mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-15 20:30:11 +00:00
move cheat category and DHGR title bits to gGamesList OKVS
no more separate gCheatsAvailable array
This commit is contained in:
parent
b2b28f6288
commit
8f5f1dbdd8
@ -119,7 +119,7 @@ gDFXStore
|
|||||||
gSlideshowStore
|
gSlideshowStore
|
||||||
!word $0800
|
!word $0800
|
||||||
gGlobalPrefsStore
|
gGlobalPrefsStore
|
||||||
!word $D100
|
!word $D000
|
||||||
gGamesListStore
|
gGamesListStore
|
||||||
!word $FDFD ; SMC
|
!word $FDFD ; SMC
|
||||||
SwitchToBank2
|
SwitchToBank2
|
||||||
|
@ -108,8 +108,6 @@ gValLen = $1F80
|
|||||||
gVal = $1F81
|
gVal = $1F81
|
||||||
|
|
||||||
; LC RAM 1
|
; LC RAM 1
|
||||||
gCheatsAvailable = $D000 ; master cheats table, indexed by game index in gGamesListStore
|
|
||||||
; 1 byte per game, so max size = 256 games
|
|
||||||
MockingboardStuff = $FFF8 ; bit 7 = 1 if speech chip present (Mockingboard "C")
|
MockingboardStuff = $FFF8 ; bit 7 = 1 if speech chip present (Mockingboard "C")
|
||||||
; bit 6 = 1 if Mockingboard "B" (stereo) found (else Mockingboard "A")
|
; bit 6 = 1 if Mockingboard "B" (stereo) found (else Mockingboard "A")
|
||||||
; bit 4-5 unused
|
; bit 4-5 unused
|
||||||
|
@ -85,6 +85,15 @@ ParseGamesList
|
|||||||
inx
|
inx
|
||||||
bpl @gatherValue
|
bpl @gatherValue
|
||||||
@endValue
|
@endValue
|
||||||
|
pla ; pop cheat category
|
||||||
|
sta gVal,x ; store after game title
|
||||||
|
pla ; pop DHGR title
|
||||||
|
clc
|
||||||
|
ror
|
||||||
|
ror
|
||||||
|
ora gVal,x
|
||||||
|
sta gVal,x ; store in bit 7 of same byte as cheat category
|
||||||
|
inx
|
||||||
stx gValLen
|
stx gValLen
|
||||||
tya
|
tya
|
||||||
pha ; okvs functions clobber everything but we need Y
|
pha ; okvs functions clobber everything but we need Y
|
||||||
@ -93,13 +102,8 @@ ParseGamesList
|
|||||||
!word gKeyLen
|
!word gKeyLen
|
||||||
!word gValLen
|
!word gValLen
|
||||||
!byte 0
|
!byte 0
|
||||||
; X = new OKVS length
|
|
||||||
pla ; pop saved Y
|
pla ; pop saved Y
|
||||||
tay
|
tay
|
||||||
pla ; pop cheat category
|
|
||||||
dex ; X = new OKVS length - 1
|
|
||||||
sta gCheatsAvailable,x
|
|
||||||
pla ; pop DHGR title
|
|
||||||
clc
|
clc
|
||||||
bcc @newkey ; always branches
|
bcc @newkey ; always branches
|
||||||
|
|
||||||
|
@ -96,10 +96,14 @@ DrawUI
|
|||||||
|
|
||||||
jsr GetGameToLaunch
|
jsr GetGameToLaunch
|
||||||
jsr okvs_get_current
|
jsr okvs_get_current
|
||||||
; (PTR) -> game title
|
; (PTR) -> game title + bitfield of game info
|
||||||
lda (PTR),y ; copy game title into UI line 2
|
; Y = 0
|
||||||
sta SAVE ; title length
|
lda (PTR),y ; A = game title length + 1
|
||||||
inc SAVE
|
sta SAVE
|
||||||
|
tay
|
||||||
|
lda (PTR),y ; A = game info bitfield
|
||||||
|
sta gGameToLaunchInfo
|
||||||
|
ldy #0
|
||||||
- iny
|
- iny
|
||||||
@printCursor
|
@printCursor
|
||||||
lda #$FD ; SMC
|
lda #$FD ; SMC
|
||||||
@ -229,7 +233,10 @@ CheckCheats
|
|||||||
ldx gGameToLaunch
|
ldx gGameToLaunch
|
||||||
inx
|
inx
|
||||||
beq +
|
beq +
|
||||||
ldy gCheatsAvailable-1,x
|
gGameToLaunchInfo=*+1
|
||||||
|
lda #$FD ; SMC
|
||||||
|
and #$03
|
||||||
|
tay
|
||||||
+
|
+
|
||||||
lda kCheatDescriptionLo,y
|
lda kCheatDescriptionLo,y
|
||||||
sta SAVE
|
sta SAVE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user