diff --git a/c64/kernal/tape/tape_head_align.s b/c64/kernal/tape/tape_head_align.s index ddd9123a..6a0437a0 100644 --- a/c64/kernal/tape/tape_head_align.s +++ b/c64/kernal/tape/tape_head_align.s @@ -24,9 +24,9 @@ .label __ha_scroll = $1300; -// Flag for GFX effects +// Flag for GFX effects - reuse BASIC numeric work area on zero page -.label __ha_gfxflag = $1200; // 1 byte +.label __ha_gfxflag = TEMPF2; // 1 byte tape_head_align: @@ -194,10 +194,50 @@ tape_head_align_loop_1: tax bne !- - // Draw helpers and decorators + // Draw decorations - jsr tape_head_align_apply_gfx + lda __ha_gfxflag + inc __ha_gfxflag + clc + adc #$08 + and #%00001100 + bne !+ + ldy #%11110001 + lda #%10001111 + bne !++ +!: + ldy #%00000001 + lda #%10000000 +!: + ora __ha_chart + 7 + 8 * 0 + sta __ha_chart + 7 + 8 * 0 + tya + ora __ha_chart + 7 + 8 * 31 + sta __ha_chart + 7 + 8 * 31 + + // Draw helper lines + + lda __ha_gfxflag + and #%00000010 + beq !+ + + // For 'normal' + + lda #%00000001 + ora __ha_chart + 7 + 8 * 6 + sta __ha_chart + 7 + 8 * 6 + + lda #%00000001 + ora __ha_chart + 7 + 8 * 13 + sta __ha_chart + 7 + 8 * 13 + + // For 'turbo' + + lda #%00010000 + ora __ha_chart + 7 + 8 * 21 + sta __ha_chart + 7 + 8 * 21 +!: // FALLTROUGH tape_head_align_loop_2: diff --git a/c64/kernal/tape/tape_head_align_apply_gfx.s b/c64/kernal/tape/tape_head_align_apply_gfx.s deleted file mode 100644 index f4091d68..00000000 --- a/c64/kernal/tape/tape_head_align_apply_gfx.s +++ /dev/null @@ -1,62 +0,0 @@ -// #LAYOUT# STD * #TAKE -// #LAYOUT# M65 KERNAL_1 #TAKE -// #LAYOUT# * * #IGNORE - -// -// Tape head alignemnt tool - draw helper symbols -// - - -#if CONFIG_TAPE_HEAD_ALIGN - - -tape_head_align_apply_gfx: - - // Apply GFX effects - - lda __ha_gfxflag - inc __ha_gfxflag - clc - adc #$08 - and #%00001100 - bne !+ - ldy #%11110001 - lda #%10001111 - bne !++ -!: - ldy #%00000001 - lda #%10000000 -!: - ora __ha_chart + 7 + 8 * 0 - sta __ha_chart + 7 + 8 * 0 - - tya - ora __ha_chart + 7 + 8 * 31 - sta __ha_chart + 7 + 8 * 31 - - // Draw helper lines - - lda __ha_gfxflag - and #%00000010 - beq !+ - - // For 'normal' - - lda #%00000001 - ora __ha_chart + 7 + 8 * 6 - sta __ha_chart + 7 + 8 * 6 - - lda #%00000001 - ora __ha_chart + 7 + 8 * 13 - sta __ha_chart + 7 + 8 * 13 - - // For 'turbo' - - lda #%00010000 - ora __ha_chart + 7 + 8 * 21 - sta __ha_chart + 7 + 8 * 21 -!: - rts - - -#endif