startup banner support cleanup

This commit is contained in:
FeralChild64 committed 2020-08-23 16:17:14 +02:00
1 parent 4f417d714e
commit 8bd0544e87
13 files changed
+131 -180

No files matched your search

+2 -2
View File
@@ -307,9 +307,9 @@ Feature needs 2 bytes in KERNAL segmment (for CPUs needing the patch), but at th
Tries to adjust the color scheme to the selected brand. Some brands might not support this.
### `CONFIG_BANNER_SIMPLE`, `CONFIG_BANNER_FANCY`, `CONFIG_BANNER_BRAND`
### `CONFIG_BANNER_SIMPLE`, `CONFIG_BANNER_FANCY`
Select startup banner - either a simple one, or with some colorful elements. `CONFIG_BANNER_BRAND` heavily depends on the selected brand, not all the brands support it.
Select startup banner - either a simple one, or with some colorful elements.
Richer banners need more BASIC segment, varies between brands.
-2
View File
@@ -22,7 +22,6 @@
#define CONFIG_BRAND_CUSTOM_BUILD
// #define CONFIG_BRAND_GENERIC
// #define CONFIG_BRAND_TESTING
// #define CONFIG_BRAND_MEGA_65
// #define CONFIG_BRAND_ULTIMATE_64
.const CONFIG_CUSTOM_BRAND = @"CUSTOM BUILD"
@@ -134,7 +133,6 @@
// #define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
-2
View File
@@ -21,7 +21,6 @@
#define CONFIG_BRAND_CUSTOM_BUILD
// #define CONFIG_BRAND_GENERIC
// #define CONFIG_BRAND_TESTING
// #define CONFIG_BRAND_MEGA_65
// #define CONFIG_BRAND_ULTIMATE_64
.const CONFIG_CUSTOM_BRAND = @"FOR COMMANDER X16"
@@ -128,7 +127,6 @@
// #define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
// #define CONFIG_SHOW_FEATURES
-2
View File
@@ -21,7 +21,6 @@
#define CONFIG_BRAND_GENERIC
// #define CONFIG_BRAND_TESTING
// #define CONFIG_BRAND_MEGA_65
// #define CONFIG_BRAND_ULTIMATE_64
@@ -126,7 +125,6 @@
#define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
+1 -17
View File
@@ -12,18 +12,11 @@
// Hardware platform and brand
// Hardware platform
#define CONFIG_PLATFORM_COMMODORE_64
#define CONFIG_MB_MEGA_65
// #define CONFIG_MB_ULTIMATE_64
// #define CONFIG_BRAND_GENERIC
// #define CONFIG_BRAND_TESTING
#define CONFIG_BRAND_MEGA_65
// #define CONFIG_BRAND_ULTIMATE_64
// Processor instruction set
@@ -121,15 +114,6 @@
#define CONFIG_BCD_SAFE_INTERRUPTS
// Eye candy
#define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
// #define CONFIG_BANNER_FANCY
#define CONFIG_BANNER_BRAND
// #define CONFIG_SHOW_FEATURES
// Built-in DOS configuration
.const CONFIG_UNIT_SDCARD = 0 // do not change, DOS is not implemented yet
-2
View File
@@ -21,7 +21,6 @@
// #define CONFIG_BRAND_GENERIC
#define CONFIG_BRAND_TESTING
// #define CONFIG_BRAND_MEGA_65
// #define CONFIG_BRAND_ULTIMATE_64
@@ -126,7 +125,6 @@
// #define CONFIG_COLORS_BRAND
#define CONFIG_BANNER_SIMPLE
// #define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
-2
View File
@@ -21,7 +21,6 @@
// #define CONFIG_BRAND_GENERIC
// #define CONFIG_BRAND_TESTING
// #define CONFIG_BRAND_MEGA_65
#define CONFIG_BRAND_ULTIMATE_64
@@ -126,7 +125,6 @@
#define CONFIG_COLORS_BRAND
// #define CONFIG_BANNER_SIMPLE
#define CONFIG_BANNER_FANCY
// #define CONFIG_BANNER_BRAND
#define CONFIG_SHOW_FEATURES
+16 -14
View File
@@ -63,18 +63,21 @@
#if CONFIG_BRAND_TESTING
.eval selected++
#endif
#if CONFIG_BRAND_MEGA_65
.eval selected++
#endif
#if CONFIG_BRAND_ULTIMATE_64
.eval selected++
#endif
#if !CONFIG_MB_MEGA_65
.if (selected != 1) .error "Please select exactly one CONFIG_BRAND_* option"
#if CONFIG_MB_MEGA_65 && !(CONFIG_BRAND_MEGA_65 || CONFIG_BRAND_TESTING || CONFIG_BRAND_CUSTOM_BUILD)
.error "Please select brand either matching the CONFIG_MB_*, or a testing/custom one"
#endif
#if CONFIG_MB_MEGA_65
.if (selected != 0) .error "Do not use CONFIG_BRAND_* options for MEGA65"
#endif
#if CONFIG_MB_MEGA_65 && CONFIG_SHOW_FEATURES
.if (selected != 0) .error "Do not use CONFIG_SHOW_FEATURES options for MEGA65"
#endif
#if CONFIG_MB_ULTIMATE_64 && !(CONFIG_BRAND_ULTIMATE_64 || CONFIG_BRAND_TESTING || CONFIG_BRAND_CUSTOM_BUILD)
.error "Please select brand either matching the CONFIG_MB_*, or a testing/custom one"
#endif
@@ -218,18 +221,17 @@
#if CONFIG_BANNER_FANCY
.eval selected++
#endif
#if CONFIG_BANNER_BRAND
.eval selected++
#endif
#if !CONFIG_MB_MEGA_65
.if (selected != 1) .error "Please select exactly one CONFIG_BANNER_* option"
#if CONFIG_BANNER_BRAND && !CONFIG_BRAND_MEGA_65
.error "CONFIG_BANNER_BRAND is not supported for your CONFIG_BRAND_*"
#endif
#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"
#if CONFIG_MB_MEGA_65
.if (selected != 0) .error "Do not use CONFIG_BANNER_* options for MEGA65"
#endif
#if CONFIG_MB_MEGA_65 && CONFIG_COLORS_BRAND
.error "Do not use CONFIG_COLORS_BRAND options for MEGA65"
#endif
}
+65
View File
@@ -0,0 +1,65 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Startup banner, to be displayed during cold start
//
.encoding "petscii_upper"
.macro BANNER_TEXT() {
#if CONFIG_BRAND_CUSTOM_BUILD
.text "OPEN ROMS "
.text CONFIG_CUSTOM_BRAND
#elif CONFIG_BRAND_GENERIC
.text "OPEN ROMS GENERIC BUILD"
#elif CONFIG_BRAND_TESTING
.text "OPEN ROMS TESTING BUILD"
#elif CONFIG_BRAND_ULTIMATE_64
.text "OPEN ROMS FOR ULTIMATE 64"
#endif
}
startup_banner:
#if CONFIG_BANNER_SIMPLE
.text " "
BANNER_TEXT()
.byte $00
#elif CONFIG_BANNER_FANCY
BANNER_TEXT()
.byte $00
rainbow_logo:
{
.var SET_COLOR_0 = $05
.var SET_COLOR_1 = $1C
.var SET_COLOR_2 = $9E
.var SET_COLOR_3 = $1E
.var SET_COLOR_4 = $9F
.byte SET_COLOR_1, $12, $A4, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_2, $12, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_3, $12, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_4, $12, $A4, $A4, $A4, $A4, $92
.byte SET_COLOR_0, $00
}
#if !CONFIG_BRAND_CUSTOM_BUILD
pre_revision_string:
.text "RELEASE "
.byte $00
#endif // no CONFIG_BRAND_CUSTOM_BUILD
#endif
@@ -1,6 +1,4 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
@@ -10,75 +8,8 @@
.encoding "petscii_upper"
.macro BANNER_TEXT() {
#if CONFIG_BRAND_CUSTOM_BUILD
.text "OPEN ROMS "
.text CONFIG_CUSTOM_BRAND
#elif CONFIG_BRAND_GENERIC
.text "OPEN ROMS GENERIC BUILD"
#elif CONFIG_BRAND_TESTING
.text "OPEN ROMS TESTING BUILD"
#elif CONFIG_BRAND_MEGA_65
.text "OPEN ROMS FOR MEGA65"
#elif CONFIG_BRAND_ULTIMATE_64
.text "OPEN ROMS FOR ULTIMATE 64"
#endif
}
startup_banner:
#if CONFIG_BANNER_SIMPLE
.text " "
BANNER_TEXT()
.byte $00
#elif CONFIG_BANNER_FANCY
BANNER_TEXT()
.byte $00
rainbow_logo:
{
#if CONFIG_COLORS_BRAND && CONFIG_BRAND_MEGA_65
.var SET_COLOR_0 = $05
.var SET_COLOR_1 = $9A
.var SET_COLOR_2 = $1E
.var SET_COLOR_3 = $9E
.var SET_COLOR_4 = $96
#else
.var SET_COLOR_0 = $05
.var SET_COLOR_1 = $1C
.var SET_COLOR_2 = $9E
.var SET_COLOR_3 = $1E
.var SET_COLOR_4 = $9F
#endif
.byte SET_COLOR_1, $12, $A4, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_2, $12, $A4, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_3, $12, $A4, $A4, $A4, $A4, $A4, $0D
.byte SET_COLOR_4, $12, $A4, $A4, $A4, $A4, $92
.byte SET_COLOR_0, $00
}
#if !CONFIG_BRAND_CUSTOM_BUILD
pre_revision_string:
.text "RELEASE "
.byte $00
#endif // no CONFIG_BRAND_CUSTOM_BUILD
#elif CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65
// Fancy Mega65 banner - from Retrofan, slightly tweaked
.byte $9A, $12, $20, $20, $7F, $A9, $20, $20, $1F, $20, $9A, $20, $20, $20, $20, $1F
@@ -135,15 +66,9 @@ pre_revision_string:
// .byte $12,$DF,$92,$7F,$9B,$20,$9A,$20,$9B,"0.2.0.0",$0D
// .byte $0D,$05,$92,$00
#if ROM_LAYOUT_M65
text_mode_64:
startup_banner_legacy:
.text "LEGACY"
.byte $11, $9D, $9D, $9D, $9D, $9D
.text "MODE"
.byte $00
#endif
#endif
+44
View File
@@ -0,0 +1,44 @@
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# * * #IGNORE
// Routine is too long to fit in the original location
// XXX banner-related code needs cleanup, move MEGA65 stuff to a separate file
INITMSG:
// Clear the screen first, some cartridges (like IEEE-488) are leaving a mess on the screen
lda #147
jsr JCHROUT
lda #<startup_banner
ldy #>startup_banner
jsr STROUT
jsr M65_ISMODE65
bcc !+ // XXX for MEGA65 native mode, display something else instead
ldx #$02
ldy #$21
jsr plot_set
lda #<startup_banner_legacy
ldy #>startup_banner_legacy
jsr STROUT
!:
ldx #$05
ldy #$00
jsr plot_set
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jsr STROUT
ldx #$05
ldy #$12
jsr plot_set
jsr initmsg_bytes_free
-59
View File
@@ -1,24 +1,13 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# M65 BASIC_1 #TAKE
// #LAYOUT# X16 BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
// Routine is too long to fit in the original location
// XXX banner-related code needs cleanup, move MEGA65 stuff to a separate file
#if ROM_LAYOUT_M65
INITMSG:
#else
initmsg_real:
#endif
// Clear the screen first, some cartridges (like IEEE-488) are leaving a mess on the screen
lda #147
jsr JCHROUT
@@ -117,52 +106,4 @@ initmsg_real:
jmp plot_set
#endif
#elif CONFIG_BANNER_BRAND && CONFIG_BRAND_MEGA_65
lda #<startup_banner
ldy #>startup_banner
jsr STROUT
#if ROM_LAYOUT_M65
jsr M65_ISMODE65
bcc !+ // XXX for MEGA65 native mode, display something else instead
ldx #$02
ldy #$21
jsr plot_set
lda #<text_mode_64
ldy #>text_mode_64
jsr STROUT
!:
#endif
ldx #$05
ldy #$00
jsr plot_set
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jsr STROUT
ldx #$05
ldy #$12
jsr plot_set
jsr initmsg_bytes_free
#if CONFIG_SHOW_FEATURES
ldx #$08
ldy #$00
jsr plot_set
jmp print_features
#else
ldx #$07
ldy #$00
jmp plot_set
#endif
#endif
+2 -2
View File
@@ -1226,7 +1226,7 @@ void DataSet::generateConfigDepStrings()
// List found
if (GLOBAL_ConfigOptions["CONFIG_SHOW_FEATURES"] || GLOBAL_ConfigOptions["CONFIG_BRAND_MEGA_65"])
if (GLOBAL_ConfigOptions["CONFIG_SHOW_FEATURES"] || GLOBAL_ConfigOptions["CONFIG_MB_MEGA_65"])
{
StringEntry newEntry1 = { true, true, true, true, "STR_PAL", "PAL\r" };
StringEntry newEntry2 = { true, true, true, true, "STR_NTSC", "NTSC\r" };
@@ -1241,7 +1241,7 @@ void DataSet::generateConfigDepStrings()
stringEntryList.list.push_back(newEntry);
}
if (GLOBAL_ConfigOptions["CONFIG_BRAND_MEGA_65"])
if (GLOBAL_ConfigOptions["CONFIG_MB_MEGA_65"])
{
StringEntry newEntry = { false, true, false, false, "STR_SI_FEATURES", featureStrM65 };
stringEntryList.list.push_back(newEntry);