mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-20 16:29:14 +00:00
tiny_tracker: more or less works
This commit is contained in:
parent
8d5f156498
commit
31bce00c05
@ -20,14 +20,8 @@ HELLO: hello.bas
|
||||
|
||||
####
|
||||
|
||||
YANKEE: yankee.o
|
||||
ld65 -o YANKEE yankee.o -C $(LINKER_SCRIPTS)/apple2_2000.inc
|
||||
|
||||
yankee.o: yankee.s \
|
||||
zp.inc hardware.inc \
|
||||
yankee_music.s \
|
||||
interrupt_handler.s mockingboard_setup.s
|
||||
ca65 -o yankee.o yankee.s -l yankee.lst
|
||||
peasant_music.s: peasant.txt text_to_tiny
|
||||
./text_to_tiny peasant.txt > peasant_music.s
|
||||
|
||||
####
|
||||
|
||||
@ -59,4 +53,5 @@ frequency.o: frequency.c
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst YANKEE PEASANT HELLO text_to_tiny frequency
|
||||
rm -f *~ *.o *.lst YANKEE PEASANT HELLO text_to_tiny frequency peasant_music.s
|
||||
|
||||
|
@ -72,6 +72,7 @@ note_only:
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
sta octave_smc+1
|
||||
lsr
|
||||
and #$FE
|
||||
sta out_smc+1
|
||||
@ -79,9 +80,8 @@ note_only:
|
||||
txa
|
||||
|
||||
and #$3F
|
||||
|
||||
tax
|
||||
lda frequency_lookup_high,X
|
||||
sta out_smc2+1
|
||||
lda frequency_lookup_low,X
|
||||
sty y_smc+1
|
||||
out_smc:
|
||||
@ -93,8 +93,18 @@ out_smc:
|
||||
; else coarse=0
|
||||
|
||||
inx
|
||||
out_smc2:
|
||||
octave_smc:
|
||||
lda #$dd
|
||||
and #$3 ; if 0 then 1
|
||||
; if 1,2,3 then 0
|
||||
bne blah0
|
||||
blah1:
|
||||
lda #1
|
||||
bne blah_blah
|
||||
blah0:
|
||||
lda #0
|
||||
blah_blah:
|
||||
|
||||
jsr ay3_write_reg ; trashes A/Y
|
||||
|
||||
y_smc:
|
||||
|
@ -178,7 +178,7 @@ init_smc:
|
||||
no_oflo:
|
||||
|
||||
; create Frequency Table
|
||||
ldx #12
|
||||
ldx #11
|
||||
make_freq_loop:
|
||||
sec
|
||||
lda frequency_lookup_low,X
|
||||
@ -189,16 +189,12 @@ make_freq_loop:
|
||||
lsr
|
||||
sta frequency_lookup_low+48,X
|
||||
|
||||
lda #1
|
||||
sta frequency_lookup_high,X
|
||||
lda #0
|
||||
sta frequency_lookup_high+16,X
|
||||
sta frequency_lookup_high+32,X
|
||||
sta frequency_lookup_high+48,X
|
||||
|
||||
dex
|
||||
bpl make_freq_loop
|
||||
|
||||
inx
|
||||
stx frequency_lookup_low+28
|
||||
|
||||
rts
|
||||
|
||||
|
||||
@ -247,11 +243,9 @@ ay3_write_reg:
|
||||
|
||||
; starts at C4
|
||||
frequency_lookup_low:
|
||||
.byte $E8,$CD,$B3,$9B,$83,$6E,$59,$46,$33,$22,$12,$02,$00
|
||||
.byte $E8,$CD,$B3,$9B,$83,$6E,$59,$46,$33,$22,$12,$02
|
||||
|
||||
;$1E8,$1CD,$1B3,$19B,$183,$16E,$159,$146,$133,$122,$112,$102,
|
||||
;.byte $F4,$E6,$D9,$CD,$C1,$B7,$AC,$A3,$99,$91,$89,$81,$00,$00,$00,$00
|
||||
;.byte $7A,$73,$6C,$66,$60,$5B,$56,$51,$4C,$48,$44,$40,$00,$00,$00,$00
|
||||
;.byte $3D,$39,$36,$33,$30,$2D,$2B,$28,$26,$24,$22,$20,$00,$00,$00,$00
|
||||
|
||||
frequency_lookup_high = frequency_lookup_low+64
|
||||
|
@ -30,7 +30,7 @@ int note_to_ed(char note, int flat, int sharp, int octave) {
|
||||
case 'A': offset=9; break;
|
||||
case 'B': offset=11; break;
|
||||
|
||||
case 'R': offset=12; flat=0; sharp=0; octave=0; break;
|
||||
case 'R': offset=12; flat=0; sharp=0; octave=3; break;
|
||||
|
||||
default:
|
||||
fprintf(stderr,"Unknown note %c\n",note);
|
||||
|
Loading…
x
Reference in New Issue
Block a user