| |
Chesoner
Registered: Apr 2013 Posts: 29 |
Krill loader not working
Hi There,
We are still strungling with the Krill loader, I have to say that we have progressed a lot but we get the following problem :
If we use the following command :
Make prg INSTALL=4000 RESIDENT=9000 zp=10
The install is working good at 4000 but the loader is still located at 0400. if we forced it to load at 9000 it ain't working.
Are we doing something wrong here ? |
|
... 55 posts hidden. Click here to view all posts.... |
| |
Knut Clausen
Registered: Apr 2013 Posts: 18 |
I don't know how that depacker works, and I'm not sure if this is what you're after, but you could depack outside of your IRQ and check within your IRQ if the content is depacked. Simple example:
lda #<IRQ
sta $fffe
lda #>IRQ
sta $ffff
lda #rasterPos
sta $d012
cli
jsr $080d
inc depackDone
jmp *
depackDone:
.byte 0
IRQ:
..
lda depackDone
beq notDone
jmp setupNextPart
notDone:
// continue running this IRQ
edit: The loader can depack as part of the loading process, but I'm not very familiar with loaders, so I can't give any input on that. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
self depacking prg files is not the way, they assume they have the whole machine themselves, so they can not live within an "irq loader"/"trackmo" enviroment.
there are packers which can pack data on the pc side, then you put it into a d64, and use the accompanied depacker code to inflate what has been loaded.
krill's loader can do this too, it has built in depackers, which can depacj while/after loading IIRC. but never used that so cant help with that. |
| |
Firehawk
Registered: Aug 2011 Posts: 31 |
You can use the load_compd call in krillloader to automatically depack the file on-the-fly (you need to recompile the loader with the option turned on). You must pack without basic-start, in puchrunch I belive the option is -c (check this). This works in exomizer also. You can run the irq during this load/decompress, but beware not to stall the loader (cpu starvation from too little time outside irq), as the load will fail, and the drive will reset (or so I've heard).
Good luck.
PS! I would advise you to put the loader on either a very low address (i.e. $0400) or very high address (i.e. $c000), otherwise you will constraint the next loaded part to be below the stated value (in your case $9000) both in compressed and decompressed mode. |
| |
Chesoner
Registered: Apr 2013 Posts: 29 |
Thanks for the replies. Indeed I tried to depack with jsr $080d outside of the irq but the irq will stop for a moment and continue when the file is depacked.
I've searched for documentation of the krill loader to depack the file after it is loaded but there is almost no documentation of that loader. if someone could point me to the right direction I would be a happy person :)
I have the same routine as Knut Clausen but when i use the jsr $080d outside the irq like his routine the irq will stop for a moment. I only use 0314 instead of fffe, I can try that but i don't think that it's the solution. |
| |
algorithm
Registered: May 2002 Posts: 705 |
Once the loader is setup to allow decompression and loading on the fly, an example below
data file to be loaded "test.raw" $2000-$3ffc (containing lo/hibyte of start at beginning
exomizer -f test.raw comp.01
then simply call the compressedload call with the file name and it will depack and load to $2000-$3ffc with forward depack (allow some extra bytes at the end) |
| |
algorithm
Registered: May 2002 Posts: 705 |
Sorry, should be something like exomizer mem -f test.raw -ocomp.01 |
| |
Bitbreaker
Registered: Oct 2002 Posts: 508 |
The drive reset only happens if you keep the watchdog option enabled. It has been discussed many times :-) Also. in general, no problem with starting a SFX, but one needs to take care that if things get depacked under IO, that the IRQ is safe with $01 being #$34, also usually the SFX extractors lock the IRQ, one needs to remove the SEI to keep the irq running. Better choice is to do levepacked files, means files without an own decompression code per file. Many packers support that and many packers also include a decompression code for standalone use, in case of loadcompd (load and depacking on the fly) the decompressors are even integrated into Krill's loader for a bunch of packers. There's all the comfort one can think of. Btw.: Placing the loader at $c000 is even more of a hindrance, the mem above is not bad or smelly, it's there and usable. |
| |
Chesoner
Registered: Apr 2013 Posts: 29 |
After a lot of testing it looks like kickassembler/krill with winvice is not a great combination. if I attach the drive and set true drive emulation on in winvice and start code with kickassembler it is kind of random if it will load and decrunch a file from the attached drive correct. If i put all the files on a d64 en start the coding from the d64 file it will load/decrunch good.
I can't see why this is but at least it is working. |
| |
Count Zero
Registered: Jan 2003 Posts: 1932 |
Did you make sure that virtual device traps in vice are disabled and no 2nd drive is enabled? |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:and start code with kickassembler
???? |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |