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