diff --git a/pt3_player/Makefile b/pt3_player/Makefile index aa184142..b0617817 100644 --- a/pt3_player/Makefile +++ b/pt3_player/Makefile @@ -13,9 +13,10 @@ pt3_player.dsk: PT3_PLAYER PT3_DUMPER HELLO DUMP $(DOS33) -y pt3_player.dsk SAVE A HELLO $(DOS33) -y pt3_player.dsk SAVE A DUMP $(DOS33) -y pt3_player.dsk BSAVE -a 0x1000 PT3_DUMPER - $(DOS33) -y pt3_player.dsk BSAVE -a 0x1000 PT3_PLAYER - $(DOS33) -y pt3_player.dsk BSAVE -a 0x3000 EA.PT3 - $(DOS33) -y pt3_player.dsk BSAVE -a 0x3000 VC.PT3 + $(DOS33) -y pt3_player.dsk BSAVE -a 0x2000 PT3_PLAYER + $(DOS33) -y pt3_player.dsk BSAVE -a 0x4000 EA.PT3 + $(DOS33) -y pt3_player.dsk BSAVE -a 0x4000 VC.PT3 + $(DOS33) -y pt3_player.dsk BSAVE -a 0x4000 SR.PT3 # $(DOS33) -y chiptune_player.dsk BSAVE -a 0x1c00 ./krw/CHRISTMAS.KRW # $(DOS33) -y chiptune_player.dsk BSAVE -a 0x1c00 ./krw/CRMOROS.KRW # $(DOS33) -y chiptune_player.dsk BSAVE -a 0x1c00 ./krw/DEATH2.KRW @@ -42,7 +43,7 @@ DUMP: dump.bas ../asoft_basic-utils/tokenize_asoft < dump.bas > DUMP PT3_PLAYER: pt3_player.o - ld65 -o PT3_PLAYER pt3_player.o -C ../linker_scripts/apple2_1000.inc + ld65 -o PT3_PLAYER pt3_player.o -C ../linker_scripts/apple2_2000.inc pt3_player.o: pt3_player.s \ gr_fast_clear.s pt3_lib.s interrupt_handler.s zp.inc diff --git a/pt3_player/dump.bas b/pt3_player/dump.bas index c8bf7f41..a3bfd473 100644 --- a/pt3_player/dump.bas +++ b/pt3_player/dump.bas @@ -1,3 +1,6 @@ -10 PRINT CHR$(4);"PR#1" -20 PRINT CHR$(4);"BRUN PT3_DUMPER" +10 HGR +12 REM 1=green, 2=purple, 5=orange 6=blue +15 HCOLOR=2 +20 FOR I=0 TO 160: HPLOT 0,I TO 279,I: NEXT I +30 PRINT CHR$(4);"BRUN PT3_PLAYER" diff --git a/pt3_player/pt3_dumper.s b/pt3_player/pt3_dumper.s index 2f641a5b..b04f8016 100644 --- a/pt3_player/pt3_dumper.s +++ b/pt3_player/pt3_dumper.s @@ -5,7 +5,7 @@ .include "zp.inc" -PT3_LOC = $3000 +PT3_LOC = $4000 NUM_FILES EQU 15 diff --git a/pt3_player/pt3_lib.s b/pt3_player/pt3_lib.s index 4fa83b10..aa832bb0 100644 --- a/pt3_player/pt3_lib.s +++ b/pt3_player/pt3_lib.s @@ -22,7 +22,7 @@ NOTE_LEN=14 NOTE_LEN_COUNT=15 NOTE_SPEC_COMMAND=16 ; is this one needed? NOTE_NEW_NOTE=17 -NOTE_ALL_DONE=18 +;NOTE_ALL_DONE=18 NOTE_ADDR_L=19 NOTE_ADDR_H=20 NOTE_ORNAMENT_POINTER_L=21 @@ -210,9 +210,10 @@ pt3_envelope_type_old: .byte $0 pt3_envelope_delay: .byte $0 pt3_envelope_delay_orig:.byte $0 -;pt3_music_len: .byte $0 pt3_mixer_value: .byte $0 +pt3_pattern_done: .byte $0 + temp_word_l: .byte $0 temp_word_h: .byte $0 @@ -1009,9 +1010,11 @@ decode_case_0X: sta note_a+NOTE_LEN_COUNT,X ; len_count=0; lda #1 - sta note_a+NOTE_ALL_DONE,X sta decode_done + ; sta note_a+NOTE_ALL_DONE,X + dec pt3_pattern_done + jmp done_decode decode_case_0X_not_zero: @@ -1667,11 +1670,15 @@ not_done: sta note_c+NOTE_ADDR_H lda #0 - sta note_a+NOTE_ALL_DONE - sta note_b+NOTE_ALL_DONE - sta note_c+NOTE_ALL_DONE - sta pt3_noise_period +; sta note_a+NOTE_ALL_DONE +; sta note_b+NOTE_ALL_DONE +; sta note_c+NOTE_ALL_DONE + + lda #3 ; FIXME: num_channels + sta pt3_pattern_done + + rts @@ -1726,9 +1733,12 @@ next_line: inc current_line ; and increment line lda current_line - ; FIXME: not always 64 - cmp #64 ; if not max, continue - bne do_frame + + lda pt3_pattern_done ; check if pattern done early + beq next_pattern + + cmp #64 ; always end at 64. + bne do_frame ; is this always needed? next_pattern: lda #0 ; reset line to 0 diff --git a/pt3_player/pt3_player.s b/pt3_player/pt3_player.s index 455a9dd5..3e3f7dbb 100644 --- a/pt3_player/pt3_player.s +++ b/pt3_player/pt3_player.s @@ -2,7 +2,7 @@ .include "zp.inc" -PT3_LOC = $3000 +PT3_LOC = $4000 UNPACK_BUFFER EQU $6000 ; $6000 - $9800, 14k, $3800 NUM_FILES EQU 15 @@ -16,6 +16,14 @@ pt3_setup: jsr HOME jsr TEXT + bit HIRES + bit SET_GR + bit TEXTGR ; split text/graphics + +; lda #$20 +; sta HGR_PAGE +; jsr HCLR + ; Init disk code jsr rts_init diff --git a/pt3_player/song_list.inc b/pt3_player/song_list.inc index 300b9d56..f36556f6 100644 --- a/pt3_player/song_list.inc +++ b/pt3_player/song_list.inc @@ -1,2 +1,2 @@ - .asciiz "EA.PT3" + .asciiz "SR.PT3" diff --git a/pt3_player/zp.inc b/pt3_player/zp.inc index 127e689f..27bf122a 100644 --- a/pt3_player/zp.inc +++ b/pt3_player/zp.inc @@ -209,6 +209,9 @@ CROUT1 EQU $FD8B ;; send a RETURN and clear end of line PRBYTE EQU $FDDA PRHEX EQU $FDE3 +;; Applesoft routines +HCLR EQU $F3F2 +;HGR_PAGE EQU $E6