Skip to content
/ cap Public
forked from svendahl/cap

The aPLib compression algorithm adapted for the Commodore c64 / c128.

Notifications You must be signed in to change notification settings

uniabis/cap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aplibsharp

aplibsharp is an open source version of Jørgen Ibsen's aPLib compression library.
The goal of aplibsharp is to approach* maximum compression ratio within the constraints of the aPLib format.

Directory structure

Directory Description
aplib the compression library
appack console application
cap c64 specific console application
depackers depackers for various architectures

appack usage

Compress file:

appack e infile outfile

Decompress file:

appack d infile outfile

cap usage

Compress file:

cap e infile outfile

Decompress file:

cap d infile outfile

Compress executable ($0200–$FFF?)**

cap x --s=64738 --c=55 --i=1 inprg outprg

Flags:
-s - jump address
-c - cpu port register
-i - interrupt flag
Flags supports decimal and 0x-prefixed hexadecimal values.

License

aplibsharp, appack and cap are released under the MIT license.
Depackers are Copyright © of the respective authors

Credits

Suffix Array by Yuta Mori
z80 depacker by Antonio José Villena Godoy

Notes

(*) Two constants needs to be edited in aplib/constant.cs to actually reach optimal compression ratio. By default these are set to shorten encoding time. File size increase is usually about a pcm due to this.
(**) Care need to be taken when compressing c64 files near top of memory. Incompressible data might cause source and destination to intersect during decompression.
This library has been tested quite extensively. Please contact me should you find a file that doesn't compress correctly using this library.

About

The aPLib compression algorithm adapted for the Commodore c64 / c128.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 84.1%
  • Assembly 15.6%
  • Other 0.3%