Demo of using exomizer v3.1.0 decompression on the BBC Micro using 6502 assembler
This demo loads a fullscreen Mode 0 image into screen memory decompressing as it goes. The picture was drawn by myself in the late 80s on a BBC Micro using Wapping Editor and a Quest mouse.
In your 6502 asm project, add this to your zeropage variables:
include "exomizer310decruncher.h.asm"
And this anywhere in your code:
include "exomizer310decruncher.asm"
.my_crunched_data
INCBIN "mycruncheddata.exo"
This decruncher is hardcoded to use the bottom of the stack (&0100-&01A0, rounded up) as workspace while decompressing data (unless -P+16 is used and EXTRA_TABLE_ENTRY_FOR_LENGTH_THREE = 1). This is easily changed by modifying decrunch_table
.
Download Exomizer v3.1.0 and compress your data, with command line options in compress.sh. e.g.:
exomizer level -M256 -P-32 -c mydata.bin@0x0000 -o mycruncheddata.exo
ldx #lo(my_crunched_data)
ldy #hi(my_crunched_data)
lda #hi(&5800) ; destination for decompressed data, only hi byte needed (page)
jsr decrunch_to_page_A
Exomizer is created by Magnus Lind, with changes to allow assembling with beebasm.
With help from 0xC0DE6502