mirror of
https://github.com/a2-4am/4cade.git
synced 2024-06-02 15:41:30 +00:00
111 lines
3.9 KiB
Plaintext
111 lines
3.9 KiB
Plaintext
sta $C00E
|
|
sta $C00C
|
|
sta $C004
|
|
sta $C002
|
|
sta $C000
|
|
jsr $FB2F
|
|
jsr $FC58
|
|
jsr Has64K ; check for 64K (required)
|
|
bcs @no64K
|
|
jsr DisableAccelerator ; set to 1 MHz
|
|
jsr Has128K ; check for 128K (absence is OK, we just filter out some games)
|
|
ror MachineStatus
|
|
jsr HasJoystick ; check for joystick (absence is OK, we just filter out some games)
|
|
ror MachineStatus ; now bit 6 = 1 if 128K
|
|
; bit 7 = 1 if joystick
|
|
|
|
jsr init ; initialize ProRWTS2 (bye bye ProDOS)
|
|
+READ_RAM1_WRITE_RAM1
|
|
ldx #$00 ; relocate rest of program to RAM bank 1 in language card
|
|
@FM lda FirstMover,x
|
|
sta $D000,x
|
|
inx
|
|
bne @FM
|
|
lda @FM+2
|
|
cmp #>LastMover
|
|
bcs +
|
|
inc @FM+2
|
|
inc @FM+5
|
|
bne @FM
|
|
+
|
|
jmp OneTimeSetup
|
|
|
|
@no64K
|
|
ldy #@no64Klen
|
|
- lda @s_no64K,y
|
|
sta $6B6,y
|
|
dey
|
|
bpl -
|
|
@hang bmi @hang
|
|
@s_no64K !raw "REQUIRES 64K"
|
|
@no64Klen=*-@s_no64K
|
|
|
|
; ProRWTS2 has its own function to relocate itself
|
|
!source "src/prorwts2.a"
|
|
; these routines will only be called once, from main memory, before relocating to language card
|
|
ProRWTSBuffer
|
|
!source "src/hw.memcheck.a"
|
|
!source "src/hw.joystick.a"
|
|
!source "src/hw.normfast.a"
|
|
*=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
|
|
OneTimeSetup
|
|
lda hddopendir+1 ; save current directory as 'root'
|
|
ldy hddopendir+3
|
|
+STAY gRootDirectory
|
|
|
|
jsr LoadFile ; load games list
|
|
!word kGameListConfFile
|
|
jsr ParseGamesList ; parse games list
|
|
!word gGamesListStore
|
|
!word ldrlo2 ; (ldrlo2) points to load address
|
|
+LDAY SRC
|
|
+STAY gFXStore ; save pointer to free space for next store
|
|
|
|
jsr LoadFile ; load HGR transition effects list
|
|
!word kFXConfFile
|
|
jsr ParseKeyValueList ; parse HGR transition effects list
|
|
!word gFXStore
|
|
!word ldrlo2 ; (ldrlo2) points to load address
|
|
+LDAY SRC
|
|
+STAY gDFXStore ; save pointer to free space for next store
|
|
|
|
jsr LoadFile ; load DHGR transition effects list
|
|
!word kDFXConfFile
|
|
jsr ParseKeyValueList ; parse DHGR transition effects list
|
|
!word gDFXStore
|
|
!word ldrlo2 ; (ldrlo2) points to load address
|
|
+LDAY SRC
|
|
+STAY gAttractModeStore ; save pointer to free space for next store
|
|
|
|
jsr LoadFile ; load attract-mode configuration
|
|
!word kAttractModeConfFile
|
|
jsr ParseKeyValueList ; parse attract-mode configuration
|
|
!word gAttractModeStore
|
|
!word ldrlo2 ; (ldrlo2) points to load address
|
|
+LDAY SRC
|
|
+STAY gSlideshowStore ; save pointer to free space for next store
|
|
|
|
jmp Main
|
|
kGameListConfFile
|
|
!byte @kGameListConfFile_e-@kGameListConfFile_b
|
|
@kGameListConfFile_b
|
|
!text "GAMES.CONF"
|
|
@kGameListConfFile_e
|
|
kFXConfFile
|
|
!byte @kFXConfFile_e-@kFXConfFile_b
|
|
@kFXConfFile_b
|
|
!text "FX.CONF"
|
|
@kFXConfFile_e
|
|
kDFXConfFile
|
|
!byte @kDFXConfFile_e-@kDFXConfFile_b
|
|
@kDFXConfFile_b
|
|
!text "DFX.CONF"
|
|
@kDFXConfFile_e
|
|
kAttractModeConfFile
|
|
!byte @kAttractModeConfFile_e-@kAttractModeConfFile_b
|
|
@kAttractModeConfFile_b
|
|
!text "ATTRACT.CONF"
|
|
@kAttractModeConfFile_e
|