diff options
author | etabeta78 <doge.fabio@gmail.com> | 2016-05-04 06:33:56 +0200 |
---|---|---|
committer | etabeta78 <doge.fabio@gmail.com> | 2016-05-04 06:33:56 +0200 |
commit | 14473449e918b0f260eb2b01a83491c2bbdc2894 (patch) | |
tree | 1bb38ba7de453ebdaa2f87b41a1562ba7d306e85 /src/devices/bus/gba/gba_slot.cpp | |
parent | ce1715534a96b82cd5f6ce8ce4e8660a71fba7f3 (diff) |
a first dive in my huge backlog. nw.
Diffstat (limited to 'src/devices/bus/gba/gba_slot.cpp')
-rw-r--r-- | src/devices/bus/gba/gba_slot.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp index 737ff5fa6ed..b32c6c21af4 100644 --- a/src/devices/bus/gba/gba_slot.cpp +++ b/src/devices/bus/gba/gba_slot.cpp @@ -50,8 +50,11 @@ void device_gba_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == nullptr) { + if (size < 0x4000000) // we always alloc 32MB of rom region! - m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(GBASLOT_ROM_REGION_TAG).c_str(), 0x2000000, 4, ENDIANNESS_LITTLE)->base(); + m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(GBASLOT_ROM_REGION_TAG).c_str(), 0x2000000, 4, ENDIANNESS_LITTLE)->base(); + else + m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(GBASLOT_ROM_REGION_TAG).c_str(), 0x4000000, 4, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -169,9 +172,9 @@ bool gba_cart_slot_device::call_load() { UINT8 *ROM; UINT32 size = (software_entry() != nullptr) ? get_software_region_length("rom") : length(); - if (size > 0x2000000) + if (size > 0x4000000) { - seterror(IMAGE_ERROR_UNSPECIFIED, "Attempted loading a cart larger than 32MB"); + seterror(IMAGE_ERROR_UNSPECIFIED, "Attempted loading a cart larger than 64MB"); return IMAGE_INIT_FAIL; } |