safer reset routine for MEGA65

This commit is contained in:
FeralChild64 committed 2020-09-02 22:17:03 +02:00
1 parent b8f1c079ba
commit 9fe0e81d53
4 files changed
+30 -7

No files matched your search

+1
View File
@@ -41,6 +41,7 @@
.label viciv_hotregs_on = KERNAL_0.viciv_hotregs_on
.label viciv_hotregs_off = KERNAL_0.viciv_hotregs_off
.label m65_clr_magictstr = KERNAL_0.m65_clr_magictstr
.label m65_scrtab_txtwidth = KERNAL_0.m65_scrtab_txtwidth
.label m65_scrtab_txtheight = KERNAL_0.m65_scrtab_txtheight
.label m65_screen_set_indx = KERNAL_0.m65_screen_set_indx
+26
View File
@@ -0,0 +1,26 @@
// #LAYOUT# M65 KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
// MEGA65 specific part of the hardware
m65_reset_part:
jsr map_NORMAL // we want normal memory mapping
jsr viciv_shutdown // by default we do not want the VIC-IV
jsr M65_MODEGET
bcs !+
// Clear MEAGA65 native mode mark, it might cause confusion
m65_clr_magictstr: // entry point for mode switching routine
lda #$00
sta M65_MAGICSTR+0
sta M65_MAGICSTR+1
sta M65_MAGICSTR+2
// FALLTROUGH
!:
rts
+1 -4
View File
@@ -18,10 +18,7 @@ m65_mode64:
// Set the magic string to mark legacy mode
lda #$00
sta M65_MAGICSTR+0
sta M65_MAGICSTR+1
sta M65_MAGICSTR+2
jsr m65_clr_magictstr
// Restore VIC-II configuration
+2 -3
View File
@@ -27,8 +27,7 @@ hw_entry_reset:
#if ROM_LAYOUT_M65
jsr map_NORMAL // we want normal memory mapping
jsr viciv_shutdown // by default we do not want the VIC-IV
jsr m65_reset_part
#endif
@@ -62,7 +61,7 @@ hw_entry_reset:
// also affirmed by c64 prg p269
jsr JRESTOR
// "Compute's Mapping the 64" p236
// "Compute's Mapping the 64" p236
jsr JCINT
#if ROM_LAYOUT_M65