started work on setting text mode

This commit is contained in:
FeralChild64 committed 2020-08-08 15:12:46 +02:00
1 parent 0b9cc2a9ec
commit 333ecf6eba
18 files changed
+247 -79

No files matched your search

@@ -18,6 +18,10 @@
.label VK1__load_tape_turbo = $4000 + 2 * 4
.label VK1__load_tape_auto = $4000 + 2 * 5
.label VK1__tape_head_align = $4000 + 2 * 6
.label VK1__M65_MODE64 = $4000 + 2 * 7
.label VK1__M65_MODE65 = $4000 + 2 * 8
.label VK1__M65_SCRMODEGET = $4000 + 2 * 9
.label VK1__M65_SCRMODESET = $4000 + 2 * 10
#else
@@ -51,4 +55,9 @@
.word $0000
#endif
.word M65_MODE64
.word M65_MODE65
.word M65_SCRMODEGET
.word M65_SCRMODESET
#endif
-19
View File
@@ -1,19 +0,0 @@
// #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
-26
View File
@@ -1,26 +0,0 @@
// #LAYOUT# M65 KERNAL_0 #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
-63
View File
@@ -1,63 +0,0 @@
// #LAYOUT# M65 KERNAL_0 #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
// XXX provide full implementation
// Switch VIC to VIC-IV mode
jsr viciv_unhide
// XXX provide proper implementation below
// Set screen mode to 80 columns
lda $D031
ora #$80
sta $D031
// Set screen RAM base to $15000
lda #$00
sta $D060
sta LDTB1+0
sta $D063
sta LDTB1+3
lda #$50
sta $D061
sta LDTB1+1
lda #$01
sta $D062
sta LDTB1+2
// Set something in screen memory
lda #$01
// STA [],Z
nop
.byte $92
.byte LDTB1
!:
nop
jmp !-
-16
View File
@@ -1,16 +0,0 @@
// #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
+4 -2
View File
@@ -9,6 +9,9 @@
.label STOP = KERNAL_0.STOP
.label M65_SLOW = KERNAL_0.M65_SLOW
.label M65_FAST = KERNAL_0.M65_FAST
.label hw_entry_reset = KERNAL_0.hw_entry_reset
.label return_from_interrupt = KERNAL_0.return_from_interrupt
@@ -17,7 +20,7 @@
.label setup_irq_timer = KERNAL_0.setup_irq_timer
.label wait_x_bars = KERNAL_0.wait_x_bars
.label viciv_unhide = KERNAL_0.viciv_unhide
#if CONFIG_IEC
@@ -28,7 +31,6 @@
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
.label viciv_unhide = KERNAL_0.viciv_unhide
.label tape_motor_on = KERNAL_0.tape_motor_on
.label tape_motor_off = KERNAL_0.tape_motor_off
-27
View File
@@ -1,27 +0,0 @@
// #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,30 @@
// #LAYOUT# M65 KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// ROM routine call redirect for Mega65 API routines
//
M65_MODE64:
jsr map_KERNAL_1
jsr_ind VK1__M65_MODE64
jmp map_NORMAL
M65_MODE65:
jsr map_KERNAL_1
jsr_ind VK1__M65_MODE65
jmp map_NORMAL
M65_SCRMODEGET:
jsr map_KERNAL_1
jsr_ind VK1__M65_SCRMODEGET
jmp map_NORMAL
M65_SCRMODESET:
jsr map_KERNAL_1
jsr_ind VK1__M65_SCRMODESET
jmp map_NORMAL
+4 -4
View File
@@ -8,17 +8,17 @@
//
#if ROM_LAYOUT_M65 || CONFIG_KEYBOARD_C65 || (CONFIG_MB_MEGA_65 && (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO))
#if ROM_LAYOUT_M65 || CONFIG_KEYBOARD_C65
// XXX viciii_unhide for non-Mega65 build?
viciv_unhide:
lda #$A5
lda #$47
sta VIC_KEY
lda #$96
lda #$53
sta VIC_KEY
rts
#endif