ADB: fix the BRAM setup hooks

This commit is contained in:
dwsJason 2019-09-23 20:38:17 -04:00
parent b48a3cf470
commit 97f34650b1
1 changed files with 8 additions and 6 deletions

View File

@ -23,6 +23,7 @@ Dummy2 start ASMCODE
KeyArray start ASMCODE KeyArray start ASMCODE
ds 128 ds 128
ds 128
RemoveKeyboardDriver entry RemoveKeyboardDriver entry
php php
@ -32,7 +33,7 @@ RemoveKeyboardDriver entry
phk phk
plb plb
pea toBRamSetupVector ;Restore the previous vector pea $12 ;toBRamSetupVector ;Restore the previous vector
lda VecBRamSetup+3 lda VecBRamSetup+3
and #$ff and #$ff
pha pha
@ -66,7 +67,8 @@ clear stz KeyArray,x
dex dex
dex dex
bpl clear bpl clear
_ClearSRQTable
* *
* Blast any previous existing handler * Blast any previous existing handler
* This is probably mean, but I want input to work * This is probably mean, but I want input to work
@ -102,7 +104,7 @@ clear stz KeyArray,x
* *
pha pha
pha pha
pea toBRamSetupVector pea $12 ;toBRamSetupVector
_GetVector ; preserve original vector address _GetVector ; preserve original vector address
pla pla
sta VecBRamSetup+1 sta VecBRamSetup+1
@ -113,7 +115,7 @@ clear stz KeyArray,x
* Hook in our vector handler * Hook in our vector handler
pea toBRamSetupVector pea $12 ;toBRamSetupVector
pea VecBRamSetup|-16 pea VecBRamSetup|-16
pea VecBRamSetup pea VecBRamSetup
_SetVector _SetVector
@ -322,7 +324,7 @@ VecBRamSetup entry
plp ;Restore MX plp ;Restore MX
rtl ;Exit rtl ;Exit
toBRamSetupVector entry *toBRamSetupVector entry
ds 4 * ds 4
end end