From 20ce3b5405f585497b3633899bb5061a28e634c5 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sun, 21 Jun 2020 22:35:46 +0200 Subject: [PATCH] PAL/NTSC display moved back to BASIC, reuses string compression --- CONFIG.md | 8 +------- c64/,,config_cx16.s | 1 - c64/,,config_generic.s | 1 - c64/,,config_mega65.s | 1 - c64/,,config_testing.s | 1 - c64/,,config_ultimate64.s | 1 - c64/basic/,imports.s | 4 ---- c64/basic/init/initmsg_real.s | 18 +++--------------- c64/basic/print/print_pal_ntsc.s | 21 +++++++++++++++++++++ c64/kernal/assets/kernal_messages.s | 17 ----------------- c64/kernal/print/print_pal_ntsc.s | 20 -------------------- tools/generate_strings.cc | 2 ++ 12 files changed, 27 insertions(+), 68 deletions(-) create mode 100644 c64/basic/print/print_pal_ntsc.s delete mode 100644 c64/kernal/print/print_pal_ntsc.s diff --git a/CONFIG.md b/CONFIG.md index afeab009..b33a17ed 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -313,16 +313,10 @@ Richer banners need more BASIC segment, varies between brands. ### `CONFIG_SHOW_FEATURES` -If enabled, shows the most important compiled-in features on the startup screen. +If enabled, shows the most important compiled-in features on the startup screen. Also shows the video system (PAL/NTSC). It is recommended to keep it enabled for informational purposes. -### `CONFIG_BANNER_PAL_NTSC` - -If enabled, prints video system on startup banner. Eye candy only. - -Feature needs few bytes in BASIC and about 25 bytes in KERNAL segment. - ## Debug options Options in this section are for debug purposes only. If unsure - disable. diff --git a/c64/,,config_cx16.s b/c64/,,config_cx16.s index 0643ac68..b1ce579a 100644 --- a/c64/,,config_cx16.s +++ b/c64/,,config_cx16.s @@ -128,7 +128,6 @@ #define CONFIG_BANNER_FANCY // #define CONFIG_BANNER_BRAND // #define CONFIG_SHOW_FEATURES -// #define CONFIG_SHOW_PAL_NTSC // Debug options diff --git a/c64/,,config_generic.s b/c64/,,config_generic.s index 711d06b5..aea04a58 100644 --- a/c64/,,config_generic.s +++ b/c64/,,config_generic.s @@ -126,7 +126,6 @@ #define CONFIG_BANNER_FANCY // #define CONFIG_BANNER_BRAND #define CONFIG_SHOW_FEATURES -#define CONFIG_SHOW_PAL_NTSC // Debug options diff --git a/c64/,,config_mega65.s b/c64/,,config_mega65.s index 1d8e77e5..dafe48d5 100644 --- a/c64/,,config_mega65.s +++ b/c64/,,config_mega65.s @@ -126,7 +126,6 @@ // #define CONFIG_BANNER_FANCY #define CONFIG_BANNER_BRAND // #define CONFIG_SHOW_FEATURES -// #define CONFIG_SHOW_PAL_NTSC // Debug options diff --git a/c64/,,config_testing.s b/c64/,,config_testing.s index 1b50ed8b..c0785af2 100644 --- a/c64/,,config_testing.s +++ b/c64/,,config_testing.s @@ -126,7 +126,6 @@ // #define CONFIG_BANNER_FANCY // #define CONFIG_BANNER_BRAND #define CONFIG_SHOW_FEATURES -#define CONFIG_SHOW_PAL_NTSC // Debug options diff --git a/c64/,,config_ultimate64.s b/c64/,,config_ultimate64.s index 6fc5a03e..bb76f26a 100644 --- a/c64/,,config_ultimate64.s +++ b/c64/,,config_ultimate64.s @@ -126,7 +126,6 @@ #define CONFIG_BANNER_FANCY // #define CONFIG_BANNER_BRAND #define CONFIG_SHOW_FEATURES -#define CONFIG_SHOW_PAL_NTSC // Debug options diff --git a/c64/basic/,imports.s b/c64/basic/,imports.s index 20eaa980..3d0934dc 100644 --- a/c64/basic/,imports.s +++ b/c64/basic/,imports.s @@ -47,10 +47,6 @@ .label print_features = KERNAL().print_features #endif -#if CONFIG_SHOW_PAL_NTSC -.label print_pal_ntsc = KERNAL().print_pal_ntsc -#endif - #if CONFIG_TAPE_HEAD_ALIGN .label tape_head_align = KERNAL().tape_head_align #endif diff --git a/c64/basic/init/initmsg_real.s b/c64/basic/init/initmsg_real.s index 62e612d4..3438c8ad 100644 --- a/c64/basic/init/initmsg_real.s +++ b/c64/basic/init/initmsg_real.s @@ -17,7 +17,7 @@ initmsg_real: #endif - // Clear the screen first, some cartridges (like IEEE-488) leeave a mess on the screen + // Clear the screen first, some cartridges (like IEEE-488) are leaving a mess on the screen lda #147 jsr JCHROUT @@ -55,16 +55,10 @@ initmsg_real: ldx #$05 #endif ldy #$00 -#if CONFIG_SHOW_PAL_NTSC && CONFIG_SHOW_FEATURES +#if CONFIG_SHOW_FEATURES jsr plot_set jsr print_features jmp print_pal_ntsc -#elif CONFIG_SHOW_PAL_NTSC - jsr plot_set - jmp print_pal_ntsc -#elif CONFIG_SHOW_FEATURES - jsr plot_set - jmp print_features #else jmp plot_set #endif @@ -115,16 +109,10 @@ initmsg_real: ldx #$05 #endif ldy #$00 -#if CONFIG_SHOW_PAL_NTSC && CONFIG_SHOW_FEATURES +#if CONFIG_SHOW_FEATURES jsr plot_set jsr print_features jmp print_pal_ntsc -#elif CONFIG_SHOW_PAL_NTSC - jsr plot_set - jmp print_pal_ntsc -#elif CONFIG_SHOW_FEATURES - jsr plot_set - jmp print_features #else jmp plot_set #endif diff --git a/c64/basic/print/print_pal_ntsc.s b/c64/basic/print/print_pal_ntsc.s new file mode 100644 index 00000000..cfabc62e --- /dev/null +++ b/c64/basic/print/print_pal_ntsc.s @@ -0,0 +1,21 @@ +// #LAYOUT# STD * #TAKE +// #LAYOUT# M65 BASIC_1 #TAKE +// #LAYOUT# X16 BASIC_0 #TAKE +// #LAYOUT# * * #IGNORE + +// +// Print video system on startup banner +// + +#if CONFIG_SHOW_FEATURES + +print_pal_ntsc: + + ldx #IDX__STR_NTSC + lda TVSFLG + beq !+ + ldx #IDX__STR_PAL +!: + jmp print_packed_misc_str + +#endif // CONFIG_SHOW_FEATURES diff --git a/c64/kernal/assets/kernal_messages.s b/c64/kernal/assets/kernal_messages.s index 16cca4ce..a5d712bf 100644 --- a/c64/kernal/assets/kernal_messages.s +++ b/c64/kernal/assets/kernal_messages.s @@ -26,11 +26,6 @@ #endif #endif -#if CONFIG_SHOW_PAL_NTSC -.label __MSG_KERNAL_PAL = __msg_kernalpal - __msg_kernal_first -.label __MSG_KERNAL_NTSC = __msg_kernalntsc - __msg_kernal_first -#endif - #if CONFIG_PANIC_SCREEN .label __MSG_KERNAL_PANIC = __msg_kernalpanic - __msg_kernal_first .label __MSG_KERNAL_PANIC_ROM_MISMATCH = __msg_kernalpanic_rom_mismatch - __msg_kernal_first @@ -93,18 +88,6 @@ __msg_kernaloksearching: #endif -#if CONFIG_SHOW_PAL_NTSC - -__msg_kernalpal: - .text "PAL" - .byte $80 + $0D // end of string mark + return - -__msg_kernalntsc: - .text "NTSC" - .byte $80 + $0D // end of string mark + return - -#endif // CONFIG_SHOW_PAL_NTSC - #if CONFIG_PANIC_SCREEN __msg_kernalpanic: diff --git a/c64/kernal/print/print_pal_ntsc.s b/c64/kernal/print/print_pal_ntsc.s deleted file mode 100644 index d005a63f..00000000 --- a/c64/kernal/print/print_pal_ntsc.s +++ /dev/null @@ -1,20 +0,0 @@ -// #LAYOUT# STD * #TAKE -// #LAYOUT# * KERNAL_0 #TAKE -// #LAYOUT# * * #IGNORE - -// -// Print video system on startup banner -// - -#if CONFIG_SHOW_PAL_NTSC - -print_pal_ntsc: - - ldx #__MSG_KERNAL_NTSC - lda TVSFLG - beq !+ - ldx #__MSG_KERNAL_PAL -!: - jmp print_kernal_message - -#endif // CONFIG_SHOW_PAL_NTSC diff --git a/tools/generate_strings.cc b/tools/generate_strings.cc index 552f4671..720c4ceb 100644 --- a/tools/generate_strings.cc +++ b/tools/generate_strings.cc @@ -313,6 +313,8 @@ const StringEntryList GLOBAL_MiscStrings = { ListType::STRINGS_BASIC, "misc", { true, true, true, "STR_ERROR", " ERROR" }, // simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html { true, true, true, "STR_IN", " IN " }, // STD M65 X16 --- misc strings specific to OpenROMs, not present in CBM ROMs + { true, true, true, "STR_PAL", "PAL\r" }, + { true, true, true, "STR_NTSC", "NTSC\r" }, { true, true, true, "STR_BRK_AT", "\rBRK AT $" }, } };