convert some demos to use TOTAL.DATA

This commit is contained in:
4am 2022-09-09 22:47:48 -04:00
parent b2f90489cd
commit 2cf2b8fed0
61 changed files with 137 additions and 123 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -25,25 +25,25 @@
11100,SLICKS=8bit-Slicks
00000,A.CITY.DIES=A City Dies
10010,A.E=A E
00000,AGENT.U.S.A=Agent U S A
00001,AGENT.U.S.A=Agent U S A
11100,AIRHEART=Airheart
00011,ALCAZAR=Alcazar
10010,ALF=Alf: The First Adventure
10010,ALIEN.AMBUSH=Alien Ambush
00010,ALIEN.DOWNPOUR=Alien Downpour
10011,ALIEN.AMBUSH=Alien Ambush
00011,ALIEN.DOWNPOUR=Alien Downpour
00000,ALIEN.LANDER=Alien Lander
00010,ALIEN.MUNCHIES=Alien Munchies
00010,ALIEN.TYPHOON=Alien Typhoon
00011,ALIEN.MUNCHIES=Alien Munchies
00011,ALIEN.TYPHOON=Alien Typhoon
11110,ALIENS=Aliens
10061,ANGEL.1=Angel-1
00001,ANKH=Ankh
00010,APE.ESCAPE=Ape Escape
00010,AC=Apple Cider Spider
10010,APPLE.INVADER=Apple Invader
10011,APPLE.INVADER=Apple Invader
00011,APPLE.PANIC=Apple Panic
00011,APPLE.ZAP=Apple Zap
10010,AO=Apple-Oids
00070,AQUATRON=Aquatron
10011,AO=Apple-Oids
00071,AQUATRON=Aquatron
10070,AB=Arcade Boot Camp
10000,ARCHON=Archon
00000,ARCHON.II=Archon II
@ -54,7 +54,7 @@
10010,ARKANOID=Arkanoid
10060,ARTESIANS=Artesians
10011,AS=Asteroid Blaster
10010,AXIS.ASSASSIN=Axis Assassin
10011,AXIS.ASSASSIN=Axis Assassin
00000,AZTEC=Aztec
10010,BQ=BC's Quest for Tires
11110,BAD.DUDES=Bad Dudes

View File

@ -148,6 +148,9 @@ SwitchToBank2
rts
!source "src/prodos.path.a" ; paths end up on the same page
; iLoadXSingle (label is in constants.a)
jmp LoadXSingle ; no direct calling - target can move
; iAddToPath (label is in constants.a)
jmp AddToPath ; no direct calling - target can move

View File

@ -166,6 +166,7 @@ gSearchIndex = $6000
gSearchCache = $A000
; LC RAM 1 & 2
iLoadXSingle = $FFE9
iAddToPath = $FFEC
iLoadFileDirect = $FFEF ; note: you really want LC RAM 2 banked in before calling this
WaitForVBL = $FFF2

View File

@ -8,9 +8,7 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
+LOAD_FILE_AT title, $00
+READ_ROM_NO_WRITE
+LOAD_XSINGLE title
lda #$60
sta $36D3
@ -46,7 +44,7 @@
jmp $837
title !byte x_e-x_b
x_b !text "X/AGENT.U.S.A/AGENT.U.S.A"
x_b !text "AGENT.U.S.A"
x_e
!if * > $3F0 {

View File

@ -8,9 +8,8 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT title, $00
+ENABLE_ACCEL
+LOAD_XSINGLE title
+NEW_RESET_VECTOR $3E0 ; overwrites $101 at end of demo cycle
lda #$60
sta $81c
@ -24,12 +23,11 @@
lda #3
sta $60CC
sta $6042
jsr DisableAccelerator
+READ_ROM_NO_WRITE
+DISABLE_ACCEL
jmp $4000
title !byte x_e-x_b
x_b !text "X/ALIEN.AMBUSH/ALIEN.AMBUSH"
x_b !text "ALIEN.AMBUSH"
x_e
!if * > $3F0 {

View File

@ -8,9 +8,8 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT alien_downpour, $00
+ENABLE_ACCEL
+LOAD_XSINGLE title
lda #$60
sta $201f
jsr $2000 ; decompress
@ -34,13 +33,12 @@
stx $907A
lda #$D0
sta $6E6D
jsr DisableAccelerator
+READ_ROM_NO_WRITE
+DISABLE_ACCEL
jmp $73a0
alien_downpour
!byte 31
!text "X/ALIEN.DOWNPOUR/ALIEN.DOWNPOUR"
title !byte x_e-x_b
x_b !text "ALIEN.DOWNPOUR"
x_e
!if * > $3F0 {
!error "code is too large, ends at ", *

View File

@ -8,10 +8,8 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT title, $00
+READ_ROM_NO_WRITE
+ENABLE_ACCEL
+LOAD_XSINGLE title
lda #$60
sta $1638
@ -53,7 +51,7 @@ patch2 !byte $10,$0A,$4C,$00,$01
patch3 !byte $4C,$00,$01
title !byte x_e-x_b
x_b !text "X/ALIEN.MUNCHIES/ALIEN.MUNCHIES"
x_b !text "ALIEN.MUNCHIES"
x_e
!if * > $3F0 {

View File

@ -8,9 +8,8 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT title, $00
+ENABLE_ACCEL
+LOAD_XSINGLE title
lda #$61
sta $471C
@ -52,7 +51,7 @@
jmp $8F98
title !byte x_e-x_b
x_b !text "X/ALIEN.TYPHOON/ALIEN.TYPHOON"
x_b !text "ALIEN.TYPHOON"
x_e
!if * > $3F0 {

View File

@ -12,13 +12,11 @@
lda $7fe
pha
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+ENABLE_ACCEL
pla
sta $7fe ; overwritten by GS acceleration
+LOAD_FILE_AT title, $00
+READ_ROM_NO_WRITE
+LOAD_XSINGLE title
lda #$60
sta $6020
@ -55,18 +53,16 @@
sta $46C0+2 ; exit on keypress
sta $4A9B ; exit at end of demo loop (moved to $1E37+2)
+READ_RAM2_NO_WRITE
lda $7fe
pha
jsr DisableAccelerator
+READ_ROM_NO_WRITE
+DISABLE_ACCEL
pla
sta $7fe ; overwritten by GS acceleration
jmp $5F00
title !byte x_e-x_b
x_b !text "X/APPLE.INVADER/APPLE.INVADER"
x_b !text "APPLE.INVADER"
x_e
!if * > $300 {

View File

@ -8,9 +8,8 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT title, $00
+ENABLE_ACCEL
+LOAD_XSINGLE title
lda #$60
sta $604E
@ -56,7 +55,7 @@ count !byte $3D ; number of 0.16395694 second WAIT cycles
; 61 cycles (hex $3D) of A=256 WAIT = 10 seconds
title !byte x_e-x_b
x_b !text "X/AO/AO"
x_b !text "AO"
x_e
!if * > $BDFF {

View File

@ -8,10 +8,8 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT title, $00
+READ_ROM_NO_WRITE
+ENABLE_ACCEL
+LOAD_XSINGLE title
lda #>(callback - 1)
sta $5FC3
@ -41,7 +39,7 @@ callback
jmp $400
title !byte x_e-x_b
x_b !text "X/AQUATRON/AQUATRON"
x_b !text "AQUATRON"
x_e
!if * > $BEFF {

View File

@ -8,10 +8,8 @@
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
+LOAD_FILE_AT axis_assassin, $3EB1
+READ_ROM_NO_WRITE
+ENABLE_ACCEL
+LOAD_XSINGLE title
lda #$84
sta $3ECC
@ -63,11 +61,9 @@ callback
jmp $100
+ rts
axis_assassin
!byte axis_assassin_e-axis_assassin_b
axis_assassin_b
!text "X/AXIS.ASSASSIN/AXIS.ASSASSIN"
axis_assassin_e
title !byte x_e-x_b
x_b !text "AXIS.ASSASSIN"
x_e
!if * > $3F0 {
!error "code is too large, ends at ", *

View File

@ -9,6 +9,9 @@
; - FindGame
; - PlayGame
; - Launch
; - Joystick
; - LoadXSingle
; - LoadStandardPrelaunch
;
; Public variables:
; - gGameToLaunch - 0-based index into gSearchStore (word)
@ -121,7 +124,7 @@ PlayGame
PlayGameInAY
+ST16 SAVE
+ST16 @pfile
+ST16 @xfile
+ST16 xfile
jsr okvs_next_field
jsr okvs_next_field_PTR_is_already_set
; (PTR) -> length-prefixed game info bitfield
@ -151,27 +154,7 @@ PlayGameInAY
plp
beq @loadFromSubdirectory
jsr LoadIndexedFile ; load xsingle index file (contains pointers to game binaries)
- !word gSearchCache ; clobber prelaunch index file which we no longer need
!word kXSingleRecord
jsr okvs_find ; find this game's xsingle index record
!word -
@xfile !word $FDFD ; SMC
+ST16 @xsingleIndexRecordPtr
jsr okvs_next_field
ldy #5
lda (PTR), y ; get game load address (stored immediately after index record)
sta @xsingleAddr
iny
lda (PTR), y
sta @xsingleAddr+1
jsr LoadIndexedFile ; load this game binary
@xsingleAddr
!word $FDFD ; SMC
@xsingleIndexRecordPtr
!word $FDFD ; SMC
jsr LoadXSingle_NameIsAlreadySet
jmp Launch
@loadFromSubdirectory
@ -233,6 +216,46 @@ Launch
sta launchpatch
jmp LaunchInternal
;------------------------------------------------------------------------------
; LoadXSingle
; load an indexed file from the xsingle OKVS
;
; in: A/Y points to game filename (must be listed in xsingle OKVS)
; out: all flags & registers clobbered
;------------------------------------------------------------------------------
LoadXSingle
+ST16 xfile
LoadXSingle_NameIsAlreadySet
jsr LoadIndexedFile ; load xsingle index file (contains pointers to game binaries)
- !word gSearchCache ; clobber prelaunch index file which we no longer need
!word kXSingleRecord
jsr okvs_find ; find this game's xsingle index record
!word -
xfile !word $FDFD ; SMC
+ST16 @xsingleIndexRecordPtr
jsr okvs_next_field
ldy #5
lda (PTR), y ; get game load address (stored immediately after index record)
sta @xsingleAddr
iny
lda (PTR), y
sta @xsingleAddr+1
jsr LoadIndexedFile ; load this game binary
@xsingleAddr
!word $FDFD ; SMC
@xsingleIndexRecordPtr
!word $FDFD ; SMC
rts
;------------------------------------------------------------------------------
; Joystick
; launch joystick calibration program
;
; in: none
; out: exits via Launch
;------------------------------------------------------------------------------
Joystick
jsr LoadStandardPrelaunch

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14244230
!be24 14388708
!le16 5108

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14192077
!be24 14336555
!le16 5521

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14128057
!be24 14272535
!le16 3932

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14141896
!be24 14286374
!le16 4354

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14159186
!be24 14303664
!le16 5527

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14178972
!be24 14323450
!le16 6146

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14249338
!be24 14393816
!le16 410

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14250092
!be24 14394570
!le16 448

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14250540
!be24 14395018
!le16 303

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14200238
!be24 14344716
!le16 1640

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14249824
!be24 14394302
!le16 67

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14244171
!be24 14388649
!le16 59

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14242637
!be24 14387115
!le16 1437

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14227829
!be24 14372307
!le16 537

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14197598
!be24 14342076
!le16 2640

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14202236
!be24 14346714
!le16 6959

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14249748
!be24 14394226
!le16 76

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14244074
!be24 14388552
!le16 97

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14249891
!be24 14394369
!le16 201

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14228366
!be24 14372844
!le16 4625

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14232991
!be24 14377469
!le16 1702

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14234693
!be24 14379171
!le16 1087

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14235780
!be24 14380258
!le16 3279

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14239059
!be24 14383537
!le16 2985

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14242044
!be24 14386522
!le16 479

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14242523
!be24 14387001
!le16 114

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14250843
!be24 14395321
!le16 2370

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14214362
!be24 14358840
!le16 4692

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14219054
!be24 14363532
!le16 2271

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14185118
!be24 14329596
!le16 6959

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14119024
!be24 14263502
!le16 9033

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14131989
!be24 14276467
!le16 9907

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14146250
!be24 14290728
!le16 12936

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14164713
!be24 14309191
!le16 14259

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14201878
!be24 14346356
!le16 358

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14209195
!be24 14353673
!le16 5167

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14221325
!be24 14365803
!le16 6504

View File

@ -4,5 +4,5 @@
; This file is automatically generated
;
!byte 0
!be24 14116131
!le16 2893
!be24 14260409
!le16 3093

View File

@ -517,6 +517,13 @@
bne -
}
!macro LOAD_XSINGLE .title {
+READ_RAM1_WRITE_RAM1
+LDADDR .title
jsr iLoadXSingle
+READ_ROM_NO_WRITE
}
; Macros for demo launchers that need to check whether they should run
; on the current machine. Exit demo if the requirements are not met.
!macro GAME_REQUIRES_JOYSTICK {