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 > Exomizer on-the-fly loading/decompressing
2015-09-17 14:05
cadaver

Registered: Feb 2002
Posts: 1153
Exomizer on-the-fly loading/decompressing

Hey,
anyone want to share, what is the lowest disk interleave you've managed to use with on-the-fly Exomizer decompression while loading?

I'm currently at 11, using 2-bit transfer and a lame drivecode (using jobcodes only) + 1 sector buffering. However I don't think the drivecode is the problem; if I try to decrease to IL 10 the C64 often doesn't have to wait for the drive at all for the next sector's data, but occasionally the depack will take too long, resulting in missed revolution.

I've already done some optimization to the depack routine, including inlining getting a single bit (literal/sequence decision, and reading the gamma).

Don't think I would switch to another packer just for speed, but nevertheless interested in any battle stories.
 
... 23 posts hidden. Click here to view all posts....
 
2015-09-21 17:39
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
in my world, exomizer is too slow to be used in constant-loading production, so i never would.

with some buffering, the problem is solved, instead complicated code to make it "real time".

no ?
2015-09-21 17:55
chatGPZ

Registered: Dec 2001
Posts: 11108
cadaver: make sure to also use 40 tracks then :)
2015-09-23 17:14
tlr

Registered: Sep 2003
Posts: 1714
make that 41 + kabuto's encoding scheme... ;)
2016-05-13 10:41
cadaver

Registered: Feb 2002
Posts: 1153
Minor update to this subject: dug up ideas to speed up drive->c64 sector transfer (for example Newcomer has a nice near-optimal transfer routine, and V-Max games like Rocket Ranger transfer multiple bytes per sync). Could get below interleave 10 that way. Custom decode in drivecode still wasn't necessary, as Exomizer (and potential slowing conditions like sprites) are still the bottleneck, but when the transfer is tuned for speed, it can be hard for drive to keep up, so I used a 256-byte table for speeding up the high nybble transfer. If custom GCR decode leaves high & low nybble in separate buffers, then it's probably also going to be fast enough without a large table.
2016-05-15 06:08
Krill

Registered: Apr 2002
Posts: 2839
I'm still not sure whether you're going up the right alley. Why is decoupling block download and decompression using out-of-order loading and in-place depacking between the arrival of new blocks not an option, again?
You'd combine good pack ratio and as-quick-as-possible loading times while being able to independently tune the serial transfer protocol. The sub-files must be split up into separate files, then, but the overhead should be negligible.

But another thing: I've considered patching Exomizer (and other compressors) to get rid of the "safety offset", i.e., the handful of clobbered bytes beyond the unpacked data after depacking in-place.
That is, ensure that the write (decompressed data) pointer always points to memory before the read (downloaded blocks, packed data) pointer. This requires picking different (possibly less efficient) packed representations of data, but this might not be required so often and may be relevant only when crossing block boundaries. Having looked at Exomizer more recently than i, do you think this is possible?
2016-05-15 13:20
cadaver

Registered: Feb 2002
Posts: 1153
I could examine the in-place depacking, but I'm not sure if it will work due to the safety offset requirement. For example, assume that rest of the memory is used by code, level data and graphics, and thus can't be clobbered, and I need to load & depack new music into a 2KB buffer. In worst case the music module will utilize the full 2KB.
2016-05-15 13:24
Krill

Registered: Apr 2002
Posts: 2839
But with Exomizer, this is really just a few bytes, like 3. Surely you can work around that? :)
2016-05-15 13:30
cadaver

Registered: Feb 2002
Posts: 1153
True :)

Another matter though is, that I like to keep just one copy of drivecode which I modify for 1581 & other drives, to keep the bootpart size low. The 1541-specific out-of-order scanning & possible custom decode would necessitate a whole 1541-specific second drivecode and would make the bootpart larger.

Anyway, this is already quite specific to my requirements, and in general I'm already happy with loading speed, though in theory I'm operating a technically substandard loader.
2016-05-15 13:35
Krill

Registered: Apr 2002
Posts: 2839
You can let the drives get their custom drive code directly from the disk rather than the roundabout way of loading drive-specific code into C-64 RAM, then write just a part of it back to the drive in question. This will make the boot part smaller than it is now, too.
2016-05-15 23:26
cadaver

Registered: Feb 2002
Posts: 1153
Good point, naturally the different drivecodes still exist as part of total data (which can mean few blocks less free for game data) but the initial boot-up time can be reduced that way, as I currently have quite a M-W + M-R + M-E monstrosity going on for the drive type detection on the C64 side :)
Previous - 1 | 2 | 3 | 4 - 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
cobbpg
WVL/Xenon
megasoftargentina
TheRyk/MYD!
csabanw
Rick/F4CG
Ervin/Abaddon
Guests online: 132
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 Bromance  (9.6)
10 Memento Mori  (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 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 S!R  (9.9)
3 Antitrack  (9.8)
4 Mr Zero Page  (9.8)
5 OTD  (9.8)

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