[Coco] Help with algorithm in assembly...
Walter ZAMBOTTI
zambotti at iinet.net.au
Sun Oct 16 21:04:27 EDT 2022
I think your forgetting the CoCo 16 color per pixel mode doesn't map
directly to RGB values directly.
The values map to a palette which in turn provides the RGB value.
Which means unless you create palette values that coincide with RGB
values your technique wont work.
Another way to tackle this is to load your image into GIMP and then tell
GIMP to convert the image to a 16 or 15(+transparency) color image.
Once GIMP has this new palette remember to choose it when processing
subsequent images.
GIMP will determine the best 15/16 colors that will recreate your
original image and provide you the list of colors in the new palette.
You can then find the closest colors in the CoCo palette.
So do all your conversions before hand rather than on the fly.
On 15/10/22 23:59, Lee via Coco wrote:
> 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