mirror of
https://github.com/a2-4am/4live.git
synced 2024-09-27 17:55:44 +00:00
highlight with inverse not flash
This commit is contained in:
parent
dc19f8f8ec
commit
63e8b7a8f5
135
src/4live.a
135
src/4live.a
@ -143,7 +143,7 @@ OpenMainFile
|
|||||||
|
|
||||||
;set input name
|
;set input name
|
||||||
|
|
||||||
lda #$A0
|
lda #SPACE
|
||||||
- cpy #(FileName_e - FileName_b)
|
- cpy #(FileName_e - FileName_b)
|
||||||
bcs +
|
bcs +
|
||||||
lda FileName_b, y
|
lda FileName_b, y
|
||||||
@ -215,6 +215,7 @@ XREG
|
|||||||
|
|
||||||
SwapFILEMAN
|
SwapFILEMAN
|
||||||
jmp FILEMAN ;self-modified from JMP to JSR
|
jmp FILEMAN ;self-modified from JMP to JSR
|
||||||
|
;to allow fallthrough to bank in RAM
|
||||||
|
|
||||||
BankInRAM1
|
BankInRAM1
|
||||||
bit LCBANK1
|
bit LCBANK1
|
||||||
@ -343,7 +344,7 @@ InstallStart
|
|||||||
ldy #0
|
ldy #0
|
||||||
beq ++
|
beq ++
|
||||||
CharMap1
|
CharMap1
|
||||||
cmp #0 ;self-modified
|
cmp #0 ;self-modified in Apple II+ environment
|
||||||
bcs +
|
bcs +
|
||||||
cmp #"a"
|
cmp #"a"
|
||||||
bcc +
|
bcc +
|
||||||
@ -360,7 +361,7 @@ CharMap1
|
|||||||
|
|
||||||
ReadEditor
|
ReadEditor
|
||||||
jsr ExchangeSwapBanked2
|
jsr ExchangeSwapBanked2
|
||||||
lda #$20
|
lda #$20 ;JSR
|
||||||
sta SwapFILEMAN
|
sta SwapFILEMAN
|
||||||
jsr DOSMLI
|
jsr DOSMLI
|
||||||
!byte InstallReadMLI_e - InstallReadMLI_b
|
!byte InstallReadMLI_e - InstallReadMLI_b
|
||||||
@ -390,11 +391,7 @@ ExchangeSwapBanked2
|
|||||||
_WelcomeMessage
|
_WelcomeMessage
|
||||||
!text $8D, "4LIVE ready. Press Ctrl+", HOTKEY + $40, " to activate.", $8D, 0
|
!text $8D, "4LIVE ready. Press Ctrl+", HOTKEY + $40, " to activate.", $8D, 0
|
||||||
|
|
||||||
;support enhanced flashing cursor while waiting for key, if available.
|
;show original DOS cursor first, whatever it was
|
||||||
;it works by passing to the routine the character under the cursor.
|
|
||||||
;the ROM toggles between that character and the Delete character.
|
|
||||||
;on an Apple II+, the cursor is an inverse space in DOS mode.
|
|
||||||
;our cursor flashes.
|
|
||||||
|
|
||||||
GlobalKeyboardHook
|
GlobalKeyboardHook
|
||||||
jsr KEYIN
|
jsr KEYIN
|
||||||
@ -474,7 +471,7 @@ ScrollEditBufferIn
|
|||||||
ldy #(WIDTH - 1)
|
ldy #(WIDTH - 1)
|
||||||
- lda (OPDST1L), y
|
- lda (OPDST1L), y
|
||||||
CharMap2
|
CharMap2
|
||||||
cmp #0 ;self-modified
|
cmp #0 ;self-modified in Apple II+ environment
|
||||||
bcs +
|
bcs +
|
||||||
cmp #"a"
|
cmp #"a"
|
||||||
bcc +
|
bcc +
|
||||||
@ -606,36 +603,6 @@ MyWAIT
|
|||||||
bne --
|
bne --
|
||||||
rts
|
rts
|
||||||
|
|
||||||
MyCOUT
|
|
||||||
MyCH
|
|
||||||
ldx #"Q" ;self-modified
|
|
||||||
|
|
||||||
ScreenBuff4
|
|
||||||
sta $34f3, x ;self-modified
|
|
||||||
inx
|
|
||||||
cpx #WIDTH
|
|
||||||
bne ++
|
|
||||||
ldx #0
|
|
||||||
MyCV
|
|
||||||
ldy #"Q" ;self-modified
|
|
||||||
iny
|
|
||||||
cpy #(HEIGHT - 1)
|
|
||||||
bne MyBASCALC
|
|
||||||
ldy #0
|
|
||||||
|
|
||||||
MyBASCALC
|
|
||||||
sty MyCV + 1
|
|
||||||
lda TextCalcLo, y
|
|
||||||
sta ScreenBuff2 + 1
|
|
||||||
sta ScreenBuff3 + 1
|
|
||||||
sta ScreenBuff4 + 1
|
|
||||||
lda TextCalcHi, y
|
|
||||||
sta ScreenBuff2 + 2
|
|
||||||
sta ScreenBuff3 + 2
|
|
||||||
sta ScreenBuff4 + 2
|
|
||||||
++ stx MyCH + 1
|
|
||||||
rts
|
|
||||||
|
|
||||||
MyKEYIN
|
MyKEYIN
|
||||||
ldx MyCH + 1
|
ldx MyCH + 1
|
||||||
|
|
||||||
@ -643,12 +610,12 @@ ScreenBuff2
|
|||||||
lda $34f3, x ;self-modified
|
lda $34f3, x ;self-modified
|
||||||
sta ToggleChar + 1
|
sta ToggleChar + 1
|
||||||
|
|
||||||
;detect Apple II+ cursor sitting on inverse space
|
;since we flash the cursor manually by toggling with an inverse space,
|
||||||
;and replace with normal space so it remains visible
|
;detect if cursor is over an inverse space and use normal space instead
|
||||||
;no inverse alternative for Apple IIe cursor
|
;otherwise cursor won't be visible
|
||||||
|
|
||||||
CharDel
|
CharDel
|
||||||
ldy #DELETE ;self-modified
|
ldy #DELETE ;self-modified to INVSPACE in Apple II+ environment
|
||||||
bmi +
|
bmi +
|
||||||
cmp #INVSPACE
|
cmp #INVSPACE
|
||||||
bne +
|
bne +
|
||||||
@ -702,21 +669,25 @@ EditorMode
|
|||||||
cpx #(IgnoreClear - KeyTable_b)
|
cpx #(IgnoreClear - KeyTable_b)
|
||||||
bcc DispatchCommand
|
bcc DispatchCommand
|
||||||
cpx #(IgnoreDirty - KeyTable_b)
|
cpx #(IgnoreDirty - KeyTable_b)
|
||||||
|
;save result in carry
|
||||||
|
|
||||||
ClearOnFirstKeypress
|
ClearOnFirstKeypress
|
||||||
ldy #0 ;self-modified
|
ldy #0 ;self-modified
|
||||||
beq +
|
beq +
|
||||||
dec ClearOnFirstKeypress + 1
|
dec ClearOnFirstKeypress + 1
|
||||||
php
|
php ;preserve carry (don't care about the rest)
|
||||||
jsr ClearScreen ;preserves A
|
pha
|
||||||
plp
|
jsr ClearScreen
|
||||||
|
pla
|
||||||
|
plp ;restore carry
|
||||||
+ bcc DispatchCommand
|
+ bcc DispatchCommand
|
||||||
|
|
||||||
SetDirty
|
SetDirty
|
||||||
sta IsDirty + 1
|
sta IsDirty + 1
|
||||||
|
|
||||||
DispatchCommand
|
DispatchCommand
|
||||||
jsr EditorMode ;self-modified, one or both bytes depending on routine placement
|
jsr EditorMode ;self-modified, current both bytes
|
||||||
|
;but could be just one if all routines begin in the same page...
|
||||||
jmp EditorMode
|
jmp EditorMode
|
||||||
|
|
||||||
_doneEditorMode
|
_doneEditorMode
|
||||||
@ -726,6 +697,24 @@ _doneEditorMode
|
|||||||
DispatchReturn
|
DispatchReturn
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
MyCOUT
|
||||||
|
MyCH
|
||||||
|
ldx #"Q" ;self-modified
|
||||||
|
|
||||||
|
ScreenBuff4
|
||||||
|
sta $34f3, x ;self-modified
|
||||||
|
inx
|
||||||
|
cpx #WIDTH
|
||||||
|
bne SetCH
|
||||||
|
ldx #0
|
||||||
|
MyCV
|
||||||
|
ldy #"Q" ;self-modified
|
||||||
|
iny
|
||||||
|
cpy #(HEIGHT - 1)
|
||||||
|
bne MyBASCALC
|
||||||
|
ldy #0
|
||||||
|
beq MyBASCALC ;always
|
||||||
|
|
||||||
HandleKeyLineLeft
|
HandleKeyLineLeft
|
||||||
dec MyCH + 1
|
dec MyCH + 1
|
||||||
bpl DispatchReturn
|
bpl DispatchReturn
|
||||||
@ -749,9 +738,21 @@ HandleKeyLineUp
|
|||||||
ldy #(HEIGHT - 2)
|
ldy #(HEIGHT - 2)
|
||||||
|
|
||||||
SetRow
|
SetRow
|
||||||
sty MyCV + 1
|
|
||||||
ldx MyCH + 1
|
ldx MyCH + 1
|
||||||
jmp MyBASCALC
|
|
||||||
|
MyBASCALC
|
||||||
|
sty MyCV + 1
|
||||||
|
lda TextCalcLo, y
|
||||||
|
sta ScreenBuff2 + 1
|
||||||
|
sta ScreenBuff3 + 1
|
||||||
|
sta ScreenBuff4 + 1
|
||||||
|
lda TextCalcHi, y
|
||||||
|
sta ScreenBuff2 + 2
|
||||||
|
sta ScreenBuff3 + 2
|
||||||
|
sta ScreenBuff4 + 2
|
||||||
|
SetCH
|
||||||
|
stx MyCH + 1
|
||||||
|
rts
|
||||||
|
|
||||||
HandleKeyClearScreen
|
HandleKeyClearScreen
|
||||||
jsr ClearScreen
|
jsr ClearScreen
|
||||||
@ -773,7 +774,6 @@ HandleKeyLineDown
|
|||||||
beq SetRow ;always
|
beq SetRow ;always
|
||||||
|
|
||||||
ClearScreen ; does not clear status line
|
ClearScreen ; does not clear status line
|
||||||
pha
|
|
||||||
clc
|
clc
|
||||||
|
|
||||||
HandleKeyImportScreen ;called with carry set
|
HandleKeyImportScreen ;called with carry set
|
||||||
@ -798,20 +798,41 @@ HandleKeyImportScreen ;called with carry set
|
|||||||
sta OPSRC1L
|
sta OPSRC1L
|
||||||
bcs +
|
bcs +
|
||||||
dec OPSRC1H
|
dec OPSRC1H
|
||||||
sec
|
sec ;maintain carry for ImportScreen path
|
||||||
+ dex
|
+ dex
|
||||||
bpl --
|
bpl --
|
||||||
bcs + ;ImportScreen path
|
rts
|
||||||
pla
|
|
||||||
+ rts
|
|
||||||
|
|
||||||
HandleKeyHighlight
|
HandleKeyHighlight
|
||||||
ldx MyCV + 1
|
ldx MyCV + 1
|
||||||
jsr SetTextCalc
|
jsr SetTextCalc
|
||||||
ldy #(WIDTH - 1)
|
ldy #(WIDTH - 1)
|
||||||
- lda (OPSRC2L), y
|
- lda (OPSRC2L), y
|
||||||
|
|
||||||
|
;lowercase to uppercase
|
||||||
|
;otherwise it's unreadable when inverted
|
||||||
|
;however, the conversion is not reversible
|
||||||
|
|
||||||
|
cmp #$E0
|
||||||
|
bcc +
|
||||||
|
and #$DF
|
||||||
|
|
||||||
|
;normal range to control range
|
||||||
|
|
||||||
|
+ and #$BF
|
||||||
|
|
||||||
|
;invert character and print if inverse
|
||||||
|
|
||||||
eor #$80
|
eor #$80
|
||||||
sta (OPSRC2L), y
|
bpl +
|
||||||
|
|
||||||
|
;control range to normal range
|
||||||
|
|
||||||
|
cmp #$A0
|
||||||
|
bcs +
|
||||||
|
ora #$40
|
||||||
|
|
||||||
|
+ sta (OPSRC2L), y
|
||||||
dey
|
dey
|
||||||
bpl -
|
bpl -
|
||||||
rts
|
rts
|
||||||
@ -886,10 +907,6 @@ FirstLine ;lines are stored sequentially, not like
|
|||||||
!fill WIDTH * 9, $A0
|
!fill WIDTH * 9, $A0
|
||||||
|
|
||||||
LoadSaveEnd
|
LoadSaveEnd
|
||||||
;in the current version, the status line is not saved
|
|
||||||
;however, when we move to multi-screen support,
|
|
||||||
;both the status line and the spill line must be saved
|
|
||||||
;for scrolling to work properly
|
|
||||||
!fill (WIDTH - 5), $20
|
!fill (WIDTH - 5), $20
|
||||||
!text "4LIVE"
|
!text "4LIVE"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user