improved VIC II initialization

This commit is contained in:
FeralChild64 committed 2019-10-18 21:24:08 +02:00
1 parent 5f7c21fdac
commit abc669d761
3 files changed
+36 -10

No files matched your search

+36 -10
View File
@@ -1,22 +1,48 @@
setup_vicii:
// XXX there is more to setup within this routine
// XXX it should also set default devices
// Set up default IO values (Compute's Mapping the 64 p215)
lda #$1B // Enable text mode
// Clear everything - turn off sprites (observed hanging around after
// running programs and resetting), etc.
lda #$00
ldx #$2E
!:
sta __VIC_BASE, x
dex
bpl !-
// Disable C128 extra keys - just to be sure they won't interfere with anything
stx VIC_XSCAN
// Disable the C128 2MHz mode, it prevents VIC-II display from working correctly
stx VIC_CLKRATE
// Set up default IO values - Compute's Mapping the 64
// - page 129 - VIC_SCROLY
// - pages 140-144 - VIC_SCROLX
// - pages 145-146 - VIC_YMCSB
lda #$9B
sta VIC_SCROLY
lda #$C8 // 40 column etc
sta VIC_SCROLX
lda #$C8
sta VIC_SCROLX // 40 column etc
lda #$14
sta VIC_YMCSB
lda #$0F
sta VIC_IRQ // clear all interrupts
// XXX initialize $D012 (VIC_RASTER) - which values to use?
// Compute's Mapping the 64, p156
// We use a different colour scheme of white text on all blue
lda #$06
sta VIC_EXTCOL
sta VIC_BGCOL0
// Turn off sprites (observed hanging around after running programs and resetting)
lda #$00
sta VIC_SPENA
rts
File renamed without changes.
File renamed without changes.