Commit Graph

1 Commits

Author SHA1 Message Date
Damian Yerrick 4504de828a cgb_boot: Compress logo with PB8
The logo is compressed using PB8, a form of RLE with unary-coded
run lengths.  Each block representing 8 bytes consists of a control
byte, where each bit (MSB to LSB) is 0 for literal or 1 for repeat
previous, followed by the literals in that block.

PB8 compression is also used in a few NES games.  A variant called
PB16, where 1 means repeat 2 bytes back, is used in the Game Boy
port of 240p Test Suite and in Libbet and the Magic Floor.

Switching from logo-compress RLE to PB8 decreases the compressed
logo data size from 287 bytes to 253 bytes, saving 34 bytes.
The decompression code is also about 10 bytes smaller.
2019-07-16 16:58:16 -04:00