mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
cpc464: force DDI-1 to use only ROM slot 7, should fix issues with Speedlock protected games.
This commit is contained in:
parent
9f91d26cec
commit
bc622e4fa6
@ -23,7 +23,7 @@ SLOT_INTERFACE_END
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( cpc_ddi1 )
|
||||
ROM_REGION( 0x4000, "exp_rom", 0 )
|
||||
ROM_REGION( 0x4000, "disc_rom", 0 )
|
||||
ROM_LOAD("cpcados.rom", 0x0000, 0x4000, CRC(1fe22ecd) SHA1(39102c8e9cb55fcc0b9b62098780ed4a3cb6a4bb))
|
||||
ROM_END
|
||||
|
||||
@ -80,6 +80,7 @@ void cpc_ddi1_device::device_start()
|
||||
|
||||
space.install_write_handler(0xfa7e,0xfa7f,0,0,write8_delegate(FUNC(cpc_ddi1_device::motor_w),this));
|
||||
space.install_readwrite_handler(0xfb7e,0xfb7f,0,0,read8_delegate(FUNC(cpc_ddi1_device::fdc_r),this),write8_delegate(FUNC(cpc_ddi1_device::fdc_w),this));
|
||||
space.install_write_handler(0xdf00,0xdfff,0,0,write8_delegate(FUNC(cpc_ddi1_device::rombank_w),this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -88,6 +89,7 @@ void cpc_ddi1_device::device_start()
|
||||
|
||||
void cpc_ddi1_device::device_reset()
|
||||
{
|
||||
m_rom_active = false;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cpc_ddi1_device::motor_w)
|
||||
@ -137,3 +139,22 @@ READ8_MEMBER(cpc_ddi1_device::fdc_r)
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(cpc_ddi1_device::rombank_w)
|
||||
{
|
||||
if(data == 0x07)
|
||||
m_rom_active = true;
|
||||
else
|
||||
m_rom_active = false;
|
||||
m_slot->rom_select(space,0,data);
|
||||
}
|
||||
|
||||
void cpc_ddi1_device::set_mapping()
|
||||
{
|
||||
if(m_rom_active)
|
||||
{
|
||||
UINT8* ROM = memregion("disc_rom")->base();
|
||||
membank(":bank7")->set_base(ROM);
|
||||
membank(":bank8")->set_base(ROM+0x2000);
|
||||
}
|
||||
}
|
||||
|
@ -25,10 +25,12 @@ public:
|
||||
// optional information overrides
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual void set_mapping();
|
||||
|
||||
DECLARE_WRITE8_MEMBER(motor_w);
|
||||
DECLARE_WRITE8_MEMBER(fdc_w);
|
||||
DECLARE_READ8_MEMBER(fdc_r);
|
||||
DECLARE_WRITE8_MEMBER(rombank_w);
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
@ -39,6 +41,8 @@ private:
|
||||
|
||||
required_device<upd765_family_device> m_fdc;
|
||||
required_device<floppy_connector> m_connector;
|
||||
|
||||
bool m_rom_active;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
@ -1972,7 +1972,7 @@ WRITE8_MEMBER(amstrad_state::rom_select)
|
||||
exp_port = temp_dev->subdevice<cpc_expansion_slot_device>("exp");
|
||||
}
|
||||
|
||||
amstrad_setUpperRom();
|
||||
amstrad_rethinkMemory();
|
||||
}
|
||||
|
||||
/* Offset handler for write */
|
||||
|
Loading…
Reference in New Issue
Block a user