/* another boolean to choice update.. */
static const TCHAR *cycleexact[] = { _T("false"), _T("memory"), _T("true"), 0 };
static const TCHAR *unmapped[] = { _T("floating"), _T("zero"), _T("one"), 0 };
+static const TCHAR *ciatype[] = { _T("default"), _T("391078-01"), 0 };
struct hdcontrollerconfig
{
cfgfile_dwrite_bool(f, _T("color_burst"), p->cs_color_burst);
cfgfile_dwrite_bool(f, _T("toshiba_gary"), p->cs_toshibagary);
cfgfile_dwrite_bool(f, _T("rom_is_slow"), p->cs_romisslow);
+ cfgfile_dwrite_str(f, _T("ciaa_type"), ciatype[p->cs_ciatype[0]]);
+ cfgfile_dwrite_str(f, _T("ciab_type"), ciatype[p->cs_ciatype[1]]);
cfgfile_dwrite_str(f, _T("unmapped_address_space"), unmapped[p->cs_unmapped_space]);
cfgfile_dwrite (f, _T("chipset_hacks"), _T("0x%x"), p->cs_hacks);
|| cfgfile_strval(option, value, _T("boot_rom_uae"), &p->boot_rom, uaebootrom, 0)
|| cfgfile_strval (option, value, _T("serial_translate"), &p->serial_crlf, serialcrlf, 0)
|| cfgfile_strval(option, value, _T("unmapped_address_space"), &p->cs_unmapped_space, unmapped, 0)
+ || cfgfile_strval(option, value, _T("ciaa_type"), &p->cs_ciatype[0], ciatype, 0)
+ || cfgfile_strval(option, value, _T("ciab_type"), &p->cs_ciatype[1], ciatype, 0)
|| cfgfile_strboolval (option, value, _T("comp_flushmode"), &p->comp_hardflush, flushmode, 0))
return 1;
p->cs_ciatodbug = false;
p->cs_unmapped_space = 0;
p->cs_color_burst = false;
+ p->cs_ciatype[0] = 0;
+ p->cs_ciatype[1] = 0;
for (int i = APMODE_NATIVE; i <= APMODE_RTG; i++) {
struct gfx_filterdata *f = &p->gf[i];
v |= (ciaapra | (ciaadra ^ 3)) & 0x03;
v = dongle_cia_read (0, reg, ciaadra, v);
v = alg_joystick_buttons(ciaapra, ciaadra, v);
+
+ // 391078-01 CIA: output mode bits always return PRA contents
+ if (currprefs.cs_ciatype[0]) {
+ v &= ~ciaadra;
+ v |= ciaapra & ciaadra;
+ }
+
#if DONGLE_DEBUG > 0
if (notinrom())
write_log (_T("BFE001 R %02X %s\n"), v, debuginfo(0));
tmp &= ~0x40;
tmp |= pb6 ? 0x40 : 00;
}
+
+ if (currprefs.cs_ciatype[0]) {
+ tmp &= ~ciaadrb;
+ tmp |= ciaaprb & ciaadrb;
+ }
+
return tmp;
case 2:
#if DONGLE_DEBUG > 0
if (notinrom ())
write_log (_T("BFD000 R %02X %s\n"), tmp, debuginfo(0));
#endif
+
+ if (currprefs.cs_ciatype[1]) {
+ tmp &= ~ciabdra;
+ tmp |= ciabpra & ciabdra;
+ }
+
return tmp;
case 1:
#if DONGLE_DEBUG > 0
tmp &= ~0x40;
tmp |= pb6 ? 0x40 : 00;
}
+
+ if (currprefs.cs_ciatype[1]) {
+ tmp &= ~ciabdrb;
+ tmp |= ciabprb & ciabdrb;
+ }
+
return tmp;
case 2:
return ciabdra;