more control codes for MEGA65 screen editor
This commit is contained in:
1 parent
ece9dc8f6f
commit
9a154b3710
7 files changed
+108
-23
No files matched your search
@@ -24,8 +24,8 @@
|
|||||||
// Page 0 - other reused values
|
// Page 0 - other reused values
|
||||||
//
|
//
|
||||||
|
|
||||||
.label M65__TXTROW = PNTR // screen row
|
.label M65__TXTROW = TBLX // screen row
|
||||||
.label M65__TXTCOL = TBLX // screen column
|
.label M65__TXTCOL = PNTR // screen column
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pages 4-7 - reused screen memory
|
// Pages 4-7 - reused screen memory
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ cmd_go_syntax_error:
|
|||||||
jsr helper_ask_if_sure
|
jsr helper_ask_if_sure
|
||||||
bcs cmd_go_rts
|
bcs cmd_go_rts
|
||||||
jsr M65_MODE64
|
jsr M65_MODE64
|
||||||
jmp do_clr
|
jmp_8 cmd_go_switchmode_clr_banner
|
||||||
!:
|
!:
|
||||||
cmp #65
|
cmp #65
|
||||||
bne !+
|
bne_16 do_ILLEGAL_QUANTITY_error
|
||||||
|
|
||||||
// If in C64 compatibility mode - switch to native mode
|
// If in C64 compatibility mode - switch to native mode
|
||||||
|
|
||||||
@@ -50,9 +50,13 @@ cmd_go_syntax_error:
|
|||||||
jsr helper_ask_if_sure
|
jsr helper_ask_if_sure
|
||||||
bcs cmd_go_rts
|
bcs cmd_go_rts
|
||||||
jsr M65_MODE65
|
jsr M65_MODE65
|
||||||
jmp do_clr
|
|
||||||
!:
|
// FALLTROUGH
|
||||||
jmp do_ILLEGAL_QUANTITY_error
|
|
||||||
|
cmd_go_switchmode_clr_banner:
|
||||||
|
|
||||||
|
jsr do_clr
|
||||||
|
jmp INITMSG
|
||||||
|
|
||||||
cmd_go_rts:
|
cmd_go_rts:
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
.label JCHRIN = KERNAL_0.JCHRIN
|
.label JCHRIN = KERNAL_0.JCHRIN
|
||||||
.label JREADST = KERNAL_0.JREADST
|
.label JREADST = KERNAL_0.JREADST
|
||||||
.label SELDEV = KERNAL_0.SELDEV
|
.label SELDEV = KERNAL_0.SELDEV
|
||||||
|
.label M65_ISMODE65 = KERNAL_0.M65_ISMODE65
|
||||||
.label plot_set = KERNAL_0.plot_set
|
.label plot_set = KERNAL_0.plot_set
|
||||||
.label init_oldtxt = BASIC_0.init_oldtxt
|
.label init_oldtxt = BASIC_0.init_oldtxt
|
||||||
.label tmpstr_free_all_reset = BASIC_0.tmpstr_free_all_reset
|
.label tmpstr_free_all_reset = BASIC_0.tmpstr_free_all_reset
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ initmsg_real:
|
|||||||
|
|
||||||
#if ROM_LAYOUT_M65
|
#if ROM_LAYOUT_M65
|
||||||
|
|
||||||
// XXX make it different for future Mega65 native mode
|
jsr M65_ISMODE65
|
||||||
|
bcc !+ // XXX for MEGA65 native mode, display something else instead
|
||||||
|
|
||||||
ldx #$02
|
ldx #$02
|
||||||
ldy #$21
|
ldy #$21
|
||||||
@@ -132,6 +133,7 @@ initmsg_real:
|
|||||||
lda #<text_mode_64
|
lda #<text_mode_64
|
||||||
ldy #>text_mode_64
|
ldy #>text_mode_64
|
||||||
jsr STROUT
|
jsr STROUT
|
||||||
|
!:
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,13 @@
|
|||||||
chrout_screen_RVS_ON:
|
chrout_screen_RVS_ON:
|
||||||
|
|
||||||
lda #$80
|
lda #$80
|
||||||
bne !+ // branch always
|
skip_2_bytes_trash_nvz
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
chrout_screen_RVS_OFF:
|
chrout_screen_RVS_OFF:
|
||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
!:
|
|
||||||
sta RVS
|
sta RVS
|
||||||
jmp chrout_screen_done
|
jmp chrout_screen_done
|
||||||
@@ -84,6 +84,11 @@ m65_chrout_screen_literal: // entry point for m65_chrout_screen_quote
|
|||||||
// Store the new character in screen memory, restore .Z
|
// Store the new character in screen memory, restore .Z
|
||||||
|
|
||||||
txa
|
txa
|
||||||
|
|
||||||
|
bit RVS
|
||||||
|
bpl !+
|
||||||
|
ora #$80 // reverse the character XXX consider doing this within chrout_to_screen_code
|
||||||
|
!:
|
||||||
sta_lp (M65_LPNT_SCR),z
|
sta_lp (M65_LPNT_SCR),z
|
||||||
plz
|
plz
|
||||||
|
|
||||||
@@ -91,8 +96,16 @@ m65_chrout_screen_literal: // entry point for m65_chrout_screen_quote
|
|||||||
|
|
||||||
inc M65__TXTCOL
|
inc M65__TXTCOL
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
|
m65_chrout_fix_column_row:
|
||||||
|
|
||||||
// XXX continue the implementation - fix the cursor position
|
// XXX continue the implementation - fix the cursor position
|
||||||
|
|
||||||
|
nop
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
m65_chrout_screen_done:
|
m65_chrout_screen_done:
|
||||||
|
|
||||||
// XXX reenable cursor
|
// XXX reenable cursor
|
||||||
|
|||||||
@@ -73,6 +73,81 @@ 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:
|
// XXX: implement screen routines below:
|
||||||
|
|
||||||
m65_chrout_screen_quote:
|
m65_chrout_screen_quote:
|
||||||
@@ -89,18 +164,6 @@ m65_chrout_screen_TXT:
|
|||||||
nop
|
nop
|
||||||
m65_chrout_screen_GFX:
|
m65_chrout_screen_GFX:
|
||||||
nop
|
nop
|
||||||
m65_chrout_screen_RVS_OFF:
|
|
||||||
nop
|
|
||||||
m65_chrout_screen_RVS_ON:
|
|
||||||
nop
|
|
||||||
m65_chrout_screen_CRSR_RIGHT:
|
|
||||||
nop
|
|
||||||
m65_chrout_screen_CRSR_LEFT:
|
|
||||||
nop
|
|
||||||
m65_chrout_screen_CRSR_DOWN:
|
|
||||||
nop
|
|
||||||
m65_chrout_screen_CRSR_UP:
|
|
||||||
nop
|
|
||||||
m65_chrout_screen_INS:
|
m65_chrout_screen_INS:
|
||||||
nop
|
nop
|
||||||
m65_chrout_screen_TAB:
|
m65_chrout_screen_TAB:
|
||||||
@@ -125,5 +188,5 @@ m65_chrout_screen_STOP:
|
|||||||
nop
|
nop
|
||||||
m65_chrout_screen_DEL:
|
m65_chrout_screen_DEL:
|
||||||
nop
|
nop
|
||||||
m65_chrout_screen_RETURN:
|
|
||||||
jmp m65_chrout_screen_done
|
jmp m65_chrout_screen_done
|
||||||
Reference in new issue
Block a user