summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/gba/gba_slot.h
diff options
context:
space:
mode:
author etabeta78 <doge.fabio@gmail.com>2016-05-17 12:35:54 +0200
committer etabeta78 <doge.fabio@gmail.com>2016-05-17 12:35:54 +0200
commit6e43812f6032b779d5732e166b09e630cd115efc (patch)
treecad06591dadf186ca081cdf69d81d28b9daa7f48 /src/devices/bus/gba/gba_slot.h
parentdf5c8faa8594fbbab71a2f31ce6636b996d44c41 (diff)
gba.cpp: Added preliminary support for the 3D Matrix Memory
Controller used by 64MB video cartridges. Disney Collection 2 works, while other dumps still fail (possibly due to reason unrelated to the mapper emulation...) [Fabio Priuli]
Diffstat (limited to 'src/devices/bus/gba/gba_slot.h')
-rw-r--r--src/devices/bus/gba/gba_slot.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h
index 11810ecd960..a3908730180 100644
--- a/src/devices/bus/gba/gba_slot.h
+++ b/src/devices/bus/gba/gba_slot.h
@@ -18,7 +18,8 @@ enum
GBA_EEPROM64,
GBA_FLASH,
GBA_FLASH512,
- GBA_FLASH1M
+ GBA_FLASH1M,
+ GBA_3DMATRIX
};
@@ -35,12 +36,15 @@ public:
virtual DECLARE_READ32_MEMBER(read_rom) { return 0xffffffff; }
virtual DECLARE_READ32_MEMBER(read_ram) { return 0xffffffff; }
virtual DECLARE_WRITE32_MEMBER(write_ram) {};
+ virtual DECLARE_WRITE32_MEMBER(write_mapper) {};
void rom_alloc(UINT32 size, const char *tag);
void nvram_alloc(UINT32 size);
UINT32* get_rom_base() { return m_rom; }
+ UINT32* get_romhlp_base() { return m_romhlp; }
UINT32* get_nvram_base() { return &m_nvram[0]; }
UINT32 get_rom_size() { return m_rom_size; }
+ UINT32 get_romhlp_size() { return m_romhlp_size; }
UINT32 get_nvram_size() { return m_nvram.size()*sizeof(UINT32); }
void set_rom_size(UINT32 val) { m_rom_size = val; }
@@ -49,6 +53,8 @@ public:
// internal state
UINT32 *m_rom; // this points to the cart rom region
UINT32 m_rom_size; // this is the actual game size, not the rom region size!
+ UINT32 *m_romhlp;
+ UINT32 m_romhlp_size;
std::vector<UINT32> m_nvram;
};
@@ -98,6 +104,7 @@ public:
virtual DECLARE_READ32_MEMBER(read_rom);
virtual DECLARE_READ32_MEMBER(read_ram);
virtual DECLARE_WRITE32_MEMBER(write_ram);
+ virtual DECLARE_WRITE32_MEMBER(write_mapper) { if (m_cart) return m_cart->write_mapper(space, offset, data, mem_mask); };
protected:
@@ -117,6 +124,7 @@ extern const device_type GBA_CART_SLOT;
***************************************************************************/
#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) \