summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mamehaze <mamehaze@users.noreply.github.com>2014-11-26 02:38:05 +0000
committer mamehaze <mamehaze@users.noreply.github.com>2014-11-26 02:38:05 +0000
commit294f1a696f33895b98e18f44ace293cac2fb7263 (patch)
treec633cb23665be08939c4a21ecbe5d36f4e2704fa
parent402dd5aa95f02f62b3179bd9058898da49f48bd9 (diff)
fixed colours, it's xRGBRRRRGGGGBBBB but with the highest bits separated, not the lowest like the MAME format (nw)
-rw-r--r--src/mame/drivers/supduck.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/mame/drivers/supduck.c b/src/mame/drivers/supduck.c
index 1a586c9e7e4..1fab83c9772 100644
--- a/src/mame/drivers/supduck.c
+++ b/src/mame/drivers/supduck.c
@@ -237,25 +237,21 @@ WRITE16_MEMBER(supduck_state::supduck_4000_w)
}
-WRITE16_MEMBER(supduck_state::supduck_paletteram_w) // wrong
+WRITE16_MEMBER(supduck_state::supduck_paletteram_w)
{
int r, g, b;
data = COMBINE_DATA(&m_paletteram[offset]);
r = ((data >> 8) & 0x0f);
- g = ((data >> 4 ) & 0x0f);
- b = ((data >> 0 ) & 0x0f);
-
- int bright = (data & 0x7000) >> 12;
+ if (data & 0x4000) r |= 0x10;
- bright += 1;
-
- r = r * bright * 2;
- g = g * bright * 2;
- b = b * bright * 2;
+ g = ((data >> 4 ) & 0x0f);
+ if (data & 0x2000) g |= 0x10;
+ b = ((data >> 0 ) & 0x0f);
+ if (data & 0x1000) b |= 0x10;
- m_palette->set_pen_color (offset, rgb_t(r, g, b));
+ m_palette->set_pen_color (offset, rgb_t(r<<3, g<<3, b<<3));
}
WRITE16_MEMBER(supduck_state::supduck_4002_w)
@@ -275,23 +271,15 @@ WRITE16_MEMBER(supduck_state::supduck_scroll_w)
{
case 0:
m_back_tilemap->set_scrollx(0, data);
-// printf("fore x scroll %04x\n", data);
-
break;
case 1:
m_back_tilemap->set_scrolly(0, -data - 32 * 8);
-// printf("fore y scroll %04x\n", data);
-
break;
case 2:
m_fore_tilemap->set_scrollx(0, data);
-// printf("back x scroll %04x\n", data);
-
break;
case 3:
m_fore_tilemap->set_scrolly(0, -data - 32 * 8);
-// printf("back y scroll %04x\n", data);
-
break;
}
}
@@ -312,7 +300,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, supduck_state )
AM_RANGE(0xfec000, 0xfecfff) AM_RAM_WRITE(text_videoram_w) AM_SHARE("textvideoram")
AM_RANGE(0xff0000, 0xff3fff) AM_RAM_WRITE(back_videoram_w) AM_SHARE("backvideoram")
AM_RANGE(0xff4000, 0xff7fff) AM_RAM_WRITE(fore_videoram_w) AM_SHARE("forevideoram")
- AM_RANGE(0xff8000, 0xff87ff) AM_RAM_WRITE(supduck_paletteram_w) AM_SHARE("paletteram")
+ AM_RANGE(0xff8000, 0xff87ff) AM_RAM_WRITE(supduck_paletteram_w) AM_SHARE("paletteram") // AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0xffc000, 0xffffff) AM_RAM /* working RAM */
ADDRESS_MAP_END
@@ -527,7 +515,7 @@ static MACHINE_CONFIG_START( supduck, supduck_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", supduck)
MCFG_PALETTE_ADD("palette", 0x800/2)
-// MCFG_PALETTE_FORMAT(IIIIRRRRGGGGBBBB)
+// MCFG_PALETTE_FORMAT(xRGBRRRRGGGGBBBB) // can't use this, the RGB bits are the lowest bits with this format, for this game they're the highest bits
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -582,4 +570,4 @@ ROM_START( supduck )
ROM_LOAD( "1.su13", 0x00000, 0x80000, CRC(7fb1ed42) SHA1(77ec86a6454398e329066aa060e9b6a39085ce71) ) // banked sample data
ROM_END
-GAME( 1992, supduck, 0, supduck, supduck, driver_device, 0, ROT0, "Comad", "Super Duck", GAME_IMPERFECT_COLORS )
+GAME( 1992, supduck, 0, supduck, supduck, driver_device, 0, ROT0, "Comad", "Super Duck", 0 )