various cleanups

This commit is contained in:
FeralChild64 committed 2020-08-31 19:39:12 +02:00
1 parent 7582913021
commit 1d4c953cee
26 files changed
+125 -123

No files matched your search

+5 -8
View File
@@ -8,19 +8,16 @@
// would copy the vector table to given memory location
M65_JMODE64:
jsr M65_MODE64
M65_JMODEGET:
jsr M65_MODEGET
M65_JMODE65: // XXX consider combining with M65_JMODE64
jsr M65_MODE65
M65_JISMODE65:
jsr M65_ISMODE65
M65_JISMODESET:
jsr M65_MODESET
M65_JSLOW:
jsr M65_SLOW
M65_JFAST: // XXX consider combining with M65_JSLOW
M65_JFAST:
jsr M65_FAST
M65_JSELDEV:
-29
View File
@@ -1,29 +0,0 @@
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
M65_MODE64:
// Disable interrupts, they might interfere
sei
// Set the magic string to mark legacy mode
lda #$00
sta M65_MAGICSTR+0
sta M65_MAGICSTR+1
sta M65_MAGICSTR+2
// Restore VIC-II configuration
jsr viciv_shutdown
jsr setup_vicii
// Reenable interrupts
cli
// Switch CPU speed back to slow and quit
jmp M65_SLOW
-36
View File
@@ -1,36 +0,0 @@
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
M65_MODE65:
// Disable interrupts, they might interfere
sei
// Switch CPU speed to fast
jsr M65_FAST
// Set the magic string to mark native mode
lda #$4D // 'M'
sta M65_MAGICSTR+0
lda #$36 // '6'
sta M65_MAGICSTR+1
lda #$35 // '5'
sta M65_MAGICSTR+2
// Initialize VIC-IV
jsr setup_vicii
jsr viciv_init
// Set screen mode to 80x50
lda #$02
jsr m65_scrmodeset_internal
// Clear the screen
jmp M65_CLRSCR
@@ -2,7 +2,9 @@
// #LAYOUT# * * #IGNORE
M65_ISMODE65: // checks if mode is native M65 one, BCC = jump if native mode
M65_MODEGET:
// Checks if mode is native M65 one; Carry clear = native mode, Carry set = legacy mode
pha
+71
View File
@@ -0,0 +1,71 @@
// #LAYOUT# M65 KERNAL_1 #TAKE
// #LAYOUT# * * #IGNORE
M65_MODESET:
// Carry clear = set native mode; Carry set = set legacy mode
bcc m65_mode65
// FALLTROUGH
m65_mode64:
// Disable interrupts, they might interfere
sei
// Set the magic string to mark legacy mode
lda #$00
sta M65_MAGICSTR+0
sta M65_MAGICSTR+1
sta M65_MAGICSTR+2
// Restore VIC-II configuration
jsr viciv_shutdown
jsr vicii_init
// Reenable interrupts
cli
// Switch CPU speed back to slow and quit
jmp M65_SLOW
m65_mode65:
// Disable interrupts, they might interfere
sei
// Switch CPU speed to fast
jsr M65_FAST
// Set the magic string to mark native mode
lda #$4D // 'M'
sta M65_MAGICSTR+0
lda #$36 // '6'
sta M65_MAGICSTR+1
lda #$35 // '5'
sta M65_MAGICSTR+2
// Initialize VIC-IV
jsr vicii_init
jsr viciv_init
// Set screen mode to 80x50
lda #$02
jsr m65_scrmodeset_internal
// Clear the screen
jmp M65_CLRSCR