| |
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.... |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
does the irq work without the loader ? does it work with a dummy irq ? (doing nothing) try to pinpoint the bug. |
| |
algorithm
Registered: May 2002 Posts: 705 |
To add to this, Are you also ensuring you run the correct load call (if depack options are enabled, make sure that you run the correct section) |
| |
Chesoner
Registered: Apr 2013 Posts: 29 |
I don't know what caused the problem but I build the loader again with more options and it is working fine now.
Thanks for the help |
| |
Chesoner
Registered: Apr 2013 Posts: 29 |
Almost there .... so here is another question :
I have now loaded a small program (with the krill loader) at a certain location and relocated to $0801 when possible. i have packed the file with pucrunch and now want the file to be decompressed while running an irq. What do i do now ?
I cannot use $080d because the irq will stop untill the file is decompressed.
Can i still use krill's loader to decompress the file and how do i do that ? |
| |
Chesoner
Registered: Apr 2013 Posts: 29 |
anyone an idea ? |
| |
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) |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next |