2019-07-10 13:37:59 -04:00
|
|
|
;license:MIT
|
2020-03-12 17:03:37 -07:00
|
|
|
;(c) 2018-2020 by 4am
|
2019-07-10 13:37:59 -04:00
|
|
|
;
|
|
|
|
; credits page
|
|
|
|
;
|
|
|
|
; Public functions
|
|
|
|
; - Credits
|
2019-10-07 23:50:23 -04:00
|
|
|
; - Help
|
|
|
|
;
|
2019-07-10 13:37:59 -04:00
|
|
|
|
2019-10-13 22:22:47 -04:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
; Credits
|
|
|
|
; display credits page and wait
|
|
|
|
;
|
|
|
|
; in: none
|
|
|
|
; out: C clear
|
|
|
|
; all other flags and registers clobbered
|
|
|
|
;------------------------------------------------------------------------------
|
2019-07-10 13:37:59 -04:00
|
|
|
Credits
|
2019-09-09 22:38:17 -04:00
|
|
|
jsr LoadFile ; load credits text into $8000
|
|
|
|
!word kRootDirectory
|
2019-09-21 18:04:38 -04:00
|
|
|
!word kCreditsFile
|
2019-09-09 22:38:17 -04:00
|
|
|
!word $8000
|
2020-04-02 17:58:13 -04:00
|
|
|
-- jsr ForceHGRMode
|
2019-07-10 13:37:59 -04:00
|
|
|
jsr ClearOffscreen
|
2020-11-09 12:22:38 -08:00
|
|
|
ldx #0
|
|
|
|
- lda OffscreenPage
|
2019-07-10 13:37:59 -04:00
|
|
|
ror ; draw on offscreen page
|
|
|
|
+LDADDR $8000
|
2020-11-09 12:22:38 -08:00
|
|
|
jsr DrawPage ; draw credits
|
2019-09-10 00:32:30 -04:00
|
|
|
jsr ShowOtherPage ; show credits
|
|
|
|
jsr WaitForKeyFor30Seconds; wait
|
2020-03-24 16:30:14 -04:00
|
|
|
bit CLEARKBD ; don't care about key
|
2020-06-05 17:09:51 -07:00
|
|
|
cmp #$81 ; Ctrl-A = about
|
|
|
|
beq Credits
|
2020-06-15 12:44:46 -04:00
|
|
|
cmp #$90 ; Ctrl-P = launch joystick calibration program
|
|
|
|
bne +
|
|
|
|
jmp Joystick
|
|
|
|
+ cmp #$83 ; Ctrl-C = toggle cheat mode
|
2020-06-05 17:09:51 -07:00
|
|
|
bne +
|
|
|
|
jsr ToggleCheat
|
|
|
|
+ sec ; if called from search mode, tell caller to refresh
|
2019-07-10 13:37:59 -04:00
|
|
|
rts
|
2019-09-26 13:46:13 -04:00
|
|
|
|
2019-10-13 22:22:47 -04:00
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
; Help
|
2020-04-02 17:58:13 -04:00
|
|
|
; display per-game or global help page and wait
|
2019-10-13 22:22:47 -04:00
|
|
|
;
|
|
|
|
; in: none
|
2020-03-24 16:30:14 -04:00
|
|
|
; out: see above
|
2019-10-13 22:22:47 -04:00
|
|
|
;------------------------------------------------------------------------------
|
2019-09-26 13:46:13 -04:00
|
|
|
Help
|
2020-04-02 17:58:13 -04:00
|
|
|
jsr GetGameToLaunch
|
|
|
|
bcs @global
|
|
|
|
+ST16 @fname
|
|
|
|
jsr LoadFile
|
|
|
|
!word kGameHelpDirectory
|
|
|
|
@fname !word $FDFD ; SMC
|
|
|
|
!word $8000
|
|
|
|
clc
|
|
|
|
bcc -- ; always branches
|
|
|
|
@global jsr LoadFile ; load help text into $8000
|
2019-12-20 10:25:30 -05:00
|
|
|
!word kRootDirectory
|
|
|
|
!word kHelpTextFile
|
|
|
|
!word $8000
|
2020-04-02 17:58:13 -04:00
|
|
|
jsr LoadHelpOffscreen ; load fancy backdrop
|
2020-06-15 12:44:46 -04:00
|
|
|
ldx #7
|
2020-03-24 16:30:14 -04:00
|
|
|
bne - ; always branches
|