WIP: 5200 starts

This commit is contained in:
2022-09-19 09:01:56 -04:00
parent d72ca57181
commit 174dbe0bed
3 changed files with 50 additions and 26 deletions
+32 -8
View File
@@ -6,7 +6,7 @@
;Miami & Warsaw 2022 ;Miami & Warsaw 2022
;--------------------------------------------------- ;---------------------------------------------------
.def target = 5200 ; or 800 .def target = 800 ;5200 ; or 800
;--------------------------------------------------- ;---------------------------------------------------
OPT r+ ; saves 12 bytes :O OPT r+ ; saves 12 bytes :O
@@ -130,6 +130,7 @@
; libraries ; libraries
;----------------------------------------------- ;-----------------------------------------------
.IF TARGET = 5200 .IF TARGET = 5200
OPT h-f+
icl 'lib/5200SYS.ASM' icl 'lib/5200SYS.ASM'
icl 'lib/5200MACRO.ASM' icl 'lib/5200MACRO.ASM'
.ELSE .ELSE
@@ -1195,9 +1196,6 @@ DLIinterruptNone
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc VBLinterrupt .proc VBLinterrupt
pha
phx
phy
mva #0 dliCounter mva #0 dliCounter
lda PAL lda PAL
@@ -1233,10 +1231,32 @@ lab2
; ------- RMT ------- ; ------- RMT -------
SkipRMTVBL SkipRMTVBL
exitVBL exitVBL
ply
plx
pla
.IF target = 5200 .IF target = 5200
; center = 114 ;Read analog stick and make it look like a digital stick
; threshold = 60
;
; lda pot0 ;Read POT0 value (horizontal position)
; cmp #center+threshold ;Compare with right threshold
; rol stick0 ;Feed carry into digital stick value
; cmp #center-threshold ;Compare with left threshold
; rol stick0 ;Feed carry into digital stick value
;
; lda pot1 ;Read POT1 value (vertical position)
; cmp #center+threshold ;Compare with down threshold
; rol stick0 ;Feed carry into digital stick value
; cmp #center-threshold ;Compare with down threshold
; rol stick0 ;Feed carry into digital stick value
;
; lda stick0 ;0 indicates a press so the right/down values need to be inverted
; eor #2+8
; and #$0f
; sta stick0
;
; mva trig0 strig0 ;Move hardware to shadow
;
; lda skstat ;Reset consol key shadow is no key is pressed anymore
; and #4
; seq:mva #consol_reset consol
pla pla
tay tay
pla pla
@@ -1564,6 +1584,9 @@ getkeyend
;-------------------------------------------------- ;--------------------------------------------------
.proc WaitForKeyRelease .proc WaitForKeyRelease
;-------------------------------------------------- ;--------------------------------------------------
.IF TARGET = 5200
rts
.ELSE
lda STICK0 lda STICK0
and #$0f and #$0f
cmp #$0f cmp #$0f
@@ -1578,6 +1601,7 @@ getkeyend
cmp #%00000110 cmp #%00000110
bne WaitForKeyRelease bne WaitForKeyRelease
rts rts
.ENDIF
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
.proc IsKeyPressed ; A=0 - yes , A>0 - no .proc IsKeyPressed ; A=0 - yes , A>0 - no
@@ -1725,7 +1749,7 @@ font4x4
.byte " SCORCH 5200 v" ;20 characters title .byte " SCORCH 5200 v" ;20 characters title
build ; " " build ; " "
.byte " " .byte " "
.byte '7A' ;2 characters year .. 1900 + $7A = 2020 .byte "7A" ;2 characters year .. 1900 + $7A = 2020
.word FirstSTART .word FirstSTART
.ELSE .ELSE
run FirstSTART run FirstSTART
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.