]> git.sesse.net Git - pistorm/commitdiff
Link Autoconf PICs so that no physical boards get skipped
authorbeeanyew <Bjorn Astrom>
Mon, 7 Dec 2020 01:15:15 +0000 (02:15 +0100)
committerbeeanyew <Bjorn Astrom>
Mon, 7 Dec 2020 01:15:15 +0000 (02:15 +0100)
The board in the (logical) first Zorro slot MAY still get skipped, but I can't confirm this yet.

platforms/amiga/amiga-autoconf.c
platforms/amiga/amiga-autoconf.h

index 3667875630263cc820564a2ea7c312c6ea08f8f7..690a3eb273c7608427895a2e04c573fccb34e47d 100644 (file)
@@ -83,6 +83,8 @@ unsigned int autoconfig_read_memory_z3_8(struct emulator_config *cfg, unsigned i
           val |= get_autoconf_size_ext(cfg->map_size[index]);
         else
           val |= get_autoconf_size(cfg->map_size[index]);
+        if (ac_z3_current_pic + 1 < ac_z3_pic_count)
+          val |= BOARDTYPE_LINKED;
         // Pre-invert this value, since it's the only value not physically complemented
         // for Zorro III.
         val ^= 0xFF;
@@ -234,8 +236,11 @@ unsigned int autoconfig_read_memory_8(struct emulator_config *cfg, unsigned int
 
   
   if ((address & 1) == 0 && (address / 2) < (int)sizeof(ac_fast_ram_rom)) {
-    if (ac_z2_type[ac_z2_current_pic] == ACTYPE_MAPFAST_Z2 && address / 2 == 1)
+    if (ac_z2_type[ac_z2_current_pic] == ACTYPE_MAPFAST_Z2 && address / 2 == 1) {
       val = get_autoconf_size(cfg->map_size[ac_z2_index[ac_z2_current_pic]]);
+      if (ac_z2_current_pic + 1 < ac_z2_pic_count)
+        val |= BOARDTYPE_LINKED;
+    }
     else
       val = rom[address / 2];
     //printf("Read byte %d from Z2 autoconf for PIC %d (%.2X).\n", address/2, ac_z2_current_pic, val);
index 329b1e0aee57eedb8a11548d30aeb6f179729fac..c39fdf158fa36c9d925cd0e38516d842b983a305 100644 (file)
@@ -69,6 +69,7 @@ enum autoconfg_z3_regs {
 #define BOARDTYPE_Z2 (0x80|0x40)
 #define BOARDTYPE_FREEMEM 0x20
 #define BOARDTYPE_BOOTROM 0x10
+#define BOARDTYPE_LINKED 0x08
 
 #define Z3_FLAGS_MEMORY    0x80
 #define Z3_FLAGS_NOSHUTUP  0x40