]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Optional BKPT CPU halt.
authorToni Wilen <twilen@winuae.net>
Sun, 31 May 2020 16:42:55 +0000 (19:42 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 31 May 2020 16:42:55 +0000 (19:42 +0300)
cfgfile.cpp
include/newcpu.h
include/options.h
newcpu.cpp

index 37d652cdfc76c2cdd66dc2316009bb578a6a0cc8..f536abe71db13eb30ba0f1892a0718bd2916e58c 100644 (file)
@@ -2429,6 +2429,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
        cfgfile_dwrite_bool(f, _T("resetwarning"), p->cs_resetwarning);
        cfgfile_dwrite_bool(f, _T("denise_noehb"), p->cs_denisenoehb);
        cfgfile_dwrite_bool(f, _T("agnus_bltbusybug"), p->cs_agnusbltbusybug);
+       cfgfile_dwrite_bool(f, _T("bkpt_halt"), p->cs_bkpthang);
        cfgfile_dwrite_bool(f, _T("ics_agnus"), p->cs_dipagnus);
        cfgfile_dwrite_bool(f, _T("cia_todbug"), p->cs_ciatodbug);
        cfgfile_dwrite_bool(f, _T("z3_autoconfig"), p->cs_z3autoconfig);
@@ -5405,6 +5406,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
                || cfgfile_yesno(option, value, _T("rom_is_slow"), &p->cs_romisslow)
                || cfgfile_yesno(option, value, _T("1mchipjumper"), &p->cs_1mchipjumper)
                || cfgfile_yesno(option, value, _T("agnus_bltbusybug"), &p->cs_agnusbltbusybug)
+               || cfgfile_yesno(option, value, _T("bkpt_halt"), &p->cs_bkpthang)
                || cfgfile_yesno(option, value, _T("gfxcard_hardware_vblank"), &p->rtg_hardwareinterrupt)
                || cfgfile_yesno(option, value, _T("gfxcard_hardware_sprite"), &p->rtg_hardwaresprite)
                || cfgfile_yesno(option, value, _T("gfxcard_multithread"), &p->rtg_multithread)
@@ -8847,6 +8849,7 @@ int built_in_chipset_prefs (struct uae_prefs *p)
        p->cs_denisenoehb = 0;
        p->cs_dipagnus = 0;
        p->cs_agnusbltbusybug = 0;
+       p->cs_bkpthang = 0;
        p->cs_mbdmac = 0;
        p->cs_pcmcia = 0;
        p->cs_ksmirror_e0 = 1;
index 668a9d02e35d16372b7056269bda137aeacfb126..ef9428bb64f7bfcd06559d3de7192d59e1f5d7fb 100644 (file)
@@ -840,6 +840,7 @@ extern bool can_cpu_tracer (void);
 #define CPU_HALT_SSP_IN_NON_EXISTING_ADDRESS 10
 #define CPU_HALT_INVALID_START_ADDRESS 11
 #define CPU_HALT_68060_HALT 12
+#define CPU_HALT_BKPT 13
 
 uae_u32 process_cpu_indirect_memory_read(uae_u32 addr, int size);
 void process_cpu_indirect_memory_write(uae_u32 addr, uae_u32 data, int size);
index 76e930f49e779477dea18b768727705d26364c42..0e9ac2ad47b968d17bd858e9840584e7815a4035 100644 (file)
@@ -674,6 +674,7 @@ struct uae_prefs {
        bool cs_color_burst;
        bool cs_romisslow;
        bool cs_toshibagary;
+       bool cs_bkpthang;
        int cs_unmapped_space;
        int cs_hacks;
        int cs_ciatype[2];
index 09062b6dd8397fc108e547a5db610bb5cd9e9693..e312b4465956382cd6394476a4ba87fbf2404e98 100644 (file)
@@ -3582,6 +3582,15 @@ uae_u32 REGPARAM2 op_illg (uae_u32 opcode)
                return 4;
        }
 
+       // BKPT?
+       if (opcode >= 0x4848 && opcode <= 0x484f && currprefs.cpu_model >= 68020) {
+               // some boards hang because there is no break point cycle acknowledge
+               if (currprefs.cs_bkpthang) {
+                       cpu_halt(CPU_HALT_BKPT);
+                       return 4;
+               }
+       }
+
        if (debugmem_illg(opcode)) {
                m68k_incpc_normal(2);
                return 4;