From 405789cdfe3d9253446a503cb3a7372e0101ce80 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Thu, 4 Jun 2020 20:53:02 +0200 Subject: [PATCH] head align tool minor improvements --- CONFIG.md | 4 ++-- c64/,,config_custom.s | 2 +- c64/,,config_cx16.s | 2 +- c64/,,config_generic.s | 2 +- c64/,,config_mega65.s | 2 +- c64/,,config_testing.s | 2 +- c64/,,config_ultimate64.s | 2 +- c64/aliases/,aliases_config.s | 4 ++-- c64/basic/wedge_tape.s | 5 +++++ c64/kernal/tape/tape_head_align.s | 3 +-- c64/kernal/tape/tape_head_align_apply_gfx.s | 12 ++-------- c64/kernal/tape/tape_head_align_help.s | 25 ++++++++++++++------- 12 files changed, 35 insertions(+), 30 deletions(-) diff --git a/CONFIG.md b/CONFIG.md index f548ee4f..94bd18ec 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -283,9 +283,9 @@ Feature needs about 330 bytes in BASIC segment. If unsure - enable. ### `CONFIG_TAPE_WEDGE` -If enabled, a simple DOS wedge is available from the direct mode for turbo tape loading - supports `←L` only +If enabled, a simple DOS wedge is available from the direct mode for tape loading - supports `←L` only. -Feature needs about 5 bytes in BASIC segment. If unsure - enable. +Feature needs few bytes in BASIC segment. If unsure - enable. ### `CONFIG_BCD_SAFE_INTERRUPTS` diff --git a/c64/,,config_custom.s b/c64/,,config_custom.s index bb93e633..c5bdaf1c 100644 --- a/c64/,,config_custom.s +++ b/c64/,,config_custom.s @@ -124,7 +124,7 @@ #define CONFIG_PANIC_SCREEN #define CONFIG_DOS_WEDGE #define CONFIG_TAPE_WEDGE -#define CONFIG_TAPE_HEAD_ALIGN // XXX work in progress +#define CONFIG_TAPE_HEAD_ALIGN #define CONFIG_BCD_SAFE_INTERRUPTS diff --git a/c64/,,config_cx16.s b/c64/,,config_cx16.s index cda04d71..0643ac68 100644 --- a/c64/,,config_cx16.s +++ b/c64/,,config_cx16.s @@ -117,7 +117,7 @@ // #define CONFIG_PANIC_SCREEN // #define CONFIG_DOS_WEDGE // #define CONFIG_TAPE_WEDGE -// #define CONFIG_TAPE_HEAD_ALIGN // XXX work in progress +// #define CONFIG_TAPE_HEAD_ALIGN #define CONFIG_BCD_SAFE_INTERRUPTS diff --git a/c64/,,config_generic.s b/c64/,,config_generic.s index 74cee7a8..711d06b5 100644 --- a/c64/,,config_generic.s +++ b/c64/,,config_generic.s @@ -115,7 +115,7 @@ #define CONFIG_PANIC_SCREEN #define CONFIG_DOS_WEDGE #define CONFIG_TAPE_WEDGE -// #define CONFIG_TAPE_HEAD_ALIGN // XXX work in progress +// #define CONFIG_TAPE_HEAD_ALIGN #define CONFIG_BCD_SAFE_INTERRUPTS diff --git a/c64/,,config_mega65.s b/c64/,,config_mega65.s index a4089233..985b5857 100644 --- a/c64/,,config_mega65.s +++ b/c64/,,config_mega65.s @@ -115,7 +115,7 @@ #define CONFIG_PANIC_SCREEN #define CONFIG_DOS_WEDGE #define CONFIG_TAPE_WEDGE -// #define CONFIG_TAPE_HEAD_ALIGN // XXX work in progress +// #define CONFIG_TAPE_HEAD_ALIGN #define CONFIG_BCD_SAFE_INTERRUPTS diff --git a/c64/,,config_testing.s b/c64/,,config_testing.s index afe531bf..1b50ed8b 100644 --- a/c64/,,config_testing.s +++ b/c64/,,config_testing.s @@ -115,7 +115,7 @@ #define CONFIG_PANIC_SCREEN #define CONFIG_DOS_WEDGE #define CONFIG_TAPE_WEDGE -// #define CONFIG_TAPE_HEAD_ALIGN // XXX work in progress +// #define CONFIG_TAPE_HEAD_ALIGN #define CONFIG_BCD_SAFE_INTERRUPTS diff --git a/c64/,,config_ultimate64.s b/c64/,,config_ultimate64.s index 707b1939..6fc5a03e 100644 --- a/c64/,,config_ultimate64.s +++ b/c64/,,config_ultimate64.s @@ -115,7 +115,7 @@ #define CONFIG_PANIC_SCREEN #define CONFIG_DOS_WEDGE #define CONFIG_TAPE_WEDGE -// #define CONFIG_TAPE_HEAD_ALIGN // XXX work in progress +// #define CONFIG_TAPE_HEAD_ALIGN #define CONFIG_BCD_SAFE_INTERRUPTS diff --git a/c64/aliases/,aliases_config.s b/c64/aliases/,aliases_config.s index 62ac4682..0a652064 100644 --- a/c64/aliases/,aliases_config.s +++ b/c64/aliases/,aliases_config.s @@ -295,8 +295,8 @@ // Check that features are configured correctly { -#if CONFIG_TAPE_WEDGE && !CONFIG_TAPE_TURBO - .error "CONFIG_TAPE_WEDGE requires CONFIG_TAPE_TURBO" +#if CONFIG_TAPE_WEDGE && !CONFIG_TAPE_TURBO && !CONFIG_TAPE_NORMAL + .error "CONFIG_TAPE_WEDGE requires CONFIG_TAPE_TURBO or CONFIG_TAPE_NORMAL" #endif #if !CONFIG_TAPE_WEDGE && CONFIG_TAPE_HEAD_ALIGN .error "CONFIG_TAPE_HEAD_ALIGN requires CONFIG_TAPE_WEDGE" diff --git a/c64/basic/wedge_tape.s b/c64/basic/wedge_tape.s index a777ff6b..b6ad6076 100644 --- a/c64/basic/wedge_tape.s +++ b/c64/basic/wedge_tape.s @@ -38,7 +38,12 @@ wedge_arrow_L: sta FNLEN ldy #$01 +#if CONFIG_TAPE_TURBO ldx #$07 // turbo tape device +#else + tdx #$01 // normal tape device +#endif + jsr JSETFLS ldy TXTTAB+1 diff --git a/c64/kernal/tape/tape_head_align.s b/c64/kernal/tape/tape_head_align.s index 77d0bea0..b0d38594 100644 --- a/c64/kernal/tape/tape_head_align.s +++ b/c64/kernal/tape/tape_head_align.s @@ -13,8 +13,7 @@ // XXX for Mega65 it can be done more easily, by just disabling the badlines // XXX consider "PRESS PLAY ON TAPE" before start, with option to stop -// XXX make tape wedge (and this tool) available also without tape turbo support -// XXX create separate configuration for tape users +// XXX document CONFIG_TAPE_HEAD_ALIGN option // XXX block NMIs // XXX fix Mega65 build compilation issues diff --git a/c64/kernal/tape/tape_head_align_apply_gfx.s b/c64/kernal/tape/tape_head_align_apply_gfx.s index 0f46157e..f4091d68 100644 --- a/c64/kernal/tape/tape_head_align_apply_gfx.s +++ b/c64/kernal/tape/tape_head_align_apply_gfx.s @@ -40,15 +40,7 @@ tape_head_align_apply_gfx: and #%00000010 beq !+ - lda #%00010000 - ora __ha_chart + 7 + 8 * 1 - sta __ha_chart + 7 + 8 * 1 - - lda #%00001000 - ora __ha_chart + 7 + 8 * 30 - sta __ha_chart + 7 + 8 * 30 - - // For normal + // For 'normal' lda #%00000001 ora __ha_chart + 7 + 8 * 6 @@ -58,7 +50,7 @@ tape_head_align_apply_gfx: ora __ha_chart + 7 + 8 * 13 sta __ha_chart + 7 + 8 * 13 - // For turbo + // For 'turbo' lda #%00010000 ora __ha_chart + 7 + 8 * 21 diff --git a/c64/kernal/tape/tape_head_align_help.s b/c64/kernal/tape/tape_head_align_help.s index ae89065b..b5c14ca2 100644 --- a/c64/kernal/tape/tape_head_align_help.s +++ b/c64/kernal/tape/tape_head_align_help.s @@ -111,23 +111,32 @@ tape_head_align_print_char: tape_head_align_help_text: - .word $2000 + (40 * 8) * 0 + 8 * 2 - .text "ADJUST HEAD FOR MINIMUM SIGNAL NOISE" + // Each string consists of: + // - destination (start byte) address + // - text in screencodes + / - $FF to mark end + + .word $2000 + (40 * 8) * 0 + 8 * 1 + .text "COMPUTER HAS TO TELL THE SIGNALS APART" .byte $FF - .word $2000 + (40 * 8) * 4 + 8 * 2 + .word $2000 + (40 * 8) * 3 + 8 * 6 + .text "ALIGN HEAD FOR MINIMUM NOISE" + .byte $FF + + .word $2000 + (40 * 8) * 6 + 8 * 2 .text "IF THE DECK HAS A PITCH (TAPE SPEED)" .byte $FF - .word $2000 + (40 * 8) * 5 + 8 * 1 - .text "CONTROL - USE IT TO PLACE DOTTED LINES" + .word $2000 + (40 * 8) * 7 + 8 * 1 + .text "CONTROL, TWEAK IT SO THAT DOTTED LINES" .byte $FF - .word $2000 + (40 * 8) * 6 + 8 * 3 - .text "EXACTLY HALF A WAY BETWEEN SIGNALS" + .word $2000 + (40 * 8) * 8 + 8 * 5 + .text "ARE HALF A WAY BETWEEN SIGNALS" .byte $FF - .byte $FF + .byte $FF // end of strings #endif