summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2018-02-16 21:34:08 +0900
committer ajrhacker <ajrhacker@users.noreply.github.com>2018-02-16 07:34:08 -0500
commit94ba7476a2464b40b55a96dcd6f3d9bad19738a0 (patch)
tree488c6515fab675c43ec4f6ee099b8b10e0771252
parent46ec69b5b15dff088b2592cb347ac4524df6b479 (diff)
rohga : Cleanup IO and Protection Handling, Cleanup duplicates, Add notes, Remove outdated comments (#3215)
-rw-r--r--src/mame/drivers/rohga.cpp207
-rw-r--r--src/mame/includes/rohga.h49
-rw-r--r--src/mame/video/rohga.cpp106
3 files changed, 144 insertions, 218 deletions
diff --git a/src/mame/drivers/rohga.cpp b/src/mame/drivers/rohga.cpp
index b97ba1f3a02..2f15b703ceb 100644
--- a/src/mame/drivers/rohga.cpp
+++ b/src/mame/drivers/rohga.cpp
@@ -14,9 +14,6 @@
Todo: Sprite priority errors in Nitro Ball.
- Todo: There is some kind of full-screen flash in Rohga when you die,
- not emulated.
-
Schmeiser Robo runs on a slightly modified Rohga pcb.
Emulation by Bryan McPhail, mish@tendril.co.uk
@@ -116,11 +113,10 @@
#include "cpu/m68000/m68000.h"
#include "cpu/h6280/h6280.h"
#include "machine/decocrpt.h"
-#include "machine/gen_latch.h"
#include "sound/ym2151.h"
-#include "sound/okim6295.h"
#include "screen.h"
#include "speaker.h"
+#include <algorithm>
READ16_MEMBER(rohga_state::rohga_irq_ack_r)
@@ -139,13 +135,31 @@ WRITE16_MEMBER(rohga_state::wizdfire_irq_ack_w)
/**********************************************************************************/
+READ16_MEMBER( rohga_state::ioprot_r )
+{
+ int real_address = 0 + (offset *2);
+ int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
+ uint8_t cs = 0;
+ uint16_t data = m_ioprot->read_data( deco146_addr, mem_mask, cs );
+ return data;
+}
+
+WRITE16_MEMBER( rohga_state::ioprot_w )
+{
+ int real_address = 0 + (offset *2);
+ int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
+ uint8_t cs = 0;
+ m_ioprot->write_data( space, deco146_addr, data, mem_mask, cs );
+}
+
+
ADDRESS_MAP_START(rohga_state::rohga_map)
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("tilegen1", deco16ic_device, pf_control_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("tilegen2", deco16ic_device, pf_control_w)
- AM_RANGE(0x280000, 0x283fff) AM_READWRITE(wf_protection_region_0_104_r,wf_protection_region_0_104_w) AM_SHARE("prot16ram") /* Protection device */
+ AM_RANGE(0x280000, 0x283fff) AM_READWRITE(ioprot_r,ioprot_w) AM_SHARE("prot16ram") /* Protection device */
AM_RANGE(0x2c0000, 0x2c0001) AM_READ_PORT("DSW3")
@@ -166,28 +180,11 @@ ADDRESS_MAP_START(rohga_state::rohga_map)
AM_RANGE(0x3cc000, 0x3ccfff) AM_MIRROR(0x1000) AM_RAM AM_SHARE("pf3_rowscroll")
AM_RANGE(0x3ce000, 0x3cefff) AM_MIRROR(0x1000) AM_RAM AM_SHARE("pf4_rowscroll")
- AM_RANGE(0x3d0000, 0x3d07ff) AM_RAM AM_SHARE("spriteram")
+ AM_RANGE(0x3d0000, 0x3d07ff) AM_RAM AM_SHARE("spriteram1")
AM_RANGE(0x3e0000, 0x3e1fff) AM_RAM_DEVWRITE("deco_common", decocomn_device, buffered_palette_w) AM_SHARE("paletteram")
AM_RANGE(0x3f0000, 0x3f3fff) AM_RAM /* Main ram */
ADDRESS_MAP_END
-READ16_MEMBER( rohga_state::wf_protection_region_0_104_r )
-{
- int real_address = 0 + (offset *2);
- int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
- uint8_t cs = 0;
- uint16_t data = m_deco104->read_data( deco146_addr, mem_mask, cs );
- return data;
-}
-
-WRITE16_MEMBER( rohga_state::wf_protection_region_0_104_w )
-{
- int real_address = 0 + (offset *2);
- int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
- uint8_t cs = 0;
- m_deco104->write_data( space, deco146_addr, data, mem_mask, cs );
-}
-
ADDRESS_MAP_START(rohga_state::wizdfire_map)
AM_RANGE(0x000000, 0x1fffff) AM_ROM
@@ -208,8 +205,8 @@ ADDRESS_MAP_START(rohga_state::wizdfire_map)
AM_RANGE(0x320002, 0x320003) AM_WRITENOP /* ? */
AM_RANGE(0x320004, 0x320005) AM_WRITE(wizdfire_irq_ack_w) /* VBL IRQ ack */
- AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x350000, 0x350001) AM_DEVWRITE("spriteram", buffered_spriteram16_device, write) /* Triggers DMA for spriteram */
+ AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_SHARE("spriteram1")
+ AM_RANGE(0x350000, 0x350001) AM_DEVWRITE("spriteram1", buffered_spriteram16_device, write) /* Triggers DMA for spriteram */
AM_RANGE(0x360000, 0x3607ff) AM_RAM AM_SHARE("spriteram2")
AM_RANGE(0x370000, 0x370001) AM_DEVWRITE("spriteram2", buffered_spriteram16_device, write) /* Triggers DMA for spriteram */
@@ -217,28 +214,10 @@ ADDRESS_MAP_START(rohga_state::wizdfire_map)
AM_RANGE(0x390008, 0x390009) AM_DEVWRITE("deco_common", decocomn_device, palette_dma_w)
AM_RANGE(0xfdc000, 0xffffff) AM_RAM
- AM_RANGE(0xfe4000, 0xfe7fff) AM_READWRITE(wf_protection_region_0_104_r,wf_protection_region_0_104_w) AM_SHARE("prot16ram") /* Protection device */
+ AM_RANGE(0xfe4000, 0xfe7fff) AM_READWRITE(ioprot_r,ioprot_w) AM_SHARE("prot16ram") /* Protection device */
ADDRESS_MAP_END
-READ16_MEMBER( rohga_state::nb_protection_region_0_146_r )
-{
- int real_address = 0 + (offset *2);
- int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
- uint8_t cs = 0;
- uint16_t data = m_deco146->read_data( deco146_addr, mem_mask, cs );
- return data;
-}
-
-WRITE16_MEMBER( rohga_state::nb_protection_region_0_146_w )
-{
- int real_address = 0 + (offset *2);
- int deco146_addr = bitswap<32>(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
- uint8_t cs = 0;
- m_deco146->write_data( space, deco146_addr, data, mem_mask, cs );
-}
-
-
ADDRESS_MAP_START(rohga_state::nitrobal_map)
AM_RANGE(0x000000, 0x1fffff) AM_ROM
@@ -259,8 +238,8 @@ ADDRESS_MAP_START(rohga_state::nitrobal_map)
AM_RANGE(0x320002, 0x320003) AM_WRITENOP /* ? */
AM_RANGE(0x320004, 0x320005) AM_WRITE(wizdfire_irq_ack_w) /* VBL IRQ ack */
- AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x350000, 0x350001) AM_DEVWRITE("spriteram", buffered_spriteram16_device, write) /* Triggers DMA for spriteram */
+ AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_SHARE("spriteram1")
+ AM_RANGE(0x350000, 0x350001) AM_DEVWRITE("spriteram1", buffered_spriteram16_device, write) /* Triggers DMA for spriteram */
AM_RANGE(0x360000, 0x3607ff) AM_RAM AM_SHARE("spriteram2")
AM_RANGE(0x370000, 0x370001) AM_DEVWRITE("spriteram2", buffered_spriteram16_device, write) /* Triggers DMA for spriteram */
@@ -268,16 +247,17 @@ ADDRESS_MAP_START(rohga_state::nitrobal_map)
AM_RANGE(0x390008, 0x390009) AM_DEVWRITE("deco_common", decocomn_device, palette_dma_w)
AM_RANGE(0xfec000, 0xff3fff) AM_RAM
- AM_RANGE(0xff4000, 0xff7fff) AM_READWRITE(nb_protection_region_0_146_r,nb_protection_region_0_146_w) AM_SHARE("prot16ram") /* Protection device */
+ AM_RANGE(0xff4000, 0xff7fff) AM_READWRITE(ioprot_r,ioprot_w) AM_SHARE("prot16ram") /* Protection device */
-AM_RANGE(0xff8000, 0xffffff) AM_RAM
+ AM_RANGE(0xff8000, 0xffffff) AM_RAM
ADDRESS_MAP_END
+
ADDRESS_MAP_START(rohga_state::hotb_base_map)
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("tilegen1", deco16ic_device, pf_control_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("tilegen2", deco16ic_device, pf_control_w)
- AM_RANGE(0x280000, 0x283fff) AM_READWRITE(wf_protection_region_0_104_r,wf_protection_region_0_104_w) AM_SHARE("prot16ram") /* Protection device */
+ AM_RANGE(0x280000, 0x283fff) AM_READWRITE(ioprot_r,ioprot_w) AM_SHARE("prot16ram") /* Protection device */
AM_RANGE(0x2c0000, 0x2c0001) AM_READ_PORT("DSW3")
AM_RANGE(0x300000, 0x300001) AM_READ_PORT("DSW3") AM_WRITE(rohga_buffer_spriteram16_w) /* write 1 for sprite dma */
@@ -297,7 +277,7 @@ ADDRESS_MAP_START(rohga_state::hotb_base_map)
AM_RANGE(0x3cc000, 0x3ccfff) AM_MIRROR(0x1000) AM_RAM AM_SHARE("pf3_rowscroll")
AM_RANGE(0x3ce000, 0x3cefff) AM_MIRROR(0x1000) AM_RAM AM_SHARE("pf4_rowscroll")
- AM_RANGE(0x3d0000, 0x3d07ff) AM_RAM AM_SHARE("spriteram")
+ AM_RANGE(0x3d0000, 0x3d07ff) AM_RAM AM_SHARE("spriteram1")
AM_RANGE(0x3e0000, 0x3e1fff) AM_MIRROR(0x2000) AM_RAM_DEVWRITE("deco_common", decocomn_device, buffered_palette_w) AM_SHARE("paletteram")
ADDRESS_MAP_END
@@ -306,8 +286,6 @@ ADDRESS_MAP_START(rohga_state::schmeisr_map)
AM_RANGE(0xff0000, 0xff7fff) AM_RAM /* Main ram */
ADDRESS_MAP_END
-
-
ADDRESS_MAP_START(rohga_state::hangzo_map)
AM_IMPORT_FROM(hotb_base_map)
AM_RANGE(0x3f0000, 0x3f3fff) AM_RAM /* Main ram */
@@ -315,26 +293,14 @@ ADDRESS_MAP_END
/******************************************************************************/
-ADDRESS_MAP_START(rohga_state::rohga_sound_map)
- AM_RANGE(0x000000, 0x00ffff) AM_ROM
- AM_RANGE(0x100000, 0x100001) AM_NOP
- AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write)
- AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
- AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
- AM_RANGE(0x140000, 0x140000) AM_DEVREAD("ioprot104", deco104_device, soundlatch_r)
- AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8")
- AM_RANGE(0x1fec00, 0x1fec01) AM_DEVWRITE("audiocpu", h6280_device, timer_w)
- AM_RANGE(0x1ff400, 0x1ff403) AM_DEVWRITE("audiocpu", h6280_device, irq_status_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(rohga_state::nitrobal_sound_map)
+ADDRESS_MAP_START(rohga_state::sound_map)
AM_RANGE(0x000000, 0x00ffff) AM_ROM
AM_RANGE(0x100000, 0x100001) AM_NOP
AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write)
AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write)
AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write)
- AM_RANGE(0x140000, 0x140000) AM_DEVREAD("ioprot", deco146_device, soundlatch_r)
- AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8")
+ AM_RANGE(0x140000, 0x140000) AM_DEVREAD("ioprot", deco_146_base_device, soundlatch_r)
+ AM_RANGE(0x1f0000, 0x1f1fff) AM_RAM
AM_RANGE(0x1fec00, 0x1fec01) AM_DEVWRITE("audiocpu", h6280_device, timer_w)
AM_RANGE(0x1ff400, 0x1ff403) AM_DEVWRITE("audiocpu", h6280_device, irq_status_w)
ADDRESS_MAP_END
@@ -792,9 +758,9 @@ static const gfx_layout charlayout =
RGN_FRAC(1,2),
4,
{ RGN_FRAC(1,2)+8, RGN_FRAC(1,2), 8, 0 },
- { 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
- 16*8 /* every char takes 8 consecutive bytes */
+ { STEP8(0,1) },
+ { STEP8(0,8*2) },
+ 8*8*2 /* every char takes 16 consecutive bytes */
};
static const gfx_layout spritelayout =
@@ -803,11 +769,9 @@ static const gfx_layout spritelayout =
RGN_FRAC(1,1),
4,
{ 16, 0, 24, 8 },
- { 64*8+0, 64*8+1, 64*8+2, 64*8+3, 64*8+4, 64*8+5, 64*8+6, 64*8+7,
- 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
- 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
- 128*8
+ { STEP16(16*8*4,1), STEP8(0,1) },
+ { STEP16(0,8*4) },
+ 16*16*4
};
static const gfx_layout spritelayout_6bpp =
@@ -816,22 +780,9 @@ static const gfx_layout spritelayout_6bpp =
4096*8,
6,
{ 0x400000*8+8, 0x400000*8, 0x200000*8+8, 0x200000*8, 8, 0 },
- { 32*8+0, 32*8+1, 32*8+2, 32*8+3, 32*8+4, 32*8+5, 32*8+6, 32*8+7, 0,1,2,3,4,5,6,7 },
- { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
- 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
- 64*8
-};
-
-static const gfx_layout spritelayout2 =
-{
- 16,16,
- 4096*8,
- 4,
- { 0x200000*8+8, 0x200000*8, 8, 0 },
- { 32*8+0, 32*8+1, 32*8+2, 32*8+3, 32*8+4, 32*8+5, 32*8+6, 32*8+7, 0,1,2,3,4,5,6,7 },
- { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
- 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
- 64*8
+ { STEP16(16*8*2,1), STEP8(0,1) },
+ { STEP16(0,8*2) },
+ 16*16*2
};
static const gfx_layout tilelayout =
@@ -840,11 +791,9 @@ static const gfx_layout tilelayout =
RGN_FRAC(1,2),
4,
{ RGN_FRAC(1,2)+8, RGN_FRAC(1,2), 8, 0 },
- { 32*8+0, 32*8+1, 32*8+2, 32*8+3, 32*8+4, 32*8+5, 32*8+6, 32*8+7,
- 0, 1, 2, 3, 4, 5, 6, 7 },
- { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
- 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
- 64*8
+ { STEP16(16*8*2,1), STEP8(0,1) },
+ { STEP16(0,8*2) },
+ 16*16*2
};
static GFXDECODE_START( rohga )
@@ -866,15 +815,15 @@ static GFXDECODE_START( schmeisr )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 32 ) /* Characters 8x8 */
GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 32 ) /* Tiles 16x16 */
GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 512, 32 ) /* Tiles 16x16 */
- GFXDECODE_ENTRY( "gfx4", 0, spritelayout2, 1024, 64 ) /* Sprites 16x16 */
+ GFXDECODE_ENTRY( "gfx4", 0, spritelayout, 1024, 64 ) /* Sprites 16x16 */
GFXDECODE_END
/**********************************************************************************/
WRITE8_MEMBER(rohga_state::sound_bankswitch_w)
{
- m_oki1->set_rom_bank(BIT(data, 0));
- m_oki2->set_rom_bank(BIT(data, 1));
+ m_oki[0]->set_rom_bank(BIT(data, 0));
+ m_oki[1]->set_rom_bank(BIT(data, 1));
}
/**********************************************************************************/
@@ -919,10 +868,10 @@ MACHINE_CONFIG_START(rohga_state::rohga)
MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert)
MCFG_CPU_ADD("audiocpu", H6280, 32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
- MCFG_CPU_PROGRAM_MAP(rohga_sound_map)
+ MCFG_CPU_PROGRAM_MAP(sound_map)
/* video hardware */
- MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
+ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram1")
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(58)
@@ -976,7 +925,7 @@ MACHINE_CONFIG_START(rohga_state::rohga)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO104_ADD("ioprot104")
+ MCFG_DECO104_ADD("ioprot")
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
@@ -1008,10 +957,10 @@ MACHINE_CONFIG_START(rohga_state::wizdfire)
MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert)
MCFG_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
- MCFG_CPU_PROGRAM_MAP(rohga_sound_map)
+ MCFG_CPU_PROGRAM_MAP(sound_map)
/* video hardware */
- MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
+ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram1")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1067,7 +1016,7 @@ MACHINE_CONFIG_START(rohga_state::wizdfire)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO104_ADD("ioprot104")
+ MCFG_DECO104_ADD("ioprot")
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
@@ -1102,10 +1051,10 @@ MACHINE_CONFIG_START(rohga_state::nitrobal)
MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert)
MCFG_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
- MCFG_CPU_PROGRAM_MAP(nitrobal_sound_map)
+ MCFG_CPU_PROGRAM_MAP(sound_map)
/* video hardware */
- MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
+ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram1")
MCFG_BUFFERED_SPRITERAM16_ADD("spriteram2")
MCFG_SCREEN_ADD("screen", RASTER)
@@ -1197,10 +1146,10 @@ MACHINE_CONFIG_START(rohga_state::schmeisr)
MCFG_CPU_VBLANK_INT_DRIVER("screen", rohga_state, irq6_line_assert)
MCFG_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
- MCFG_CPU_PROGRAM_MAP(rohga_sound_map)
+ MCFG_CPU_PROGRAM_MAP(sound_map)
/* video hardware */
- MCFG_BUFFERED_SPRITERAM16_ADD("spriteram")
+ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram1")
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(58)
@@ -1254,7 +1203,7 @@ MACHINE_CONFIG_START(rohga_state::schmeisr)
MCFG_DECO_SPRITE_GFX_REGION(3)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DECO104_ADD("ioprot104")
+ MCFG_DECO104_ADD("ioprot")
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
@@ -1851,10 +1800,10 @@ ROM_START( schmeisr )
ROM_LOAD( "sr008.18d", 0x100000, 0x100000, CRC(a74cbc90) SHA1(1aabfec7cd64e7097aa55f0ddc5a2c9e1e25618a) )
ROM_REGION( 0x400000, "gfx4", 0 )
- ROM_LOAD( "sr004.19a", 0x000000, 0x100000, CRC(e25434a1) SHA1(136ebb36e9b6caeac885423e8f365008ddcea778) )
- ROM_LOAD( "sr005.20a", 0x100000, 0x100000, CRC(1630033b) SHA1(e2a5fd7f8839db9d5b41d3cada598a6c07a97368) )
- ROM_LOAD( "sr009.19d", 0x200000, 0x100000, CRC(7b9d982f) SHA1(55d89ee68ceaf3ca8059177721b6c9a16103b1b4) )
- ROM_LOAD( "sr010.20d", 0x300000, 0x100000, CRC(6e9e5352) SHA1(357659ff5ab9ce94df3313e9a60125769c7fe10a) )
+ ROM_LOAD16_BYTE( "sr004.19a", 0x000001, 0x100000, CRC(e25434a1) SHA1(136ebb36e9b6caeac885423e8f365008ddcea778) )
+ ROM_LOAD16_BYTE( "sr005.20a", 0x200001, 0x100000, CRC(1630033b) SHA1(e2a5fd7f8839db9d5b41d3cada598a6c07a97368) )
+ ROM_LOAD16_BYTE( "sr009.19d", 0x000000, 0x100000, CRC(7b9d982f) SHA1(55d89ee68ceaf3ca8059177721b6c9a16103b1b4) )
+ ROM_LOAD16_BYTE( "sr010.20d", 0x200000, 0x100000, CRC(6e9e5352) SHA1(357659ff5ab9ce94df3313e9a60125769c7fe10a) )
ROM_REGION(0x80000, "oki2", 0 ) /* Oki samples */
ROM_LOAD( "sr011.14p", 0x00000, 0x80000, CRC(81805616) SHA1(cdca2eb6d12924b9b578b4ce95d5816c7d82f345) )
@@ -1891,10 +1840,10 @@ ROM_START( hangzo ) /* Found on a Data East DE-0353-3 PCB */
ROM_LOAD( "BK23H 12.10.18D.574200", 0x100000, 0x080000, CRC(6a725fb2) SHA1(f4da4da62eb7e3ec2f1a54b57eaf94dc748dec68) )
ROM_REGION( 0x400000, "gfx4", 0 )
- ROM_LOAD( "OBJ01L 12.10.19A.27C4000", 0x000000, 0x080000, CRC(c141e310) SHA1(81eb0b977aaf44a110a663416e385ca617de8f28) ) /* 6bpp sprites */
- ROM_LOAD( "OBJ01H 12.10.20A.27C4000", 0x100000, 0x080000, CRC(6a7b4252) SHA1(4bd588bc96c07cc9367afdeab4976af6f8dcc823) )
- ROM_LOAD( "OBJ23L 12.10.19D.27C4000", 0x200000, 0x080000, CRC(0db6df6c) SHA1(fe7ef7b5a279656d9e46334c4833ab8911caa5db) )
- ROM_LOAD( "OBJ23H 12.10.20D.27C4000", 0x300000, 0x080000, CRC(165031a1) SHA1(0e88fe45fd78d352fdbd398c1d98feefe1b43917) )
+ ROM_LOAD16_BYTE( "OBJ01L 12.10.19A.27C4000", 0x000001, 0x080000, CRC(c141e310) SHA1(81eb0b977aaf44a110a663416e385ca617de8f28) ) /* 4bpp sprites */
+ ROM_LOAD16_BYTE( "OBJ01H 12.10.20A.27C4000", 0x200001, 0x080000, CRC(6a7b4252) SHA1(4bd588bc96c07cc9367afdeab4976af6f8dcc823) )
+ ROM_LOAD16_BYTE( "OBJ23L 12.10.19D.27C4000", 0x000000, 0x080000, CRC(0db6df6c) SHA1(fe7ef7b5a279656d9e46334c4833ab8911caa5db) )
+ ROM_LOAD16_BYTE( "OBJ23H 12.10.20D.27C4000", 0x200000, 0x080000, CRC(165031a1) SHA1(0e88fe45fd78d352fdbd398c1d98feefe1b43917) )
ROM_REGION(0x80000, "oki2", 0 ) /* Oki samples */
ROM_LOAD( "PCM16K 11.5.14P.574000", 0x00000, 0x80000, CRC(5b95c6c7) SHA1(587e7f87d085af3a5d24f317fffc1716c8027e43) )
@@ -1931,25 +1880,21 @@ DRIVER_INIT_MEMBER(rohga_state,nitrobal)
deco74_decrypt_gfx(machine(), "gfx3");
}
-DRIVER_INIT_MEMBER(rohga_state,schmeisr)
+DRIVER_INIT_MEMBER(rohga_state,hangzo)
{
const uint8_t *src = memregion("gfx2")->base();
uint8_t *dst = memregion("gfx1")->base();
-
- memcpy(dst, src, 0x20000);
- memcpy(dst + 0x20000, src + 0x80000, 0x20000);
-
- deco74_decrypt_gfx(machine(), "gfx1");
- deco74_decrypt_gfx(machine(), "gfx2");
+
+ std::copy(&src[0], &src[0x20000], &dst[0]);
+ std::copy(&src[0x80000], &src[0xa0000], &dst[0x20000]);
}
-DRIVER_INIT_MEMBER(rohga_state,hangzo)
+DRIVER_INIT_MEMBER(rohga_state,schmeisr)
{
- const uint8_t *src = memregion("gfx2")->base();
- uint8_t *dst = memregion("gfx1")->base();
+ DRIVER_INIT_CALL(hangzo);
- memcpy(dst, src, 0x20000);
- memcpy(dst + 0x20000, src + 0x80000, 0x20000);
+ deco74_decrypt_gfx(machine(), "gfx1");
+ deco74_decrypt_gfx(machine(), "gfx2");
}
GAME( 1991, rohga, 0, rohga, rohga, rohga_state, rohga, ROT0, "Data East Corporation", "Rohga Armor Force (Asia/Europe v5.0)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/rohga.h b/src/mame/includes/rohga.h
index 26016e9f3b4..e2e6068e0e1 100644
--- a/src/mame/includes/rohga.h
+++ b/src/mame/includes/rohga.h
@@ -21,45 +21,29 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
- m_deco146(*this, "ioprot"),
- m_deco104(*this, "ioprot104"),
+ m_ioprot(*this, "ioprot"),
m_decocomn(*this, "deco_common"),
- m_deco_tilegen1(*this, "tilegen1"),
- m_deco_tilegen2(*this, "tilegen2"),
- m_oki1(*this, "oki1"),
- m_oki2(*this, "oki2"),
- m_spriteram(*this, "spriteram"),
- m_spriteram2(*this, "spriteram2") ,
- m_pf1_rowscroll(*this, "pf1_rowscroll"),
- m_pf2_rowscroll(*this, "pf2_rowscroll"),
- m_pf3_rowscroll(*this, "pf3_rowscroll"),
- m_pf4_rowscroll(*this, "pf4_rowscroll"),
- m_sprgen1(*this, "spritegen1"),
- m_sprgen2(*this, "spritegen2"),
+ m_deco_tilegen(*this, "tilegen%u", 1),
+ m_oki(*this, "oki%u", 1),
+ m_spriteram(*this, "spriteram%u", 1),
+ m_pf_rowscroll(*this, "pf%u_rowscroll", 1),
+ m_sprgen(*this, "spritegen%u", 1),
m_palette(*this, "palette")
{ }
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- optional_device<deco146_device> m_deco146;
- optional_device<deco104_device> m_deco104;
+ required_device<deco_146_base_device> m_ioprot;
required_device<decocomn_device> m_decocomn;
- required_device<deco16ic_device> m_deco_tilegen1;
- required_device<deco16ic_device> m_deco_tilegen2;
- required_device<okim6295_device> m_oki1;
- required_device<okim6295_device> m_oki2;
- required_device<buffered_spriteram16_device> m_spriteram;
- optional_device<buffered_spriteram16_device> m_spriteram2;
+ required_device_array<deco16ic_device, 2> m_deco_tilegen;
+ required_device_array<okim6295_device, 2> m_oki;
+ optional_device_array<buffered_spriteram16_device, 2> m_spriteram;
/* memory pointers */
- optional_shared_ptr<uint16_t> m_pf1_rowscroll;
- optional_shared_ptr<uint16_t> m_pf2_rowscroll;
- required_shared_ptr<uint16_t> m_pf3_rowscroll;
- required_shared_ptr<uint16_t> m_pf4_rowscroll;
+ optional_shared_ptr_array<uint16_t, 4> m_pf_rowscroll;
- optional_device<decospr_device> m_sprgen1;
- optional_device<decospr_device> m_sprgen2;
+ optional_device_array<decospr_device, 2> m_sprgen;
required_device<palette_device> m_palette;
@@ -83,10 +67,8 @@ public:
DECOSPR_COLOUR_CB_MEMBER(rohga_col_callback);
DECOSPR_COLOUR_CB_MEMBER(schmeisr_col_callback);
- READ16_MEMBER( nb_protection_region_0_146_r );
- WRITE16_MEMBER( nb_protection_region_0_146_w );
- READ16_MEMBER( wf_protection_region_0_104_r );
- WRITE16_MEMBER( wf_protection_region_0_104_w );
+ READ16_MEMBER( ioprot_r );
+ WRITE16_MEMBER( ioprot_w );
void wizdfire(machine_config &config);
void nitrobal(machine_config &config);
void hangzo(machine_config &config);
@@ -95,9 +77,8 @@ public:
void hangzo_map(address_map &map);
void hotb_base_map(address_map &map);
void nitrobal_map(address_map &map);
- void nitrobal_sound_map(address_map &map);
void rohga_map(address_map &map);
- void rohga_sound_map(address_map &map);
+ void sound_map(address_map &map);
void schmeisr_map(address_map &map);
void wizdfire_map(address_map &map);
};
diff --git a/src/mame/video/rohga.cpp b/src/mame/video/rohga.cpp
index 89eaf75e92d..89d8dc33635 100644
--- a/src/mame/video/rohga.cpp
+++ b/src/mame/video/rohga.cpp
@@ -15,7 +15,7 @@ WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w)
{
// Spriteram seems to be triple buffered (no sprite lag on real pcb, but there
// is on driver with only double buffering)
- m_spriteram->copy();
+ m_spriteram[0]->copy();
}
/******************************************************************************/
@@ -23,16 +23,16 @@ WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w)
uint32_t rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
+ uint16_t flip = m_deco_tilegen[0]->pf_control_r(space, 0, 0xffff);
uint16_t priority = m_decocomn->priority_r();
// sprites are flipped relative to tilemaps
flip_screen_set(BIT(flip, 7));
- m_sprgen1->set_flip_screen(!BIT(flip, 7));
+ m_sprgen[0]->set_flip_screen(!BIT(flip, 7));
/* Update playfields */
- m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
- m_deco_tilegen2->pf_update(m_pf3_rowscroll, m_pf4_rowscroll);
+ m_deco_tilegen[0]->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]);
+ m_deco_tilegen[1]->pf_update(m_pf_rowscroll[2], m_pf_rowscroll[3]);
/* Draw playfields */
screen.priority().fill(0, cliprect);
@@ -44,30 +44,30 @@ uint32_t rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &b
if (priority & 4)
{
// Draw as 1 8BPP layer
- m_deco_tilegen2->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 3);
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 3);
}
else
{
// Draw as 2 4BPP layers
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 2);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 2);
}
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 4);
break;
case 1:
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
break;
case 2:
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, 0, 2);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 4);
break;
}
- m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
- m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_sprgen[0]->draw_sprites(bitmap, cliprect, m_spriteram[0]->buffer(), 0x400);
+ m_deco_tilegen[0]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
@@ -76,8 +76,8 @@ uint32_t rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &b
VIDEO_START_MEMBER(rohga_state,wizdfire)
{
- m_sprgen1->alloc_sprite_bitmap();
- m_sprgen2->alloc_sprite_bitmap();
+ m_sprgen[0]->alloc_sprite_bitmap();
+ m_sprgen[1]->alloc_sprite_bitmap();
}
// not amazingly efficient, called multiple times to pull a layer out of the sprite bitmaps, but keeps correct sprite<->sprite priorities
@@ -88,7 +88,7 @@ void rohga_state::mixwizdfirelayer(bitmap_rgb32 &bitmap, const rectangle &clipre
bitmap_ind16* sprite_bitmap;
int penbase;
- sprite_bitmap = &m_sprgen2->get_sprite_temp_bitmap();
+ sprite_bitmap = &m_sprgen[1]->get_sprite_temp_bitmap();
penbase = 0x600;
uint16_t* srcline;
@@ -129,40 +129,40 @@ void rohga_state::mixwizdfirelayer(bitmap_rgb32 &bitmap, const rectangle &clipre
uint32_t rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
+ uint16_t flip = m_deco_tilegen[0]->pf_control_r(space, 0, 0xffff);
uint16_t priority = m_decocomn->priority_r();
// sprites are flipped relative to tilemaps
flip_screen_set(BIT(flip, 7));
- m_sprgen1->set_flip_screen(!BIT(flip, 7));
- m_sprgen2->set_flip_screen(!BIT(flip, 7));
+ m_sprgen[0]->set_flip_screen(!BIT(flip, 7));
+ m_sprgen[1]->set_flip_screen(!BIT(flip, 7));
/* draw sprite gfx to temp bitmaps */
- m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400);
- m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
+ m_sprgen[1]->draw_sprites(bitmap, cliprect, m_spriteram[1]->buffer(), 0x400);
+ m_sprgen[0]->draw_sprites(bitmap, cliprect, m_spriteram[0]->buffer(), 0x400);
/* Update playfields */
- m_deco_tilegen1->pf_update(nullptr, nullptr);
- m_deco_tilegen2->pf_update(m_pf3_rowscroll, m_pf4_rowscroll);
+ m_deco_tilegen[0]->pf_update(nullptr, nullptr);
+ m_deco_tilegen[1]->pf_update(m_pf_rowscroll[2], m_pf_rowscroll[3]);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
bitmap.fill(m_palette->pen(512), cliprect);
- m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
- m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
- m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
+ m_deco_tilegen[1]->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
+ m_sprgen[0]->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
+ m_sprgen[0]->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
if ((priority & 0x1f) == 0x1f) /* Wizdfire has bit 0x40 always set, Dark Seal 2 doesn't?! */
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
else
- m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_deco_tilegen[1]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
- m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
+ m_sprgen[0]->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
mixwizdfirelayer(bitmap, cliprect, 0x000, 0x000);
- m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_deco_tilegen[0]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
@@ -175,8 +175,8 @@ void rohga_state::mixnitroballlayer(screen_device &screen, bitmap_rgb32 &bitmap,
uint16_t priority = m_decocomn->priority_r();
- sprite_bitmap1 = &m_sprgen1->get_sprite_temp_bitmap();
- sprite_bitmap2 = &m_sprgen2->get_sprite_temp_bitmap();
+ sprite_bitmap1 = &m_sprgen[0]->get_sprite_temp_bitmap();
+ sprite_bitmap2 = &m_sprgen[1]->get_sprite_temp_bitmap();
priority_bitmap = &screen.priority();
uint32_t* dstline;
@@ -289,10 +289,10 @@ void rohga_state::mixnitroballlayer(screen_device &screen, bitmap_rgb32 &bitmap,
uint8_t bgpri = srcpriline[x];
/* once we get here we have
- pri1 - 1/2/4/8/16/64 (sprite chip 1 pixel priority relative to bg)
- pri2 - 8/16 (sprite chip 2 pixel priority relative to bg)
+ pri1 - 0x001/0x002/0x004/0x008/0x010/0x020/0x040/0x080/0x100/0x200 (sprite chip 1 pixel priority relative to bg)
+ pri2 - 0x080/0x010 (sprite chip 2 pixel priority relative to bg)
- bgpri - 4/32 (from drawing tilemaps earlier, to compare above pri1/pri2 priorities against)
+ bgpri - 0x008/0x040 (from drawing tilemaps earlier, to compare above pri1/pri2 priorities against)
pix1 - same as before (ready to extract just colour data from)
pix2 - same as before ^^
*/
@@ -332,44 +332,44 @@ void rohga_state::mixnitroballlayer(screen_device &screen, bitmap_rgb32 &bitmap,
uint32_t rohga_state::screen_update_nitrobal(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
+ uint16_t flip = m_deco_tilegen[0]->pf_control_r(space, 0, 0xffff);
uint16_t priority = m_decocomn->priority_r();
flip_screen_set(BIT(flip, 7));
- m_sprgen1->set_flip_screen(BIT(flip, 7));
- m_sprgen2->set_flip_screen(BIT(flip, 7));
+ m_sprgen[0]->set_flip_screen(BIT(flip, 7));
+ m_sprgen[1]->set_flip_screen(BIT(flip, 7));
/* draw sprite gfx to temp bitmaps */
- m_sprgen1->set_alt_format(true);
- m_sprgen2->set_alt_format(true);
- m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400);
- m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
+ m_sprgen[0]->set_alt_format(true);
+ m_sprgen[1]->set_alt_format(true);
+ m_sprgen[1]->draw_sprites(bitmap, cliprect, m_spriteram[1]->buffer(), 0x400);
+ m_sprgen[0]->draw_sprites(bitmap, cliprect, m_spriteram[0]->buffer(), 0x400);
/* Update playfields */
- m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
- m_deco_tilegen2->pf_update(m_pf3_rowscroll, m_pf4_rowscroll);
+ m_deco_tilegen[0]->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]);
+ m_deco_tilegen[1]->pf_update(m_pf_rowscroll[2], m_pf_rowscroll[3]);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
bitmap.fill(m_palette->pen(512), cliprect);
screen.priority().fill(0);
/* pf3 and pf4 are combined into a single 8bpp bitmap */
- m_deco_tilegen2->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
+ m_deco_tilegen[1]->tilemap_12_combine_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
switch (priority)
{
case 0:
default:
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x008);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x008);
break;
case 0x20:
- m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x040);
+ m_deco_tilegen[0]->tilemap_2_draw(screen, bitmap, cliprect, 0, 0x040);
break;
}
/* TODO verify priorities + mixing / alpha */
mixnitroballlayer(screen,bitmap,cliprect);
- m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_deco_tilegen[0]->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}