4cade/src/demo/apple.oids.a

63 lines
1.6 KiB
Plaintext
Raw Normal View History

;license:MIT
2022-09-27 17:20:04 +00:00
;(c) 2021-2022 by Frank M., qkumba
!cpu 6502
2022-10-01 00:04:02 +00:00
!to "build/DEMO/AO#06B900",plain
*=$B900
!source "src/constants.a" ; no code in these
!source "src/macros.a"
2022-09-27 17:20:04 +00:00
+ENABLE_ACCEL_LC
2022-09-10 02:47:48 +00:00
+LOAD_XSINGLE title
lda #$60
sta $604E
jsr $6000 ; decompress
lda #$4C
sta $4FD7 ; exit on keypress
sta $4F96 ; exit at end of demo
2022-09-23 17:20:57 +00:00
ldx #0
stx $4FD7+1
inx
stx $4FD7+2
; doesn't try to detect joystick or joystick buttons
lda #$D0 ; disable sounds
sta $0DA0 ; A-P-P-L-E-O-I-D-S
sta $1118 ; alien
sta $111F ; alien
lda #<callback
sta $4F96+1
lda #>callback
sta $4F96+2 ; wait 10 seconds at end of demo once Twilight logo is shown
+DISABLE_ACCEL
jmp $4D00
callback lda $C000
bmi +
lda #$FF
jsr $FCA8 ; WAIT 0.16395694 seconds
dec count
2022-09-23 17:20:57 +00:00
bne callback
+ jmp $100
count !byte $3D ; number of 0.16395694 second WAIT cycles
; (A*A*2.5 + A*13.5 + 7) * 0.980 usec
; 163,840 + 3,456 + 7 = 167,303 * 0.980 usec = 163,956.94 usec
; 163,956.94 usec = 0.16395694 seconds
; 61 cycles (hex $3D) of A=256 WAIT = 10 seconds
title !byte x_e-x_b
2022-09-10 02:47:48 +00:00
x_b !text "AO"
x_e
!if * > $BDFF {
!error "code is too large, ends at ", *
}