Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Krill loader not working
2014-10-19 20:28
Chesoner
Account closed

Registered: Apr 2013
Posts: 28
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....
 
2014-11-24 07:48
Oswald

Registered: Apr 2002
Posts: 5018
does the irq work without the loader ? does it work with a dummy irq ? (doing nothing) try to pinpoint the bug.
2014-11-24 13:35
algorithm

Registered: May 2002
Posts: 702
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)
2014-11-25 07:43
Chesoner
Account closed

Registered: Apr 2013
Posts: 28
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
2014-11-25 19:47
Chesoner
Account closed

Registered: Apr 2013
Posts: 28
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 ?
2014-11-26 11:04
Chesoner
Account closed

Registered: Apr 2013
Posts: 28
anyone an idea ?
2014-11-26 11:27
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.
2014-11-26 11:39
Oswald

Registered: Apr 2002
Posts: 5018
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.
2014-11-26 11:50
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.
2014-11-26 17:36
Chesoner
Account closed

Registered: Apr 2013
Posts: 28
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.
2014-11-26 17:46
algorithm

Registered: May 2002
Posts: 702
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
DKT/Samar
Sentinel/Excess/TREX
Picrard/Mayday
Bansai/BSILabs
Alakran_64
t0m3000/ibex-crew
Nordischsound/Hokuto..
Frida Katarina
Tim/Silicon Limited
Didi/Laxity
Guests online: 158
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Original Suppliers
1 Black Beard  (9.7)
2 Derbyshire Ram  (9.5)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Irata  (8.5)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.045 sec.