mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-11 21:37:37 +00:00
tiny_tracker: push the ay values to the start of the program
This commit is contained in:
parent
087d22d390
commit
681189eff0
@ -12,10 +12,11 @@ submit: hgr_d2_1k.zip
|
||||
|
||||
####
|
||||
|
||||
hgr_d2.dsk: HELLO D2
|
||||
hgr_d2.dsk: HELLO D2 VIZ
|
||||
cp $(EMPTY_DISK)/empty.dsk ./hgr_d2.dsk
|
||||
$(DOS33) -y hgr_d2.dsk SAVE A HELLO
|
||||
$(DOS33) -y hgr_d2.dsk -t BIN -a 0x80 BSAVE D2
|
||||
$(DOS33) -y hgr_d2.dsk -t BIN -a 0xc00 BSAVE VIZ
|
||||
|
||||
####
|
||||
|
||||
@ -48,6 +49,16 @@ d2.o: d2.s \
|
||||
|
||||
####
|
||||
|
||||
VIZ: viz.o
|
||||
ld65 -o VIZ viz.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
|
||||
|
||||
viz.o: viz.s \
|
||||
zp.inc hardware.inc
|
||||
ca65 -o viz.o viz.s -l viz.lst
|
||||
|
||||
|
||||
####
|
||||
|
||||
text_to_tiny: text_to_tiny.o
|
||||
$(CC) -o text_to_tiny text_to_tiny.o -lm
|
||||
|
||||
@ -57,4 +68,4 @@ text_to_tiny.o: text_to_tiny.c
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst D2 HELLO text_to_tiny mA2E_2.s
|
||||
rm -f *~ *.o *.lst D2 VIZ HELLO text_to_tiny mA2E_2.s
|
||||
|
@ -40,7 +40,15 @@
|
||||
;.globalzp frequencies_high
|
||||
|
||||
|
||||
d2:
|
||||
music_split:
|
||||
|
||||
; we can execute these... (as qkumba noticed)
|
||||
; it's SEC, ASL $0E0E
|
||||
|
||||
.byte $38,$e,$e,$e ; mixer, A, B, C volume
|
||||
; want to start at AY_REGS+7
|
||||
|
||||
|
||||
; this is also the start of AY_REGS
|
||||
; we count on A/B/C being played first note
|
||||
; so the code gets over-written
|
||||
@ -50,18 +58,12 @@ d2:
|
||||
jsr SETGR ; enable lo-res graphics
|
||||
; A=$D0, Z=1
|
||||
|
||||
bit FULLGR ; make graphcs full screen
|
||||
|
||||
ldx #$FF ; set stack offset
|
||||
; bmi skip_const
|
||||
|
||||
txs ; write 0 to stack pointer
|
||||
|
||||
nop
|
||||
|
||||
; we can execute these... (as qkumba noticed)
|
||||
; it's SEC, ASL $0E0E
|
||||
|
||||
.byte $38,$e,$e,$e ; mixer, A, B, C volume
|
||||
|
||||
|
||||
;===================
|
||||
; music Player Setup
|
||||
@ -82,6 +84,27 @@ game_loop:
|
||||
; play a frame of music
|
||||
|
||||
.include "play_frame.s"
|
||||
|
||||
; visualization?
|
||||
|
||||
viz_smc:
|
||||
ldx #$00 ; 2
|
||||
|
||||
lda AY_REGS+4 ; 2 ; C channel low freq
|
||||
sta $400,X ; 3
|
||||
lda AY_REGS+2 ; 2 ; C channel low freq
|
||||
sta $500,X ; 3
|
||||
lda AY_REGS+0 ; 2 ; C channel low freq
|
||||
sta $600,X ; 3
|
||||
|
||||
inc viz_smc+1 ; 2
|
||||
|
||||
; nop
|
||||
; nop
|
||||
|
||||
|
||||
|
||||
|
||||
.include "ay3_write_regs.s"
|
||||
|
||||
; X is in theory $ff when we get here
|
||||
@ -106,10 +129,12 @@ inner_wait:
|
||||
|
||||
; pad so starts at $80
|
||||
; use this for visualization
|
||||
.byte $00,$00,$00,$00
|
||||
.byte $00,$00,$00,$00,$00
|
||||
.byte $00,$00,$00
|
||||
.byte $00,$00,$00,$00
|
||||
;.byte $00,$00
|
||||
;.byte $00,$00
|
||||
;.byte $00,$00,$00,$00,$00
|
||||
;.byte $00
|
||||
;.byte $00,$00
|
||||
;.byte $00,$00,$00,$00
|
||||
|
||||
; music
|
||||
.include "mA2E_2.s"
|
||||
|
@ -29,6 +29,7 @@ NORMAL = $F273
|
||||
HGR2 = $F3D8
|
||||
HCLR = $F3F2
|
||||
HPOSN = $F411 ; (Y,X),(A) (values stores in HGRX,XH,Y)
|
||||
COSTBL = $F5BA
|
||||
XDRAW0 = $F65D
|
||||
|
||||
|
||||
|
@ -52,15 +52,14 @@ not_end:
|
||||
|
||||
lda frequencies_high,Y
|
||||
sta AY_REGS+1,X
|
||||
; sta $500,X
|
||||
|
||||
lda frequencies_low,Y
|
||||
sta AY_REGS,X ; set proper register value
|
||||
|
||||
; visualization
|
||||
blah_urgh:
|
||||
sta $400,Y
|
||||
inc blah_urgh+1
|
||||
;blah_urgh:
|
||||
; sta $400,Y
|
||||
; inc blah_urgh+1
|
||||
|
||||
|
||||
;============================
|
||||
|
@ -9,7 +9,7 @@ GBASH = $27
|
||||
BASL = $28
|
||||
BASH = $29
|
||||
|
||||
AY_REGS = $80
|
||||
AY_REGS = $80-$7
|
||||
|
||||
HGR_Y = $E2
|
||||
HGR_COLOR = $E4
|
||||
|
Loading…
x
Reference in New Issue
Block a user