diff --git a/src/mem.c b/src/mem.c index e74fa03b2..376e748b7 100644 --- a/src/mem.c +++ b/src/mem.c @@ -1380,7 +1380,7 @@ void mem_init(void) for (c = 0; c < (mem_size / 64); c++) { isram[c] = 1; - if (c >= 0xa && c <= 0xf) + if ((c >= 0xa && c <= 0xf) || (cpu_16bitbus && c >= 0xfe && c <= 0xff)) isram[c] = 0; } @@ -1476,7 +1476,7 @@ void mem_resize() for (c = 0; c < (mem_size / 64); c++) { isram[c] = 1; - if (c >= 0xa && c <= 0xf) + if ((c >= 0xa && c <= 0xf) || (cpu_16bitbus && c >= 0xfe && c <= 0xff)) isram[c] = 0; } diff --git a/src/pc.c b/src/pc.c index 1d8d1b5e6..c0a1168b8 100644 --- a/src/pc.c +++ b/src/pc.c @@ -683,6 +683,7 @@ pc_reset_hard_init(void) initalmain(0, NULL); /* Reset the general machine support modules. */ + cpu_set(); mem_resize(); io_init(); device_init(); @@ -782,7 +783,6 @@ pc_reset_hard_init(void) device_add(&bugger_device); /* Reset the CPU module. */ - cpu_set(); cpu_update_waitstates(); cpu_cache_int_enabled = cpu_cache_ext_enabled = 0; resetx86();