show the most important compiled-in features on startup screen

This commit is contained in:
FeralChild64 committed 2019-10-31 19:09:17 +01:00
1 parent 65c27f4dd4
commit 2b9475475f
12 files changed
+161 -28

No files matched your search

+1
View File
@@ -115,6 +115,7 @@
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
#define CONFIG_SHOW_PAL_NTSC
+1
View File
@@ -117,6 +117,7 @@
// #define CONFIG_BANNER_SIMPLE
// #define CONFIG_BANNER_FANCY
#define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
// #define CONFIG_SHOW_PAL_NTSC
+4 -3
View File
@@ -113,10 +113,11 @@
// Eye candy
// #define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
#define CONFIG_BANNER_SIMPLE
// #define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
// #define CONFIG_SHOW_PAL_NTSC
#define CONFIG_SHOW_FEATURES
#define CONFIG_SHOW_PAL_NTSC
// Debug options
+1
View File
@@ -115,6 +115,7 @@
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
#define CONFIG_SHOW_PAL_NTSC
+69 -2
View File
@@ -3,6 +3,8 @@
// Various configuration dependent aliases/macros/checks
//
.encoding "petscii_upper"
// Check that platform configuration is correct
@@ -146,8 +148,8 @@
.error "CONFIG_BANNER_BRAND is not supported for your CONFIG_BRAND_*"
#endif
#if CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65 && CONFIG_SHOW_PAL_NTSC
.error "MEGA65 brand banner does not support showing PAL/NTSC"
#if CONFIG_MB_MEGA_65 && CONFIG_SHOW_PAL_NTSC
.error "MEGA65 can switch PAL/NTSC during run-time, CONFIG_SHOW_PAL_NTSC makes no sense"
#endif
}
@@ -261,3 +263,68 @@
STUB_IMPLEMENTATION_RTS()
#endif
}
// Function for printing out build features
.var feature_new_line = false
.function ADD_FEATURE(current_features, new_feature)
{
.var features_str = current_features
.if (!feature_new_line && features_str.size() > 0)
{
.eval features_str = features_str + ", "
}
.if (feature_new_line)
{
.eval feature_new_line = false
.eval features_str = features_str + @"\r"
}
.return features_str + new_feature
}
.function BUILD_FEATURES_STR()
{
.var features_str = ""
#if CONFIG_TAPE_NORMAL
.eval features_str = ADD_FEATURE(features_str, "TAPE NORMAL")
#elif CONFIG_TAPE_TURBO
.eval features_str = ADD_FEATURE(features_str, "TAPE TURBO")
#elif CONFIG_TAPE_NORMAL && CONFIG_TAPE_TURBO
.eval features_str = ADD_FEATURE(features_str, "TAPE NORMAL+TURBO")
#endif
.eval feature_new_line = true
#if CONFIG_IEC
.eval features_str = ADD_FEATURE(features_str, "IEC")
#endif
#if CONFIG_IEC_JIFFYDOS
.eval features_str = ADD_FEATURE(features_str, "JIFFY")
#endif
.eval feature_new_line = true
#if CONFIG_RS232_UP2400
.eval features_str = ADD_FEATURE(features_str, "UP2400")
#endif
#if CONFIG_RS232_UP2400
.eval features_str = ADD_FEATURE(features_str, "UP9600")
#endif
#if CONFIG_KEYBOARD_C128
.eval features_str = ADD_FEATURE(features_str, "KBD 128")
#endif
#if CONFIG_KEYBOARD_C65
.eval features_str = ADD_FEATURE(features_str, "KBD 65")
#endif
.return features_str
}
+4
View File
@@ -19,6 +19,10 @@
.label print_return = KERNAL.print_return
.label print_space = KERNAL.print_space
#if CONFIG_SHOW_FEATURES
.label print_features = KERNAL.print_features
#endif
#if CONFIG_SHOW_PAL_NTSC
.label print_pal_ntsc = KERNAL.print_pal_ntsc
#endif
+39 -14
View File
@@ -11,7 +11,7 @@ initmsg_real:
jsr STROUT
ldx #$02
ldy #$02
ldy #$04
jsr plot_set
lda #<rom_revision_basic_string
@@ -19,18 +19,26 @@ initmsg_real:
jsr STROUT
ldx #$04
ldy #$02
ldy #$04
jsr plot_set
#if CONFIG_SHOW_PAL_NTSC
jsr print_pal_ntsc
#endif
jsr initmsg_bytes_free
ldx #$07
ldx #$06
ldy #$00
#if CONFIG_SHOW_PAL_NTSC && 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
#elif CONFIG_BANNER_FANCY
@@ -58,19 +66,27 @@ initmsg_real:
ldy #>rom_revision_basic_string
jsr STROUT
ldx #$05
ldy #$00
ldx #$04
ldy #$0A
jsr plot_set
#if CONFIG_SHOW_PAL_NTSC
jsr print_pal_ntsc
#endif
jsr initmsg_bytes_free
ldx #$07
ldx #$05
ldy #$00
#if CONFIG_SHOW_PAL_NTSC && 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
#elif CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65
@@ -88,8 +104,17 @@ initmsg_real:
jsr initmsg_bytes_free
#if CONFIG_SHOW_FEATURES
ldx #$04
ldy #$00
jsr plot_set
jsr print_features
jmp print_return
#else
ldx #$05
ldy #$00
jmp plot_set
#endif
#endif
+1 -1
View File
@@ -24,7 +24,7 @@ startup_banner:
#if CONFIG_BANNER_SIMPLE
.text " "
.text " "
BANNER_TEXT()
.byte $00
+17 -4
View File
@@ -25,6 +25,9 @@
.label __MSG_KERNAL_PANIC_ROM_MISMATCH = __msg_kernalpanic_rom_mismatch - __msg_kernal_first
#endif
#if CONFIG_SHOW_FEATURES
.label __MSG_KERNAL_FEATURES = __msg_kernalfeatures - __msg_kernal_first
#endif
__msg_kernal_first:
@@ -59,12 +62,14 @@ __msg_kernalto_hex:
#if CONFIG_SHOW_PAL_NTSC
__msg_kernalpal:
.text "PAL,"
.byte $80 + $20 // end of string mark + space
.text "PAL"
.byte $0D
.byte $80 + $0D // end of string mark + return
__msg_kernalntsc:
.text "NTSC,"
.byte $80 + $20 // end of string mark + space
.text "NTSC"
.byte $0D
.byte $80 + $0D // end of string mark + return
#endif // CONFIG_SHOW_PAL_NTSC
@@ -79,3 +84,11 @@ __msg_kernalpanic_rom_mismatch:
.byte $80 + $48 // end of string mark + 'H'
#endif // CONFIG_PANIC_SCREEN
#if CONFIG_SHOW_FEATURES
__msg_kernalfeatures:
.text BUILD_FEATURES_STR()
.byte $80 + $0D // end of string mark + return
#endif // CONFIG_SHOW_FEATURES
+3 -3
View File
@@ -72,10 +72,10 @@ jiffydos_restore_sprites:
.function SAME_PAGE_CHECK(label_1, label_2)
{
#if !PASS_SIZETEST
return (label_1 - label_1 % 256) == (label_2 - label_2 % 256)
#if PASS_SIZETEST
.return (label_1 - label_1 % 256) == (label_2 - label_2 % 256)
#else
return true
.return true
#endif
}
+14
View File
@@ -0,0 +1,14 @@
//
// Print configured features on startup banner
//
#if CONFIG_SHOW_FEATURES
print_features:
ldx #__MSG_KERNAL_FEATURES
!:
jmp print_kernal_message
#endif // CONFIG_SHOW_FEATURES