interpro: prevent some crashes

This commit is contained in:
Patrick Mackinlay 2021-02-05 12:19:23 +07:00
parent 1e45fb328a
commit 0712ac147e
2 changed files with 6 additions and 5 deletions

View File

@ -607,6 +607,7 @@ edge2plus_processor_device_base::edge2plus_processor_device_base(const machine_c
, device_srx_card_interface(mconfig, *this)
, m_dsp1(*this, "dsp1")
, m_screen(nullptr)
, m_sram(nullptr)
{
}
@ -702,12 +703,11 @@ void edge2plus_framebuffer_device_base::device_start()
LOG("found processor device %s\n", processor->tag());
processor->register_screen(m_screen, m_sram);
processor->m_dsp1->set_addrmap(0, address_map_constructor(&edge2plus_framebuffer_device_base::map_dynamic, processor->m_dsp1->tag(), this));
}
// FIXME: dynamically allocate SR region 4
m_bus->install_map(*this, 0x90000000, 0x93ffffff, &edge2plus_framebuffer_device_base::map_dynamic);
processor->m_dsp1->set_addrmap(0, address_map_constructor(&edge2plus_framebuffer_device_base::map_dynamic, processor->m_dsp1->tag(), this));
}
u32 mpcb849_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@ -833,8 +833,8 @@ WRITE_LINE_MEMBER(edge2plus_processor_device_base::holda)
void edge2plus_processor_device_base::dsp1_map(address_map &map)
{
map(0x00000, 0x3ffff).lrw8(
NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram->read(offset); }),
NAME([this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { m_sram->write(offset, data); }));
NAME([this](address_space &space, offs_t offset, u8 mem_mask) { return m_sram ? m_sram->read(offset) : 0; }),
NAME([this](address_space &space, offs_t offset, u8 data, u8 mem_mask) { if (m_sram) m_sram->write(offset, data); }));
map(0x40000, 0x7ffff).lr32(
NAME([this](address_space &space, offs_t offset, u32 mem_mask) { return memregion("prg1")->as_u32(offset); }));

View File

@ -1637,9 +1637,10 @@ ROM_START(ip2500)
ROM_REGION32_LE(0x80, "idprom", 0)
ROM_LOAD32_BYTE("msmt1000.bin", 0x0, 0x20, CRC(548046c0) SHA1(ce7646e868f3aa35642d7f9348f6b9e91693918e))
// FIXME: undumped - probably identical to ip2700 eprom
ROM_REGION16_LE(0x20000, "eprom", 0)
ROM_SYSTEM_BIOS(0, "ip2500", "InterPro/InterServe 25x0 EPROM")
ROMX_LOAD("ip2500_eprom.bin", 0x00000, 0x20000, NO_DUMP, ROM_BIOS(0))
ROMX_LOAD("ip2500_eprom.bin", 0x00000, 0x20000, CRC(467ce7bd) SHA1(53faee40d5df311f53b24c930e434cbf94a5c4aa) BAD_DUMP, ROM_BIOS(0))
ROM_REGION(0x20000, "flash_lsb", 0)
ROM_LOAD_OPTIONAL("y225.u76", 0x00000, 0x20000, CRC(46c0b105) SHA1(7c4a104e4fb3d0e5e8db7c911cdfb3f5c4fb0218))