mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
liberate: use palette device for palette ram for prosport
This commit is contained in:
parent
6f68656e05
commit
4460ea60b3
@ -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_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>)
|
#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
|
// standard 2-2-2-2 formats
|
||||||
#define PALETTE_FORMAT_BBGGRRII raw_to_rgb_converter(1, &raw_to_rgb_converter::BBGGRRII_decoder)
|
#define PALETTE_FORMAT_BBGGRRII raw_to_rgb_converter(1, &raw_to_rgb_converter::BBGGRRII_decoder)
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ WRITE8_MEMBER(liberate_state::prosport_charram_w)
|
|||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
static ADDRESS_MAP_START( prosport_map, AS_PROGRAM, 8, liberate_state )
|
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(0x0000, 0x03ff) AM_MIRROR(0x2000) AM_RAM
|
||||||
AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(prosport_bg_vram_w) AM_SHARE("bg_vram")
|
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!
|
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_GFXDECODE_ADD("gfxdecode", "palette", prosport)
|
||||||
MCFG_PALETTE_ADD("palette", 256)
|
MCFG_PALETTE_ADD("palette", 256)
|
||||||
|
MCFG_PALETTE_FORMAT(BBGGGRRR_inverted)
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(liberate_state,prosport)
|
MCFG_VIDEO_START_OVERRIDE(liberate_state,prosport)
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ class liberate_state : public driver_device
|
|||||||
public:
|
public:
|
||||||
liberate_state(const machine_config &mconfig, device_type type, const char *tag)
|
liberate_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_paletteram(*this, "paletteram"),
|
|
||||||
m_bg_vram(*this, "bg_vram"),
|
m_bg_vram(*this, "bg_vram"),
|
||||||
m_colorram(*this, "colorram"),
|
m_colorram(*this, "colorram"),
|
||||||
m_videoram(*this, "videoram"),
|
m_videoram(*this, "videoram"),
|
||||||
@ -17,7 +16,6 @@ public:
|
|||||||
m_palette(*this, "palette"),
|
m_palette(*this, "palette"),
|
||||||
m_decrypted_opcodes(*this, "decrypted_opcodes") { }
|
m_decrypted_opcodes(*this, "decrypted_opcodes") { }
|
||||||
|
|
||||||
optional_shared_ptr<UINT8> m_paletteram;
|
|
||||||
optional_shared_ptr<UINT8> m_bg_vram; /* prosport */
|
optional_shared_ptr<UINT8> m_bg_vram; /* prosport */
|
||||||
required_shared_ptr<UINT8> m_colorram;
|
required_shared_ptr<UINT8> m_colorram;
|
||||||
required_shared_ptr<UINT8> m_videoram;
|
required_shared_ptr<UINT8> m_videoram;
|
||||||
@ -59,7 +57,6 @@ public:
|
|||||||
DECLARE_WRITE8_MEMBER(liberate_videoram_w);
|
DECLARE_WRITE8_MEMBER(liberate_videoram_w);
|
||||||
DECLARE_WRITE8_MEMBER(liberate_colorram_w);
|
DECLARE_WRITE8_MEMBER(liberate_colorram_w);
|
||||||
DECLARE_WRITE8_MEMBER(prosport_bg_vram_w);
|
DECLARE_WRITE8_MEMBER(prosport_bg_vram_w);
|
||||||
DECLARE_WRITE8_MEMBER(prosport_paletteram_w);
|
|
||||||
DECLARE_DRIVER_INIT(yellowcb);
|
DECLARE_DRIVER_INIT(yellowcb);
|
||||||
DECLARE_DRIVER_INIT(liberate);
|
DECLARE_DRIVER_INIT(liberate);
|
||||||
DECLARE_DRIVER_INIT(prosport);
|
DECLARE_DRIVER_INIT(prosport);
|
||||||
|
@ -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)
|
PALETTE_INIT_MEMBER(liberate_state,liberate)
|
||||||
{
|
{
|
||||||
const UINT8 *color_prom = memregion("proms")->base();
|
const UINT8 *color_prom = memregion("proms")->base();
|
||||||
|
Loading…
Reference in New Issue
Block a user