2018-08-23 20:02:48 +00:00
|
|
|
!cpu 6502
|
|
|
|
!to "build/LAUNCHER.SYSTEM",plain
|
|
|
|
*=$2000
|
|
|
|
|
2018-08-26 19:33:32 +00:00
|
|
|
!source "src/constants.a"
|
|
|
|
!source "src/macros.a"
|
2018-08-29 19:27:30 +00:00
|
|
|
|
2018-08-30 17:07:21 +00:00
|
|
|
jsr Has64K ; check for 64K (required)
|
2018-08-31 04:31:54 +00:00
|
|
|
bcs @no64K
|
2018-08-29 19:27:30 +00:00
|
|
|
jsr DisableAccelerator ; set to 1 MHz
|
2018-08-30 17:07:21 +00:00
|
|
|
jsr Has128K ; check for 128K (absence is OK, we just filter out some games)
|
2018-08-29 19:27:30 +00:00
|
|
|
ror MachineStatus
|
2018-08-30 17:07:21 +00:00
|
|
|
jsr HasJoystick ; check for joystick (absence is OK, we just filter out some games)
|
2018-09-13 13:53:04 +00:00
|
|
|
ror MachineStatus ; now bit 6 = 1 if 128K
|
|
|
|
; bit 7 = 1 if joystick
|
2018-08-29 19:27:30 +00:00
|
|
|
|
2018-10-24 13:44:30 +00:00
|
|
|
jsr init ; initialize ProRWTS2 (bye bye ProDOS)
|
|
|
|
+READ_RAM1_WRITE_RAM1
|
2018-08-31 04:31:54 +00:00
|
|
|
ldx #$00 ; relocate rest of program to RAM bank 1 in language card
|
|
|
|
@FM lda FirstMover,x
|
2018-08-29 19:27:30 +00:00
|
|
|
sta $D000,x
|
|
|
|
inx
|
2018-08-31 04:31:54 +00:00
|
|
|
bne @FM
|
|
|
|
lda @FM+2
|
|
|
|
cmp #>LastMover
|
|
|
|
bcs +
|
|
|
|
inc @FM+2
|
|
|
|
inc @FM+5
|
|
|
|
bne @FM
|
|
|
|
+
|
2018-08-29 19:27:30 +00:00
|
|
|
jmp Start
|
|
|
|
|
2018-08-31 04:31:54 +00:00
|
|
|
@no64K
|
|
|
|
jsr $FB2F
|
|
|
|
jsr $FC58
|
|
|
|
ldy #@no64Klen
|
|
|
|
- lda @s_no64K,y
|
|
|
|
sta $6B6,y
|
|
|
|
dey
|
|
|
|
bpl -
|
|
|
|
@hang bmi @hang
|
|
|
|
@s_no64K !raw "REQUIRES 64K"
|
|
|
|
@no64Klen=*-@s_no64K
|
|
|
|
|
2018-10-24 13:44:30 +00:00
|
|
|
; ProRWTS2 has its own function to relocate itself
|
|
|
|
!source "src/prorwts2.a"
|
2018-08-31 04:31:54 +00:00
|
|
|
; these routines will only be called once, from main memory, before relocating to language card
|
2018-10-24 13:44:30 +00:00
|
|
|
ProRWTSBuffer
|
2018-09-13 13:53:04 +00:00
|
|
|
!source "src/hw.memcheck.a"
|
|
|
|
!source "src/hw.joystick.a"
|
|
|
|
!source "src/hw.normfast.a"
|
2018-10-24 13:44:30 +00:00
|
|
|
*=ProRWTSBuffer+512 ; ProRWTS needs a 512-byte buffer for its init function
|
|
|
|
; so we reuse as much of the 1-time code as possible
|
|
|
|
; and fill the rest with zeros
|
2018-08-23 20:02:48 +00:00
|
|
|
|
2018-08-29 19:27:30 +00:00
|
|
|
FirstMover
|
|
|
|
!pseudopc $D000 {
|
|
|
|
!zone
|
2018-10-23 19:44:06 +00:00
|
|
|
Reenter ; self-running demos should call this to exit back to 4cade
|
|
|
|
; TODO
|
2018-08-27 19:39:08 +00:00
|
|
|
Start
|
2018-10-23 19:44:06 +00:00
|
|
|
jsr LoadFile ; load games list from file
|
|
|
|
!word kGameListConfFile
|
2018-09-13 13:53:04 +00:00
|
|
|
|
2018-10-23 19:44:06 +00:00
|
|
|
jsr ParseGamesList ; parse games list
|
2018-09-13 13:53:04 +00:00
|
|
|
!word gGamesListStore
|
2018-10-27 22:47:27 +00:00
|
|
|
!word ldrlo2 ; (ldrlo2) points to load address
|
2018-10-23 19:44:06 +00:00
|
|
|
|
|
|
|
+LDAY SRC
|
|
|
|
+STAY gAttractModeStore ; save pointer to free space for next store
|
|
|
|
|
|
|
|
jsr LoadFile ; load attract-mode configuration from file
|
|
|
|
!word kAttractModeConfFile
|
|
|
|
|
|
|
|
jsr ParseKeyValueList ; parse attract-mode configuration
|
|
|
|
!word gAttractModeStore
|
2018-10-27 22:47:27 +00:00
|
|
|
!word ldrlo2 ; (ldrlo2) points to load address
|
2018-10-23 19:44:06 +00:00
|
|
|
|
2018-10-27 22:47:27 +00:00
|
|
|
+LDAY SRC
|
|
|
|
+STAY gSlideshowStore ; save pointer to free space for next store
|
2018-10-23 19:44:06 +00:00
|
|
|
|
2018-10-27 22:47:27 +00:00
|
|
|
jsr AttractMode
|
2018-09-13 13:53:04 +00:00
|
|
|
|
2018-10-27 22:47:27 +00:00
|
|
|
jmp $FAA6
|
|
|
|
|
|
|
|
AttractMode
|
|
|
|
jsr okvs_nth ; get filename of next attract module
|
|
|
|
!word gAttractModeStore
|
|
|
|
!byte 0
|
|
|
|
+STAY PTR
|
|
|
|
jsr ResetPath
|
|
|
|
+LDADDR kAttractModeSlideshowDirectory
|
|
|
|
jsr AddToPath
|
|
|
|
+LDADDR kPathSeparator
|
|
|
|
jsr AddToPath
|
|
|
|
+LDAY PTR
|
|
|
|
jsr AddToPath
|
|
|
|
jsr LoadFile ; load attract module configuration file
|
|
|
|
!word gPathname
|
|
|
|
|
|
|
|
jsr ParseKeyValueList ; parse slideshow configuration
|
|
|
|
!word gSlideshowStore
|
|
|
|
!word ldrlo2 ; (ldrlo2) points to load address
|
|
|
|
|
|
|
|
jsr okvs_iter
|
|
|
|
!word gSlideshowStore
|
2018-09-13 13:53:04 +00:00
|
|
|
!word HGRLoad
|
2018-10-27 22:47:27 +00:00
|
|
|
rts
|
2018-09-13 13:53:04 +00:00
|
|
|
|
|
|
|
HGRLoad
|
|
|
|
ldx $C000
|
|
|
|
bmi @exit
|
|
|
|
+STAY PTR
|
|
|
|
jsr ResetPath
|
|
|
|
+LDADDR kHGRScreenshotDirectory
|
|
|
|
jsr AddToPath
|
|
|
|
+LDADDR kPathSeparator
|
|
|
|
jsr AddToPath
|
|
|
|
+LDAY PTR
|
|
|
|
jsr AddToPath
|
|
|
|
jsr LoadFile
|
|
|
|
!word gPathname
|
|
|
|
jsr FizzleHGR
|
|
|
|
@exit rts
|
|
|
|
|
2018-10-23 19:44:06 +00:00
|
|
|
kGameListConfFile
|
|
|
|
!byte @kGameListConfFile_e-@kGameListConfFile_b
|
|
|
|
@kGameListConfFile_b
|
2018-08-31 04:31:54 +00:00
|
|
|
!text "GAMES.CONF"
|
2018-10-23 19:44:06 +00:00
|
|
|
@kGameListConfFile_e
|
|
|
|
kAttractModeConfFile
|
|
|
|
!byte @kAttractModeConfFile_e-@kAttractModeConfFile_b
|
|
|
|
@kAttractModeConfFile_b
|
|
|
|
!text "ATTRACT.CONF"
|
|
|
|
@kAttractModeConfFile_e
|
|
|
|
|
2018-08-31 04:31:54 +00:00
|
|
|
; these routines will only be called after relocating to language card
|
2018-09-13 13:53:04 +00:00
|
|
|
!source "src/prodos.path.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-23 19:44:06 +00:00
|
|
|
!source "src/parse.common.a"
|
2018-08-31 04:31:54 +00:00
|
|
|
!source "src/parse.games.a"
|
2018-09-13 13:53:04 +00:00
|
|
|
!source "src/fx.hgr.fizzle.a"
|
|
|
|
!source "src/fx.dhgr.fizzle.a"
|
2018-08-31 04:31:54 +00:00
|
|
|
gGamesListStore
|
|
|
|
!word *+2 ; address of first okvs store
|
2018-08-29 19:27:30 +00:00
|
|
|
}
|
|
|
|
LastMover
|