redo amstrad expansion slot devcb usage (nw)

This commit is contained in:
Miodrag Milanovic 2014-03-16 10:32:02 +00:00
parent 93f4e806a4
commit fbdf07c69f
6 changed files with 24 additions and 42 deletions

View File

@ -844,8 +844,8 @@ CPC_EXPANSION_INTERFACE(cpc_exp_intf)
DEVCB_CPU_INPUT_LINE("maincpu", 0), DEVCB_CPU_INPUT_LINE("maincpu", 0),
DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_NMI), DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_NMI),
DEVCB_NULL, // RESET DEVCB_NULL, // RESET
DEVCB_LINE(cpc_romdis), // ROMDIS DEVCB_DRIVER_LINE_MEMBER(amstrad_state, cpc_romdis), // ROMDIS
DEVCB_LINE(cpc_romen) // /ROMEN DEVCB_DRIVER_LINE_MEMBER(amstrad_state, cpc_romen) // /ROMEN
}; };
static MACHINE_CONFIG_FRAGMENT( cpcplus_cartslot ) static MACHINE_CONFIG_FRAGMENT( cpcplus_cartslot )

View File

@ -234,6 +234,9 @@ public:
DECLARE_READ8_MEMBER(amstrad_ppi_portb_r); DECLARE_READ8_MEMBER(amstrad_ppi_portb_r);
DECLARE_WRITE8_MEMBER(amstrad_ppi_portc_w); DECLARE_WRITE8_MEMBER(amstrad_ppi_portc_w);
DECLARE_WRITE_LINE_MEMBER( cpc_romdis );
DECLARE_WRITE_LINE_MEMBER( cpc_romen );
void aleste_interrupt(bool state); void aleste_interrupt(bool state);
DECLARE_FLOPPY_FORMATS( floppy_formats ); DECLARE_FLOPPY_FORMATS( floppy_formats );
@ -320,13 +323,6 @@ protected:
/*----------- defined in machine/amstrad.c -----------*/ /*----------- 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_mc6845_intf;
extern const mc6845_interface amstrad_plus_mc6845_intf; extern const mc6845_interface amstrad_plus_mc6845_intf;

View File

@ -1142,33 +1142,19 @@ static device_t* get_expansion_device(running_machine &machine, const char* tag)
return NULL; 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) if(state != 0)
tstate->m_gate_array.mrer &= ~0x04; m_gate_array.mrer &= ~0x04;
else else
tstate->m_gate_array.mrer |= 0x04; m_gate_array.mrer |= 0x04;
tstate->amstrad_rethinkMemory(); amstrad_rethinkMemory();
} }

View File

@ -17,11 +17,11 @@ const device_type CPC_ROM = &device_creator<cpc_rom_device>;
CPC_EXPANSION_INTERFACE(sub_exp_intf) CPC_EXPANSION_INTERFACE(sub_exp_intf)
{ {
DEVCB_LINE(cpc_irq_w), DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, irq_w),
DEVCB_LINE(cpc_nmi_w),//LINE_MEMBER(cpc_expansion_slot_device,nmi_w), DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, nmi_w),
DEVCB_NULL, // RESET DEVCB_NULL, // RESET
DEVCB_LINE(cpc_romdis), // ROMDIS DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romdis_w), // ROMDIS
DEVCB_LINE(cpc_romen) // /ROMEN DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romen_w) // /ROMEN
}; };
// device machine config // device machine config

View File

@ -19,11 +19,11 @@ const device_type CPC_DKSPEECH = &device_creator<cpc_dkspeech_device>;
CPC_EXPANSION_INTERFACE(sub_exp_intf) CPC_EXPANSION_INTERFACE(sub_exp_intf)
{ {
DEVCB_LINE(cpc_irq_w), DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, irq_w),
DEVCB_LINE(cpc_nmi_w), DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, nmi_w),
DEVCB_NULL, // RESET DEVCB_NULL, // RESET
DEVCB_LINE(cpc_romdis), // ROMDIS DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romdis_w), // ROMDIS
DEVCB_LINE(cpc_romen) // /ROMEN DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romen_w) // /ROMEN
}; };
//------------------------------------------------- //-------------------------------------------------

View File

@ -16,11 +16,11 @@ const device_type CPC_MFACE2 = &device_creator<cpc_multiface2_device>;
CPC_EXPANSION_INTERFACE(sub_exp_intf) CPC_EXPANSION_INTERFACE(sub_exp_intf)
{ {
DEVCB_LINE(cpc_irq_w), DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, irq_w),
DEVCB_LINE(cpc_nmi_w),//LINE_MEMBER(cpc_expansion_slot_device,nmi_w), DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, nmi_w),
DEVCB_NULL, // RESET DEVCB_NULL, // RESET
DEVCB_LINE(cpc_romdis), // ROMDIS DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romdis_w), // ROMDIS
DEVCB_LINE(cpc_romen) // /ROMEN DEVCB_DEVICE_LINE_MEMBER("^^", cpc_expansion_slot_device, romen_w) // /ROMEN
}; };
// device machine config // device machine config