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 > Epyx RLE Packer
2024-12-28 12:40
Knight Rider

Registered: Mar 2005
Posts: 134
Epyx RLE Packer

The early Epyx (eg summer 1 +2) games seem to be packed with an RLE packer. It uses key bytes of $bf and $cf. Does anyone have the original? Or maybe wrote own ?
2024-12-28 13:41
Martin Piper

Registered: Nov 2007
Posts: 739
The original disks used this compression. Are you looking for the compression source?
2024-12-28 16:07
Knight Rider

Registered: Mar 2005
Posts: 134
I observed that the RLE packer gives better results than the one that I currently use. So was interested in experimenting with this packer. If you have the source of the pack routine, this would be great. The depack code is in the originals.
2024-12-28 18:36
Martin Piper

Registered: Nov 2007
Posts: 739
It's quite simple. 0 byte RLE sequences use $bf and count only. RLE sequences of other bytes use $cf and count and byte to write.

$990 start of RLE decompress
	$9d3 gets the next byte
		$995 compare #$bf
			If yes, get byte as count of zero bytes to write
		$9a7 compare #$cf
			If yes, get byte as count, then get byte to write for count
2024-12-28 21:39
Fungus

Registered: Sep 2002
Posts: 750
They also use delta packing. Other companies did too like Accolade.
2024-12-30 07:28
Skate

Registered: Jul 2003
Posts: 506
using RLE with more than one magic byte is new to me. i understand zero's special case but now you have more than one byte you need to escape even if there is only single one of them.

probably it's already a known method but if more than one magic byte really works better, i'd go for scanning the data and instead of zero, i'd select most recurring blocks and reserve multiple magic bytes selected from least used bytes and add a small header infront of packed data like

<number of magic bytes>
<magic byte 1 key>
<magic byte 1 value>
<magic byte 2 key>
<magic byte 2 value>
...

packer routine can try more and more number of magic bytes and stops trying when it gives a worse result. it never occured to me before, interesting.

edit: actually when i think about it a little bit more, it turns into using hash tables and stuff, other well known compression methods. :)
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
HOL2001/Quantum
ΛΛdZ
TheRyk/MYD!
New Design/Excess
Hoogo/Padua
Murphy/Exceed
d4ng3r
master_hacker
cba
Guests online: 252
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 Tim  (9.7)
4 Irata  (9.7)
5 hedning  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.039 sec.