mirror of
https://github.com/a2-4am/4cade.git
synced 2025-02-11 14:31:07 +00:00
cut some bytes
This commit is contained in:
parent
eefe04bc4b
commit
9ec08f8430
@ -79,7 +79,9 @@ RestoreStackNextTime
|
|||||||
STACKPTR
|
STACKPTR
|
||||||
ldx #$D1 ; SMC, restore stack pointer
|
ldx #$D1 ; SMC, restore stack pointer
|
||||||
txs
|
txs
|
||||||
jmp SwitchToBank1 ; switch to bank 1 and return to caller
|
SwitchToBank1
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
|
rts
|
||||||
ResetVector ; 6 bytes, copied to $100
|
ResetVector ; 6 bytes, copied to $100
|
||||||
+READ_RAM1_NO_WRITE
|
+READ_RAM1_NO_WRITE
|
||||||
jmp Reenter
|
jmp Reenter
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
; YE OLDE GRAND UNIFIED MEMORY MAP
|
; YE OLDE GRAND UNIFIED MEMORY MAP
|
||||||
;
|
;
|
||||||
; LC RAM BANK 1
|
; LC RAM BANK 1
|
||||||
; D000..E891 - persistent data structures (per-game cheat categories,
|
; D000..E8A7 - persistent data structures (per-game cheat categories,
|
||||||
; gGlobalPrefsStore, gGamesListStore)
|
; gGlobalPrefsStore, gGamesListStore)
|
||||||
; ...unused...
|
; ...unused...
|
||||||
; EA6F..FFF9 - main program code
|
; EA96..FFF9 - main program code
|
||||||
; FFFA..FFFF - NMI, reset, IRQ vectors
|
; FFFA..FFFF - NMI, reset, IRQ vectors
|
||||||
;
|
;
|
||||||
; LC RAM BANK 2
|
; LC RAM BANK 2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
;license:MIT
|
;license:MIT
|
||||||
;(c) 2018-9 by 4am
|
;(c) 2018-2020 by 4am
|
||||||
;
|
;
|
||||||
; GAMES.CONF parser
|
; GAMES.CONF parser
|
||||||
;
|
;
|
||||||
@ -88,8 +88,7 @@ ParseGamesList
|
|||||||
pla ; pop cheat category
|
pla ; pop cheat category
|
||||||
sta gVal,x ; store after game title
|
sta gVal,x ; store after game title
|
||||||
pla ; pop DHGR title
|
pla ; pop DHGR title
|
||||||
clc
|
lsr
|
||||||
ror
|
|
||||||
ror
|
ror
|
||||||
ora gVal,x
|
ora gVal,x
|
||||||
sta gVal,x ; store in bit 7 of same byte as cheat category
|
sta gVal,x ; store in bit 7 of same byte as cheat category
|
||||||
|
@ -4,36 +4,12 @@
|
|||||||
; miscellaneous UI functions
|
; miscellaneous UI functions
|
||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
; - ClearScreens
|
|
||||||
; - Home
|
; - Home
|
||||||
; - BlankDHGR
|
; - BlankDHGR
|
||||||
; - IsSearchKey
|
; - IsSearchKey
|
||||||
; - IsUpDownOrRightArrow
|
; - IsUpDownOrRightArrow
|
||||||
;
|
;
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
|
||||||
; ClearScreens
|
|
||||||
; clear and display text screen and then clear both hires screens
|
|
||||||
; (in this order so that the erasing isn't visible)
|
|
||||||
;
|
|
||||||
; in: none
|
|
||||||
; out: $0106..$011F clobbered
|
|
||||||
;------------------------------------------------------------------------------
|
|
||||||
ClearScreens
|
|
||||||
jsr Home
|
|
||||||
lda #$20 ; clear both hi-res pages
|
|
||||||
sta @clear+2 ; (in case game loader shows them, we don't want
|
|
||||||
ldx #$40 ; to flash previous bits of the launcher UI)
|
|
||||||
ldy #$00
|
|
||||||
tya
|
|
||||||
@clear sta $FD00,y ; SMC
|
|
||||||
iny
|
|
||||||
bne @clear
|
|
||||||
inc @clear+2
|
|
||||||
dex
|
|
||||||
bne @clear
|
|
||||||
rts
|
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Home
|
; Home
|
||||||
; clear and display text screen (HARDER THAN IT SOUNDS)
|
; clear and display text screen (HARDER THAN IT SOUNDS)
|
||||||
@ -58,24 +34,17 @@ Home
|
|||||||
sta CLOCKCTL ; set twice for VidHD
|
sta CLOCKCTL ; set twice for VidHD
|
||||||
@noSHR
|
@noSHR
|
||||||
sta gMachineInDHGRMode ; A=0 here
|
sta gMachineInDHGRMode ; A=0 here
|
||||||
|
ldy #$2C ; BIT
|
||||||
|
sty PageFrom
|
||||||
|
ldx #$04
|
||||||
|
stx PageTo+2
|
||||||
lda #$A0 ; clear text screen page 1
|
lda #$A0 ; clear text screen page 1
|
||||||
ldx #$77 ; but preserve screen holes
|
jsr ClearGR
|
||||||
- sta $400,x
|
|
||||||
sta $480,x
|
|
||||||
sta $500,x
|
|
||||||
sta $580,x
|
|
||||||
sta $600,x
|
|
||||||
sta $680,x
|
|
||||||
sta $700,x
|
|
||||||
sta $780,x
|
|
||||||
dex
|
|
||||||
bpl -
|
|
||||||
sta DHIRESOFF ; get out of DHGR mode
|
sta DHIRESOFF ; get out of DHGR mode
|
||||||
sta CLR80VID ; /!\ order of operations matters for RGB card
|
sta CLR80VID ; /!\ order of operations matters for RGB card
|
||||||
lda PAGE1
|
lda PAGE1
|
||||||
lda TEXTMODE
|
lda TEXTMODE
|
||||||
SwitchToBank1 ; unnecessary but harmless (and has to be somewhere)
|
|
||||||
+READ_RAM1_WRITE_RAM1
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
; - ResyncPage
|
; - ResyncPage
|
||||||
; - ShowOtherPage
|
; - ShowOtherPage
|
||||||
; - ToggleOffscreenPage
|
; - ToggleOffscreenPage
|
||||||
|
; - ClearScreens
|
||||||
; - ClearOffscreen
|
; - ClearOffscreen
|
||||||
; - ClearHGR1
|
; - ClearHGR1
|
||||||
; - ClearMem
|
; - ClearMem
|
||||||
@ -115,6 +116,20 @@ LoadGameTitleOffscreen
|
|||||||
+ !word $FDFD
|
+ !word $FDFD
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
; ClearScreens
|
||||||
|
; clear and display text screen and then clear both hires screens
|
||||||
|
; (in this order so that the erasing isn't visible)
|
||||||
|
;
|
||||||
|
; in: none
|
||||||
|
; out: $400..$7FF and $2000..$5FFF cleared
|
||||||
|
;------------------------------------------------------------------------------
|
||||||
|
ClearScreens
|
||||||
|
jsr Home
|
||||||
|
lda #$20 ; clear both hi-res pages
|
||||||
|
ldx #$40 ; to flash previous bits of the launcher UI)
|
||||||
|
bne ClearMem ; always
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; ClearOffscreen
|
; ClearOffscreen
|
||||||
; clear $2000..$3FFF or $4000..$5FFF, depending on which HGR page is not
|
; clear $2000..$3FFF or $4000..$5FFF, depending on which HGR page is not
|
||||||
|
@ -214,24 +214,15 @@ OnError
|
|||||||
SoftBell
|
SoftBell
|
||||||
ldx #32
|
ldx #32
|
||||||
- lda #2
|
- lda #2
|
||||||
jsr @wait
|
jsr WaitForKeyWithTimeout
|
||||||
bit SPEAKER
|
bit SPEAKER
|
||||||
lda #33
|
lda #33
|
||||||
jsr @wait
|
jsr WaitForKeyWithTimeout
|
||||||
bit SPEAKER
|
bit SPEAKER
|
||||||
dex
|
dex
|
||||||
bne -
|
bne -
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
@wait ; identical to $FCA8 ROM routine, but ROM is switched out when we need it
|
|
||||||
sec
|
|
||||||
-- pha
|
|
||||||
- sbc #1
|
|
||||||
bne -
|
|
||||||
pla
|
|
||||||
sbc #1
|
|
||||||
bne --
|
|
||||||
rts
|
|
||||||
|
|
||||||
+
|
+
|
||||||
ldx BestMatchIndex ; check if the new best match is the same
|
ldx BestMatchIndex ; check if the new best match is the same
|
||||||
|
Loading…
x
Reference in New Issue
Block a user