summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/amstrad.c
diff options
context:
space:
mode:
author etabeta78 <etabeta78@users.noreply.github.com>2015-01-19 06:37:19 +0100
committer etabeta78 <etabeta78@users.noreply.github.com>2015-01-19 06:37:19 +0100
commit0641ab831c824f8d9a66301534a22b6ea0e4da59 (patch)
tree7257b6113f18ec7a92fe551fca8ee24e210cdf59 /src/mess/machine/amstrad.c
parent76edf0d3e6500b2936a18c7d27ee0a81271d2b1b (diff)
avoid fatal error during -str run (typically used for regression tests). nw.
Diffstat (limited to 'src/mess/machine/amstrad.c')
-rw-r--r--src/mess/machine/amstrad.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c
index 5954bb90682..8c692622488 100644
--- a/src/mess/machine/amstrad.c
+++ b/src/mess/machine/amstrad.c
@@ -2842,7 +2842,7 @@ void amstrad_state::enumerate_roms()
int i;
bool slot3 = false,slot7 = false;
- if(m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000)
+ if (m_system_type == SYSTEM_PLUS || m_system_type == SYSTEM_GX4000)
{
UINT8 *crt = m_region_cart->base();
int bank_mask = (m_cart->get_rom_size() / 0x4000) - 1;
@@ -3034,6 +3034,8 @@ MACHINE_START_MEMBER(amstrad_state,plus)
astring region_tag;
m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
+ if (!m_region_cart) // this should never happen, since we make carts mandatory!
+ m_region_cart = memregion("maincpu");
}
@@ -3076,6 +3078,8 @@ MACHINE_START_MEMBER(amstrad_state,gx4000)
astring region_tag;
m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
+ if (!m_region_cart) // this should never happen, since we make carts mandatory!
+ m_region_cart = memregion("maincpu");
}
MACHINE_RESET_MEMBER(amstrad_state,gx4000)