[Coco] Help with algorithm in assembly...

Lee leep at tigerbase.com
Sat Oct 15 11:59:31 EDT 2022


I'm attempting this myself, but I want to throw it out here for those that
like a challenge, and because I'll probably get better ideas from all of
you than what I come up with myself. 😀 Here's the scenario:

I have a 16x16 image loaded into an 8*16 (128) byte buffer (tileBuffer).
Each 8 bytes represents a 16-pixel row. Each 2 bytes in that row represent
a color plane of bits for 16 pixels. The first 2 bytes are the red bits,
next are green bits, then blue, then the last 2 bytes are intensity.

I need to "decode" this into another 8*16 (128) byte buffer. Each 8 bytes
represents a 16 pixel row. Each nibble (4 bits) holds the
red/green/blue/intensity bits for a single pixel. This buffer is at an
offset (tileIndex*8*16, tileIndex is 1 byte) in a larger buffer that holds
64 tiles (tileData).

6309 instructions are available for use.

-----
Lee


More information about the Coco mailing list