diff --git a/definitions.asm b/definitions.asm index eddde64..c96f7a0 100644 --- a/definitions.asm +++ b/definitions.asm @@ -26,6 +26,7 @@ TextForegroundColor = $0A space = 0 ; space in screencodes KeyRepeatSpeed = 8 ; (max 127 !!!) +FirstKeySpeed = 8 ; additional delay for first keypress ;character codes for symbols (tank, parachute, etc. ) ; characters from tanks.fnt (graphics screen) diff --git a/scorch.asm b/scorch.asm index 8d15712..3c431e2 100644 --- a/scorch.asm +++ b/scorch.asm @@ -38,8 +38,9 @@ icl 'definitions.asm' ;--------------------------------------------------- -FirstZpageVariable = $52 +FirstZpageVariable = $51 .zpvar DliColorBack .byte = FirstZpageVariable + .zpvar FirstKeypressDelay .byte .zpvar ClearSky .byte ; $ff - Crear sky during drawmountains, 0 - no clear sky .zpvar PaddleState .byte ; old state 2nd button for 2 buttons joysticks .zpvar GradientNr .byte @@ -496,10 +497,13 @@ Check2button ;-------------------------------------------------- .proc WaitForKeyRelease ;-------------------------------------------------- - mva #128-KeyRepeatSpeed pressTimer ; tricky + lda #128-KeyRepeatSpeed ; tricky + sec + sbc FirstKeypressDelay ; tricky 2 :) + sta pressTimer StillWait bit pressTimer - bmi KeyReleased + bmi KeyAutoReleased lda STICK0 and #$0f cmp #$0f @@ -520,6 +524,10 @@ StillWait beq StillWait .ENDIF KeyReleased + mva #FirstKeySpeed FirstKeypressDelay + rts +KeyAutoReleased ; autorepeat + mva #0 FirstKeypressDelay rts .endp ;-------------------------------------------------- diff --git a/scorch.bin b/scorch.bin index 81e7295..d069191 100644 Binary files a/scorch.bin and b/scorch.bin differ diff --git a/scorch.xex b/scorch.xex index 42a9308..0ae6f21 100644 Binary files a/scorch.xex and b/scorch.xex differ