mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-22 22:33:41 +00:00
shave some bytes
This commit is contained in:
parent
e57eaaa3fa
commit
6c4b3873d0
@ -9,7 +9,7 @@
|
||||
; D000..E611 - persistent data structures (per-game cheat categories,
|
||||
; gGlobalPrefsStore, gGamesListStore)
|
||||
; ...unused...
|
||||
; EC04..FFF9 - main program code
|
||||
; EC07..FFF9 - main program code
|
||||
; FFFA..FFFF - NMI, reset, IRQ vectors
|
||||
;
|
||||
; LC RAM BANK 2
|
||||
|
@ -4,7 +4,6 @@
|
||||
; miscellaneous UI functions
|
||||
;
|
||||
; Public functions
|
||||
; - SoftBell
|
||||
; - Home
|
||||
; - BlankHGR
|
||||
; - BlankDHGR
|
||||
@ -12,39 +11,6 @@
|
||||
; - IsUpDownOrRightArrow
|
||||
;
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; SoftBell
|
||||
; yell at the user, but, like, gently
|
||||
;
|
||||
; in: none
|
||||
; out: C clear
|
||||
; Y preserved
|
||||
; A=0
|
||||
; X=0
|
||||
; all flags preserved
|
||||
;------------------------------------------------------------------------------
|
||||
SoftBell
|
||||
ldx #32
|
||||
- lda #2
|
||||
jsr @wait
|
||||
bit SPEAKER
|
||||
lda #33
|
||||
jsr @wait
|
||||
bit SPEAKER
|
||||
dex
|
||||
bne -
|
||||
clc
|
||||
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
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Home
|
||||
; clear and display text screen (HARDER THAN IT SOUNDS)
|
||||
|
@ -5,6 +5,7 @@
|
||||
;
|
||||
; Public functions
|
||||
; - SearchMode
|
||||
; - SoftBell
|
||||
;
|
||||
|
||||
; indices into InputDispatchTable
|
||||
@ -201,7 +202,39 @@ FindMatchingTitle
|
||||
OnError
|
||||
jsr SwitchToBank2
|
||||
jsr DisableAcceleratorAndSwitchToBank1
|
||||
jmp SoftBell ; Beep on invalid input and start over.
|
||||
; /!\ execution falls through to SoftBell
|
||||
;------------------------------------------------------------------------------
|
||||
; SoftBell
|
||||
; yell at the user, but, like, gently
|
||||
;
|
||||
; in: none
|
||||
; out: C clear
|
||||
; Y preserved
|
||||
; A=0
|
||||
; X=0
|
||||
; all flags preserved
|
||||
;------------------------------------------------------------------------------
|
||||
SoftBell
|
||||
ldx #32
|
||||
- lda #2
|
||||
jsr @wait
|
||||
bit SPEAKER
|
||||
lda #33
|
||||
jsr @wait
|
||||
bit SPEAKER
|
||||
dex
|
||||
bne -
|
||||
clc
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user