mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
this should be the correct palette formula according to schematics
This commit is contained in:
parent
02b2ba8a6d
commit
9d8d924418
@ -131,16 +131,23 @@ WRITE16_HANDLER( bionicc_txvideoram_w )
|
|||||||
|
|
||||||
WRITE16_HANDLER( bionicc_paletteram_w )
|
WRITE16_HANDLER( bionicc_paletteram_w )
|
||||||
{
|
{
|
||||||
int red, green, blue, bright;
|
int r, g, b, bright;
|
||||||
data = COMBINE_DATA(&paletteram16[offset]);
|
data = COMBINE_DATA(&paletteram16[offset]);
|
||||||
|
|
||||||
bright = 0x10 + (data&0x0f);
|
bright = (data&0x0f);
|
||||||
|
|
||||||
red = ((data>>12)&0x0f) * bright * 0x11 / 0x1f;
|
r = ((data>>12)&0x0f) * 0x11;
|
||||||
green = ((data>>8 )&0x0f) * bright * 0x11 / 0x1f;
|
g = ((data>>8 )&0x0f) * 0x11;
|
||||||
blue = ((data>>4 )&0x0f) * bright * 0x11 / 0x1f;
|
b = ((data>>4 )&0x0f) * 0x11;
|
||||||
|
|
||||||
palette_set_color (machine, offset, MAKE_RGB(red, green, blue));
|
if ((bright & 0x08) == 0)
|
||||||
|
{
|
||||||
|
r = r * (0x07 + bright) / 0x0e;
|
||||||
|
g = g * (0x07 + bright) / 0x0e;
|
||||||
|
b = b * (0x07 + bright) / 0x0e;
|
||||||
|
}
|
||||||
|
|
||||||
|
palette_set_color (machine, offset, MAKE_RGB(r, g, b));
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_HANDLER( bionicc_scroll_w )
|
WRITE16_HANDLER( bionicc_scroll_w )
|
||||||
|
Loading…
Reference in New Issue
Block a user