summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2014-03-02 18:54:17 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2014-03-02 18:54:17 +0000
commit3e4d318b7956b4eca8dd72b67d9b6b5f7e065aaa (patch)
treec1425fbe8d36b0a1e68d04681df0decb8ea47e93
parent56ff58c009eb8aee062059f854a641b41c112890 (diff)
dec0 fixed (nw)
-rw-r--r--src/mame/drivers/dec0.c13
-rw-r--r--src/mame/includes/dec0.h2
-rw-r--r--src/mame/video/dec0.c5
3 files changed, 15 insertions, 5 deletions
diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c
index f22e519b53a..0b72a0c40bf 100644
--- a/src/mame/drivers/dec0.c
+++ b/src/mame/drivers/dec0.c
@@ -581,7 +581,7 @@ ADDRESS_MAP_END
READ16_MEMBER( dec0_automat_state::automat_palette_r )
{
offset ^=0xf;
- return m_generic_paletteram_16[offset];
+ return m_paletteram[offset];
}
WRITE16_MEMBER( dec0_automat_state::automat_palette_w )
@@ -617,7 +617,7 @@ static ADDRESS_MAP_START( automat_map, AS_PROGRAM, 16, dec0_automat_state )
AM_RANGE(0x300000, 0x30001f) AM_READ(dec0_rotary_r)
AM_RANGE(0x30c000, 0x30c00b) AM_READ(dec0_controls_r)
AM_RANGE(0x30c000, 0x30c01f) AM_WRITE(automat_control_w) /* Priority, sound, etc. */
- AM_RANGE(0x310000, 0x3107ff) AM_READWRITE(automat_palette_r, automat_palette_w) AM_SHARE("paletteram")
+ AM_RANGE(0x310000, 0x3107ff) AM_READWRITE(automat_palette_r, automat_palette_w)
AM_RANGE(0x314000, 0x3147ff) AM_RAM
// video regs are moved to here..
@@ -651,7 +651,7 @@ static ADDRESS_MAP_START( secretab_map, AS_PROGRAM, 16, dec0_automat_state )
AM_RANGE(0x300c00, 0x300fff) AM_RAM
AM_RANGE(0x301000, 0x3017ff) AM_DEVREADWRITE("tilegen3", deco_bac06_device, pf_data_r, pf_data_w)
AM_RANGE(0x301800, 0x307fff) AM_RAM AM_SHARE("ram") /* Sly spy main ram */
- AM_RANGE(0x310000, 0x3107ff) AM_READWRITE(automat_palette_r, automat_palette_w) AM_SHARE("paletteram")
+ AM_RANGE(0x310000, 0x3107ff) AM_READWRITE(automat_palette_r, automat_palette_w)
AM_RANGE(0xb08000, 0xb08fff) AM_RAM AM_SHARE("spriteram") /* Sprites */
ADDRESS_MAP_END
@@ -1415,7 +1415,7 @@ static MACHINE_CONFIG_START( automat, dec0_automat_state )
// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 57.41 Hz, 529us Vblank */)
MCFG_SCREEN_RAW_PARAMS(DEC0_PIXEL_CLOCK,DEC0_HTOTAL,DEC0_HBEND,DEC0_HBSTART,DEC0_VTOTAL,DEC0_VBEND,DEC0_VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(dec0_automat_state, screen_update_automat)
- MCFG_VIDEO_START_OVERRIDE(dec0_state,dec0_nodma)
+ MCFG_VIDEO_START_OVERRIDE(dec0_automat_state,automat)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
@@ -1433,6 +1433,8 @@ static MACHINE_CONFIG_START( automat, dec0_automat_state )
MCFG_DECO_MXC06_PALETTE("palette")
MCFG_PALETTE_ADD("palette", 1024)
+ MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
+
MCFG_GFXDECODE_ADD("gfxdecode", automat)
/* sound hardware */
@@ -1472,7 +1474,7 @@ static MACHINE_CONFIG_START( secretab, dec0_automat_state )
// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 57.41 Hz, 529us Vblank */)
MCFG_SCREEN_RAW_PARAMS(DEC0_PIXEL_CLOCK,DEC0_HTOTAL,DEC0_HBEND,DEC0_HBSTART,DEC0_VTOTAL,DEC0_VBEND,DEC0_VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(dec0_automat_state, screen_update_secretab)
- MCFG_VIDEO_START_OVERRIDE(dec0_state,dec0_nodma)
+ MCFG_VIDEO_START_OVERRIDE(dec0_automat_state,automat)
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
deco_bac06_device::set_gfx_region_wide(*device,0,0,0);
@@ -1491,6 +1493,7 @@ static MACHINE_CONFIG_START( secretab, dec0_automat_state )
MCFG_PALETTE_ADD("palette", 1024)
+ MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
MCFG_GFXDECODE_ADD("gfxdecode", secretab)
/* sound hardware */
diff --git a/src/mame/includes/dec0.h b/src/mame/includes/dec0.h
index ba3623db17c..2b014aa167f 100644
--- a/src/mame/includes/dec0.h
+++ b/src/mame/includes/dec0.h
@@ -25,6 +25,8 @@ public:
required_shared_ptr<UINT16> m_spriteram;
optional_shared_ptr<UINT8> m_robocop_shared_ram;
optional_shared_ptr<UINT8> m_hippodrm_shared_ram;
+ dynamic_array<UINT16> m_paletteram;
+ dynamic_array<UINT16> m_paletteram_ext;
optional_device<deco_bac06_device> m_tilegen1;
optional_device<deco_bac06_device> m_tilegen2;
diff --git a/src/mame/video/dec0.c b/src/mame/video/dec0.c
index 6df6216bde8..c6a03e56655 100644
--- a/src/mame/video/dec0.c
+++ b/src/mame/video/dec0.c
@@ -375,6 +375,11 @@ VIDEO_START_MEMBER(dec0_state,dec0)
VIDEO_START_MEMBER(dec0_automat_state,automat)
{
+ VIDEO_START_CALL_MEMBER(dec0_nodma);
+ m_paletteram.resize(0x800);
+ m_palette->basemem().set(m_paletteram, ENDIANNESS_BIG, 2);
+
+ save_item(NAME(m_paletteram));
}
/******************************************************************************/