chiptune_debug: add 25Hz test

This commit is contained in:
Vince Weaver 2018-04-20 16:16:23 -04:00
parent cfc36d98c0
commit 7b895d15aa
4 changed files with 27 additions and 4 deletions

View File

@ -5,10 +5,11 @@ PNG2GR = ../gr-utils/png2gr
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
$(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_25HZ
CHIPTUNE_IRQ: chiptune_irq.o
@ -29,8 +30,17 @@ chiptune_noirq.o: chiptune_player.s \
zp.inc
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:
rm -f *~ TITLE.GR *.o *.lst \
CHIPTUNE_PLAYER CHIPTUNE_IRQ CHIPTUNE_NOIRQ
CHIPTUNE_PLAYER CHIPTUNE_IRQ CHIPTUNE_NOIRQ CHIPTUNE_25HZ

Binary file not shown.

View File

@ -52,14 +52,27 @@
sta $C40D ; IFR: 1100, enable interrupt on timer one oflow
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
sta $C404 ; write into low-order latch
lda #$4f
sta $C405 ; write into high-order latch,
; load both values into counter
; clear interrupt and start counting
; 4fe7 / 1e6 = .020s, 50Hz
.endif
.endif
;==================

View File

@ -4,7 +4,7 @@ MEMORY {
}
SEGMENTS {
CODE: load = RAM, type = ro;
CODE: load = RAM, type = ro, align = $100;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes;