return v;
}
+static bool has_expansion_with_rtc(struct uae_prefs* p, int chiplimit)
+{
+ if (p->bogomem.size ||
+ p->chipmem.size > chiplimit ||
+ p->cpuboard_type) {
+ return true;
+ }
+
+ for (int i = 0; i < MAX_RAM_BOARDS; i++) {
+ if (p->fastmem[i].size || p->z3fastmem[i].size) {
+ return true;
+ }
+ }
+ return false;
+}
+
int built_in_chipset_prefs (struct uae_prefs *p)
{
if (!p->cs_compatible)
// very A500-like
p->cs_df0idhw = 0;
p->cs_resetwarning = 0;
- if (p->bogomem.size || p->chipmem.size > 0x80000 || p->fastmem[0].size)
+ if (has_expansion_with_rtc(p, 0x80000))
p->cs_rtc = 1;
p->cs_ciatodbug = true;
} else {
p->cs_ciaoverlay = 0;
p->cs_resetwarning = 0;
p->cs_unmapped_space = 1;
+ if (has_expansion_with_rtc(p, 0x200000))
+ p->cs_rtc = 1;
break;
case CP_A500: // A500
p->cs_df0idhw = 0;
p->cs_resetwarning = 0;
- if (p->bogomem.size || p->chipmem.size > 0x80000 || p->fastmem[0].size)
+ if (has_expansion_with_rtc(p, 0x100000))
p->cs_rtc = 1;
p->cs_ciatodbug = true;
break;
p->cs_resetwarning = 0;
p->cs_ciatodbug = true;
p->cs_ciatype[0] = p->cs_ciatype[1] = 1;
+ if (has_expansion_with_rtc(p, 0x100000))
+ p->cs_rtc = 1;
break;
case CP_A1000: // A1000
p->cs_a1000ram = 1;
p->cs_agnusbltbusybug = 1;
p->cs_dipagnus = 1;
p->cs_ciatodbug = true;
+ if (has_expansion_with_rtc(p, 0x80000))
+ p->cs_rtc = 1;
break;
case CP_VELVET: // A1000 Prototype
p->cs_ciaatod = p->ntscmode ? 2 : 1;
p->cs_pcmcia = 1;
p->cs_ksmirror_a8 = 1;
p->cs_ciaoverlay = 0;
- if (p->fastmem[0].size || p->z3fastmem[0].size || p->cpuboard_type)
+ if (has_expansion_with_rtc(p, 0x200000))
p->cs_rtc = 1;
break;
case CP_A2000: // A2000