]> git.sesse.net Git - pistorm/commitdiff
Merge pull request #21 from beeanyew/wip-crap
authorbeeanyew <beeanyew@gmail.com>
Thu, 22 Apr 2021 02:30:11 +0000 (04:30 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Apr 2021 02:30:11 +0000 (04:30 +0200)
Fix Z3 Fast autoconf on Kickstart 2.0

emulator.c
platforms/amiga/amiga-autoconf.c
platforms/amiga/amiga-platform.c

index 6e0e0f97496f4e0b280ef0afaecfcb9df8e41a30..802761794a7f237c2b9e2f227f2c4be26e2062e0 100644 (file)
@@ -434,11 +434,6 @@ int main(int argc, char *argv[]) {
   int g;
   //const struct sched_param priority = {99};
 
-  if (argc > 1) {
-    irq_delay = atoi(argv[1]);
-    printf("Setting IRQ delay to %d loops (%s).\n", irq_delay, argv[1]);
-  }
-
   // Some command line switch stuffles
   for (g = 1; g < argc; g++) {
     if (strcmp(argv[g], "--cpu_type") == 0 || strcmp(argv[g], "--cpu") == 0) {
index 3da54adc267f284ac1140113abc391e8b066273b..ed958ea951968a54019085c29160ef779c83732d 100644 (file)
@@ -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;
index 819dd0fdc1da7c7ded00f26818677ae3fee3eefc..e3e1a072726ec8b76bae27e78ff255ce6bea97ea 100644 (file)
@@ -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;