From 4eb0923f9c9b36bf0b00926544cd6f2f92571e18 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sun, 11 Oct 2020 11:45:13 +0200 Subject: [PATCH] VIC initialization fixes --- src/kernal/board_m65/mega65_viciv_shutdown.s | 4 ++++ src/kernal/init/e5a0.vicii_init.s | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/kernal/board_m65/mega65_viciv_shutdown.s b/src/kernal/board_m65/mega65_viciv_shutdown.s index e53b6f0e..0a4492a5 100644 --- a/src/kernal/board_m65/mega65_viciv_shutdown.s +++ b/src/kernal/board_m65/mega65_viciv_shutdown.s @@ -23,6 +23,10 @@ viciv_shutdown: sta VIC_CTRLA ; enable C64 character set sta VIC_CTRLB ; disable extended resolution and attributes + lda VIC_CTRLC + and #%00101000 ; disable fast mode and various VIC-IV extensions + sta VIC_CTRLC + ; Reenable hot registers jsr viciv_hotregs_on diff --git a/src/kernal/init/e5a0.vicii_init.s b/src/kernal/init/e5a0.vicii_init.s index 1657e714..d4637ce4 100644 --- a/src/kernal/init/e5a0.vicii_init.s +++ b/src/kernal/init/e5a0.vicii_init.s @@ -35,11 +35,12 @@ vicii_init: ; Disable C128 extra keys - just to be sure they will not interfere with anything - stx VIC_XSCAN + stx VIC_XSCAN ; store $FF ; Disable the C128 2MHz mode, it prevents VIC-II display from working correctly - stx VIC_CLKRATE + inx + stx VIC_CLKRATE ; store $00 } } ; Set up default IO values