mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
deco146: Use DEVCB for input ports and explicitly define these in all drivers (nw)
This commit is contained in:
parent
b1da9c903d
commit
c64933be0e
@ -389,6 +389,9 @@ static MACHINE_CONFIG_START( boogwing )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
|
@ -926,6 +926,9 @@ static MACHINE_CONFIG_START( cninja )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
/* sound hardware */
|
||||
@ -1015,6 +1018,9 @@ static MACHINE_CONFIG_START( stoneage )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
|
||||
@ -1181,6 +1187,9 @@ static MACHINE_CONFIG_START( edrandy )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -1268,6 +1277,9 @@ static MACHINE_CONFIG_START( robocop2 )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
|
||||
@ -1364,6 +1376,9 @@ static MACHINE_CONFIG_START( mutantf )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
@ -400,6 +400,9 @@ static MACHINE_CONFIG_START( dblewing )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(dblewing_state, dblewing_sound_cb)
|
||||
|
@ -728,11 +728,6 @@ WRITE32_MEMBER(deco32_state::tattass_control_w)
|
||||
/**********************************************************************************/
|
||||
|
||||
|
||||
uint16_t deco32_state::port_b_nslasher(int unused)
|
||||
{
|
||||
return (m_eeprom->do_read());
|
||||
}
|
||||
|
||||
void deco32_state::nslasher_sound_cb( address_space &space, uint16_t data, uint16_t mem_mask )
|
||||
{
|
||||
/* bit 1 of nslasher_sound_irq specifies IRQ command writes */
|
||||
@ -741,7 +736,7 @@ void deco32_state::nslasher_sound_cb( address_space &space, uint16_t data, uint1
|
||||
m_audiocpu->set_input_line(0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
uint16_t deco32_state::port_b_tattass(int unused)
|
||||
READ16_MEMBER(deco32_state::port_b_tattass)
|
||||
{
|
||||
return m_tattass_eprom_bit;
|
||||
}
|
||||
@ -1913,6 +1908,9 @@ static MACHINE_CONFIG_START( captaven )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(deco32_state,captaven)
|
||||
@ -1938,21 +1936,6 @@ static MACHINE_CONFIG_START( captaven )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
uint16_t deco32_state::port_a_fghthist(int unused)
|
||||
{
|
||||
return machine().root_device().ioport(":IN0")->read();
|
||||
}
|
||||
|
||||
uint16_t deco32_state::port_b_fghthist(int unused)
|
||||
{
|
||||
return machine().device<eeprom_serial_93cxx_device>(":eeprom")->do_read();
|
||||
}
|
||||
|
||||
uint16_t deco32_state::port_c_fghthist(int unused)
|
||||
{
|
||||
return machine().root_device().ioport(":IN1")->read();
|
||||
}
|
||||
|
||||
DECO16IC_BANK_CB_MEMBER(deco32_state::fghthist_bank_callback)
|
||||
{
|
||||
bank = bank >> 4;
|
||||
@ -2018,9 +2001,9 @@ static MACHINE_CONFIG_START( fghthist ) /* DE-0380-2 PCB */
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_SET_PORTA_CALLBACK( deco32_state, port_a_fghthist )
|
||||
MCFG_DECO146_SET_PORTB_CALLBACK( deco32_state, port_b_fghthist )
|
||||
MCFG_DECO146_SET_PORTC_CALLBACK( deco32_state, port_c_fghthist )
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("IN0"))
|
||||
MCFG_DECO146_IN_PORTB_CB(DEVREADLINE("eeprom", eeprom_serial_93cxx_device, do_read)) MCFG_DEVCB_BIT(0)
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("IN1"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
@ -2104,9 +2087,9 @@ static MACHINE_CONFIG_START( fghthsta ) /* DE-0395-1 PCB */
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_SET_PORTA_CALLBACK( deco32_state, port_a_fghthist )
|
||||
MCFG_DECO146_SET_PORTB_CALLBACK( deco32_state, port_b_fghthist )
|
||||
MCFG_DECO146_SET_PORTC_CALLBACK( deco32_state, port_c_fghthist )
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("IN0"))
|
||||
MCFG_DECO146_IN_PORTB_CB(DEVREADLINE("eeprom", eeprom_serial_93cxx_device, do_read)) MCFG_DEVCB_BIT(0)
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("IN1"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
@ -2149,9 +2132,9 @@ static MACHINE_CONFIG_DERIVED( fghthistz, fghthsta )
|
||||
/*
|
||||
MCFG_DEVICE_REMOVE("ioprot")
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_SET_PORTA_CALLBACK( deco32_state, port_a_fghthist )
|
||||
MCFG_DECO146_SET_PORTB_CALLBACK( deco32_state, port_b_fghthist )
|
||||
MCFG_DECO146_SET_PORTC_CALLBACK( deco32_state, port_c_fghthist )
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("IN0"))
|
||||
MCFG_DECO146_IN_PORTB_CB(DEVREADLINE("eeprom", eeprom_serial_93cxx_device, do_read)) MCFG_DEVCB_BIT(0)
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("IN1"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, nslasher_sound_cb)
|
||||
@ -2236,6 +2219,9 @@ static MACHINE_CONFIG_START( dragngun )
|
||||
MCFG_VIDEO_START_OVERRIDE(dragngun_state,dragngun)
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
|
||||
|
||||
@ -2344,6 +2330,9 @@ static MACHINE_CONFIG_START( lockload )
|
||||
MCFG_DECO_ZOOMSPR_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
|
||||
|
||||
@ -2441,7 +2430,9 @@ static MACHINE_CONFIG_START( tattass )
|
||||
MCFG_PALETTE_ADD("palette", 2048)
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_SET_PORTB_CALLBACK( deco32_state, port_b_tattass )
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(READ16(deco32_state, port_b_tattass))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, tattass_sound_cb)
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
|
||||
@ -2517,7 +2508,9 @@ static MACHINE_CONFIG_START( nslasher )
|
||||
MCFG_VIDEO_START_OVERRIDE(deco32_state,nslasher)
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_SET_PORTB_CALLBACK( deco32_state, port_b_nslasher )
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(DEVREADLINE("eeprom", eeprom_serial_93cxx_device, do_read)) MCFG_DEVCB_BIT(0)
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, nslasher_sound_cb)
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
|
||||
@ -2551,7 +2544,9 @@ static MACHINE_CONFIG_DERIVED( nslasheru, nslasher )
|
||||
|
||||
MCFG_DEVICE_REMOVE("ioprot104")
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_SET_PORTB_CALLBACK( deco32_state, port_b_nslasher )
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(DEVREADLINE("eeprom", eeprom_serial_93cxx_device, do_read)) MCFG_DEVCB_BIT(0)
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(deco32_state, deco32_sound_cb)
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -561,6 +561,9 @@ static MACHINE_CONFIG_START( mlc )
|
||||
MCFG_VIDEO_START_OVERRIDE(deco_mlc_state,mlc)
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
/* sound hardware */
|
||||
|
@ -256,6 +256,9 @@ static MACHINE_CONFIG_START( dietgo )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
|
@ -327,6 +327,9 @@ static MACHINE_CONFIG_START( dreambal )
|
||||
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom") // 93lc46b
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
|
||||
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
|
||||
MCFG_DECO16IC_SPLIT(0)
|
||||
|
@ -331,6 +331,9 @@ static MACHINE_CONFIG_START( funkyjet )
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_INTERLEAVE
|
||||
|
||||
|
||||
|
@ -270,6 +270,9 @@ static MACHINE_CONFIG_START( lemmings )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
MCFG_DECO146_SET_SOUNDLATCH_CALLBACK(lemmings_state, lemmings_sound_cb)
|
||||
|
||||
|
@ -370,6 +370,9 @@ static MACHINE_CONFIG_START( pktgaldx )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE(8,9, 4,5,6,7 ,1,0,3,2) // hopefully this is correct, nothing else uses this arrangement!
|
||||
|
||||
/* sound hardware */
|
||||
|
@ -960,6 +960,9 @@ static MACHINE_CONFIG_START( rohga )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
@ -1047,6 +1050,9 @@ static MACHINE_CONFIG_START( wizdfire )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(rohga_state, wizdfire)
|
||||
@ -1139,6 +1145,9 @@ static MACHINE_CONFIG_START( nitrobal )
|
||||
MCFG_VIDEO_START_OVERRIDE(rohga_state, wizdfire)
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
@ -1227,6 +1236,9 @@ static MACHINE_CONFIG_START( schmeisr )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
@ -425,6 +425,9 @@ static MACHINE_CONFIG_START( sshangha )
|
||||
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
|
||||
|
||||
MCFG_DECO146_ADD("ioprot")
|
||||
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
|
||||
MCFG_DECO146_IN_PORTB_CB(IOPORT("SYSTEM"))
|
||||
MCFG_DECO146_IN_PORTC_CB(IOPORT("DSW"))
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") /* sure it's stereo? */
|
||||
|
@ -176,14 +176,10 @@ public:
|
||||
void updateAceRam();
|
||||
void mixDualAlphaSprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, gfx_element *gfx0, gfx_element *gfx1, int mixAlphaTilemap);
|
||||
|
||||
uint16_t port_a_fghthist(int unused);
|
||||
uint16_t port_b_fghthist(int unused);
|
||||
uint16_t port_c_fghthist(int unused);
|
||||
void deco32_sound_cb( address_space &space, uint16_t data, uint16_t mem_mask );
|
||||
|
||||
uint16_t port_b_nslasher(int unused);
|
||||
void nslasher_sound_cb( address_space &space, uint16_t data, uint16_t mem_mask );
|
||||
uint16_t port_b_tattass(int unused);
|
||||
DECLARE_READ16_MEMBER(port_b_tattass);
|
||||
void tattass_sound_cb( address_space &space, uint16_t data, uint16_t mem_mask );
|
||||
void deco32_set_audio_output(uint8_t raw_data);
|
||||
void update_irq_state(uint8_t irq_cause, bool assert_state);
|
||||
|
@ -1252,7 +1252,6 @@ void deco_146_base_device::write_protport(address_space &space, uint16_t address
|
||||
else if ((address&0xff) == m_soundlatch_port)
|
||||
{
|
||||
logerror("LOAD SOUND LATCH %04x %04x\n", data, mem_mask);
|
||||
COMBINE_DATA(&m_soundlatch);
|
||||
m_soundlatch_w(space, data, mem_mask);
|
||||
}
|
||||
|
||||
@ -1315,11 +1314,11 @@ uint16_t deco_146_base_device::read_data(uint16_t address, uint16_t mem_mask, ui
|
||||
|
||||
deco_146_base_device::deco_146_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock),
|
||||
m_port_a_r(*this),
|
||||
m_port_b_r(*this),
|
||||
m_port_c_r(*this),
|
||||
m_sound_latch(*this, ":soundlatch")
|
||||
{
|
||||
m_port_a_r = deco146_port_read_cb(FUNC(deco_146_base_device::port_a_default), this);
|
||||
m_port_b_r = deco146_port_read_cb(FUNC(deco_146_base_device::port_b_default), this);
|
||||
m_port_c_r = deco146_port_read_cb(FUNC(deco_146_base_device::port_c_default), this);
|
||||
m_soundlatch_w = deco146_port_write_cb(FUNC(deco_146_base_device::soundlatch_default), this);
|
||||
|
||||
m_external_addrswap[0] = 0;
|
||||
@ -1336,30 +1335,6 @@ deco_146_base_device::deco_146_base_device(const machine_config &mconfig, device
|
||||
|
||||
|
||||
|
||||
uint16_t deco_146_base_device::port_dummy_cb(int unused)
|
||||
{
|
||||
return 0x00;
|
||||
}
|
||||
|
||||
void deco_146_base_device::soundlatch_dummy(address_space &space, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
}
|
||||
|
||||
uint16_t deco_146_base_device::port_a_default(int unused)
|
||||
{
|
||||
return ioport(":INPUTS")->read();
|
||||
}
|
||||
|
||||
uint16_t deco_146_base_device::port_b_default(int unused)
|
||||
{
|
||||
return ioport(":SYSTEM")->read();
|
||||
}
|
||||
|
||||
uint16_t deco_146_base_device::port_c_default(int unused)
|
||||
{
|
||||
return ioport(":DSW")->read();
|
||||
}
|
||||
|
||||
void deco_146_base_device::soundlatch_default(address_space &space, uint16_t data, uint16_t mem_mask)
|
||||
{
|
||||
if (m_sound_latch != nullptr)
|
||||
@ -1371,9 +1346,6 @@ void deco_146_base_device::soundlatch_default(address_space &space, uint16_t dat
|
||||
|
||||
|
||||
|
||||
void deco_146_base_device::set_port_a_cb(device_t &device,deco146_port_read_cb port_cb) { deco_146_base_device &dev = downcast<deco_146_base_device &>(device); dev.m_port_a_r = port_cb; }
|
||||
void deco_146_base_device::set_port_b_cb(device_t &device,deco146_port_read_cb port_cb) { deco_146_base_device &dev = downcast<deco_146_base_device &>(device); dev.m_port_b_r = port_cb; }
|
||||
void deco_146_base_device::set_port_c_cb(device_t &device,deco146_port_read_cb port_cb) { deco_146_base_device &dev = downcast<deco_146_base_device &>(device); dev.m_port_c_r = port_cb; }
|
||||
void deco_146_base_device::set_soundlatch_cb(device_t &device,deco146_port_write_cb port_cb) { deco_146_base_device &dev = downcast<deco_146_base_device &>(device); dev.m_soundlatch_w = port_cb; }
|
||||
void deco_146_base_device::set_interface_scramble(device_t &device,uint8_t a9, uint8_t a8, uint8_t a7, uint8_t a6, uint8_t a5, uint8_t a4, uint8_t a3,uint8_t a2,uint8_t a1,uint8_t a0)
|
||||
{
|
||||
@ -1406,15 +1378,14 @@ void deco_146_base_device::device_start()
|
||||
|
||||
|
||||
// bind our handler
|
||||
m_port_a_r.bind_relative_to(*owner());
|
||||
m_port_b_r.bind_relative_to(*owner());
|
||||
m_port_c_r.bind_relative_to(*owner());
|
||||
m_port_a_r.resolve_safe(0xffff);
|
||||
m_port_b_r.resolve_safe(0xffff);
|
||||
m_port_c_r.resolve_safe(0xffff);
|
||||
m_soundlatch_w.bind_relative_to(*owner());
|
||||
|
||||
|
||||
save_item(NAME(m_xor));
|
||||
save_item(NAME(m_nand));
|
||||
save_item(NAME(m_soundlatch));
|
||||
|
||||
save_item(NAME(m_rambank0));
|
||||
save_item(NAME(m_rambank1));
|
||||
@ -1440,8 +1411,6 @@ void deco_146_base_device::device_reset()
|
||||
|
||||
m_current_rambank = 0;
|
||||
|
||||
m_soundlatch = 0x0000;
|
||||
|
||||
m_latchaddr = 0xffff;
|
||||
m_latchdata = 0x0000;
|
||||
m_latchflag = 0;
|
||||
|
@ -7,18 +7,17 @@
|
||||
|
||||
#include "machine/gen_latch.h"
|
||||
|
||||
typedef device_delegate<uint16_t (int unused)> deco146_port_read_cb;
|
||||
typedef device_delegate<void (address_space &space, uint16_t data, uint16_t mem_mask)> deco146_port_write_cb;
|
||||
|
||||
|
||||
#define MCFG_DECO146_SET_PORTA_CALLBACK( _class, _method) \
|
||||
deco_146_base_device::set_port_a_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
|
||||
#define MCFG_DECO146_IN_PORTA_CB(_devcb) \
|
||||
devcb = &deco_146_base_device::set_port_a_cb(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_DECO146_SET_PORTB_CALLBACK( _class, _method) \
|
||||
deco_146_base_device::set_port_b_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
|
||||
#define MCFG_DECO146_IN_PORTB_CB(_devcb) \
|
||||
devcb = &deco_146_base_device::set_port_b_cb(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_DECO146_SET_PORTC_CALLBACK( _class, _method) \
|
||||
deco_146_base_device::set_port_c_cb(*device, deco146_port_read_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
|
||||
#define MCFG_DECO146_IN_PORTC_CB(_devcb) \
|
||||
devcb = &deco_146_base_device::set_port_c_cb(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_DECO146_SET_SOUNDLATCH_CALLBACK( _class, _method) \
|
||||
deco_146_base_device::set_soundlatch_cb(*device, deco146_port_write_cb(&_class::_method, #_class "::" #_method, nullptr, (_class *)nullptr));
|
||||
@ -86,9 +85,9 @@ public:
|
||||
void write_data(address_space &space, uint16_t address, uint16_t data, uint16_t mem_mask, uint8_t &csflags);
|
||||
uint16_t read_data(uint16_t address, uint16_t mem_mask, uint8_t &csflags);
|
||||
|
||||
static void set_port_a_cb(device_t &device,deco146_port_read_cb port_cb);
|
||||
static void set_port_b_cb(device_t &device,deco146_port_read_cb port_cb);
|
||||
static void set_port_c_cb(device_t &device,deco146_port_read_cb port_cb);
|
||||
template<class Object> static devcb_base &set_port_a_cb(device_t &device, Object &&object) { return downcast<deco_146_base_device &>(device).m_port_a_r.set_callback(std::forward<Object>(object)); }
|
||||
template<class Object> static devcb_base &set_port_b_cb(device_t &device, Object &&object) { return downcast<deco_146_base_device &>(device).m_port_b_r.set_callback(std::forward<Object>(object)); }
|
||||
template<class Object> static devcb_base &set_port_c_cb(device_t &device, Object &&object) { return downcast<deco_146_base_device &>(device).m_port_c_r.set_callback(std::forward<Object>(object)); }
|
||||
static void set_soundlatch_cb(device_t &device,deco146_port_write_cb port_cb);
|
||||
static void set_interface_scramble(device_t &device,uint8_t a9, uint8_t a8, uint8_t a7, uint8_t a6, uint8_t a5, uint8_t a4, uint8_t a3,uint8_t a2,uint8_t a1,uint8_t a0);
|
||||
static void set_use_magic_read_address_xor(device_t &device, int use_xor);
|
||||
@ -97,17 +96,12 @@ public:
|
||||
|
||||
|
||||
|
||||
deco146_port_read_cb m_port_a_r;
|
||||
deco146_port_read_cb m_port_b_r;
|
||||
deco146_port_read_cb m_port_c_r;
|
||||
devcb_read16 m_port_a_r;
|
||||
devcb_read16 m_port_b_r;
|
||||
devcb_read16 m_port_c_r;
|
||||
deco146_port_write_cb m_soundlatch_w;
|
||||
|
||||
uint16_t port_a_default(int unused);
|
||||
uint16_t port_b_default(int unused);
|
||||
uint16_t port_c_default(int unused);
|
||||
uint16_t port_dummy_cb(int unused);
|
||||
void soundlatch_default(address_space &space, uint16_t data, uint16_t mem_mask);
|
||||
void soundlatch_dummy(address_space &space, uint16_t data, uint16_t mem_mask);
|
||||
|
||||
uint8_t m_bankswitch_swap_read_address;
|
||||
uint16_t m_magic_read_address_xor;
|
||||
@ -139,7 +133,6 @@ protected:
|
||||
|
||||
uint16_t m_nand;
|
||||
uint16_t m_xor;
|
||||
uint16_t m_soundlatch;
|
||||
|
||||
uint16_t m_latchaddr;
|
||||
uint16_t m_latchdata;
|
||||
|
Loading…
Reference in New Issue
Block a user