MEGA65 banner cleanup, fix for native mode autoswitch screen garbage

This commit is contained in:
FeralChild64 committed 2020-09-03 16:42:00 +02:00
1 parent fde114154e
commit fd13b2a65b
6 files changed
+105 -95

No files matched your search

-7
View File
@@ -69,10 +69,3 @@ startup_banner:
// .byte $12,$A0,$A0,$9B,$92,$20,$9A,$7F,$12,$A0,$A0,$9B,$92,$20,$9A,$7F
// .byte $12,$DF,$92,$7F,$9B,$20,$9A,$20,$9B,"0.2.0.0",$0D
// .byte $0D,$05,$92,$00
startup_banner_legacy:
.text "LEGACY"
.byte $11, $9D, $9D, $9D, $9D, $9D
.text "MODE"
.byte $00
+1
View File
@@ -30,6 +30,7 @@ cmd_sys:
bcs cmd_sys_nsys_common
sec
jsr M65_MODESET // set legacy C64 compatibility mode
jsr INITMSG_autoswitch
// FALLTROUGH
@@ -13,21 +13,22 @@
// Label definitions
.label VB1__INITMSG = $4000 + 2 * 0
.label VB1__LINKPRG = $4000 + 2 * 1
.label VB1__tokenise_line = $4000 + 2 * 2
.label VB1__list_single_line = $4000 + 2 * 3
.label VB1__print_packed_error = $4000 + 2 * 4
.label VB1__print_packed_misc_str = $4000 + 2 * 5
.label VB1__do_new = $4000 + 2 * 6
.label VB1__do_clr = $4000 + 2 * 7
.label VB1__do_restore = $4000 + 2 * 8
.label VB1__cmd_mem_cont = $4000 + 2 * 9
.label VB1__cmd_sysinfo = $4000 + 2 * 10
.label VB1__prepare_direct_execution = $4000 + 2 * 11
.label VB1__helper_ask_if_sure = $4000 + 2 * 12
.label VB1__INITMSG_autoswitch = $4000 + 2 * 1
.label VB1__LINKPRG = $4000 + 2 * 2
.label VB1__tokenise_line = $4000 + 2 * 3
.label VB1__list_single_line = $4000 + 2 * 4
.label VB1__print_packed_error = $4000 + 2 * 5
.label VB1__print_packed_misc_str = $4000 + 2 * 6
.label VB1__do_new = $4000 + 2 * 7
.label VB1__do_clr = $4000 + 2 * 8
.label VB1__do_restore = $4000 + 2 * 9
.label VB1__cmd_mem_cont = $4000 + 2 * 10
.label VB1__cmd_sysinfo = $4000 + 2 * 11
.label VB1__prepare_direct_execution = $4000 + 2 * 12
.label VB1__helper_ask_if_sure = $4000 + 2 * 13
#if CONFIG_DOS_WEDGE
.label VB1__wedge_dos = $4000 + 2 * 13
.label VB1__wedge_dos = $4000 + 2 * 14
#endif
#else
@@ -35,6 +36,7 @@
// Vector table (Open ROMs private!)
.word INITMSG
.word INITMSG_autoswitch
.word LINKPRG
.word tokenise_line
.word list_single_line
+7
View File
@@ -16,8 +16,15 @@ INITMSG:
jsr map_BASIC_1
jsr_ind VB1__INITMSG
!:
jmp map_NORMAL
INITMSG_autoswitch:
jsr map_BASIC_1
jsr_ind VB1__INITMSG_autoswitch
bra !-
#else
jmp initmsg_real
+48 -42
View File
@@ -9,16 +9,7 @@
INITMSG:
// Clear the screen first, some cartridges (like IEEE-488) are leaving a mess on the screen
lda #147
jsr JCHROUT
// Display main banner
lda #<startup_banner
ldy #>startup_banner
jsr STROUT
jsr INITMSG_main_banner
// Display additional information, depending on the mode
@@ -27,34 +18,12 @@ INITMSG:
// Legacy C64 compatibility mode
ldx #$02
ldy #$21
jsr plot_set
jsr INITMSG_partial
lda #<startup_banner_legacy
ldy #>startup_banner_legacy
jsr STROUT
// Legacy mode - display revision and available memory
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
ldx #$07
ldy #$00
jmp plot_set
ldx #IDX__STR_ORS_LEGACY_2
jsr print_packed_misc_str
bra INITMSG_end
!:
// Native mode
@@ -79,17 +48,54 @@ INITMSG:
ldx #IDX__STR_ORS
jsr print_packed_misc_str
ldx #IDX__STR_PRE_REV
jsr print_packed_misc_str
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jsr STROUT
jsr INITMSG_revision
jsr print_return
jsr print_return
// FALLTROUGH
INITMSG_end:
jsr initmsg_bytes_free
ldx #$09
ldy #$00
jmp plot_set
INITMSG_main_banner:
// Clear the screen first, some cartridges (like IEEE-488) are leaving a mess on the screen
lda #147
jsr JCHROUT
// Display main banner
lda #<startup_banner
ldy #>startup_banner
jmp STROUT
INITMSG_autoswitch: // entry point for 'SYS command'
jsr INITMSG_main_banner
jsr INITMSG_partial
jsr print_return
jmp print_return
INITMSG_partial:
ldx #IDX__STR_ORS_LEGACY_1
jsr print_packed_misc_str
// FALLTROUGH
INITMSG_revision:
ldx #IDX__STR_PRE_REV
jsr print_packed_misc_str
lda #<rom_revision_basic_string
ldy #>rom_revision_basic_string
jmp STROUT