diff options
Diffstat (limited to 'src/devices/bus/z88/flash.cpp')
-rw-r--r-- | src/devices/bus/z88/flash.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/devices/bus/z88/flash.cpp b/src/devices/bus/z88/flash.cpp index ee92f351ec7..bda80f4cff6 100644 --- a/src/devices/bus/z88/flash.cpp +++ b/src/devices/bus/z88/flash.cpp @@ -37,10 +37,27 @@ z88_1024k_flash_device::z88_1024k_flash_device(const machine_config &mconfig, co : device_t(mconfig, Z88_1024K_FLASH, tag, owner, clock) , device_z88cart_interface(mconfig, *this) , m_flash(*this, FLASH_TAG) + , m_region(*this, FLASH_TAG) { } //------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +ROM_START( z88_1024k_flash ) + ROM_REGION( 0x100000, FLASH_TAG, ROMREGION_ERASEFF ) + // this region is required to initialize the flash device with the data loaded from the cartridge interface +ROM_END + + +const tiny_rom_entry *z88_1024k_flash_device::device_rom_region() const +{ + return ROM_NAME( z88_1024k_flash ); +} + + +//------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- @@ -64,14 +81,14 @@ void z88_1024k_flash_device::device_add_mconfig(machine_config &config) uint8_t* z88_1024k_flash_device::get_cart_base() { - return m_flash->base(); + return m_region->base(); } /*------------------------------------------------- read -------------------------------------------------*/ -READ8_MEMBER(z88_1024k_flash_device::read) +uint8_t z88_1024k_flash_device::read(offs_t offset) { return m_flash->read(offset & (get_cart_size() - 1)); } @@ -80,7 +97,7 @@ READ8_MEMBER(z88_1024k_flash_device::read) write -------------------------------------------------*/ -WRITE8_MEMBER(z88_1024k_flash_device::write) +void z88_1024k_flash_device::write(offs_t offset, uint8_t data) { m_flash->write(offset & (get_cart_size() - 1), data); } |