centiped.c: fix generic_paletteram regression (nw)

This commit is contained in:
Alex W. Jackson 2014-05-02 15:00:29 +00:00
parent 534451c93e
commit 3f73720885
2 changed files with 14 additions and 6 deletions

View File

@ -14,17 +14,18 @@ public:
m_rambase(*this, "rambase"),
m_videoram(*this, "videoram"),
m_spriteram(*this, "spriteram"),
m_paletteram(*this, "paletteram"),
m_bullsdrt_tiles_bankram(*this, "bullsdrt_bank"),
m_maincpu(*this, "maincpu"),
m_eeprom(*this, "eeprom"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_generic_paletteram_8(*this, "paletteram") { }
m_palette(*this, "palette") { }
optional_shared_ptr<UINT8> m_rambase;
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_spriteram;
optional_shared_ptr<UINT8> m_paletteram;
optional_shared_ptr<UINT8> m_bullsdrt_tiles_bankram;
UINT8 m_oldpos[4];
@ -96,5 +97,4 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<UINT8> m_generic_paletteram_8;
};

View File

@ -204,6 +204,10 @@ WRITE8_MEMBER(centiped_state::bullsdrt_sprites_bank_w)
Centipede is unusual because the sprite color code specifies the
colors to use one by one, instead of a combination code.
FIXME: handle this using standard indirect colors instead of
custom implementation
bit 5-4 = color to use for pen 11
bit 3-2 = color to use for pen 10
bit 1-0 = color to use for pen 01
@ -213,7 +217,7 @@ WRITE8_MEMBER(centiped_state::bullsdrt_sprites_bank_w)
WRITE8_MEMBER(centiped_state::centiped_paletteram_w)
{
m_generic_paletteram_8[offset] = data;
m_paletteram[offset] = data;
/* bit 2 of the output palette RAM is always pulled high, so we ignore */
/* any palette changes unless the write is to a palette RAM address */
@ -328,6 +332,10 @@ PALETTE_INIT_MEMBER(centiped_state,warlords)
Millipede is unusual because the sprite color code specifies the
colors to use one by one, instead of a combination code.
FIXME: handle this using standard indirect colors instead of
custom implementation
bit 7-6 = palette bank (there are 4 groups of 4 colors)
bit 5-4 = color to use for pen 11
bit 3-2 = color to use for pen 10
@ -392,7 +400,7 @@ void centiped_state::milliped_set_color(offs_t offset, UINT8 data)
WRITE8_MEMBER(centiped_state::milliped_paletteram_w)
{
m_generic_paletteram_8[offset] = data;
m_paletteram[offset] = data;
milliped_set_color(offset, data);
}
@ -400,7 +408,7 @@ WRITE8_MEMBER(centiped_state::milliped_paletteram_w)
WRITE8_MEMBER(centiped_state::mazeinv_paletteram_w)
{
m_generic_paletteram_8[offset] = data;
m_paletteram[offset] = data;
/* the value passed in is a look-up index into the color PROM */
milliped_set_color(offset, ~memregion("proms")->base()[~data & 0x0f]);