Link Autoconf PICs so that no physical boards get skipped

The board in the (logical) first Zorro slot MAY still get skipped, but I can't confirm this yet.
This commit is contained in:
beeanyew
2020-12-07 02:15:15 +01:00
parent 74fe0f61f3
commit b82265a918
2 changed files with 7 additions and 1 deletions

View 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);

View 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