chiptune_debug: add 25Hz test
This commit is contained in:
parent
cfc36d98c0
commit
7b895d15aa
|
@ -5,10 +5,11 @@ PNG2GR = ../gr-utils/png2gr
|
||||||
|
|
||||||
all: chiptune_debug.dsk
|
all: chiptune_debug.dsk
|
||||||
|
|
||||||
chiptune_debug.dsk: CHIPTUNE_IRQ CHIPTUNE_NOIRQ ./sdemo.raw
|
chiptune_debug.dsk: CHIPTUNE_IRQ CHIPTUNE_NOIRQ CHIPTUNE_25HZ ./sdemo.raw
|
||||||
cp chiptune_empty.dsk chiptune_debug.dsk
|
cp chiptune_empty.dsk chiptune_debug.dsk
|
||||||
$(DOS33) -y chiptune_debug.dsk BSAVE -a 0x0C00 CHIPTUNE_IRQ
|
$(DOS33) -y chiptune_debug.dsk BSAVE -a 0x0C00 CHIPTUNE_IRQ
|
||||||
$(DOS33) -y chiptune_debug.dsk BSAVE -a 0x0C00 CHIPTUNE_NOIRQ
|
$(DOS33) -y chiptune_debug.dsk BSAVE -a 0x0C00 CHIPTUNE_NOIRQ
|
||||||
|
$(DOS33) -y chiptune_debug.dsk BSAVE -a 0x0C00 CHIPTUNE_25HZ
|
||||||
|
|
||||||
|
|
||||||
CHIPTUNE_IRQ: chiptune_irq.o
|
CHIPTUNE_IRQ: chiptune_irq.o
|
||||||
|
@ -29,8 +30,17 @@ chiptune_noirq.o: chiptune_player.s \
|
||||||
zp.inc
|
zp.inc
|
||||||
ca65 -D NOIRQ=1 -o chiptune_noirq.o chiptune_player.s -l chiptune_noirq.lst
|
ca65 -D NOIRQ=1 -o chiptune_noirq.o chiptune_player.s -l chiptune_noirq.lst
|
||||||
|
|
||||||
|
CHIPTUNE_25HZ: chiptune_25Hz.o
|
||||||
|
ld65 -o CHIPTUNE_25HZ chiptune_25Hz.o -C ../linker_scripts/apple2_c00.inc
|
||||||
|
|
||||||
|
chiptune_25Hz.o: chiptune_player.s \
|
||||||
|
mockingboard_a.s \
|
||||||
|
interrupt_handler.s \
|
||||||
|
zp.inc
|
||||||
|
ca65 -D F25HZ=1 -o chiptune_25Hz.o chiptune_player.s -l chiptune_25Hz.lst
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ TITLE.GR *.o *.lst \
|
rm -f *~ TITLE.GR *.o *.lst \
|
||||||
CHIPTUNE_PLAYER CHIPTUNE_IRQ CHIPTUNE_NOIRQ
|
CHIPTUNE_PLAYER CHIPTUNE_IRQ CHIPTUNE_NOIRQ CHIPTUNE_25HZ
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -52,14 +52,27 @@
|
||||||
sta $C40D ; IFR: 1100, enable interrupt on timer one oflow
|
sta $C40D ; IFR: 1100, enable interrupt on timer one oflow
|
||||||
sta $C40E ; IER: 1100, enable timer one interrupt
|
sta $C40E ; IER: 1100, enable timer one interrupt
|
||||||
|
|
||||||
|
.ifdef F25HZ
|
||||||
|
lda #$40
|
||||||
|
sta $C404 ; write into low-order latch
|
||||||
|
lda #$9c
|
||||||
|
sta $C405 ; write into high-order latch,
|
||||||
|
; load both values into counter
|
||||||
|
; clear interrupt and start counting
|
||||||
|
|
||||||
|
; 9c40 / 1e6 = .040s, 25Hz
|
||||||
|
|
||||||
|
|
||||||
|
.else
|
||||||
lda #$E7
|
lda #$E7
|
||||||
sta $C404 ; write into low-order latch
|
sta $C404 ; write into low-order latch
|
||||||
lda #$4f
|
lda #$4f
|
||||||
sta $C405 ; write into high-order latch,
|
sta $C405 ; write into high-order latch,
|
||||||
; load both values into counter
|
; load both values into counter
|
||||||
; clear interrupt and start counting
|
; clear interrupt and start counting
|
||||||
|
|
||||||
; 4fe7 / 1e6 = .020s, 50Hz
|
; 4fe7 / 1e6 = .020s, 50Hz
|
||||||
|
.endif
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
;==================
|
;==================
|
||||||
|
|
|
@ -4,7 +4,7 @@ MEMORY {
|
||||||
}
|
}
|
||||||
|
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro, align = $100;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
|
|
Loading…
Reference in New Issue