initial concept of ROM versioning, still needs quite some work

This commit is contained in:
FeralChild64 committed 2019-10-12 19:13:56 +02:00
1 parent 5b69467dc1
commit 890558213a
20 files changed
+191 -11

No files matched your search

+13 -2
View File
@@ -17,6 +17,9 @@
.label __MSG_KERNAL_NTSC = __kernal_message_ntsc - __kernal_messages_start
#endif
.label __MSG_KERNAL_PANIC = __kernal_message_panic - __kernal_messages_start
.label __MSG_KERNAL_PANIC_VERSION = __kernal_message_panic_version - __kernal_messages_start
__kernal_messages_start:
@@ -51,11 +54,19 @@ __kernal_message_to_hex:
#if CONFIG_BANNER_PAL_NTSC
__kernal_message_pal:
.text "PAL,"
.text ", PAL"
.byte $80 + $20 // end of string mark + space
__kernal_message_ntsc:
.text "NTSC,"
.text ", NTSC"
.byte $80 + $20 // end of string mark + space
#endif // CONFIG_BANNER_PAL_NTSC
__kernal_message_panic:
.text "KERNAL PANI"
.byte $80 + $43 // end of string mark + 'C'
__kernal_message_panic_version:
.text " - ROM MISMATC"
.byte $80 + $48 // end of string mark + 'H'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+61
View File
@@ -0,0 +1,61 @@
//
// Something terrible happened - show the panic screen
//
// .A = 0 - just panic, no extra message
// .A = 1 - ROM version mismatch
panic:
sei
pha
jsr IOINIT
jsr setup_vicii
jsr clear_screen
// XXX disable NMIs
ldx #$14
ldy #$0E
jsr plot_set
ldx #__MSG_KERNAL_PANIC
jsr print_kernal_message
pla
beq kernal_panic_infinite_loop
pha
ldx #$02
ldy #$02
jsr plot_set
pla
pha
jsr print_hex_byte
pla
cmp #$01
bne kernal_panic_infinite_loop
ldx #__MSG_KERNAL_PANIC_VERSION
jsr print_kernal_message
kernal_panic_infinite_loop:
ldx #$00
stx VIC_EXTCOL
ldx #$80
!:
dex
bne !-
ldx #$06
stx VIC_EXTCOL
!:
dex
bne !-
beq kernal_panic_infinite_loop // branch always
+34
View File
@@ -0,0 +1,34 @@
//
// !!! 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: