4cade/src/demo/nightmare.a
frankmilliron a141ad7b5a
buncha demo launchers (#411)
* Add files via upload

* Delete BATTLEZONE.1

* Delete BUZZARD.BAIT.1

* Delete CRIME.WAVE.1

* Delete GAMMA.GOBLINS.1

* Delete NIGHTMARE.1

* Delete ROBOTRON.1

* Delete SPACE.EGGS.1

* Add files via upload
2021-10-31 12:39:38 -04:00

68 lines
1.3 KiB
Plaintext

;license:MIT
;(c) 2021 by Frank M.
!cpu 6502
!to "res/DEMO/NI",plain
*=$300
!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 #5-1 ; we also need to copy the length byte
- lda newpath,x
sta $BFD0,x
dex
bpl -
lda #$60
sta $404B
jsr $4000 ; decompress
lda #$4C
sta $8C24
sta $8C35
sta $1669
lda #0
sta $8C24+1
sta $8C35+1
lda #1
sta $8C24+2
sta $8C35+2 ; set exits
lda #<(count+1)
sta $1669+1
lda #>(count+1)
sta $1669+2 ; decrement custom counter after demo cycle and eventually exit
+DISABLE_ACCEL
jmp $1206
count !byte $03
dec count
beq +
jmp $128E
+ jmp $100
newpath
!byte 4
!text "X/NI"
title !byte x_e-x_b
x_b !text "X/NI/NI"
x_e
!if * > $3F0 {
!error "code is too large, ends at ", *
}