Elektrine lite

← Feed

@tattlemuss@mastodon.gamedev.place

Post #1943913

2026-02-06 22:03 UTC

the purpose of this exercise is to compress my decode table -- I don't want a 64K array of decoder function indices. The previous image showed that there is 2D structure in the bit pattern -- every 512 values there is repetition. In this image I swizzle the opcode values using bitshifts, and making each row 64 values wide. It turns out that 75% of the 1024 rows always have the same value in every column. This should allow me to shrink the table to about 17.4K with a simple lookup.

Replies (1)

  • And there is an added bonus: after switching over to this new scheme, I noticed that a lot of the "unpackable" blocks of 64 entries were actually the same. In fact, of the 244 original unpacked blocks there are only 72 really unique ones. By tweaking my table generator to remap these repetitions, my table data now occupies 7.6K rather than the original 64K. The runtime cost is some bit swizzles and an extra table lookup when looking in an "unpacked" block. Win! #atari

    Open ##1943914