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