diff --git a/c64/kernal/tape/tape_head_align.s b/c64/kernal/tape/tape_head_align.s index 6a0437a0..690c665b 100644 --- a/c64/kernal/tape/tape_head_align.s +++ b/c64/kernal/tape/tape_head_align.s @@ -9,8 +9,6 @@ #if CONFIG_TAPE_HEAD_ALIGN -// XXX for Mega65 it can be done more easily, by just disabling the badlines - .label __ha_start = 12 // starting row of the chart .label __ha_rows = 11 // number of rows for scrolling diff --git a/c64/kernal/tape/tape_head_align_draw_pulse.s b/c64/kernal/tape/tape_head_align_draw_pulse.s deleted file mode 100644 index 813d0d0a..00000000 --- a/c64/kernal/tape/tape_head_align_draw_pulse.s +++ /dev/null @@ -1,29 +0,0 @@ -// #LAYOUT# STD * #TAKE -// #LAYOUT# M65 KERNAL_1 #TAKE -// #LAYOUT# * * #IGNORE - -// -// Tape head alignemnt tool - draw pulses -// - - -#if CONFIG_TAPE_HEAD_ALIGN - - -tape_head_align_draw_pulse: - - // Put pulse on the screen; center the chart horizontaly, with some margin from top - - .label __ha_chart = $2000 + 8 * (40 * __ha_start + 4) - - tax - lda __ha_offsets, x - tay - lda __ha_masks, x - ora __ha_chart + 7, y - sta __ha_chart + 7, y -!: - rts - - -#endif diff --git a/c64/kernal/tape/tape_head_align_irq.s b/c64/kernal/tape/tape_head_align_irq.s index 321869b2..878041c6 100644 --- a/c64/kernal/tape/tape_head_align_irq.s +++ b/c64/kernal/tape/tape_head_align_irq.s @@ -40,13 +40,23 @@ tape_head_align_irq_loop: cmp #$33 // first line where badline can occur bcs tape_head_align_irq_end !: - // Draw pulse + // Draw pulse on the screen cpy #$FF beq !+ + + // Center the chart horizontaly, with some margin from top + + .label __ha_chart = $2000 + 8 * (40 * __ha_start + 4) + phx_trash_a - tya - jsr tape_head_align_draw_pulse + + lda __ha_offsets, y + tax + lda __ha_masks, y + ora __ha_chart + 7, x + sta __ha_chart + 7, x + plx_trash_a !: // Next iteration