44Fermer46
PpHdLe 16/07/2009 à 20:47
PpHd (./31) :
Folco (./30) :
Confirmed, it works on 89 HW2 ! Sorry for the false report... (first repeat delay seems to be ~5 sec, then 2 secs)


Well, don't get me wrong. I really consider this as a bug. The delays are too big!


I get it! I get it!
I get this fucking bug!
The bug wasn't in the int 1, neither in the repeat code, neither in the get code.
It was....
in the idle function!!!

The idle function doesn't wake up if auto int 1 is trigered on PedroM.
Which makes the idle function to wake up only for the first press on the keyboard (auto int 2), and then to wake up only if the auto int 5 is triggered, which explains the slow rate (In fact, the counter was near the counter of int 5 which makes senses).

AMS does the same thing (don't wake up the CPU if auto int 1 is triggered) except if some keys are in the key buffer, in which case, it wakes up if Auto Int 1 is triggered...

Here is the patch:
--- a/src/Boot.asm
+++ b/src/Boot.asm
@@ -239,7 +239,7 @@ OSCont2     lea     (SSP_INIT).w,sp                 ; Setup Supervisor Stack
 
        ; Init Key System
        jsr     GKeyFlush
-       move.w  #50,(a7)
+       move.w  #24,(a7)
        jsr     OSInitBetweenKeyDelay
        move.w  #130,(a7)
        jsr     OSInitKeyInitDelay
--- a/src/Vectors.asm
+++ b/src/Vectors.asm
@@ -326,7 +326,11 @@ Trap_5:    ; Trap_5 really turns off the calc.
 Trap_0:        ; Idle
        move.w  #$2700,SR
        move.w  #$280,$600018
-       moveq   #$1E,d0
+       moveq   #$1E,d0          ; Default: Wake up only for auto int 2, 3, 4, 5, 6 or 7
+       tst.w   (KEY_PREVIOUS).w ;      Check if a key is currently processed by the Auto int 1 (in which case the auto int 1 has to handle the auto repeat feature ==> The calculator
+       beq.s   \DontWakeUpIfAutoInt1
+               moveq   #$1F,d0          ; Wake up only for auto int 1, 2, 3, 4, 5, 6 or 7
+\DontWakeUpIfAutoInt1:
        ifd     PEDROM_92
                bsr.s   IdleRam         ; For 92+ & V200; shut dowwn flash
        endif

(I have also increased the default repeat rate).
A RC5 should come soon.