From eaf95017a8ebda9ab26321d09e6f3ec4ba5e68aa Mon Sep 17 00:00:00 2001 From: beeanyew Date: Thu, 22 Apr 2021 02:22:42 +0200 Subject: [PATCH] Fix Z3 Fast autoconf on Kickstart 2.0 Managed to forget to stage one line of code for the last commit... Also fixes the Z3 Autoconf memory range staying active after being configured, prevents some rare memory wraparounds. --- platforms/amiga/amiga-autoconf.c | 4 +++- platforms/amiga/amiga-platform.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/platforms/amiga/amiga-autoconf.c b/platforms/amiga/amiga-autoconf.c index 3da54ad..ed958ea 100644 --- a/platforms/amiga/amiga-autoconf.c +++ b/platforms/amiga/amiga-autoconf.c @@ -238,8 +238,10 @@ void autoconfig_write_memory_z3_16(struct emulator_config *cfg, unsigned int add cfg->map_high[index] = cfg->map_offset[index] + cfg->map_size[index]; m68k_add_ram_range(cfg->map_offset[index], cfg->map_high[index], cfg->map_data[index]); ac_z3_current_pic++; - if (ac_z3_current_pic == ac_z3_pic_count) + if (ac_z3_current_pic == ac_z3_pic_count) { ac_z3_done = 1; + adjust_ranges_amiga(cfg); + } } return; diff --git a/platforms/amiga/amiga-platform.c b/platforms/amiga/amiga-platform.c index 819dd0f..e3e1a07 100644 --- a/platforms/amiga/amiga-platform.c +++ b/platforms/amiga/amiga-platform.c @@ -187,20 +187,20 @@ void adjust_ranges_amiga(struct emulator_config *cfg) { } } - if (ac_z2_pic_count && (!ac_z2_done || !ac_z3_done)) { + if ((ac_z2_pic_count || ac_z3_pic_count) && (!ac_z2_done || !ac_z3_done)) { if (cfg->custom_low == 0) cfg->custom_low = AC_Z2_BASE; else cfg->custom_low = min(cfg->custom_low, AC_Z2_BASE); cfg->custom_high = max(cfg->custom_high, AC_Z2_BASE + AC_SIZE); } - if (ac_z3_pic_count && !ac_z3_done) { + /*if (ac_z3_pic_count && !ac_z3_done) { if (cfg->custom_low == 0) cfg->custom_low = AC_Z3_BASE; else cfg->custom_low = min(cfg->custom_low, AC_Z3_BASE); cfg->custom_high = max(cfg->custom_high, AC_Z3_BASE + AC_SIZE); - } + }*/ if (rtg_enabled) { if (cfg->custom_low == 0) cfg->custom_low = PIGFX_RTG_BASE; -- 2.39.2