added panic screen, added versioning mechanism proposal
This commit is contained in:
1 parent
890558213a
commit
5a231c1847
40 files changed
+363
-182
No files matched your search
@@ -5,68 +5,74 @@
|
||||
|
||||
// Double underscore prevents labels from being passed to VICE (would confuse monitor)
|
||||
|
||||
.label __MSG_KERNAL_SEARCHING_FOR = __kernal_message_searching_for - __kernal_messages_start
|
||||
.label __MSG_KERNAL_LOADING = __kernal_message_loading - __kernal_messages_start
|
||||
.label __MSG_KERNAL_VERIFYING = __kernal_message_verifying - __kernal_messages_start
|
||||
.label __MSG_KERNAL_SAVING = __kernal_message_saving - __kernal_messages_start
|
||||
.label __MSG_KERNAL_FROM_HEX = __kernal_message_from_hex - __kernal_messages_start
|
||||
.label __MSG_KERNAL_TO_HEX = __kernal_message_to_hex - __kernal_messages_start
|
||||
.label __MSG_KERNAL_SEARCHING_FOR = __msg_kernalsearching_for - __msg_kernal_first
|
||||
.label __MSG_KERNAL_LOADING = __msg_kernalloading - __msg_kernal_first
|
||||
.label __MSG_KERNAL_VERIFYING = __msg_kernalverifying - __msg_kernal_first
|
||||
.label __MSG_KERNAL_SAVING = __msg_kernalsaving - __msg_kernal_first
|
||||
.label __MSG_KERNAL_FROM_HEX = __msg_kernalfrom_hex - __msg_kernal_first
|
||||
.label __MSG_KERNAL_TO_HEX = __msg_kernalto_hex - __msg_kernal_first
|
||||
|
||||
#if CONFIG_BANNER_PAL_NTSC
|
||||
.label __MSG_KERNAL_PAL = __kernal_message_pal - __kernal_messages_start
|
||||
.label __MSG_KERNAL_NTSC = __kernal_message_ntsc - __kernal_messages_start
|
||||
#if CONFIG_SHOW_PAL_NTSC
|
||||
.label __MSG_KERNAL_PAL = __msg_kernalpal - __msg_kernal_first
|
||||
.label __MSG_KERNAL_NTSC = __msg_kernalntsc - __msg_kernal_first
|
||||
#endif
|
||||
|
||||
.label __MSG_KERNAL_PANIC = __kernal_message_panic - __kernal_messages_start
|
||||
.label __MSG_KERNAL_PANIC_VERSION = __kernal_message_panic_version - __kernal_messages_start
|
||||
#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
|
||||
#endif
|
||||
|
||||
|
||||
__kernal_messages_start:
|
||||
__msg_kernal_first:
|
||||
|
||||
__kernal_message_searching_for:
|
||||
__msg_kernalsearching_for:
|
||||
.byte $0D
|
||||
.text "SEARCHING FOR"
|
||||
.byte $80 + $20 // end of string mark + space
|
||||
|
||||
__kernal_message_loading:
|
||||
__msg_kernalloading:
|
||||
.byte $0D
|
||||
.text "LOADIN"
|
||||
.byte $80 + $47 // end of string mark + 'G'
|
||||
|
||||
__kernal_message_verifying:
|
||||
__msg_kernalverifying:
|
||||
.byte $0D
|
||||
.text "VERIFYIN"
|
||||
.byte $80 + $47 // end of string mark + 'G'
|
||||
|
||||
__kernal_message_saving:
|
||||
__msg_kernalsaving:
|
||||
.byte $0D
|
||||
.text "SAVIN"
|
||||
.byte $80 + $47 // end of string mark + 'G'
|
||||
|
||||
__kernal_message_from_hex:
|
||||
__msg_kernalfrom_hex:
|
||||
.text " FROM "
|
||||
.byte $80 + $24 // end of string mark + '$'
|
||||
|
||||
__kernal_message_to_hex:
|
||||
__msg_kernalto_hex:
|
||||
.text " TO "
|
||||
.byte $80 + $24 // end of string mark + '$'
|
||||
|
||||
#if CONFIG_BANNER_PAL_NTSC
|
||||
#if CONFIG_SHOW_PAL_NTSC
|
||||
|
||||
__kernal_message_pal:
|
||||
.text ", PAL"
|
||||
__msg_kernalpal:
|
||||
.text "PAL,"
|
||||
.byte $80 + $20 // end of string mark + space
|
||||
|
||||
__kernal_message_ntsc:
|
||||
.text ", NTSC"
|
||||
__msg_kernalntsc:
|
||||
.text "NTSC,"
|
||||
.byte $80 + $20 // end of string mark + space
|
||||
|
||||
#endif // CONFIG_BANNER_PAL_NTSC
|
||||
#endif // CONFIG_SHOW_PAL_NTSC
|
||||
|
||||
__kernal_message_panic:
|
||||
#if CONFIG_PANIC_SCREEN
|
||||
|
||||
__msg_kernalpanic:
|
||||
.text "KERNAL PANI"
|
||||
.byte $80 + $43 // end of string mark + 'C'
|
||||
|
||||
__kernal_message_panic_version:
|
||||
__msg_kernalpanic_rom_mismatch:
|
||||
.text " - ROM MISMATC"
|
||||
.byte $80 + $48 // end of string mark + 'H'
|
||||
|
||||
#endif // CONFIG_PANIC_SCREEN
|
||||
@@ -5,7 +5,7 @@
|
||||
// - [RG64] C64 Programmer's Reference Guide - page 275 (CHKIN) / 276 (CKOUT)
|
||||
// - [CM64] Compute's Mapping the Commodore 64 - page 229
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): .Y
|
||||
// CPU registers that has to be preserved (see [RG64]): .Y, possibly .A (XXX - see [CM64], page 213)
|
||||
//
|
||||
|
||||
|
||||
|
||||
+21
-5
@@ -3,19 +3,29 @@
|
||||
// Something terrible happened - show the panic screen
|
||||
//
|
||||
|
||||
// .A = 0 - just panic, no extra message
|
||||
// .A = 1 - ROM version mismatch
|
||||
|
||||
#if CONFIG_PANIC_SCREEN
|
||||
|
||||
panic:
|
||||
|
||||
// Disable interrupts, store error code on stack
|
||||
|
||||
sei
|
||||
pha
|
||||
|
||||
// Reinitialize the hardware
|
||||
|
||||
jsr IOINIT
|
||||
jsr setup_vicii
|
||||
jsr clear_screen
|
||||
|
||||
// XXX disable NMIs
|
||||
// Disable NMIs - our routine checks for NULL vector
|
||||
|
||||
lda #$00
|
||||
sta NMINV+0
|
||||
sta NMINV+1
|
||||
|
||||
// Display KERNAL PANIC message
|
||||
|
||||
ldx #$14
|
||||
ldy #$0E
|
||||
@@ -24,6 +34,8 @@ panic:
|
||||
ldx #__MSG_KERNAL_PANIC
|
||||
jsr print_kernal_message
|
||||
|
||||
// Display error code and message (if known)
|
||||
|
||||
pla
|
||||
beq kernal_panic_infinite_loop
|
||||
pha
|
||||
@@ -37,12 +49,14 @@ panic:
|
||||
jsr print_hex_byte
|
||||
|
||||
pla
|
||||
cmp #$01
|
||||
cmp #P_ERR_ROM_MISMATCH
|
||||
bne kernal_panic_infinite_loop
|
||||
|
||||
ldx #__MSG_KERNAL_PANIC_VERSION
|
||||
ldx #__MSG_KERNAL_PANIC_ROM_MISMATCH
|
||||
jsr print_kernal_message
|
||||
|
||||
// Display some raster effect in the infinitew loop
|
||||
|
||||
kernal_panic_infinite_loop:
|
||||
ldx #$00
|
||||
stx VIC_EXTCOL
|
||||
@@ -59,3 +73,5 @@ kernal_panic_infinite_loop:
|
||||
bne !-
|
||||
|
||||
beq kernal_panic_infinite_loop // branch always
|
||||
|
||||
#endif // CONFIG_PANIC_SCREEN
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
print_kernal_message:
|
||||
|
||||
lda __kernal_messages_start, x
|
||||
lda __msg_kernal_first, x
|
||||
bpl !- // 0 marks end of string
|
||||
and #$7F
|
||||
jmp JCHROUT
|
||||
@@ -3,7 +3,7 @@
|
||||
// Print video system on startup banner
|
||||
//
|
||||
|
||||
#if CONFIG_BANNER_PAL_NTSC
|
||||
#if CONFIG_SHOW_PAL_NTSC
|
||||
|
||||
print_pal_ntsc:
|
||||
|
||||
@@ -14,4 +14,4 @@ print_pal_ntsc:
|
||||
!:
|
||||
jmp print_kernal_message
|
||||
|
||||
#endif // CONFIG_BANNER_PAL_NTSC
|
||||
#endif // CONFIG_SHOW_PAL_NTSC
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
//
|
||||
// !!! PROPOSAL ONLY !!! PROPOSAL ONLY !!! NOT FOR USING EXTERNALLY YET !!!
|
||||
//
|
||||
//
|
||||
// Do not change! Locations of the following data should be constant - now and forever!
|
||||
//
|
||||
// If you want to integrate Open ROMs support in your emulator, FPGA ccomputer, etc. - this
|
||||
// is the official way to recognize the ROM and it's revision.
|
||||
//
|
||||
|
||||
|
||||
// XXX we need to find a safe address within $E4D3-$FFFF range, we need 20 bytes
|
||||
|
||||
|
||||
panic_vector:
|
||||
|
||||
// This vector is to be used by non-Kernal ROMs, if they want to complain
|
||||
// about incompatible ROM releases - jump via this vector with .A set to 1
|
||||
|
||||
.byte <panic
|
||||
.byte >panic
|
||||
|
||||
rom_revision_kernal:
|
||||
|
||||
.text "OR" // Magic string, after "Open ROMs"
|
||||
.byte CONFIG_ID // Config file ID, might change between revisions
|
||||
|
||||
rom_revision_kernal_string:
|
||||
|
||||
.text "DEVEL SNAPSHOT" // Actual ROM revision string
|
||||
.byte $00
|
||||
|
||||
__rom_revision_kernal_end:
|
||||
Reference in new issue
Block a user