summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <mamehaze@users.noreply.github.com>2013-07-21 14:44:11 +0000
committer David Haywood <mamehaze@users.noreply.github.com>2013-07-21 14:44:11 +0000
commitf198d8c294b873c440f6ff53abfcc6e3613bbc71 (patch)
treef3e6e8b64148e51bd3f7d0b5d240a9ba5e336fe3
parent2199cdb59ca17eafb2617ac55a8d21491eceb5c2 (diff)
night slashers using generic 104 (nw)
-rw-r--r--src/mame/drivers/boogwing.c4
-rw-r--r--src/mame/drivers/cninja.c8
-rw-r--r--src/mame/drivers/dblewing.c4
-rw-r--r--src/mame/drivers/deco32.c67
-rw-r--r--src/mame/drivers/dietgo.c4
-rw-r--r--src/mame/drivers/rohga.c14
-rw-r--r--src/mame/includes/deco32.h12
-rw-r--r--src/mame/machine/deco104.c25
8 files changed, 86 insertions, 52 deletions
diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c
index 35c28b864cd..7df42d2d9f6 100644
--- a/src/mame/drivers/boogwing.c
+++ b/src/mame/drivers/boogwing.c
@@ -159,7 +159,7 @@ ADDRESS_MAP_END
/**********************************************************************************/
static INPUT_PORTS_START( boogwing )
- PORT_START("IN1")
+ PORT_START("SYSTEM")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
@@ -213,7 +213,7 @@ static INPUT_PORTS_START( boogwing )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_START("IN0")
+ PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c
index e0fa4a0fa3c..9521fe13f84 100644
--- a/src/mame/drivers/cninja.c
+++ b/src/mame/drivers/cninja.c
@@ -205,9 +205,9 @@ static ADDRESS_MAP_START( cninjabl_map, AS_PROGRAM, 16, cninja_state )
AM_RANGE(0x15e000, 0x15e7ff) AM_RAM AM_SHARE("pf4_rowscroll")
AM_RANGE(0x17ff22, 0x17ff23) AM_READ_PORT("DSW")
- AM_RANGE(0x17ff28, 0x17ff29) AM_READ_PORT("IN1")
+ AM_RANGE(0x17ff28, 0x17ff29) AM_READ_PORT("SYSTEM")
AM_RANGE(0x17ff2a, 0x17ff2b) AM_WRITE(stoneage_sound_w)
- AM_RANGE(0x17ff2c, 0x17ff2d) AM_READ_PORT("IN0")
+ AM_RANGE(0x17ff2c, 0x17ff2d) AM_READ_PORT("INPUTS")
AM_RANGE(0x180000, 0x187fff) AM_RAM // more ram on bootleg?
@@ -507,10 +507,10 @@ INPUT_PORTS_END
static INPUT_PORTS_START( cninja )
- PORT_START("IN0")
+ PORT_START("INPUTS")
DATAEAST_2BUTTON
- PORT_START("IN1")
+ PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c
index 9373d3f6591..a11b79d43c0 100644
--- a/src/mame/drivers/dblewing.c
+++ b/src/mame/drivers/dblewing.c
@@ -206,7 +206,7 @@ static GFXDECODE_START( dblewing )
GFXDECODE_END
static INPUT_PORTS_START( dblewing )
- PORT_START("IN0")
+ PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
@@ -224,7 +224,7 @@ static INPUT_PORTS_START( dblewing )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START("IN1")
+ PORT_START("SYSTEM")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c
index c2de00e1e42..6cfd88e1af4 100644
--- a/src/mame/drivers/deco32.c
+++ b/src/mame/drivers/deco32.c
@@ -604,19 +604,22 @@ WRITE32_MEMBER(deco32_state::tattass_control_w)
/**********************************************************************************/
-READ32_MEMBER(deco32_state::nslasher_prot_r)
+UINT16 deco32_state::port_b_nslasher(int unused)
{
- switch (offset<<1) {
- case 0x280: return ioport("IN0")->read() << 16| 0xffff; /* IN0 */
- case 0x4c4: return ioport("IN1")->read() << 16| 0xffff; /* IN1 */
- case 0x35a: return (m_eeprom->read_bit()<< 16) | 0xffff; // Debug switch in low word??
- }
+ return (m_eeprom->read_bit());
+}
- //logerror("%08x: Read unmapped prot %08x (%08x)\n",space.device().safe_pc(),offset<<1,mem_mask);
- return 0xffffffff;
+void deco32_state::nslasher_sound_cb( address_space &space, UINT16 data, UINT16 mem_mask )
+{
+ /* bit 1 of nslasher_sound_irq specifies IRQ command writes */
+ soundlatch_byte_w(space,0,(data)&0xff);
+ m_nslasher_sound_irq |= 0x02;
+ m_audiocpu->set_input_line(0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
}
+
+
WRITE32_MEMBER(deco32_state::nslasher_eeprom_w)
{
if (ACCESSING_BITS_0_7)
@@ -630,18 +633,7 @@ WRITE32_MEMBER(deco32_state::nslasher_eeprom_w)
}
-WRITE32_MEMBER(deco32_state::nslasher_prot_w)
-{
- //logerror("%08x:write prot %08x (%08x) %08x\n",space.device().safe_pc(),offset<<1,mem_mask,data);
- /* Only sound port of chip is used - no protection */
- if (offset==0x700/4) {
- /* bit 1 of nslasher_sound_irq specifies IRQ command writes */
- soundlatch_byte_w(space,0,(data>>16)&0xff);
- m_nslasher_sound_irq |= 0x02;
- m_audiocpu->set_input_line(0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
- }
-}
/**********************************************************************************/
@@ -987,6 +979,29 @@ static ADDRESS_MAP_START( tattass_map, AS_PROGRAM, 32, deco32_state )
AM_RANGE(0x200000, 0x200fff) AM_READWRITE(tattass_prot_r, tattass_prot_w) AM_SHARE("prot32ram")
ADDRESS_MAP_END
+READ16_MEMBER( deco32_state::nslasher_protection_region_0_104_r )
+{
+ int real_address = 0 + (offset *2);
+ int deco146_addr = BITSWAP32(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 cs = 0;
+ UINT16 data = m_deco104->read_data( deco146_addr, mem_mask, cs );
+ return data;
+}
+
+WRITE16_MEMBER( deco32_state::nslasher_protection_region_0_104_w )
+{
+ int real_address = 0 + (offset *2);
+ int deco146_addr = BITSWAP32(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 cs = 0;
+ m_deco104->write_data( space, deco146_addr, data, mem_mask, cs );
+}
+
+READ16_MEMBER( deco32_state::nslasher_debug_r )
+{
+ return 0xffff;
+}
+
+
static ADDRESS_MAP_START( nslasher_map, AS_PROGRAM, 32, deco32_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x100000, 0x11ffff) AM_RAM AM_SHARE("ram")
@@ -1025,7 +1040,10 @@ static ADDRESS_MAP_START( nslasher_map, AS_PROGRAM, 32, deco32_state )
AM_RANGE(0x1d4000, 0x1d5fff) AM_RAM_WRITE(deco32_pf4_rowscroll_w) AM_SHARE("pf4_rowscroll32")
AM_RANGE(0x1e0000, 0x1e001f) AM_DEVREADWRITE("tilegen2", deco16ic_device, pf_control_dword_r, pf_control_dword_w)
- AM_RANGE(0x200000, 0x200fff) AM_READWRITE(nslasher_prot_r, nslasher_prot_w) AM_SHARE("prot32ram")
+// AM_RANGE(0x200000, 0x200fff) AM_READWRITE(nslasher_prot_r, nslasher_prot_w) AM_SHARE("prot32ram")
+ AM_RANGE(0x200000, 0x207fff) AM_READWRITE16(nslasher_protection_region_0_104_r, nslasher_protection_region_0_104_w, 0xffff0000)
+ AM_RANGE(0x200000, 0x207fff) AM_READ16(nslasher_debug_r, 0x0000ffff) // seems to be debug switches / code activated by this?
+
ADDRESS_MAP_END
/******************************************************************************/
@@ -1444,7 +1462,7 @@ static INPUT_PORTS_START( tattass )
INPUT_PORTS_END
static INPUT_PORTS_START( nslasher )
- PORT_START("IN0")
+ PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
@@ -1462,7 +1480,7 @@ static INPUT_PORTS_START( nslasher )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START("IN1")
+ PORT_START("DSW")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
@@ -2207,6 +2225,11 @@ static MACHINE_CONFIG_START( nslasher, deco32_state )
MCFG_VIDEO_START_OVERRIDE(deco32_state,nslasher)
MCFG_DECO104_ADD("ioprot104")
+ MCFG_DECO146_SET_PORTB_CALLBACK( deco32_state, port_b_nslasher )
+ MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, nslasher_sound_cb)
+ MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
+// MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
+
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c
index 54584ff1b4e..3ef948d75d8 100644
--- a/src/mame/drivers/dietgo.c
+++ b/src/mame/drivers/dietgo.c
@@ -76,13 +76,13 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( dietgo )
- PORT_START("IN1") /* Verified as 4 bit input port only */
+ PORT_START("SYSTEM") /* Verified as 4 bit input port only */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_START("IN0")
+ PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
diff --git a/src/mame/drivers/rohga.c b/src/mame/drivers/rohga.c
index 3d35e3ec3da..afd39201e12 100644
--- a/src/mame/drivers/rohga.c
+++ b/src/mame/drivers/rohga.c
@@ -274,7 +274,7 @@ static ADDRESS_MAP_START( schmeisr_map, AS_PROGRAM, 16, rohga_state )
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 */
- AM_RANGE(0x310002, 0x310003) AM_READ_PORT("IN1")
+ AM_RANGE(0x310002, 0x310003) AM_READ_PORT("SYSTEM")
AM_RANGE(0x310000, 0x310009) AM_WRITENOP /* Palette control? */
AM_RANGE(0x31000a, 0x31000b) AM_DEVWRITE("deco_common", decocomn_device, palette_dma_w) /* Write 1111 for dma? (Or any value?) */
AM_RANGE(0x320000, 0x320001) AM_WRITENOP /* ? */
@@ -314,7 +314,7 @@ ADDRESS_MAP_END
/**********************************************************************************/
static INPUT_PORTS_START( rohga )
- PORT_START("IN0")
+ PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
@@ -332,7 +332,7 @@ static INPUT_PORTS_START( rohga )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START("IN1")
+ PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
@@ -412,7 +412,7 @@ static INPUT_PORTS_START( rohga )
INPUT_PORTS_END
static INPUT_PORTS_START( wizdfire )
- PORT_START("IN0")
+ PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
@@ -430,7 +430,7 @@ static INPUT_PORTS_START( wizdfire )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START("IN1")
+ PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
@@ -569,7 +569,7 @@ static INPUT_PORTS_START( nitrobal )
INPUT_PORTS_END
static INPUT_PORTS_START( schmeisr )
- PORT_START("IN0")
+ PORT_START("INPUTS")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
@@ -587,7 +587,7 @@ static INPUT_PORTS_START( schmeisr )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 )
- PORT_START("IN1")
+ PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h
index 3a85cecd149..6f61e127e88 100644
--- a/src/mame/includes/deco32.h
+++ b/src/mame/includes/deco32.h
@@ -15,6 +15,7 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_deco146(*this, "ioprot"),
+ m_deco104(*this, "ioprot104"),
m_decobsmt(*this, "decobsmt"),
m_spriteram(*this, "spriteram"),
m_ram(*this, "ram"),
@@ -36,6 +37,7 @@ public:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
optional_device<deco146_device> m_deco146;
+ optional_device<deco104_device> m_deco104;
optional_device<decobsmt_device> m_decobsmt;
optional_device<buffered_spriteram32_device> m_spriteram;
required_shared_ptr<UINT32> m_ram;
@@ -100,9 +102,13 @@ public:
DECLARE_READ32_MEMBER(tattass_prot_r);
DECLARE_WRITE32_MEMBER(tattass_prot_w);
DECLARE_WRITE32_MEMBER(tattass_control_w);
- DECLARE_READ32_MEMBER(nslasher_prot_r);
+ //DECLARE_READ32_MEMBER(nslasher_prot_r);
+ DECLARE_READ16_MEMBER( nslasher_protection_region_0_104_r );
+ DECLARE_WRITE16_MEMBER( nslasher_protection_region_0_104_w );
+ DECLARE_READ16_MEMBER( nslasher_debug_r );
+
DECLARE_WRITE32_MEMBER(nslasher_eeprom_w);
- DECLARE_WRITE32_MEMBER(nslasher_prot_w);
+ //DECLARE_WRITE32_MEMBER(nslasher_prot_w);
DECLARE_READ32_MEMBER(deco32_spriteram_r);
DECLARE_WRITE32_MEMBER(deco32_spriteram_w);
DECLARE_WRITE32_MEMBER(deco32_buffer_spriteram_w);
@@ -149,6 +155,8 @@ public:
WRITE16_MEMBER( dg_protection_region_0_146_w );
void deco32_sound_cb( address_space &space, UINT16 data, UINT16 mem_mask );
+ UINT16 port_b_nslasher(int unused);
+ void nslasher_sound_cb( address_space &space, UINT16 data, UINT16 mem_mask );
};
class dragngun_state : public deco32_state
diff --git a/src/mame/machine/deco104.c b/src/mame/machine/deco104.c
index 4654b522828..c4deecca4ce 100644
--- a/src/mame/machine/deco104.c
+++ b/src/mame/machine/deco104.c
@@ -189,6 +189,7 @@ UINT16 deco104_device::read_data_getloc(UINT16 offset, int& location)
const UINT16* prot_ram=m_current_rambank;
location = 0x00;
+ int tempinput = 0;
if (m_use_dblewings_hacks==1)
{
@@ -209,11 +210,13 @@ UINT16 deco104_device::read_data_getloc(UINT16 offset, int& location)
case 0x78c: /* was 0x528 */ /* was 0x330*/ return 0; // controls bonuses such as shoot type,bombs etc.
case 0x114: /* was 0x3b0 */ /* was 0x1d4*/ return m_70c_data; //controls restart points
- case 0x674: /* was 0x4d0 */ /* was 0x0ac*/ return (ioport(":DSW")->read() & 0x40) << 4;//flip screen
+ case 0x674: /* was 0x4d0 */ /* was 0x0ac*/tempinput = m_port_c_r(0); return (tempinput & 0x40) << 4;//flip screen
case 0x726: /* was 0x582 */ /* was 0x4b0*/return m_608_data;//coinage
case 0x4e4: /* was 0x640 */ /* was 0x068*/
{
- switch (ioport(":DSW")->read() & 0x0300) //I don't know how to relationate this...
+ tempinput = m_port_c_r(0);
+
+ switch (tempinput & 0x0300) //I don't know how to relationate this...
{
case 0x0000: return 0x000;//0
case 0x0100: return 0x060;//3
@@ -224,11 +227,11 @@ UINT16 deco104_device::read_data_getloc(UINT16 offset, int& location)
//case 0x334: /* was 0x190 */ /* was 0x094*/ return m_104_data;// p1 inputs select screen OK // in shared sim
//case 0x0fc: /* was 0x258 */ /* was 0x24c*/return m_008_data;//read DSW (mirror for coinage/territory) // in shared sim
//case 0x36c: /* was 0x1c8 */ /* was 0x298*/return ioport(":IN1")->read();//vblank // in shared sim
- case 0x5b2: /* was 0x716 */ /* was 0x476*/return ioport(":IN1")->read();//mirror for coins
+ case 0x5b2: /* was 0x716 */ /* was 0x476*/tempinput = m_port_b_r(0); return tempinput;//mirror for coins
//case 0x292: /* was 0x036 */ /* was 0x506*/return ioport(":DSW")->read(); // in shared sim
case 0x146: /* was 0x3e2 */ /* was 0x5d8*/return m_406_data;
- case 0x73c: /* was 0x598 */ /* was 0x2b4*/return ioport(":IN0")->read();
- case 0x644: /* was 0x4e0 */ /* was 0x1a8*/return (ioport(":DSW")->read() & 0x4000) >> 12;//allow continue
+ case 0x73c: /* was 0x598 */ /* was 0x2b4*/tempinput = m_port_a_r(0); return tempinput;
+ case 0x644: /* was 0x4e0 */ /* was 0x1a8*/tempinput = m_port_c_r(0); return (tempinput & 0x4000) >> 12;//allow continue
// case 0x45c: /* was 0x6f8 */ /* was 0x3ec*/return m_70c_data; //score entry // in shared sim
case 0x0b8: /* was 0x21c */ /* was 0x246*/return m_580_data; // these three controls "perfect bonus" I suppose...
case 0x6d2: /* was 0x476 */ /* was 0x52e*/return m_580_data;
@@ -251,10 +254,10 @@ UINT16 deco104_device::read_data_getloc(UINT16 offset, int& location)
switch (offset>>1)
{
- case 0x088/2: /* Player 1 & 2 input ports */ return machine().root_device().ioport(":IN0")->read(); // also caveman ninja + wizard fire
- case 0x36c/2: return machine().root_device().ioport(":IN1")->read(); // also caveman ninja + wizard fire
- case 0x44c/2: return ((machine().root_device().ioport(":IN1")->read() & 0x7)<<13)|((machine().root_device().ioport(":IN1")->read() & 0x8)<<9);
- case 0x292/2: /* Dips */ return machine().root_device().ioport(":DSW")->read(); // also wizard fire
+ case 0x088/2: /* Player 1 & 2 input ports */ tempinput = m_port_a_r(0); return tempinput; // also caveman ninja + wizard fire
+ case 0x36c/2: tempinput = m_port_b_r(0); return tempinput; // also caveman ninja + wizard fire
+ case 0x44c/2: tempinput = m_port_b_r(0); return ((tempinput & 0x7)<<13)|((tempinput & 0x8)<<9);
+ case 0x292/2: /* Dips */ tempinput = m_port_c_r(0); return tempinput; // also wizard fire
case 0x044/2: location = 0x2c; return ((((DECO_PORT(location)&0x000f)<<12)) ^ m_xor) & (~m_nand);
case 0x282/2: location = 0x26; return ((DECO_PORT(location)&0x000f)<<12) & (~m_nand);
case 0x0d4/2: location = 0x6e; return ((DECO_PORT(location)&0x0ff0)<<4) | ((DECO_PORT(location)&0x000e)<<3) | ((DECO_PORT(location)&0x0001)<<7);
@@ -483,8 +486,8 @@ UINT16 deco104_device::read_data_getloc(UINT16 offset, int& location)
// wizard fire cases
//case 0x088/2: /* was 0x110*/ /* Player input */ return space.machine().root_device().ioport("IN0")->read(); // also used in rohga sim
//case 0x36c/2: /* was 0x36c*/ return space.machine().root_device().ioport("IN1")->read(); // also used in rohga sim
- case 0x2cc/2: /* was 0x334*/ return machine().root_device().ioport(":IN1")->read();
- case 0x3b0/2: /* was 0x0dc*/ return machine().root_device().ioport(":IN1")->read()<<4;
+ case 0x2cc/2: /* was 0x334*/ tempinput = m_port_b_r(0); return tempinput;
+ case 0x3b0/2: /* was 0x0dc*/ tempinput = m_port_b_r(0); return tempinput<<4;
//case 0x292/2: /* was 0x494*/ /* Dips */ return space.machine().root_device().ioport("DSW1_2")->read(); // also used in rohga sim // also caveman ninja
//case 0x224/2: /* was 0x244*/ return DECO_NEW_PORT(0x00); // also caveman ninja
//case 0x33e/2: /* was 0x7cc*/ return ((DECO_NEW_PORT(0x00)&0x000f)<<12) | ((DECO_NEW_PORT(0x00)&0x00f0)<<4) | ((DECO_NEW_PORT(0x00)&0x0f00)>>4) | ((DECO_NEW_PORT(0x00)&0xf000)>>12); // also used in rohga sim (NOTE, ROHGA APPLIES MASK, CHECK!)