summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/bml3/bml3mp1805.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/bml3/bml3mp1805.cpp')
-rw-r--r--src/devices/bus/bml3/bml3mp1805.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/devices/bus/bml3/bml3mp1805.cpp b/src/devices/bus/bml3/bml3mp1805.cpp
index 9d7e0823388..e16c924a62d 100644
--- a/src/devices/bus/bml3/bml3mp1805.cpp
+++ b/src/devices/bus/bml3/bml3mp1805.cpp
@@ -13,6 +13,8 @@
#include "emu.h"
#include "bml3mp1805.h"
+#include "softlist_dev.h"
+
/***************************************************************************
PARAMETERS
@@ -24,12 +26,10 @@
DEFINE_DEVICE_TYPE(BML3BUS_MP1805, bml3bus_mp1805_device, "bml3mp1805", "Hitachi MP-1805 Floppy Controller Card")
-#define MP1805_ROM_REGION "mp1805_rom"
-
ROM_START( mp1805 )
- ROM_REGION(0x10000, MP1805_ROM_REGION, 0)
+ ROM_REGION(0x800, "mp1805_rom", 0)
// MP-1805 disk controller ROM, which replaces part of the system ROM
- ROM_LOAD( "mp1805.rom", 0xf800, 0x0800, BAD_DUMP CRC(b532d8d9) SHA1(6f1160356d5bf64b5926b1fdb60db414edf65f22))
+ ROM_LOAD( "mp1805.rom", 0x000, 0x800, BAD_DUMP CRC(b532d8d9) SHA1(6f1160356d5bf64b5926b1fdb60db414edf65f22))
ROM_END
// Although the drive is single-sided, D88 images are double-sided,
@@ -51,7 +51,6 @@ void bml3bus_mp1805_device::floppy_drives(device_slot_interface &device)
void bml3bus_mp1805_device::device_add_mconfig(machine_config &config)
{
MC6843(config, m_mc6843, 500000);
- m_mc6843->force_ready();
m_mc6843->irq().set(FUNC(bml3bus_mp1805_device::nmi_w));
FLOPPY_CONNECTOR(config, m_floppy[0], floppy_drives, "mb_6890", floppy_image_device::default_mfm_floppy_formats).enable_sound(true);
@@ -133,7 +132,8 @@ bml3bus_mp1805_device::bml3bus_mp1805_device(const machine_config &mconfig, cons
device_t(mconfig, BML3BUS_MP1805, tag, owner, clock),
device_bml3bus_card_interface(mconfig, *this),
m_floppy(*this, "%u", 0U),
- m_mc6843(*this, "mc6843"), m_rom(nullptr)
+ m_mc6843(*this, "mc6843"),
+ m_rom(*this, "mp1805_rom")
{
}
@@ -144,16 +144,6 @@ bml3bus_mp1805_device::bml3bus_mp1805_device(const machine_config &mconfig, cons
void bml3bus_mp1805_device::device_start()
{
- m_rom = memregion(MP1805_ROM_REGION)->base();
-
- // install into memory
- address_space &space_prg = space();
- space_prg.install_device(0xff18, 0xff1f, *m_mc6843, &mc6843_device::map);
- space_prg.install_readwrite_handler(0xff20, 0xff20, read8smo_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_r)), write8smo_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_w)));
- // overwriting the main ROM (rather than using e.g. install_rom) should mean that bank switches for RAM expansion still work...
- uint8_t *mainrom = device().machine().root_device().memregion("maincpu")->base();
- memcpy(mainrom + 0xf800, m_rom + 0xf800, 0x800);
-
save_item(NAME(m_control));
}
@@ -161,3 +151,16 @@ void bml3bus_mp1805_device::device_reset()
{
m_control = 0;
}
+
+void bml3bus_mp1805_device::map_exrom(address_space_installer &space)
+{
+ space.install_rom(0xf800, 0xfeff, &m_rom[0]);
+ space.install_rom(0xfff0, 0xffff, &m_rom[0x7f0]);
+}
+
+void bml3bus_mp1805_device::map_io(address_space_installer &space)
+{
+ // install into memory
+ space.install_device(0xff18, 0xff1f, *m_mc6843, &mc6843_device::map);
+ space.install_readwrite_handler(0xff20, 0xff20, read8smo_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_r)), write8smo_delegate(*this, FUNC(bml3bus_mp1805_device::bml3_mp1805_w)));
+}