Yes, text coordinates are calculated on the "new mouse text" mode from the graphics coordinates, but I've not created system vars for it as I intended to do the key-click inside the Mouse driver. Now It will be done remotely on this new approach:
A flag(a bit on one of the mouse system vars) will indicate the editor driver that the Editor+Mouse mode is active. If not, the Editor returns to its normal tasks.
Then, if in Editor+Mouse mode, a branch in the code will be executed, much like when I inserted the mouse routine on a game.
But there are a lot of information needed, information that I have stored and already calculated inside the mouse driver:
ARROW db 96,112,120,124,126,120,72,8,0; constant
EDITOR_PAGE db 0
EDITOR_INDEX DW 0
EDITOR_CHN db 0
EDITOR_FLAG db 0
VAR_1 db 0
VAR_2 db 0
EDITOR_MODE db 0
LAST_FIRE db 0
POINTER_ADDR dw 0
POINTER_PAGE db 0
POINTER_CONT db 0,0,0,0,0,0,0,0,0
LPT_BASE dw 0
LPT_line db 0 ;Line where the video page starts on the LPT
LPT_ADDR dw 0 ;Address where the first LPT line of the video page is
LPT_cont db 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 ; line content
BUFF_LEN dw 0
BUFFER_END dw 0
VIDEO_ADDRESS dw 0 ;
COLUMNS db 0
VIDEOX dw 0 ;
VIDEOY dw 0
VIDEOXx2 dw 0 ;
VIDEO_MODE db 0 ;
;
VIDEO_COLOUR db 0 ;
SCR_SAVE db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;
;
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POINTER_ADDRESS dw 0 ;
HALF_VIDEOY dw 0 ;
;Modification here
HELPTXT db "MOUSE version 1.10D",0Dh
MODEWRD db "Control: "
MODE0TXT db "0 Internal Joystick ",0Dh,0Dh
MODE1TXT db "1 External Joystick 1 ",0Dh,0Dh
MODE2TXT db "2 External Joystick 2 ",0Dh,0Dh
MODE3TXT db "3 Boxsoft interface ",0Dh,0Dh
MODE4TXT db "4 Entermice interface ",0Dh,0Dh
MODE5TXT db "5 Serial Mouse Systems",0Dh,0Dh
MODE6TXT db "6 Serial Microsoft ",0Dh,0Dh
MODE7TXT db " Not defined ",0Dh,0Dh
ENTERMICETXT db 0Dh,"Entermice by Pear",0Dh
EMVERSIONTXT db "Mouse Id. X Hw ver. X.X Sw ver. X.X",0Dh,0Dh
EM_EXISTS db 2 ; 0= not found, 1= found, 2= requested. Always requested at initialization, but afterwards only requested by :MOUSE command
EM_BUFF db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;0-15 bytes, the max that can be counted with a nibble
;end
VIDEO_CHN db 101 ;
; INIOPEN
; EXOS Variable 180
STATUS_POS db 30 ;
; EXOS Variable 181
STATUS_DISP db 0 ;
; EXOS Variable 182
; 0 OFF, 1 ON
POINTER_COLOUR db 0FFh ;
; EXOS Variable 183
X_LOW db 0 ;
;
; EXOS Variable 184
X_HIGH db 0 ; EXOS Variable 185
Y_LOW db 0 ;
; EXOS Variable 186
Y_HIGH db 0 ; EXOS Variable 187
FIRE_STATUS db 0 ;
; EXOS Variable 188
INPUT_DEVICE db 0 ;
; EXOS Variable 189
SW_Z_STATUS db 0 ;
; EXOS Variable 190
H_WHEEL db 0 ; ready for var 191
X1 dw 0 ;
Y1 dw 0 ;
CLICK db 0
SET_CURSOR db 27,61,33,33 ; escape sequence set cursor
Y1R db 0 ; row for text modes
X1C db 0 ; column for text modes
X_REL db 0 ;
Y_REL db 0 ;
CHN_FLAG db 255 ;
CHN_COUNT db 0 ;
POS_RD db 0 ;
POS_COUNT db 0 ;
;
X1_EXOS dw 0 ;
;
; X1*2
Y1_EXOS dw 0 ;
; Y1*2
POINTER_DISP db 1 ;
; 0 OFF, 1 ON
PAGE0 db 0 ;
POINTER_ROWS db 0 ;
I think it would be better to access directly the data from the mouse driver if I store the segment and address of the table on two system vars. Then in the future, if the Mouse driver is put on a ROM, the address will point to an allocated Ram with the same information.