Revert wrong commit "work on INS support for MEGA65 mode"
This reverts commit 2c5e181457.
This commit is contained in:
1 parent
2c5e181457
commit
c9d68d8586
9 files changed
+33
-126
No files matched your search
@@ -41,6 +41,16 @@ chrout_screen_literal: // entry point for chrout_screen_quote
|
||||
|
||||
tax // store screen code, we need .A for calculations
|
||||
|
||||
// First we need offset from PNT in .Y, we can take it from PNTR
|
||||
|
||||
jsr screen_get_clipped_PNTR
|
||||
|
||||
// Put the character on the screen
|
||||
|
||||
txa
|
||||
ora RVS // Computes Mapping the 64, page 38
|
||||
sta (PNT),y
|
||||
|
||||
// Decrement number of chars waiting to be inserted
|
||||
|
||||
lda INSRT
|
||||
@@ -52,16 +62,6 @@ chrout_screen_literal: // entry point for chrout_screen_quote
|
||||
txa
|
||||
jsr screen_check_toggle_quote
|
||||
|
||||
// First we need offset from PNT in .Y, we can take it from PNTR
|
||||
|
||||
jsr screen_get_clipped_PNTR
|
||||
|
||||
// Put the character on the screen
|
||||
|
||||
txa
|
||||
ora RVS // Computes Mapping the 64, page 38
|
||||
sta (PNT),y
|
||||
|
||||
// Set colour of the newly printed character
|
||||
|
||||
lda COLOR
|
||||
|
||||
@@ -23,10 +23,10 @@ chrout_screen_jumptable_codes:
|
||||
.byte KEY_CRSR_LEFT
|
||||
.byte KEY_CRSR_DOWN
|
||||
.byte KEY_CRSR_UP
|
||||
.byte KEY_INS
|
||||
|
||||
__chrout_screen_jumptable_quote_guard:
|
||||
|
||||
.byte KEY_INS
|
||||
#if CONFIG_EDIT_STOPQUOTE
|
||||
.byte KEY_STOP
|
||||
#endif
|
||||
|
||||
@@ -38,13 +38,12 @@ m65_chrout_screen_literal: // entry point for m65_chrout_screen_quote
|
||||
|
||||
phz
|
||||
|
||||
// Prepare M65_LPNT_SCR for colour memory manipulation
|
||||
// Prepare .Z and M65_LPNT_SCR for colour memory manipulation
|
||||
|
||||
jsr m65_helper_scrlpnt_color
|
||||
|
||||
// Store the new color in screen memory
|
||||
|
||||
ldz M65__TXTCOL
|
||||
lda COLOR
|
||||
sta_lp (M65_LPNT_SCR),z
|
||||
|
||||
@@ -52,16 +51,6 @@ m65_chrout_screen_literal: // entry point for m65_chrout_screen_quote
|
||||
|
||||
jsr m65_helper_scrlpnt_to_screen
|
||||
|
||||
// Decrement number of chars waiting to be inserted
|
||||
|
||||
lda INSRT
|
||||
beq !+
|
||||
dec INSRT
|
||||
!:
|
||||
// Toggle quote flag if required
|
||||
txa
|
||||
jsr screen_check_toggle_quote
|
||||
|
||||
// Store the new character in screen memory, restore .Z
|
||||
|
||||
txa
|
||||
|
||||
@@ -75,10 +75,14 @@ m65_chrout_try_color_loop:
|
||||
|
||||
// XXX: implement screen routines below:
|
||||
|
||||
m65_chrout_screen_quote:
|
||||
nop
|
||||
m65_chrout_screen_CLR:
|
||||
nop
|
||||
m65_chrout_screen_HOME:
|
||||
nop
|
||||
m65_chrout_screen_INS:
|
||||
nop
|
||||
m65_chrout_screen_TAB:
|
||||
nop
|
||||
m65_chrout_screen_LINE_FEED:
|
||||
@@ -97,9 +101,7 @@ m65_chrout_screen_ESC:
|
||||
nop
|
||||
m65_chrout_screen_BELL:
|
||||
nop
|
||||
m65_chrout_screen_GFX:
|
||||
nop
|
||||
m65_chrout_screen_TXT:
|
||||
m65_chrout_screen_STOP:
|
||||
nop
|
||||
m65_chrout_screen_DEL:
|
||||
nop
|
||||
|
||||
@@ -40,84 +40,19 @@ m65_chrout_screen_SHIFT_OFF:
|
||||
sta MODE
|
||||
jmp_8 m65_chrout_screen_ctrl2_end
|
||||
|
||||
// STOP key
|
||||
|
||||
m65_chrout_screen_STOP:
|
||||
// GFX/TXT switching support
|
||||
|
||||
lda #$00
|
||||
sta QTSW
|
||||
sta INSRT
|
||||
m65_chrout_screen_GFX:
|
||||
|
||||
lda VIC_YMCSB
|
||||
and #$02 // to upper case
|
||||
!:
|
||||
sta VIC_YMCSB
|
||||
jmp_8 m65_chrout_screen_ctrl2_end
|
||||
|
||||
// INS key
|
||||
m65_chrout_screen_TXT:
|
||||
|
||||
m65_chrout_screen_INS:
|
||||
|
||||
// First prepare the pointer to the current row
|
||||
|
||||
jsr m65_helper_scrlpnt_color
|
||||
jsr m65_helper_scrlpnt_to_screen
|
||||
|
||||
// Check for windowed mode
|
||||
|
||||
lda M65_SCRWINMODE
|
||||
bmi_16 m65_chrout_screen_INS_winmode
|
||||
|
||||
// Check if last character of the line is space
|
||||
|
||||
ldy M65_SCRMODE
|
||||
lda m65_scrtab_txtwidth,y
|
||||
dec_a
|
||||
taz
|
||||
lda_lp (M65_LPNT_SCR), z
|
||||
cmp #$20
|
||||
bne_16 m65_chrout_screen_ctrl2_end
|
||||
phz
|
||||
|
||||
// Last character is space - move the characters
|
||||
|
||||
jsr m65_chrout_screen_INS_copy
|
||||
|
||||
// Store space in the current character cell
|
||||
|
||||
lda #$20
|
||||
sta_lp (M65_LPNT_SCR), z
|
||||
|
||||
// Move the color memory
|
||||
|
||||
jsr m65_helper_scrlpnt_color
|
||||
plz
|
||||
jsr m65_chrout_screen_INS_copy
|
||||
|
||||
// Store current colour in the current character cell
|
||||
|
||||
lda COLOR
|
||||
and #$0F
|
||||
sta_lp (M65_LPNT_SCR), z
|
||||
|
||||
// Increase insert mode count (which causes quote-mode like behaviour) and quit
|
||||
|
||||
inc INSRT
|
||||
jmp_8 m65_chrout_screen_ctrl2_end
|
||||
|
||||
m65_chrout_screen_INS_winmode:
|
||||
|
||||
// Check if last character of the line within window is space
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
jmp_8 m65_chrout_screen_ctrl2_end
|
||||
|
||||
|
||||
|
||||
m65_chrout_screen_INS_copy:
|
||||
|
||||
dez
|
||||
lda_lp (M65_LPNT_SCR), z
|
||||
inz
|
||||
sta_lp (M65_LPNT_SCR), z
|
||||
dez
|
||||
cpz M65__TXTCOL
|
||||
bne m65_chrout_screen_INS_copy
|
||||
|
||||
rts
|
||||
lda VIC_YMCSB
|
||||
ora #$02 // to lower case
|
||||
bne !- // branch always
|
||||
@@ -1,22 +0,0 @@
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// CHROUT routine - screen support, control codes in quote mode, MEGA65 native mode version
|
||||
//
|
||||
|
||||
|
||||
m65_chrout_screen_quote:
|
||||
|
||||
// Low control codes are just +$80
|
||||
clc
|
||||
adc #$80
|
||||
|
||||
// If it overflowed, then it is a high control code,
|
||||
// so we need to make it be $80 + $40 + char
|
||||
// as we will have flipped back to just $00 + char, we should
|
||||
// now add $c0 if C is set from overflow
|
||||
bcc !+
|
||||
adc #$BF // C=1, so adding $BF + C = add $C0
|
||||
!:
|
||||
jmp m65_chrout_screen_literal
|
||||
@@ -39,7 +39,6 @@ m65_cursor_undraw:
|
||||
// Cursor undraw - color
|
||||
|
||||
jsr m65_helper_scrlpnt_color
|
||||
ldz M65__TXTCOL
|
||||
lda GDCOL
|
||||
sta_lp (M65_LPNT_SCR),z
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
m65_helper_scrlpnt_color:
|
||||
|
||||
// Set .Z to the current column
|
||||
|
||||
ldz M65__TXTCOL // XXX probably not the best place for this
|
||||
|
||||
// Setting M65_LPNT_SCR to point to colour memory (starts from $FF80000)
|
||||
|
||||
lda #$0F
|
||||
|
||||
@@ -59,6 +59,7 @@ m65_chrout_screen_jumptable_codes:
|
||||
.byte KEY_CRSR_LEFT
|
||||
.byte KEY_CRSR_DOWN
|
||||
.byte KEY_CRSR_UP
|
||||
.byte KEY_INS
|
||||
.byte KEY_TAB
|
||||
.byte KEY_LINE_FEED
|
||||
.byte KEY_UNDERLINE_ON
|
||||
@@ -71,7 +72,6 @@ m65_chrout_screen_jumptable_codes:
|
||||
|
||||
__m65_chrout_screen_jumptable_quote_guard:
|
||||
|
||||
.byte KEY_INS
|
||||
.byte KEY_STOP
|
||||
.byte KEY_DEL
|
||||
.byte KEY_RETURN
|
||||
|
||||
Reference in new issue
Block a user