]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Small IPL test update
authorToni Wilen <twilen@winuae.net>
Sat, 23 Apr 2022 13:08:49 +0000 (16:08 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 23 Apr 2022 13:08:49 +0000 (16:08 +0300)
cputest.cpp
cputest/cputest_defines.h
cputest/cputestgen.ini

index e19903ddb3129f00afadefbed823b58d36c86c83..eca0e7906bc942106527f058ca150692c67ef626 100644 (file)
@@ -373,8 +373,8 @@ static void count_interrupt_cycles(int cycles)
                return;
        interrupt_cycle_cnt -= cycles;
        if (interrupt_cycle_cnt <= 0) {
-               regs.ipl_pin = 1;
-               interrupt_level = 1;
+               regs.ipl_pin = IPL_TEST_IPL_LEVEL;
+               interrupt_level = regs.ipl_pin;
                interrupt_cycle_cnt = 0;
        }
 }
@@ -3045,7 +3045,10 @@ static int create_ea_random(uae_u16 *opcodep, uaecptr pc, int mode, int reg, str
                                                *isconstant = -1;
                                } else {
                                        put_word_test(pc, imm16_cnt);
-                                       imm16_cnt += 0x100; // STOP hack
+                                       if (dp->mnemo == i_STOP && feature_interrupts > 0) {
+                                               // STOP hack to keep STOP test size smaller.
+                                               imm16_cnt += 0x0100;
+                                       }
                                        if (imm16_cnt == 0)
                                                *isconstant = 0; 
                                        else
@@ -3948,6 +3951,7 @@ static void execute_ins(uaecptr endpc, uaecptr targetpc, struct instr *dp, bool
        int cnt = 2;
        uaecptr first_pc = regs.pc;
        uae_u32 loop_mode_reg = 0;
+
        if (feature_loop_mode_68010) {
                // 68010 loop mode
                cnt = (feature_loop_mode_cnt + 1) * 2;
index f98548b6f988efb30986858caff51085cbfa7fa4..5aaeb9b10926d9c8dd42c31d2608a57ef6897b98 100644 (file)
@@ -61,3 +61,4 @@
 #define INTERRUPT_CYCLES 64
 #define MAX_INTERRUPT_DELAY 64
 #define IPL_TRIGGER_ADDR 0xdc0000
+#define IPL_TEST_IPL_LEVEL 4
index 9e3755d875963f1e97c77729d8a6108c41cc8087..802919bce0eae8380beb1f35016ffc2b76c6ae4a 100644 (file)
@@ -145,6 +145,7 @@ feature_min_interrupt_mask=0
 ; 1 = interrupt request is set before test.
 ; Tests all INTREQ bits one by one. Compatible with cycle count mode.
 ; 2 = test CPU IPL sampling timing.
+; 3 = 2 + Set T1 immediately before test instruction
 ; Uses serial port to generate timing interrupt. Requires serial port TX connected to RX.
 ; Generates multiple extra tests.
 ; Used delay instruction: ROL.L D0,D0 (D0 = number of CPU clocks * 2)
@@ -240,6 +241,7 @@ enabled=1
 verbose=0
 feature_undefined_ccr=1
 feature_interrupts=2
+;feature_sr_mask=0x2100
 mode=all
 
 ; interrupt exception