summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/gba
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
commitb380514764cf857469bae61c11143a19f79a74c5 (patch)
tree63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/bus/gba
parentc24473ddff715ecec2e258a6eb38960cf8c8e98e (diff)
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/bus/gba')
-rw-r--r--src/devices/bus/gba/gba_slot.h17
-rw-r--r--src/devices/bus/gba/rom.cpp32
2 files changed, 22 insertions, 27 deletions
diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h
index b26891c6589..c946fd71c57 100644
--- a/src/devices/bus/gba/gba_slot.h
+++ b/src/devices/bus/gba/gba_slot.h
@@ -84,17 +84,7 @@ class gba_cart_slot_device : public device_t,
{
public:
// construction/destruction
- template <typename T>
- gba_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
- : gba_cart_slot_device(mconfig, tag, owner, 0)
- {
- option_reset();
- opts(*this);
- set_default_option(dflt);
- set_fixed(false);
- }
-
- gba_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ gba_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~gba_cart_slot_device();
// device-level overrides
@@ -153,6 +143,11 @@ DECLARE_DEVICE_TYPE(GBA_CART_SLOT, gba_cart_slot_device)
#define GBASLOT_ROM_REGION_TAG ":cart:rom"
#define GBAHELP_ROM_REGION_TAG ":cart:romhlp"
+#define MCFG_GBA_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
+ MCFG_DEVICE_ADD(_tag, GBA_CART_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+
//------------------------------------------------------------------------
//
diff --git a/src/devices/bus/gba/rom.cpp b/src/devices/bus/gba/rom.cpp
index e1c61ec0f49..1471d43a430 100644
--- a/src/devices/bus/gba/rom.cpp
+++ b/src/devices/bus/gba/rom.cpp
@@ -417,13 +417,13 @@ READ32_MEMBER(gba_rom_flash_device::read_ram)
offset &= m_flash_mask;
if (mem_mask & 0xff)
- rv |= m_flash->read(offset * 4);
+ rv |= m_flash->read(space, offset * 4);
if (mem_mask & 0xff00)
- rv |= m_flash->read((offset * 4) + 1) << 8;
+ rv |= m_flash->read(space, (offset * 4) + 1) << 8;
if (mem_mask & 0xff0000)
- rv |= m_flash->read((offset * 4) + 2) << 16;
+ rv |= m_flash->read(space, (offset * 4) + 2) << 16;
if (mem_mask & 0xff000000)
- rv |= m_flash->read((offset * 4) + 3) << 24;
+ rv |= m_flash->read(space, (offset * 4) + 3) << 24;
return rv;
}
@@ -435,16 +435,16 @@ WRITE32_MEMBER(gba_rom_flash_device::write_ram)
switch (mem_mask)
{
case 0xff:
- m_flash->write(offset * 4, data & 0xff);
+ m_flash->write(space, offset * 4, data & 0xff);
break;
case 0xff00:
- m_flash->write((offset * 4) + 1, (data >> 8) & 0xff);
+ m_flash->write(space, (offset * 4) + 1, (data >> 8) & 0xff);
break;
case 0xff0000:
- m_flash->write((offset * 4) + 2, (data >> 16) & 0xff);
+ m_flash->write(space, (offset * 4) + 2, (data >> 16) & 0xff);
break;
case 0xff000000:
- m_flash->write((offset * 4) + 3, (data >> 24) & 0xff);
+ m_flash->write(space, (offset * 4) + 3, (data >> 24) & 0xff);
break;
default:
fatalerror("Unknown mem_mask for GBA flash write %x\n", mem_mask);
@@ -464,13 +464,13 @@ READ32_MEMBER(gba_rom_flash1m_device::read_ram)
offset &= m_flash_mask;
if (mem_mask & 0xff)
- rv |= m_flash->read(offset * 4);
+ rv |= m_flash->read(space, offset * 4);
if (mem_mask & 0xff00)
- rv |= m_flash->read((offset * 4) + 1) << 8;
+ rv |= m_flash->read(space, (offset * 4) + 1) << 8;
if (mem_mask & 0xff0000)
- rv |= m_flash->read((offset * 4) + 2) << 16;
+ rv |= m_flash->read(space, (offset * 4) + 2) << 16;
if (mem_mask & 0xff000000)
- rv |= m_flash->read((offset * 4) + 3) << 24;
+ rv |= m_flash->read(space, (offset * 4) + 3) << 24;
return rv;
}
@@ -482,16 +482,16 @@ WRITE32_MEMBER(gba_rom_flash1m_device::write_ram)
switch (mem_mask)
{
case 0xff:
- m_flash->write(offset * 4, data & 0xff);
+ m_flash->write(space, offset * 4, data & 0xff);
break;
case 0xff00:
- m_flash->write((offset * 4) + 1, (data >> 8) & 0xff);
+ m_flash->write(space, (offset * 4) + 1, (data >> 8) & 0xff);
break;
case 0xff0000:
- m_flash->write((offset * 4) + 2, (data >> 16) & 0xff);
+ m_flash->write(space, (offset * 4) + 2, (data >> 16) & 0xff);
break;
case 0xff000000:
- m_flash->write((offset * 4) + 3, (data >> 24) & 0xff);
+ m_flash->write(space, (offset * 4) + 3, (data >> 24) & 0xff);
break;
default:
fatalerror("Unknown mem_mask for GBA flash write %x\n", mem_mask);