Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user tubesockor ! (Registered 2024-05-12) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Decrunching from ram with Exomizer 1.1.5
2007-04-29 08:50
Mantiz
Account closed

Registered: Apr 2006
Posts: 36
Decrunching from ram with Exomizer 1.1.5

Howdy!

I have tried to study the tutorial for quite a long time how to decrunch and run a file from ram with Exomizer, and I've reached a point where I just about have had enough. I just don't get it. The docs and decruncher sources are like hebrew with a lot of text but makes very little sense to me. Implement a get_byte routine? zp_len_lo? I admit I have always had difficulties to understand other peoples code most of the time so that could be a big part of the problem I'm having. Okay okay, I've had problems understanding my own code too but that's another story :)

I've got a file which I have crunched with the -l parameter and put it at $9000. At some point in a demopart (like pressing space or whatever), I would like to call the decruncher to work on that data and the execute the results. I understand I have to put the decruncher in a safe area which won't be overwritten. The uncrunched data will fit between ~0800-~8000 something. But how to feed the decruncher with the location and range of the data that it should decrunch and where the results should go? And how do I get the thing to cooperate? :)

Many thanks,
Mantiz
2007-04-29 09:25
Mace

Registered: May 2002
Posts: 1799
Did you check the source code?

; zero page addresses used
; -------------------------------------------------------------------
exod_zp_len_lo = $a7

exod_zp_src_lo  = $ae
exod_zp_src_hi  = exod_zp_src_lo + 1

exod_zp_bits_hi = $fc

exod_zp_bitbuf  = $fd
exod_zp_dest_lo = exod_zp_bitbuf + 1	; dest addr lo
exod_zp_dest_hi = exod_zp_bitbuf + 2	; dest addr hi

exod_tabl_bi = exod_decrunch_table
exod_tabl_lo = exod_decrunch_table + 52
exod_tabl_hi = exod_decrunch_table + 104

This looks like you have to put the 'source' in $ae/$af and the destination in $fe/$ff.
2007-04-29 10:04
Raf

Registered: Nov 2003
Posts: 343
now I don't remember how it all looked like exactly , but I used exo 1.1.5 in '69 positions' so you may have a look into source code I released - it works okay in the collection - I load packed music using fastload to $c100 or so and then I do memory-to-memory unpack (music is placed @ $1000)
However I remeber that one address in original depacker's soure has got reversed lo/hi nibble ;-) this confused me a lot when I started using exomizer.

www.vulture.c64.org
2007-04-29 10:21
cadaver

Registered: Feb 2002
Posts: 1153
No, you don't have to put anything into the ZP variables, as src/dest addresses are contained within the crunched datastream. Just make sure you don't use those areas for something important you need preserved, and that there's enough space reserved for exod_decrunch_table (all 3 sub-tables are same size, so 156 bytes total). Isn't there a sample getbyte routine? Like..

getbyte:
lda $9000
inc getbyte+1
bne getbyte_ok
inc getbyte+2
getbyte_ok:
rts

So the idea is to return the next byte of datastream in A and you're not allowed to touch the carry flag.

I never remember though, if you should use the forward- or backward-crunching datastream, and if it has changed in new exomizers. In old versions it was backwards I think. But you can try both until it works :)
2007-04-29 11:41
Mantiz
Account closed

Registered: Apr 2006
Posts: 36
You guys are simply the best. I finally got it to work.

Mace: I had read the sourcecode but I didn't get much smarter from that. The zeropage adresses confused me a lot, I didn't understand they were handled automatically by the datastream so I got very frustrated since it crashed no matter how I'd set them up.

Raf: Very kind of you to share the whole source to the public. And I must tell you that even if my Polish could need some polishing (oh how funny I am), I really see that one day I need to learn to write more structured sources. The stuff I write ends up in a mess within the main file.

Cadaver, finally: You helped me understand my biggest error I made from the whole beginning. It was indeed a backwards crunched datafile you needed to make it work with no mysterious crashes.

I owe you all a big thank you.
/Mantiz
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
Scorpie/F4CG
Higgie/Kraze/Onslaught
rtiainen
Jammer
Visage/Lethargy
iAN CooG/HVSC
Youth
E$G/hOKUtO fOrcE
CopAss/Leader
cg/Censor Design
Pex Mahoney ../Mahon..
sebalozlepsi
Korodny
jmin
Mibri/ATL^MSL^PRX
Apollyon/ALD
Bob/Censor Design
xahmol
Dave/SIDNIFY
Guests online: 146
Top Demos
1 13:37  (9.9)
2 Next Level  (9.8)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 No Bounds  (9.6)
8 Uncensored  (9.6)
9 Wonderland XIV  (9.6)
10 Multiverse 100%  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Layers  (9.6)
5 Copper Booze  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

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