mirror of
https://github.com/holub/mame
synced 2025-07-03 09:06:08 +03:00
(MESS) speeding up slot implementation of the SVP add-on chip. nw.
This commit is contained in:
parent
98ac2b1071
commit
a219ff2db0
@ -335,6 +335,10 @@ bool base_md_cart_slot_device::call_load()
|
|||||||
|
|
||||||
if (res == IMAGE_INIT_PASS)
|
if (res == IMAGE_INIT_PASS)
|
||||||
{
|
{
|
||||||
|
//speed-up rom access from SVP add-on, if present
|
||||||
|
if (m_type == SEGA_SVP)
|
||||||
|
m_cart->set_bank_to_rom("cart_svp", 0x800/2);
|
||||||
|
|
||||||
// STEP 3: install memory handlers for this type of cart
|
// STEP 3: install memory handlers for this type of cart
|
||||||
setup_custom_mappers();
|
setup_custom_mappers();
|
||||||
|
|
||||||
|
@ -109,6 +109,7 @@ public:
|
|||||||
virtual UINT16* get_nvram_base() { return m_nvram; };
|
virtual UINT16* get_nvram_base() { return m_nvram; };
|
||||||
virtual UINT32 get_rom_size() { return m_rom_size; };
|
virtual UINT32 get_rom_size() { return m_rom_size; };
|
||||||
virtual UINT32 get_nvram_size() { return m_nvram_size; };
|
virtual UINT32 get_nvram_size() { return m_nvram_size; };
|
||||||
|
virtual void set_bank_to_rom(const char *banktag, UINT32 offset) {};
|
||||||
|
|
||||||
void rom_map_setup(UINT32 size);
|
void rom_map_setup(UINT32 size);
|
||||||
UINT32 get_padded_size(UINT32 size);
|
UINT32 get_padded_size(UINT32 size);
|
||||||
|
@ -314,10 +314,10 @@ INPUT_PORTS_END
|
|||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
ADDRESS_MAP_START( md_svp_ssp_map, AS_PROGRAM, 16, md_rom_svp_device )
|
ADDRESS_MAP_START( md_svp_ssp_map, AS_PROGRAM, 16, md_rom_svp_device )
|
||||||
AM_RANGE(0x0000, 0x03ff) AM_READ(rom_read1)
|
// AM_RANGE(0x0000, 0x03ff) AM_READ(rom_read1)
|
||||||
AM_RANGE(0x0400, 0xffff) AM_READ(rom_read2)
|
// AM_RANGE(0x0400, 0xffff) AM_READ(rom_read2)
|
||||||
// AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("bank3")
|
AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("iram_svp")
|
||||||
// AM_RANGE(0x0400, 0xffff) AM_ROMBANK("bank4")
|
AM_RANGE(0x0400, 0xffff) AM_ROMBANK("cart_svp")
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -361,6 +361,13 @@ ioport_constructor md_rom_svp_device::device_input_ports() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void md_rom_svp_device::set_bank_to_rom(const char *banktag, UINT32 offset)
|
||||||
|
{
|
||||||
|
if (membank(banktag))
|
||||||
|
membank(banktag)->set_base(m_rom + offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void md_rom_svp_device::device_start()
|
void md_rom_svp_device::device_start()
|
||||||
{
|
{
|
||||||
memset(m_pmac_read, 0, ARRAY_LENGTH(m_pmac_read));
|
memset(m_pmac_read, 0, ARRAY_LENGTH(m_pmac_read));
|
||||||
@ -373,8 +380,12 @@ void md_rom_svp_device::device_start()
|
|||||||
m_xst2 = 0;
|
m_xst2 = 0;
|
||||||
|
|
||||||
/* SVP stuff */
|
/* SVP stuff */
|
||||||
|
// DRAM
|
||||||
m_dram = auto_alloc_array(machine(), UINT8, 0x20000);
|
m_dram = auto_alloc_array(machine(), UINT8, 0x20000);
|
||||||
|
// IRAM
|
||||||
m_iram = auto_alloc_array(machine(), UINT8, 0x800);
|
m_iram = auto_alloc_array(machine(), UINT8, 0x800);
|
||||||
|
this->membank("iram_svp")->set_base(m_iram);
|
||||||
|
// the other bank, "cart_svp", is setup at call_load
|
||||||
}
|
}
|
||||||
|
|
||||||
READ16_MEMBER(md_rom_svp_device::read)
|
READ16_MEMBER(md_rom_svp_device::read)
|
||||||
|
@ -24,6 +24,7 @@ public:
|
|||||||
virtual void device_config_complete() { m_shortname = "md_rom_svp"; }
|
virtual void device_config_complete() { m_shortname = "md_rom_svp"; }
|
||||||
virtual machine_config_constructor device_mconfig_additions() const;
|
virtual machine_config_constructor device_mconfig_additions() const;
|
||||||
virtual ioport_constructor device_input_ports() const;
|
virtual ioport_constructor device_input_ports() const;
|
||||||
|
virtual void set_bank_to_rom(const char *banktag, UINT32 offset);
|
||||||
|
|
||||||
required_device<device_t> m_svp;
|
required_device<device_t> m_svp;
|
||||||
required_ioport m_test_ipt;
|
required_ioport m_test_ipt;
|
||||||
|
Loading…
Reference in New Issue
Block a user