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

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....
 
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: 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.
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

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.
2014-11-26 17:46
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)
2014-11-26 17:47
algorithm

Registered: May 2002
Posts: 705
Sorry, should be something like exomizer mem -f test.raw -ocomp.01
2014-11-27 07:58
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.
2014-12-03 20:45
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.
2014-12-03 21:41
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?
2014-12-03 23:37
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:
and start code with kickassembler

????
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
DJ Gruby/TRiAD
Sulevi/Virtual Dreams
chancer
Guests online: 144
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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