mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
redo amstrad expansion slot devcb usage (nw)
This commit is contained in:
parent
93f4e806a4
commit
fbdf07c69f
@ -844,8 +844,8 @@ CPC_EXPANSION_INTERFACE(cpc_exp_intf)
|
||||
DEVCB_CPU_INPUT_LINE("maincpu", 0),
|
||||
DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_NMI),
|
||||
DEVCB_NULL, // RESET
|
||||
DEVCB_LINE(cpc_romdis), // ROMDIS
|
||||
DEVCB_LINE(cpc_romen) // /ROMEN
|
||||
DEVCB_DRIVER_LINE_MEMBER(amstrad_state, cpc_romdis), // ROMDIS
|
||||
DEVCB_DRIVER_LINE_MEMBER(amstrad_state, cpc_romen) // /ROMEN
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( cpcplus_cartslot )
|
||||
|
@ -234,6 +234,9 @@ public:
|
||||
DECLARE_READ8_MEMBER(amstrad_ppi_portb_r);
|
||||
DECLARE_WRITE8_MEMBER(amstrad_ppi_portc_w);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( cpc_romdis );
|
||||
DECLARE_WRITE_LINE_MEMBER( cpc_romen );
|
||||
|
||||
void aleste_interrupt(bool state);
|
||||
|
||||
DECLARE_FLOPPY_FORMATS( floppy_formats );
|
||||
@ -320,13 +323,6 @@ protected:
|
||||
|
||||
/*----------- defined in machine/amstrad.c -----------*/
|
||||
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER( cpc_irq_w );
|
||||
WRITE_LINE_DEVICE_HANDLER( cpc_nmi_w );
|
||||
WRITE_LINE_DEVICE_HANDLER( cpc_romdis );
|
||||
WRITE_LINE_DEVICE_HANDLER( cpc_romen );
|
||||
|
||||
|
||||
extern const mc6845_interface amstrad_mc6845_intf;
|
||||
extern const mc6845_interface amstrad_plus_mc6845_intf;
|
||||
|
||||
|
@ -1142,33 +1142,19 @@ static device_t* get_expansion_device(running_machine &machine, const char* tag)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER(cpc_irq_w)
|
||||
WRITE_LINE_MEMBER(amstrad_state::cpc_romdis)
|
||||
{
|
||||
device->machine().device("maincpu")->execute().set_input_line(0, state);
|
||||
m_gate_array.romdis = state;
|
||||
amstrad_rethinkMemory();
|
||||
}
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER(cpc_nmi_w)
|
||||
WRITE_LINE_MEMBER(amstrad_state::cpc_romen)
|
||||
{
|
||||
device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, state);
|
||||
}
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER(cpc_romdis)
|
||||
{
|
||||
amstrad_state *tstate = device->machine().driver_data<amstrad_state>();
|
||||
|
||||
tstate->m_gate_array.romdis = state;
|
||||
tstate->amstrad_rethinkMemory();
|
||||
}
|
||||
|
||||
WRITE_LINE_DEVICE_HANDLER(cpc_romen)
|
||||
{
|
||||
amstrad_state *tstate = device->machine().driver_data<amstrad_state>();
|
||||
|
||||
if(state != 0)
|
||||
tstate->m_gate_array.mrer &= ~0x04;
|
||||
m_gate_array.mrer &= ~0x04;
|
||||
else
|
||||
tstate->m_gate_array.mrer |= 0x04;
|
||||
tstate->amstrad_rethinkMemory();
|
||||
m_gate_array.mrer |= 0x04;
|
||||
amstrad_rethinkMemory();
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,11 +17,11 @@ const device_type CPC_ROM = &device_creator<cpc_rom_device>;
|
||||
|
||||
CPC_EXPANSION_INTERFACE(sub_exp_intf)
|
||||
{
|
||||
DEVCB_LINE(cpc_irq_w),
|
||||
DEVCB_LINE(cpc_nmi_w),//LINE_MEMBER(cpc_expansion_slot_device,nmi_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, irq_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, nmi_w),
|
||||
DEVCB_NULL, // RESET
|
||||
DEVCB_LINE(cpc_romdis), // ROMDIS
|
||||
DEVCB_LINE(cpc_romen) // /ROMEN
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romdis_w), // ROMDIS
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romen_w) // /ROMEN
|
||||
};
|
||||
|
||||
// device machine config
|
||||
|
@ -19,11 +19,11 @@ const device_type CPC_DKSPEECH = &device_creator<cpc_dkspeech_device>;
|
||||
|
||||
CPC_EXPANSION_INTERFACE(sub_exp_intf)
|
||||
{
|
||||
DEVCB_LINE(cpc_irq_w),
|
||||
DEVCB_LINE(cpc_nmi_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, irq_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, nmi_w),
|
||||
DEVCB_NULL, // RESET
|
||||
DEVCB_LINE(cpc_romdis), // ROMDIS
|
||||
DEVCB_LINE(cpc_romen) // /ROMEN
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romdis_w), // ROMDIS
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romen_w) // /ROMEN
|
||||
};
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -16,11 +16,11 @@ const device_type CPC_MFACE2 = &device_creator<cpc_multiface2_device>;
|
||||
|
||||
CPC_EXPANSION_INTERFACE(sub_exp_intf)
|
||||
{
|
||||
DEVCB_LINE(cpc_irq_w),
|
||||
DEVCB_LINE(cpc_nmi_w),//LINE_MEMBER(cpc_expansion_slot_device,nmi_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, irq_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, nmi_w),
|
||||
DEVCB_NULL, // RESET
|
||||
DEVCB_LINE(cpc_romdis), // ROMDIS
|
||||
DEVCB_LINE(cpc_romen) // /ROMEN
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romdis_w), // ROMDIS
|
||||
DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romen_w) // /ROMEN
|
||||
};
|
||||
|
||||
// device machine config
|
||||
|
Loading…
Reference in New Issue
Block a user