native MEGA65 mode now runs with disabled hot registers (fixes IEC access)

This commit is contained in:
FeralChild64 committed 2020-09-02 21:39:32 +02:00
1 parent 25dec8848a
commit b3096fbb17
5 files changed
+29

No files matched your search

+2
View File
@@ -20,6 +20,8 @@
.label VIC_CHARSTEP = $D058 // 2 bytes - logical characters per line
.label VIC_SRH = $D05D // - various flags, bit 7 = hot registers
.label VIC_SCRNPTR = $D060 // 4 bytes - pointer to start of screen memory
.label VIC_COLPTR = $D064 // 2 bytes - pointer to start of color memory
+2
View File
@@ -38,6 +38,8 @@
.label viciv_unhide = KERNAL_0.viciv_unhide
.label viciv_init = KERNAL_0.viciv_init
.label viciv_shutdown = KERNAL_0.viciv_shutdown
.label viciv_hotregs_on = KERNAL_0.viciv_hotregs_on
.label viciv_hotregs_off = KERNAL_0.viciv_hotregs_off
.label m65_scrtab_txtwidth = KERNAL_0.m65_scrtab_txtwidth
.label m65_scrtab_txtheight = KERNAL_0.m65_scrtab_txtheight
+17
View File
@@ -22,4 +22,21 @@ viciv_init:
lda #%01000000 // enable C65 character set
sta VIC_CTRLA
// Disable hot registers
// FALLTROUGH
viciv_hotregs_off:
lda VIC_SRH
and #$7F
!:
sta VIC_SRH
rts
viciv_hotregs_on:
lda VIC_SRH
ora #$80
bra !-
@@ -23,6 +23,10 @@ viciv_shutdown:
sta VIC_CTRLA // enable C64 character set
sta VIC_CTRLB // disable extended resolution and attributes
// Reenable hot registers
jsr viciv_hotregs_on
// Hide VIC-IV registers and quit
sta VIC_KEY
@@ -46,11 +46,15 @@ m65_scrmodeset_internal: // entry point for M65_MODE65
tax
jsr viciv_hotregs_on
lda m65_scrtab_scrolx,x
sta VIC_SCROLX
lda m65_scrtab_vic_ctrlb,x
sta VIC_CTRLB
jsr viciv_hotregs_off
// Set the logical row length to 80
ldx #$50