mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-21 21:34:20 +02:00
WIP: 5200 starts
This commit is contained in:
+50
-26
@@ -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,11 +1231,33 @@ lab2
|
|||||||
; ------- RMT -------
|
; ------- RMT -------
|
||||||
SkipRMTVBL
|
SkipRMTVBL
|
||||||
exitVBL
|
exitVBL
|
||||||
ply
|
|
||||||
plx
|
|
||||||
pla
|
|
||||||
.IF target = 5200
|
.IF target = 5200
|
||||||
pla
|
; 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
|
||||||
tay
|
tay
|
||||||
pla
|
pla
|
||||||
tax
|
tax
|
||||||
@@ -1564,20 +1584,24 @@ getkeyend
|
|||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc WaitForKeyRelease
|
.proc WaitForKeyRelease
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
lda STICK0
|
.IF TARGET = 5200
|
||||||
and #$0f
|
rts
|
||||||
cmp #$0f
|
.ELSE
|
||||||
bne WaitForKeyRelease
|
lda STICK0
|
||||||
lda STRIG0
|
and #$0f
|
||||||
beq WaitForKeyRelease
|
cmp #$0f
|
||||||
lda SKSTAT
|
bne WaitForKeyRelease
|
||||||
cmp #$ff
|
lda STRIG0
|
||||||
bne WaitForKeyRelease
|
beq WaitForKeyRelease
|
||||||
lda CONSOL
|
lda SKSTAT
|
||||||
and #%00000110 ; Select and Option only
|
cmp #$ff
|
||||||
cmp #%00000110
|
bne WaitForKeyRelease
|
||||||
bne WaitForKeyRelease
|
lda CONSOL
|
||||||
rts
|
and #%00000110 ; Select and Option only
|
||||||
|
cmp #%00000110
|
||||||
|
bne WaitForKeyRelease
|
||||||
|
rts
|
||||||
|
.ENDIF
|
||||||
.endp
|
.endp
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
.proc IsKeyPressed ; A=0 - yes , A>0 - no
|
.proc IsKeyPressed ; A=0 - yes , A>0 - no
|
||||||
@@ -1722,10 +1746,10 @@ font4x4
|
|||||||
.ENDIF
|
.ENDIF
|
||||||
org ROM_SETTINGS ; 5200 ROM settings address $bfe8
|
org ROM_SETTINGS ; 5200 ROM settings address $bfe8
|
||||||
; "01234567890123456789"
|
; "01234567890123456789"
|
||||||
.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
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user