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: 133
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: 726
The original disks used this compression. Are you looking for the compression source?
2024-12-28 16:07
Knight Rider

Registered: Mar 2005
Posts: 133
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: 726
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: 691
They also use delta packing. Other companies did too like Accolade.
2024-12-30 07:28
Skate

Registered: Jul 2003
Posts: 495
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
The Syndrom/TIA/Pret..
CA$H/TRiAD
kbs/Pht/Lxt
Knut Clausen/SHAPE/F..
Scrap/Genesis Project
MCM/ONSLAUGHT
SplAtterpunk
Acidchild/Padua
Scrapper
Guests online: 120
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.6)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Sprite Bukkake 2  (9.6)
9 Uncensored  (9.6)
10 Comaland 100%  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 Morph  (9.5)
7 Dawnfall V1.1  (9.5)
8 Libertongo  (9.5)
9 Katzen-Video.mp4  (9.5)
10 Onscreen 5k  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Fairlight  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Jammer  (9.6)

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