I'm still intrigued on implementing mouse on graphics modes 0 and 2.
I have almost figured out how, but there are little details that prevents me to complete it.
Static pages aren't the problem, it is very easy to make work the mouse driver on a page that has a static LPT. The driver does perfectly on graphics modes only with EXOS calls(@@SIZE and @@ADDR). Text modes can be even more easy, as we only will move the mouse pointer between character boundaries.
The future TEXT 40 mouse mode will have a single defined font character, the same on the 80 mode, with some form of pointer. But to make tests easier, on the first attempts I will use the 255 ASCII(that strange "b" character) on TEXT 40, and a blue underline(also 255) on TEXT 80 mode.
But I also want mouse control on the Editor pages, where the LPT lines can be strangely mixed.
For example, on "normal" Basic Editor pages, TEXT 40 or 80, we have fixed sizes of 40x24 0r 80x24. The mouse driver maintains its X and Y own coordinates, and the LPT can serve to know what character is on the coordinates.
This is the procedure:
-The Enterprise is loaded with a program that makes use of the internal Editor.
-The interrupt routine halts the main program and makes a call to the mouse interrupt routine.
-If there is already a mouse pointer drawn, it is erased. For that, the driver maintains stored the original character that was on the old coordinates. But the Editor could have altered the position of that line on the LPT, so the old address and segment was stored on the last interrupt cycle.
-The LPT is used to know the actual value inside the coordinates.
-The actual value inside the current coordinates is stored, with the exact NICK position, segment+address. A 255 is stored on that position.
-The control is returned to the main program.
This procedure can work, but I want to extend it to all possible editor modes, the four editor lines that remain when a GRAPHICS mode is recalled, the EXDOS or ISDOS editors, or even other languages editors, including of course the WP editor.
I want to call the mouse driver from an editor and it start automatically without the need to open the mouse channel. Only typing :MOUSE ON or :MOUSE OFF, for example.
But an Editor page can have variable size and position on the LPT, and I don't know if there is an easy way to know it.