Welcome, Guest. Please login or register.


Author Topic: EnterMice (Joy & PS/2 mouse interface) (Read 177044 times)

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #45 on: 2015.May.31. 20:30:30 »
Instead of jumpers I can do a dip-switch. You don't need switch off the computer to change it.
« Last Edit: 2015.May.31. 20:39:28 by pear »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #46 on: 2015.May.31. 20:39:44 »
Resolutions? They aren't so important with the Enterprise resolutions. All Ps/2 mouses I've tested have accuracy.
But for the joystick mode will be a good option.
I tested the original Neos in joystick mode. in some games are very nice, some others are too slow or too fast.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #47 on: 2015.May.31. 20:47:02 »
I agree, Joystick mode is very utile. Think on my desire of moving the Basic cursor with the mouse... only with a little applet that copies the Mouse joystick mode to the internal one.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #48 on: 2015.May.31. 21:40:08 »
Sorry , you mean resolutions on joystick mode, but they don't work as that..... The only way is to autorepeat the movement. Up=x*Up. 
It can be programmed inside the joystick mode but I don't know  if  it is useful.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #49 on: 2015.May.31. 22:13:31 »
I think that inside a program you can't move the cursor faster than the programmer wanted or achieved. And autorepeat is internal of a program.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #50 on: 2015.May.31. 22:27:17 »
Think Zozo, for example on the Editor of EXDOS. The movement is character by character boundaries. But the mouse jumps that boundaries. You can't mimic the mouse pointer movement on the editor cursor. You only can do a joystick mode, but then you are limited to the velocity of the editor cursor. Autorepeat can aid to ease the movement but there  are certain "physic" limitations. If you do two or more Up with a Up  pulsation it can go faster but can be ungovernable.
« Last Edit: 2015.May.31. 23:53:03 by gflorez »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #51 on: 2015.May.31. 22:36:58 »
Ok, but the mouse also have a "repeat time" variable. It is set the direction at full time only when you move fast.
At slower speed switching on and off.
For example:
Full speed: 1,1,1,1,1,1,1,1...
3/4 speed: 1,1,1,0,1,1,1,0...
1/2 speed: 1,1,0,0,1,1,0,0...
1/4 speed: 1,0,0,0,1,0,0,0...

The resolution change for how many movement means the full speed. For example: 1000, then the limits:
1000 or more the full
750 or more the 3/4
500 or more the 1/2
250 or more the 1/4
Other resolution setting: 2000,1500,1000,500
Another: 500,375,250,125

These are just example values. I think these need be tested on the real interface and machine with lot of games. And put the most usable values to the final firmware.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #52 on: 2015.May.31. 23:30:03 »
Thanks for the data... Good explanation! Then we need auto-fire and autorepeat on all joystick keys.....poor programmer.....

May be they put all that autorepeat rates thinking on the patkány. It is proportional or only joystick mode?
« Last Edit: 2015.May.31. 23:53:36 by gflorez »

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #53 on: 2015.May.31. 23:32:55 »
Ok, sorry I misunderstood it. The data is for the mouse driver.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #54 on: 2015.May.31. 23:40:32 »
Ok. I again misunderstood it. You mean the PS\2 mice standard. Yes there are some variables. I touch all them when the PS/2 interface didn't worked..... But the best the defaults of the Arduino project.
« Last Edit: 2015.May.31. 23:56:17 by gflorez »

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #55 on: 2015.June.01. 00:39:48 »
Sorry I was reading the messages with the phone...

The settings you mentioned include all kinds of mice and many years of development. Also it isn't a real standard, only different commands added by the principal makers, Logitech, Genius and IBM when a new characteristic was implanted along the years.

A mouse can have only four or five settings of the total resolution range, but only two real ones(for example 200 or 300 dpi). Then if you set it to a resolution it doesn't have, it defaults to its near possible setting.

Again we don't need to reinvent the wheel here...   NYYRIKKI has done a good work with his Arduino project. It emulates perfectly a MSX mouse from a PS/2 mouse(IBM Intellimouse Explorer standard) with wheel and upto five buttons(three of them and the wheel are read from the received stream but only the EP SymbOS port can benefit of it for now.). The project also emulates MSX track-ball and MSX touch-pad, not much useful for our project. Even an experimental way to transfer files by the USB-serial port of the Arduino, from the PC to the MSX computer, but it applies only to the Arduino project.

Inside that project there are a lot of  PS/2 and MSX mice knowledge, surely learned by stumbling on errors that now we can avoid.
« Last Edit: 2015.June.01. 01:53:22 by gflorez »

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #56 on: 2015.June.01. 13:16:23 »
I've added a dip-switch and two SMD LEDs (place for THT is over ;) ).
One section of the dip-switch is connected to the PLD (can be eg. Global Chip Disable), four to the MCU inputs.

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #57 on: 2015.June.01. 18:46:01 »
Arduino code for PS/2 mouse uses Remote Mode. I decided to see how they handle the MCU in Stream Mode.
It gives advice :)
At the beginning of the "disappeared" me some data, but it turned out that it was only a small buffer.
In this mode, the movements counters can be more precise.
If I understood correctly, then after each reading state of the mouse by the Enterprise, counters should be cleaned and counted again ?

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #58 on: 2015.June.01. 21:26:59 »
The Arduino code maintains lx and ly from the last lecture only for calculating the scaling(additional velocity) but it only pass to the MSX port the data acquired on the PS/2 port. So every cycle the counters are cleared.

The data read on PS/2 is similar  to the needed at the MSX port, 2 numbers in two's complement of the pointer displacement of the two axis. Only that the PS/2 numbers are nine bits and MSX numbers are 8bits. But the Arduino project only read 8 bits on the PS/2 port. Moving fast the mouse(A "modern" Logitech optical trackball PS/2 and USB) I can't go higher than 50/-50 moving the pointer side to side by the screen. The movement is very smooth.

That project works on demand. But if your MCU can maintain the Stream mode rate you can go for it. On the MSX(Enterprise) side it is not necessary, I think, as is the driver who recalls the data.

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #59 on: 2015.June.01. 23:53:03 »
This page about the PS/2 protocol can serve you.