From 09dd33878069c46b92769685bc2215d96a3a3ae9 Mon Sep 17 00:00:00 2001 From: beeanyew Date: Sun, 3 Oct 2021 09:25:08 +0200 Subject: [PATCH] Hopefully fix up physical Zorro board detection during AutoConfig --- platforms/amiga/amiga-platform.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platforms/amiga/amiga-platform.c b/platforms/amiga/amiga-platform.c index 3c28a25..257c807 100644 --- a/platforms/amiga/amiga-platform.c +++ b/platforms/amiga/amiga-platform.c @@ -86,7 +86,10 @@ inline int custom_read_amiga(struct emulator_config *cfg, unsigned int addr, uns if (addr == AC_Z2_BASE) { uint8_t zchk = ps_read_8(addr); DEBUG("[AUTOCONF] Read from AC_Z2_BASE: %.2X\n", zchk); - if (zchk != 0x4E) { + // This check may look a bit strange, but it appears that some boards invert the lower four nibbles + // for the boardtype bits, although this isn't required, and if it isn't "clear" in one way or the + // other (either 1111 or 0000), there's no board responding on this address. + if ((zchk & 0x0F) == 0x0F || (zchk & 0x0F) == 0x00) { if (!ac_waiting_for_physical_pic) { printf("[AUTOCONF] Found physical Zorro board, pausing processing until done.\n"); ac_waiting_for_physical_pic = 1;