started work on setting text mode
This commit is contained in:
1 parent
0b9cc2a9ec
commit
333ecf6eba
18 files changed
+247
-79
No files matched your search
@@ -0,0 +1,27 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Not this is not an official Kernal API extension (yet)! It is subject to change!
|
||||
//
|
||||
// XXX consider turning this into vector table, the only jumptable extension
|
||||
// would copy the vector table to given memory location
|
||||
|
||||
|
||||
M65_JMODE64:
|
||||
jsr M65_MODE64
|
||||
|
||||
M65_JMODE65:
|
||||
jsr M65_MODE65
|
||||
|
||||
M65_JISMODE65:
|
||||
jsr M65_ISMODE65
|
||||
|
||||
M65_JSLOW:
|
||||
jsr M65_SLOW
|
||||
|
||||
M65_JFAST:
|
||||
jsr M65_FAST
|
||||
|
||||
M65_JSELDEV:
|
||||
jsr SELDEV
|
||||
@@ -0,0 +1,19 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
M65_ISMODE65: // checks if mode is native M65 one, BEQ = jump if native mode
|
||||
|
||||
pha
|
||||
|
||||
lda M65_MAGICSTR+0
|
||||
cmp #$4D // 'M'
|
||||
bne !+
|
||||
lda M65_MAGICSTR+1
|
||||
cmp #$36 // '6'
|
||||
bne !+
|
||||
lda M65_MAGICSTR+2
|
||||
cmp #$35 // '5'
|
||||
!:
|
||||
pla
|
||||
rts
|
||||
@@ -0,0 +1,26 @@
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
M65_MODE64:
|
||||
|
||||
// Disable interrupts, they might interfere
|
||||
|
||||
sei
|
||||
|
||||
// XXX provide full implementation
|
||||
|
||||
// Set the magic string to mark legacy mode
|
||||
|
||||
lda #$00
|
||||
sta M65_MAGICSTR+0
|
||||
sta M65_MAGICSTR+1
|
||||
sta M65_MAGICSTR+2
|
||||
|
||||
// Reenable interrupts
|
||||
|
||||
cli
|
||||
|
||||
// Switch CPU speed back to slow and quit
|
||||
|
||||
jmp M65_SLOW
|
||||
@@ -0,0 +1,35 @@
|
||||
// #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
|
||||
|
||||
// Switch VIC to VIC-IV mode
|
||||
|
||||
jsr viciv_unhide
|
||||
|
||||
// Set screen mode to 80x25
|
||||
|
||||
lda #$01
|
||||
jsr m65_scrmodeset_internal
|
||||
|
||||
// Clear the screen
|
||||
|
||||
jmp M65_CLRSCR
|
||||
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
M65_SLOW: // set CPU speed to 1 MHz
|
||||
|
||||
lda #$40
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
M65_FAST: // set CPU speed to 40 MHz
|
||||
|
||||
lda #$41
|
||||
sta CPU_D6510
|
||||
rts
|
||||
Reference in new issue
Block a user