2018-12-29 18:38:18 +00:00
|
|
|
;license:MIT
|
|
|
|
;(c) 2018 by 4am
|
|
|
|
;
|
2018-08-23 20:02:48 +00:00
|
|
|
!cpu 6502
|
|
|
|
!to "build/LAUNCHER.SYSTEM",plain
|
|
|
|
*=$2000
|
|
|
|
|
2019-06-19 04:49:12 +00:00
|
|
|
!ifndef RELBASE {
|
|
|
|
RELBASE=$2000
|
|
|
|
}
|
|
|
|
|
2018-08-26 19:33:32 +00:00
|
|
|
!source "src/constants.a"
|
|
|
|
!source "src/macros.a"
|
2018-11-10 13:36:36 +00:00
|
|
|
|
|
|
|
; first-run initialization, relocates code to language card and continues from Main
|
2018-11-07 23:56:39 +00:00
|
|
|
!source "src/4cade.init.a"
|
2018-10-23 19:44:06 +00:00
|
|
|
|
2018-10-29 23:23:43 +00:00
|
|
|
FirstMover
|
2019-06-19 04:49:12 +00:00
|
|
|
!pseudopc RELBASE {
|
2018-10-29 23:23:43 +00:00
|
|
|
Reenter ; self-running demos should call this to exit back to 4cade
|
2018-12-10 00:04:36 +00:00
|
|
|
cld
|
|
|
|
cli
|
2018-10-29 23:23:43 +00:00
|
|
|
+READ_RAM1_WRITE_RAM1
|
2018-11-12 02:13:27 +00:00
|
|
|
jsr CloseHandles ; close any open handles to restore ProRWTS state to original
|
2018-11-26 19:43:39 +00:00
|
|
|
jsr SaveScreenHoles ; restore screen hole contents from saved copy
|
2018-10-28 21:20:48 +00:00
|
|
|
Main
|
2018-10-29 23:23:43 +00:00
|
|
|
ldx #$FF
|
|
|
|
txs
|
2019-01-08 19:10:26 +00:00
|
|
|
ldx #5
|
|
|
|
- lda Prelaunch,x ; copy reset vector code (switches to LC RAM and jumps to |Reenter|)
|
|
|
|
sta $100,x
|
|
|
|
dex
|
|
|
|
bpl -
|
|
|
|
inx
|
|
|
|
stx $3F2 ; set up reset vectors
|
|
|
|
stx $FFFC
|
|
|
|
inx
|
|
|
|
stx $3F3
|
|
|
|
stx $FFFD
|
|
|
|
txa
|
|
|
|
eor #$A5
|
|
|
|
sta $3F4
|
|
|
|
|
2018-10-28 18:04:52 +00:00
|
|
|
jsr BlankHGR
|
2018-12-23 16:13:47 +00:00
|
|
|
@loop
|
2019-01-08 20:01:45 +00:00
|
|
|
lda $C000
|
|
|
|
cmp #$8D
|
|
|
|
bne +
|
|
|
|
jsr Play
|
2019-06-20 17:56:31 +00:00
|
|
|
+ cmp #$9B
|
|
|
|
bne +
|
|
|
|
lda Mode
|
|
|
|
eor #$80
|
|
|
|
sta Mode
|
2019-01-08 20:01:45 +00:00
|
|
|
+
|
2018-12-23 16:13:47 +00:00
|
|
|
bit $C010
|
2019-06-20 17:56:31 +00:00
|
|
|
bit Mode
|
|
|
|
bpl +
|
|
|
|
jsr AttractMode
|
|
|
|
jmp @loop
|
|
|
|
+
|
2019-06-18 18:56:05 +00:00
|
|
|
jsr SearchMode
|
2018-12-23 16:13:47 +00:00
|
|
|
jmp @loop
|
2019-06-20 17:56:31 +00:00
|
|
|
Mode
|
|
|
|
!byte $80
|
2018-10-27 22:47:27 +00:00
|
|
|
|
2018-08-31 04:31:54 +00:00
|
|
|
; these routines will only be called after relocating to language card
|
2018-12-28 20:11:38 +00:00
|
|
|
!source "src/ui.search.mode.a"
|
2018-11-07 23:56:39 +00:00
|
|
|
!source "src/ui.attract.mode.a"
|
2019-01-15 00:06:58 +00:00
|
|
|
!source "src/ui.attract.hgr.a"
|
|
|
|
!source "src/ui.attract.dhgr.a"
|
|
|
|
!source "src/ui.attract.shr.a"
|
2018-09-13 13:53:04 +00:00
|
|
|
!source "src/prodos.path.a"
|
2019-01-15 00:06:58 +00:00
|
|
|
!source "src/glue.launch.a"
|
2018-08-31 04:31:54 +00:00
|
|
|
!source "src/glue.prorwts2.a"
|
2018-08-30 20:30:58 +00:00
|
|
|
!source "src/okvs.a"
|
2018-10-29 23:23:43 +00:00
|
|
|
!source "src/wait.a"
|
2019-06-18 18:56:05 +00:00
|
|
|
!source "src/textrank.a"
|
2018-10-23 19:44:06 +00:00
|
|
|
!source "src/parse.common.a"
|
2018-11-11 13:42:53 +00:00
|
|
|
!source "src/parse.prefs.a"
|
2018-08-31 04:31:54 +00:00
|
|
|
!source "src/parse.games.a"
|
2019-06-18 20:54:15 +00:00
|
|
|
!source "src/ui.sound.a"
|
2018-12-28 20:11:38 +00:00
|
|
|
!source "src/ui.font.a"
|
2018-11-10 15:08:14 +00:00
|
|
|
gGlobalPrefsStore
|
2019-06-19 04:49:12 +00:00
|
|
|
!word $D000 ; address of first okvs store
|
2018-08-29 19:27:30 +00:00
|
|
|
}
|
|
|
|
LastMover
|
2019-06-20 01:50:48 +00:00
|
|
|
!source "src/ui.font.data.a"
|
2019-06-19 04:49:12 +00:00
|
|
|
!if RELBASE = $2000 {
|
|
|
|
!ifdef PASS2 {
|
|
|
|
} else { ;PASS2
|
|
|
|
!set PASS2=1
|
2019-06-20 01:10:56 +00:00
|
|
|
!warn "RELBASE = ", $FFFC - (LastMover - FirstMover)
|
2019-06-19 04:49:12 +00:00
|
|
|
}
|
|
|
|
}
|