ENTERPRISE KLUB
2021. október 2., 1055 Budapest, Nyugati tér 9. 14-19 óráig
Belépés kizárólag klubtagok részére! (Klubkártyával vagy előfizetéssel!)
Welcome, Guest. Please login or register.


Author Topic: Universal Mouse Driver (Read 58768 times)

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #120 on: 2016.October.02. 13:11:29 »
Thought out and done, mouse arrow pointer on Text 80.

The driver redefines character 127 to the arrow sign at initialisation so, it can be changed later inside a program.

Also the pointer follows the colour codes of System Var 183(Pointer_colour).
« Last Edit: 2016.October.02. 13:30:37 by gflorez »

Offline geco

  • EP addict
  • *
  • Posts: 6289
  • Country: hu
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 45.0 Firefox 45.0
    • View Profile
Re: Universal Mouse Driver
« Reply #121 on: 2016.October.02. 14:14:32 »
coool :)

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #122 on: 2016.October.02. 14:59:43 »
It is good, I see one thing what could be better, if 2 direction is pressed eg right+up then cursor is drawn twice, 1 step up, and then right, 1st drawing step is not needed.

I want to explain a little why the pointer movement seems a little erratic on short movement compared to the cursor movement.

First to say that the Editor cursor movement  has  freedom to move, four ways, but only one character boundary per cycle, while the pointer can move more ways on longer distances, jumping boundaries. Then, is normal that the cursor track is more precise than the pointer one. Also keep in mind that the Enterprise Editor has a corrected diagonal movement, alternating the two selected keys.

On my text mouse pointer approach the driver maintains internally the graphics pixel coordinates for compatibility, but they are converted to rows and columns to print the text characters. In the conversion some character boundaries are slightly touched but drawn anyway. Is for this that some places seem odd when moving the pointer with the internal joystick. But with a mouse it isn't noticeable.

See the picture attached, how the pointer draws more boundaries than necessary.

« Last Edit: 2016.October.02. 15:21:32 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #123 on: 2016.October.08. 01:17:04 »
I have implemented a new command inside the Mouse driver  that opens a mouse channel.

By now it only works sometimes and with some applications(I still don't know why).

First I have to specify the video channel associated to the Editor channel, every app uses a different one. Then I execute the command.

Here are some examples:
« Last Edit: 2016.October.08. 10:46:58 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #124 on: 2016.October.08. 18:50:13 »
WP has been more difficult, as I have discovered that F8(EXOS) only admits commands  of two words. Then, for example,  VAR 186 4 (EnterMice controller mode) is not admitted.

Touching the ruler makes the driver confuse the pointer coordinates.

WP maintains six Video channels and two Editor channels.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 14023
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Universal Mouse Driver
« Reply #125 on: 2016.October.08. 19:16:55 »
WP has been more difficult, as I have discovered that F8(EXOS) only admits commands  of two words. Then, for example,  VAR 186 4 (EnterMice controller mode) is not admitted.
???
It is working, also tested in your snapshot. Anyway also working VAR 186,4

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #126 on: 2016.October.08. 19:24:14 »
I'm not expressing me well, the command is accepted, but not executed.

Try F8 and type VAR 189 0  (Internal joystick controller) on my snapshot. It is unaffected and EnterMice continues being the controller.


I have accessed the vars exiting to Exdos, changing them and re-entering with the Esc key.
« Last Edit: 2016.October.08. 19:29:12 by gflorez »

Offline Zozosoft

  • EP addict
  • *
  • Posts: 14023
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Universal Mouse Driver
« Reply #127 on: 2016.October.08. 19:32:29 »
Try F8 and type VAR 189 0  (Internal joystick controller) on my snapshot. It is unaffected and EnterMice continues being the controller.
It is problem somewhere in the mouse driver :oops:
If you check again with VAR 189, the right value reported.

(And for example try using COPY command, it is least 3 words :-) )

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #128 on: 2016.October.08. 19:52:41 »
You are right, but this only happens on WP.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 14023
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Universal Mouse Driver
« Reply #129 on: 2016.October.08. 20:02:13 »
And I verified in debuger, at the entry point of mouse expansion got the right parameters from the EXOS after the VAR command.

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #130 on: 2016.October.08. 20:41:57 »
Sorry, it seems that something is corrupted on the snapshot. If I try to exit to Exdos it hangs.

Offline IstvanV

  • EP addict
  • *
  • Posts: 4825
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 48.0 Firefox 48.0
    • View Profile
Re: Universal Mouse Driver
« Reply #131 on: 2016.October.09. 10:51:22 »
The EXOS variable seems to be stored at e0:0bd1 in the snapshot, but it is never read while using WP, it is only written when the VAR 189 command is entered.

Edit: there is apparently a problem with more than one instance of the driver being loaded, one is on segment DEh and another is on E0h, the variable is written to the latter, but the mouse input code runs on the former. That explains why VAR 189 does not work, but the corruption issue still needs to be debugged.
« Last Edit: 2016.October.09. 11:28:04 by IstvanV »

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Unknown Unknown
  • Browser:
  • Firefox 47.0 Firefox 47.0
    • View Profile
Re: Universal Mouse Driver
« Reply #132 on: 2016.October.09. 12:21:01 »
Thanks. I loaded again the driver, I forgot it....

Online gflorez

  • EP addict
  • *
  • Posts: 3190
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 49.0 Firefox 49.0
    • View Profile
Re: Universal Mouse Driver
« Reply #133 on: 2016.October.09. 19:44:57 »
That second instance of the mouse driver is caused by my poor PB fix.

On the original Boxsoft versions of the extension,  a PB command had to be typed to initialise the driver.

The extension was loaded but left ineffective until passing the "PB" string(Paintbox) to the extension.

Paintbox and EGI do this internally but it had to be typed to work in Basic so, when I removed the checking inside the extension, it worked straight on Basic but not on the apps.

Then I re-fixed it, allowing the execution of the PB command only if the extension was installed but not linked. Also I added the extension to the initialization chain, loading c register with an 8 at return, but only if not initialized, to protect EGI reinitialisation. A mix of two worlds. At last it seemed to work.

To test if the mouse driver was linked I tried to open a channel, but forgot to close it. Then sometimes, a mouse channel is opened just before a new instance of the extension is loaded and linked. It seems that the channel survives the process...

------------------------------

On the other side, this has been the only weird way to open a mouse channel on WP, while on the others apps tested, the normal way worked.


------------------------

Now I know a little more about EXOS, and I can use other methods to test if the mouse driver has been linked but,

how can an extension be refused to load if exist the same one already linked?
« Last Edit: 2016.October.09. 20:46:02 by gflorez »

Offline IstvanV

  • EP addict
  • *
  • Posts: 4825
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 48.0 Firefox 48.0
    • View Profile
Re: Universal Mouse Driver
« Reply #134 on: 2016.October.12. 12:51:05 »
An issue brought up in another topic: would it be useful to ignore the upper nibble of the mouse wheel byte? The code in the FILE extension currently does that, but MOUSE.XR did not the last time I checked. According to the wiki, those bits are reserved for the horizontal wheel, but this feature is not implemented yet in EnterMice. It was in ep128emu at first, but I deleted it for compatibility reasons. It probably depends on whether Pear has plans to implement horizontal wheel support in a future revision of EnterMice.