mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-28 03:29:59 +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
|
||||
!word $0800
|
||||
gGlobalPrefsStore
|
||||
!word $D100
|
||||
!word $D000
|
||||
gGamesListStore
|
||||
!word $FDFD ; SMC
|
||||
SwitchToBank2
|
||||
|
@ -108,8 +108,6 @@ gValLen = $1F80
|
||||
gVal = $1F81
|
||||
|
||||
; 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")
|
||||
; bit 6 = 1 if Mockingboard "B" (stereo) found (else Mockingboard "A")
|
||||
; bit 4-5 unused
|
||||
|
@ -85,6 +85,15 @@ ParseGamesList
|
||||
inx
|
||||
bpl @gatherValue
|
||||
@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
|
||||
tya
|
||||
pha ; okvs functions clobber everything but we need Y
|
||||
@ -93,13 +102,8 @@ ParseGamesList
|
||||
!word gKeyLen
|
||||
!word gValLen
|
||||
!byte 0
|
||||
; X = new OKVS length
|
||||
pla ; pop saved Y
|
||||
tay
|
||||
pla ; pop cheat category
|
||||
dex ; X = new OKVS length - 1
|
||||
sta gCheatsAvailable,x
|
||||
pla ; pop DHGR title
|
||||
clc
|
||||
bcc @newkey ; always branches
|
||||
|
||||
|
@ -96,10 +96,14 @@ DrawUI
|
||||
|
||||
jsr GetGameToLaunch
|
||||
jsr okvs_get_current
|
||||
; (PTR) -> game title
|
||||
lda (PTR),y ; copy game title into UI line 2
|
||||
sta SAVE ; title length
|
||||
inc SAVE
|
||||
; (PTR) -> game title + bitfield of game info
|
||||
; Y = 0
|
||||
lda (PTR),y ; A = game title length + 1
|
||||
sta SAVE
|
||||
tay
|
||||
lda (PTR),y ; A = game info bitfield
|
||||
sta gGameToLaunchInfo
|
||||
ldy #0
|
||||
- iny
|
||||
@printCursor
|
||||
lda #$FD ; SMC
|
||||
@ -229,7 +233,10 @@ CheckCheats
|
||||
ldx gGameToLaunch
|
||||
inx
|
||||
beq +
|
||||
ldy gCheatsAvailable-1,x
|
||||
gGameToLaunchInfo=*+1
|
||||
lda #$FD ; SMC
|
||||
and #$03
|
||||
tay
|
||||
+
|
||||
lda kCheatDescriptionLo,y
|
||||
sta SAVE
|
||||
|
Loading…
Reference in New Issue
Block a user