more control codes supported for MEGA65 native screen
This commit is contained in:
1 parent
19dfa0f4a1
commit
5f6357c7e3
4 files changed
+122
-87
No files matched your search
@@ -11,11 +11,13 @@
|
||||
chrout_screen_SHIFT_ON:
|
||||
|
||||
lda #$00 // enable SHIFT+VENDOR combination
|
||||
!:
|
||||
sta MODE
|
||||
jmp chrout_screen_done
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
chrout_screen_SHIFT_OFF:
|
||||
|
||||
lda #$80 // disable SHIFT+VENDOR combination
|
||||
bne !- // branch always
|
||||
|
||||
sta MODE
|
||||
jmp chrout_screen_done
|
||||
@@ -73,81 +73,6 @@ m65_chrout_try_color_loop:
|
||||
|
||||
|
||||
|
||||
|
||||
// XXX: consider moving to separate files
|
||||
|
||||
m65_chrout_screen_RETURN:
|
||||
|
||||
// RETURN clears quote and insert modes, it also clears reverse flag
|
||||
|
||||
lda #$00
|
||||
sta QTSW
|
||||
sta INSRT
|
||||
sta RVS
|
||||
|
||||
// XXX should we clear special colour attributes too?
|
||||
|
||||
// Move cursor to the beginning of the next line
|
||||
|
||||
sta M65__TXTCOL
|
||||
inc M65__TXTROW
|
||||
|
||||
// Correct the column/row values
|
||||
|
||||
jmp m65_chrout_fix_column_row
|
||||
|
||||
|
||||
|
||||
|
||||
m65_chrout_screen_RVS_ON:
|
||||
|
||||
lda #$80
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_RVS_OFF:
|
||||
|
||||
lda #$00
|
||||
|
||||
sta RVS
|
||||
jmp m65_chrout_screen_done
|
||||
|
||||
|
||||
|
||||
m65_chrout_screen_CRSR_RIGHT:
|
||||
|
||||
inc M65__TXTCOL
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_CRSR_LEFT:
|
||||
|
||||
dec M65__TXTCOL
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_CRSR_DOWN:
|
||||
|
||||
inc M65__TXTROW
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_CRSR_UP:
|
||||
|
||||
dec M65__TXTROW
|
||||
|
||||
// Correct the column/row values
|
||||
|
||||
jmp m65_chrout_fix_column_row
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// XXX: implement screen routines below:
|
||||
|
||||
m65_chrout_screen_quote:
|
||||
@@ -156,14 +81,6 @@ m65_chrout_screen_CLR:
|
||||
nop
|
||||
m65_chrout_screen_HOME:
|
||||
nop
|
||||
m65_chrout_screen_SHIFT_OFF:
|
||||
nop
|
||||
m65_chrout_screen_SHIFT_ON:
|
||||
nop
|
||||
m65_chrout_screen_TXT:
|
||||
nop
|
||||
m65_chrout_screen_GFX:
|
||||
nop
|
||||
m65_chrout_screen_INS:
|
||||
nop
|
||||
m65_chrout_screen_TAB:
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Cursor movement
|
||||
|
||||
m65_chrout_screen_CRSR_RIGHT:
|
||||
|
||||
inc M65__TXTCOL
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_CRSR_LEFT:
|
||||
|
||||
dec M65__TXTCOL
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_CRSR_DOWN:
|
||||
|
||||
inc M65__TXTROW
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_CRSR_UP:
|
||||
|
||||
dec M65__TXTROW
|
||||
jmp_8 m65_chrout_screen_ctrl1_end
|
||||
|
||||
|
||||
// 'RETURN' key
|
||||
|
||||
m65_chrout_screen_RETURN:
|
||||
|
||||
// RETURN clears quote and insert modes, it also clears reverse flag
|
||||
|
||||
lda #$00
|
||||
sta QTSW
|
||||
sta INSRT
|
||||
sta RVS
|
||||
|
||||
// XXX should we clear special colour attributes too?
|
||||
|
||||
// Move cursor to the beginning of the next line
|
||||
|
||||
sta M65__TXTCOL
|
||||
inc M65__TXTROW
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_ctrl1_end:
|
||||
|
||||
// Correct the column/row values
|
||||
|
||||
jmp m65_chrout_fix_column_row
|
||||
@@ -0,0 +1,58 @@
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// 'REVERSE' mode support
|
||||
|
||||
m65_chrout_screen_RVS_ON:
|
||||
|
||||
lda #$80
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_RVS_OFF:
|
||||
|
||||
lda #$00
|
||||
|
||||
sta RVS
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_ctrl2_end:
|
||||
|
||||
jmp m65_chrout_screen_done
|
||||
|
||||
|
||||
// 'SHIFT ON/OFF' support
|
||||
|
||||
m65_chrout_screen_SHIFT_ON:
|
||||
|
||||
lda #$00 // enable SHIFT+VENDOR combination
|
||||
skip_2_bytes_trash_nvz
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_chrout_screen_SHIFT_OFF:
|
||||
|
||||
lda #$80 // disable SHIFT+VENDOR combination
|
||||
|
||||
sta MODE
|
||||
jmp_8 m65_chrout_screen_ctrl2_end
|
||||
|
||||
|
||||
// GFX/TXT switching support
|
||||
|
||||
m65_chrout_screen_GFX:
|
||||
|
||||
lda VIC_YMCSB
|
||||
and #$02 // to upper case
|
||||
!:
|
||||
sta VIC_YMCSB
|
||||
jmp_8 m65_chrout_screen_ctrl2_end
|
||||
|
||||
m65_chrout_screen_TXT:
|
||||
|
||||
lda VIC_YMCSB
|
||||
ora #$02 // to lower case
|
||||
bne !- // branch always
|
||||
Reference in new issue
Block a user