Important information: this site is currently scheduled to go offline indefinitely by end of the year.

an old raw picture

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
User avatar
peter2005
advanced
Posts: 44
Joined: Fri Mar 25, 2016 8:26 am
Location: None
Has thanked: 3 times
Been thanked: 9 times

an old raw picture

Post by peter2005 »

Hi, attached is a raw picture of a red heart from an old amiga game but I haven't figured out how to properly display it.

Best I could do
Image


What's to figure out:
- resolution
- number of colors
- palette

The last 32bytes at the end of file could be palette, but 32 does not seem enough.

Any help, tips?
You do not have the required permissions to view the files attached to this post.
User avatar
piken
beginner
Posts: 22
Joined: Sat Dec 25, 2021 2:55 pm
Has thanked: 4 times
Been thanked: 11 times

Re: an old raw picture

Post by piken »

Does this look right? Tis four bitplanes, each 320x192, with indeed the palette starting at 7800h with 16-bit palette entries (in bit increasing index order: r4,g4,b4,x4) The bitplanes are stored in big endian order (x coordinate 0 is bit 7, and x coordinate 7 is bit 0). Do you have an in-game reference image from anonymous game? Memory layout is (using a pseudo language):

Code: Select all

// big endian bit layout within each byte (x=0 resides in bit=7, x=7 in bit=0)
uint1 bitplane0[320*192];
uint1 bitplane1[320*192];
uint1 bitplane2[320*192];
uint1 bitplane3[320*192];

struct r4x4b4g4 // little endian bit order here
{
    uint4 r; // byte 0, bits 0 through 3, red comes first
    uint4 x; // byte 0, bits 4 through 7, ignored bits (0's)
    uint4 b; // byte 1, bits 0 through 3
    uint4 g; // byte 1, bits 4 through 7
};
r4x4b4g4 palette[16]; // @7800h
See Amiga ACBM https://codetapper.com/amiga/maptapper/ ... /gfx-mode/.
You do not have the required permissions to view the files attached to this post.
Last edited by piken on Tue Sep 26, 2023 11:06 am, edited 2 times in total.
User avatar
peter2005
advanced
Posts: 44
Joined: Fri Mar 25, 2016 8:26 am
Location: None
Has thanked: 3 times
Been thanked: 9 times

Re: an old raw picture

Post by peter2005 »

Than you so much for your help. :]

Your picture looks very right. How did you do it?

Reference:
Image

Based on the information you provided,

I split one palette entry (2bytes) into 4x4bit color components but then the highest resulting number is 15.

Code: Select all

05 AF 0D DD-05 22 09 40-0B 70 0D A3-0A 00 02 7F 
00 3B 07 C2-05 90 03 60-01 11 03 34-05 56 09 9A
r:0xF g:0xA b:0x5
r:0xD g:0xD b:0xD
r:0x2 g:0x2 b:0x5
r:0x0 g:0x4 b:0x9

Am I interpreting the values correctly?
How do I convert these into standard RBG values?
User avatar
piken
beginner
Posts: 22
Joined: Sat Dec 25, 2021 2:55 pm
Has thanked: 4 times
Been thanked: 11 times

Re: an old raw picture

Post by piken »

Your picture looks very right. How did you do it?
I used a hacky little C++ utility I'm working on, but you can do the same with other (user friendly) tools like Maptapper (pictured below, albeit with wrong palette) and Binxelview. Expanding the palette is a tougher aspect, as I'm not seeing this option in Maptapper itself, but if you convert the palette to more typical RGB form, maybe the Palette options/menu hold promise.
I split one palette entry (2bytes) into 4x4bit color components but then the highest resulting number is 15. Am I interpreting the values correctly?
Close, just reversed. The two pertinent palette indices are 6 for the heart and 12 for the background. So index 6 should have value red=0xA (or 170 of 255).

Code: Select all

0: r:0x5 g:0xA b:0xF (85, 170, 255)
1: r:0xD g:0xD b:0xD
2: r:0x5 g:0x2 b:0x2
3: r:0x9 g:0x4 b:0x0
4: r:0xB g:0x7 b:0x0
5: r:0xD g:0xA b:0x3
6: r:0xA g:0x0 b:0x0
...
How do I convert these into standard RGB values?
Just multiply by 255/15.
You do not have the required permissions to view the files attached to this post.
Post Reply