From 2f1381a71c8ba4e31852fefd4c142d047de79eb8 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 10 Jun 2019 12:20:51 -0700 Subject: [PATCH] scraping the barrel --- pt3_player/mockingboard_a.s | 7 ++++--- pt3_player/pt3_lib.s | 12 ++++++------ pt3_player/pt3_player.s | 1 - pt3_player/text_print.s | 5 +++-- pt3_player/zp.inc | 5 ++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pt3_player/mockingboard_a.s b/pt3_player/mockingboard_a.s index d7e92658c..e8bac8f9d 100644 --- a/pt3_player/mockingboard_a.s +++ b/pt3_player/mockingboard_a.s @@ -81,7 +81,7 @@ reset_ay_both: clear_ay_both: ldx #14 lda #0 - sta MB_VALUE + sta MB_VALUE_smc+1 clear_ay_left_loop: ; Write sequence ; Inactive -> Latch Address -> Inactive -> Write Data -> Inactive @@ -104,7 +104,8 @@ write_ay_both: sty MOCK_6522_ORB2 ; 3 ; value - lda MB_VALUE ; 3 +MB_VALUE_smc: + lda #$d1 ; 2 sta MOCK_6522_ORA1 ; put value on PA1 ; 3 sta MOCK_6522_ORA2 ; put value on PA2 ; 3 lda #MOCK_AY_WRITE ; ; 2 @@ -114,7 +115,7 @@ write_ay_both: sty MOCK_6522_ORB2 ; 3 ;=========== - ; 45 + ; 44 dex bpl clear_ay_left_loop rts diff --git a/pt3_player/pt3_lib.s b/pt3_player/pt3_lib.s index 7f3361532..fd9b3579e 100644 --- a/pt3_player/pt3_lib.s +++ b/pt3_player/pt3_lib.s @@ -421,7 +421,7 @@ zero_song_structs_loop: sta note_c+NOTE_VOLUME ; 4 ; default ornament/sample in A - ldx #(NOTE_STRUCT_SIZE*0) ; 2 + ;;ldx #(NOTE_STRUCT_SIZE*0) ; 2 jsr load_ornament0_sample1 ; 6+93 ; default ornament/sample in B @@ -1026,12 +1026,12 @@ done_note: lsr pt3_mixer_value_smc+1 handle_onoff: - lda note_a+NOTE_ONOFF,X ;if (a->onoff>0) { + ldy note_a+NOTE_ONOFF,X ;if (a->onoff>0) { beq done_onoff - dec note_a+NOTE_ONOFF,X ; a->onoff--; + dey ; a->onoff--; - bne done_onoff ; if (a->onoff==0) { + bne put_offon ; if (a->onoff==0) { lda note_a+NOTE_ENABLED,X eor #$1 ; toggle sta note_a+NOTE_ENABLED,X @@ -1041,9 +1041,9 @@ do_onoff: dex ; select ONOFF ;lda note_a+NOTE_ONOFF_DELAY,X ; if (a->enabled) a->onoff=a->onoff_delay; do_offon: - lda note_a+NOTE_OFFON_DELAY,X ; else a->onoff=a->offon_delay; + ldy note_a+NOTE_OFFON_DELAY,X ; else a->onoff=a->offon_delay; put_offon: - sta note_a+NOTE_ONOFF,X + sty note_a+NOTE_ONOFF,X done_onoff: diff --git a/pt3_player/pt3_player.s b/pt3_player/pt3_player.s index 9f263a713..d0cb3ccd0 100644 --- a/pt3_player/pt3_player.s +++ b/pt3_player/pt3_player.s @@ -464,7 +464,6 @@ done_MHz: sta $AD1 ; Print Rright Arrow (INVERSE) - lda #'-' sta $6F6 sta $AF6 diff --git a/pt3_player/text_print.s b/pt3_player/text_print.s index a39506f7d..baede5cb1 100644 --- a/pt3_player/text_print.s +++ b/pt3_player/text_print.s @@ -62,7 +62,7 @@ point_to_end_string: ;================================ print_both_pages: lda DRAW_PAGE - pha + sta draw_page_smc+1 lda #0 sta DRAW_PAGE @@ -72,7 +72,8 @@ print_both_pages: sta DRAW_PAGE jsr move_and_print - pla +draw_page_smc: + lda #$d1 sta DRAW_PAGE rts ; oops forgot this initially diff --git a/pt3_player/zp.inc b/pt3_player/zp.inc index 80ccdb048..a2211113c 100644 --- a/pt3_player/zp.inc +++ b/pt3_player/zp.inc @@ -67,9 +67,8 @@ ORNAMENT_H = $03 SAMPLE_L = $04 SAMPLE_H = $05 -WHICH_FILE = $62 -LOOP = $63 -MB_VALUE = $64 +WHICH_FILE = $63 +LOOP = $64 MB_ADDRL = $65 MB_ADDRH = $66 DONE_PLAYING = $67