08-03-2012, 11:26 AM
na_th_an Wrote:And the results are positive. INKEY$ doesn't neeed the BASIC ISR. So, unless I need to use the FRAMES system variable, I can skip calling the BASIC ISR from my own ISR.
You could do it faster yourself. Berksman does this itself. When playing a sound, it goes to IM2, which updates FRAMES and nothing else, as quickly as I could This lets the clock stay in sync in the middle of a sound and doesn't affect the sound too badly. (I can barely hear it)..
Code:
isr:
asm
;This is the interrupt Service Routune
; First thing, save those registers.
PUSH AF
PUSH HL
;Kick the clock forward because we lost at least a frame.
LD HL,23672
INC (HL)
JR NZ, ISREnd
INC HL
INC (HL)
JR NZ, ISREnd
INC HL
INC (HL)
ISREnd:
POP HL
POP AF
reti
end asm