4cade/src/demo/gumball.a
frankmilliron 7eae249529
Gumball & Jungle Hunt demo launchers (#423)
* Add files via upload

* Delete GUMBALL.A

* Delete GUMBALL.B

* Delete GUMBALL.F

* Delete GUMBALL.I

* Delete GUMBALL.M

* Delete JUNGLE.HUNT.1

* Delete JUNGLE.HUNT.A

* Delete JUNGLE.HUNT.C

* Delete JUNGLE.HUNT.F

* Delete JUNGLE.HUNT.H

* Delete JUNGLE.HUNT.J

* Add files via upload
2021-11-05 10:49:55 -04:00

92 lines
1.8 KiB
Plaintext

;license:MIT
;(c) 2021 by Frank M.
!cpu 6502
!to "res/DEMO/GUMBALL",plain
*=$210
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
;+LOAD_FILE_KEEP_DIR
ldx #0 ; read to main memory
stx ldrhi
stx ldrlo
+LDADDR title
jsr iLoadFileDirect
ldx #10-1 ; we also need to copy the length byte
- lda newpath,x
sta $BFD0,x
dex
bpl -
lda #$60
sta $851
jsr $800 ; load "DOS"
lda #$20
sta $B21E
lda #<callback1
sta $B21F
lda #>callback1
sta $B220
+DISABLE_ACCEL
jmp $B2F1 ; stage 1 (title screen and credits)
callback1
lda #$4C
sta $0DFB
lda #0
sta $0DFB+1
lda #1
sta $0DFB+2 ; exit on button press or keypress
lda #<callback2
sta $0FD0+1
lda #>callback2
sta $0FD0+2 ; continue to demo stage 2 after end of demo stage 1
lda $5F
asl
bne +
dec $E09
+ rts
callback2
lda #$4C
sta $B22B
lda #<callback3
sta $B22B+1
lda #>callback3
sta $B22B+2
jmp $E02
callback3
lda #$4C
sta $0DF6
sta $12F6
lda #0
sta $0DF6+1
sta $12F6+1
lda #1
sta $0DF6+2
sta $12F6+2 ; stage 2 (demo play) - set exits
jmp $31F9
newpath
!byte 9
!text "X/GUMBALL"
title !byte x_e-x_b
x_b !text "X/GUMBALL/GUMBALL"
x_e
!if * > $300 {
!error "code is too large, ends at ", *
}