mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-14 01:05:01 +00:00
more efficient
This commit is contained in:
parent
3d958303e9
commit
3684510a30
40
src/4cade.a
40
src/4cade.a
@ -147,7 +147,7 @@ AttractMode
|
||||
iny
|
||||
iny
|
||||
sty ProDOS_prefix
|
||||
lda gPathname-2, y
|
||||
- lda gPathname-2, y
|
||||
sta ProDOS_prefix, y
|
||||
dey
|
||||
bne -
|
||||
@ -156,7 +156,7 @@ AttractMode
|
||||
lda #'X'
|
||||
sta ProDOS_prefix+2
|
||||
|
||||
+LOAD_FILE kDemoDirectory, @key
|
||||
+LOAD_FILE_IMM @key
|
||||
|
||||
ldx #(@end_prelaunch-@prelaunch-1)
|
||||
- lda @prelaunch,x ; copy pre-launch code to main memory
|
||||
@ -170,6 +170,24 @@ AttractMode
|
||||
bpl -
|
||||
jmp $106 ; jump to pre-launch code
|
||||
|
||||
@prelaunch ; this runs from main memory
|
||||
lda $C088 ; entry point used by some self-running demos
|
||||
jmp Reenter
|
||||
+READ_ROM_NO_WRITE ; entry point to launch game (called above)
|
||||
jsr $FE89 ; initialize machine like a cold boot
|
||||
jsr $FE93 ; (many games assume a 'clean slate')
|
||||
sta $C000
|
||||
sta $C002
|
||||
sta $C004
|
||||
sta $C00C
|
||||
sta $C00E
|
||||
jsr $FB2F
|
||||
jsr $FC58
|
||||
ldx #$FF
|
||||
txs
|
||||
jmp (ldrlo2) ; jump to game
|
||||
@end_prelaunch
|
||||
|
||||
@Slideshow
|
||||
pha ; save module type
|
||||
|
||||
@ -196,24 +214,6 @@ AttractMode
|
||||
!word HGRLoad
|
||||
rts
|
||||
|
||||
@prelaunch ; this runs from main memory
|
||||
lda $C088 ; entry point used by some self-running demos
|
||||
jmp Reenter
|
||||
+READ_ROM_NO_WRITE ; entry point to launch game (called above)
|
||||
jsr $FE89 ; initialize machine like a cold boot
|
||||
jsr $FE93 ; (many games assume a 'clean slate')
|
||||
sta $C000
|
||||
sta $C002
|
||||
sta $C004
|
||||
sta $C00C
|
||||
sta $C00E
|
||||
jsr $FB2F
|
||||
jsr $FC58
|
||||
ldx #$FF
|
||||
txs
|
||||
jmp (ldrlo2) ; jump to game
|
||||
@end_prelaunch
|
||||
|
||||
HGRLoad
|
||||
ldx $C000
|
||||
bpl +
|
||||
|
@ -101,3 +101,11 @@
|
||||
+LDADDR kPathSeparator
|
||||
jsr AddToPath
|
||||
}
|
||||
|
||||
!macro LOAD_FILE_IMM .filename {
|
||||
+LDAY .filename
|
||||
jsr AddToPath
|
||||
jsr LoadFile
|
||||
!word gPathname
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user