diff --git a/src/emu/emupal.h b/src/emu/emupal.h index c75c4f7704b..0e1e8c57eb5 100644 --- a/src/emu/emupal.h +++ b/src/emu/emupal.h @@ -119,6 +119,9 @@ #define PALETTE_FORMAT_BBGGGRRR raw_to_rgb_converter(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 0,3,6>) #define PALETTE_FORMAT_RRRGGGBB raw_to_rgb_converter(1, &raw_to_rgb_converter::standard_rgb_decoder<3,3,2, 5,2,0>) +// data-inverted 3-3-2 formats +#define PALETTE_FORMAT_BBGGGRRR_inverted raw_to_rgb_converter(1, &raw_to_rgb_converter::inverted_rgb_decoder<3,3,2, 0,3,6>) + // standard 2-2-2-2 formats #define PALETTE_FORMAT_BBGGRRII raw_to_rgb_converter(1, &raw_to_rgb_converter::BBGGRRII_decoder) diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c index 24d30fab933..9e0b2b7d644 100644 --- a/src/mame/drivers/liberate.c +++ b/src/mame/drivers/liberate.c @@ -237,7 +237,7 @@ WRITE8_MEMBER(liberate_state::prosport_charram_w) *************************************/ static ADDRESS_MAP_START( prosport_map, AS_PROGRAM, 8, liberate_state ) - AM_RANGE(0x0200, 0x021f) AM_RAM_WRITE(prosport_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0x0200, 0x021f) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x2000) AM_RAM AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(prosport_bg_vram_w) AM_SHARE("bg_vram") AM_RANGE(0x0800, 0x1fff) AM_READWRITE(prosport_charram_r,prosport_charram_w) //0x1e00-0x1fff isn't charram! @@ -836,6 +836,7 @@ static MACHINE_CONFIG_START( prosport, liberate_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", prosport) MCFG_PALETTE_ADD("palette", 256) + MCFG_PALETTE_FORMAT(BBGGGRRR_inverted) MCFG_VIDEO_START_OVERRIDE(liberate_state,prosport) diff --git a/src/mame/includes/liberate.h b/src/mame/includes/liberate.h index 442c5ca5b70..c86a926b090 100644 --- a/src/mame/includes/liberate.h +++ b/src/mame/includes/liberate.h @@ -5,7 +5,6 @@ class liberate_state : public driver_device public: liberate_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_paletteram(*this, "paletteram"), m_bg_vram(*this, "bg_vram"), m_colorram(*this, "colorram"), m_videoram(*this, "videoram"), @@ -17,7 +16,6 @@ public: m_palette(*this, "palette"), m_decrypted_opcodes(*this, "decrypted_opcodes") { } - optional_shared_ptr m_paletteram; optional_shared_ptr m_bg_vram; /* prosport */ required_shared_ptr m_colorram; required_shared_ptr m_videoram; @@ -59,7 +57,6 @@ public: DECLARE_WRITE8_MEMBER(liberate_videoram_w); DECLARE_WRITE8_MEMBER(liberate_colorram_w); DECLARE_WRITE8_MEMBER(prosport_bg_vram_w); - DECLARE_WRITE8_MEMBER(prosport_paletteram_w); DECLARE_DRIVER_INIT(yellowcb); DECLARE_DRIVER_INIT(liberate); DECLARE_DRIVER_INIT(prosport); diff --git a/src/mame/video/liberate.c b/src/mame/video/liberate.c index 0b49699cf2b..55011e47c58 100644 --- a/src/mame/video/liberate.c +++ b/src/mame/video/liberate.c @@ -243,14 +243,6 @@ VIDEO_START_MEMBER(liberate_state,prosport) /***************************************************************************/ -WRITE8_MEMBER(liberate_state::prosport_paletteram_w) -{ - m_paletteram[offset] = data; - - /* RGB output is inverted */ - m_palette->set_pen_color(offset, pal3bit(~data >> 0), pal3bit(~data >> 3), pal2bit(~data >> 6)); -} - PALETTE_INIT_MEMBER(liberate_state,liberate) { const UINT8 *color_prom = memregion("proms")->base();