Revert wrong commit "work on INS support for MEGA65 mode"

This reverts commit 2c5e181457.
This commit is contained in:
FeralChild64 committed 2020-08-29 21:11:48 +02:00
1 parent 2c5e181457
commit c9d68d8586
9 files changed
+33 -126

No files matched your search

@@ -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