Welcome, Guest. Please login or register.


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

Offline Z80System

  • EP addict
  • *
  • Posts: 3926
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 45.0.2454.101 Chrome 45.0.2454.101
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #210 on: 2015.September.27. 21:25:06 »
Maybe this is the answer to my question ? :

https://enterpriseforever.com/hardware/entermice-joy-ps2-mouse-interface/msg47483/#msg47483

Is this unchanged ?
Z80 System

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #211 on: 2015.September.27. 22:16:23 »
Hello Pear. I'm glad you choose remote mode at last... so you can make better use of previous projects.

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #212 on: 2015.September.27. 22:38:25 »
Hello Z80System.

Exactly, Entermice will follow the Kempston standard and will have three buttons on every joystick connector, I said you. But think it doesn't imply that the two new buttons can work on old games, while they always can be modified easily to use them...
« Last Edit: 2015.September.27. 22:57:17 by gflorez »

Offline Z80System

  • EP addict
  • *
  • Posts: 3926
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 45.0.2454.101 Chrome 45.0.2454.101
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #213 on: 2015.September.27. 23:15:30 »
Quote
Exactly, Entermice will follow the Kempston standard and will have three buttons on every joystick connector, I said you.

It's cool ... in this case (from my multi button joystick point of perspective) this interface will solve to me (alongside the mouse thingy :)) the "multiplexing/demultiplexing" (I think this is the name) behaviour of EP joy ports, and will serve 7 paralell input lines at the joy connectors (Kepston thingy).

This will be compatible with many commercial DB-9 joysticks without a converter for one button at least (I do not think that there will be many multi button jojsticks what have a kepston fire button layout).

But even if I have a multi button joystick what is not compatible with the Kempston DB-9 layout (with the fire buttons, or at all) I can easily convert those only by wire, because of the 7 paralell input lines served by the EnterMice.

Moreover, the 7 paralell input lines is important to me because of an other thing, too.
I do not have experience with hardware building, but (after my keyboard interface) I have expereience with programming of printed circuit assembled microcontroller boards, like the arduino micro and clones.
These microcontrollers are fast enough to handle protocols like PS/2 and the sega megadrive or NES controller protocol, but barely or simply not enough fast to handle (and react to) the *plexed signals of the original EP control ports.
Now with the 7 paralell input lines per joystick of the EnterMice I can easily write protocol handlers with AVR microcontrollers, and the output of those microcontrollers can drive the EnterMice joystick input lines directly.

So, I can connect (from a hardware point of perspective) complex controllers to EnterMice's DB9 connectors while the 7 line is enough to me. And 3 fire buttons will (almost :)) be enough.


Quote
But think it doesn't imply that the two new buttons can work on old games, while they always can be modified easily...

Yes, I understand that this will not mean software compatibility at all.
« Last Edit: 2015.September.27. 23:33:56 by Z80System »
Z80 System

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #214 on: 2015.September.27. 23:44:22 »
For some complex pads you will need an output pin, RTS inverted and converted from 12v to 5v, only used internally by the Entermice but surely Pear will put a probe point on some place of the board.

You can use also Data Out on the underused Serial port to do it.
« Last Edit: 2015.September.27. 23:54:20 by gflorez »

Offline Z80System

  • EP addict
  • *
  • Posts: 3926
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 45.0.2454.101 Chrome 45.0.2454.101
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #215 on: 2015.September.27. 23:53:40 »
Quote
For some complex pads you will need an output pin, RTS inverted and converted from 12v to 5v, only used internally by the Entermice but surely Pear will put a probe point on some place of the board.

But you can use also Data Out on the Serial port to do it.

I do not understand you ... Did you mean interpreting and controlling the protocols of the controllers by the EP natively ?
I do not mean that ... I will read only the EP joy port(s) by the Z80 in every case of controllers, and I will convert everything to the Kempston signals of the EnterMice by an additional microcontroller board.

Or am I wrong ? Aren't the Kempston lines paralell input lines ? Have they a protocol ?
Z80 System

Offline Z80System

  • EP addict
  • *
  • Posts: 3926
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 45.0.2454.101 Chrome 45.0.2454.101
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #216 on: 2015.September.27. 23:57:33 »
Anyway... what will be the latency of the EnterMice's control ports ? Or will there not be any latency ?
Z80 System

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #217 on: 2015.September.28. 00:25:17 »
Yes, they are really parallel. I was meaning some SEGA joysticks that send information of more buttons when an output pin is activated. That is not a protocol, only switching the output pin low or high to read some buttons or others of the joystick.

But reading directly a complex device is not new, you already know that Entermice converts internally PS/2 mouse protocol to MSX mouse protocol, then MSX(Neos)mouse protocol is read directly by the Z80. What really makes very complex to Entermice is the part where it converts the estrange Enterprise signals to standard Atari-Kempston signals.

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

I think no latency as the circuits used are faster enough than our lovely old EP.... but better wait an answer from Pear about that.
« Last Edit: 2015.September.28. 00:30:50 by gflorez »

Online pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #218 on: 2015.September.28. 05:11:50 »
Anyway... what will be the latency of the EnterMice's control ports ? Or will there not be any latency ?
The joystick ports latency between the move and the appearance of the corresponding output signal is 16 ns.
The delay reading mouse is about 2 - 5 ms, but will be read in advance before the video IRQ (every 20 ms).
Hello Pear. I'm glad you choose remote mode at last... so you can make better use of previous projects.
Previous projects work in software loops and delays. They bit me made it difficult to come up with that by hardware will be easier ;)

Online Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 40.0 Firefox 40.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #219 on: 2015.September.28. 08:59:41 »
In the attachments are connection matrix and destiny of dip switch and LEDs (based on existing ideas in this thread).
It is looks very great!

Offline Z80System

  • EP addict
  • *
  • Posts: 3926
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 45.0.2454.101 Chrome 45.0.2454.101
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #220 on: 2015.October.01. 21:06:20 »
Quote
The joystick ports latency between the move and the appearance of the corresponding output signal is 16 ns.

Cool. Nanoseconds are good ... nanoseconds are our friends ... :)
Z80 System

Online pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #221 on: 2015.October.06. 06:27:29 »
I could use a simple program to test EnterMice. As for the buttons and the mouse moves (with wheel inclusive).
I noticed that the movements X, Y and Z are different between the PS/2 and MSX.
Is it properly?
Code: [Select]
MSX PS/2
 X = -X
 Y =  Y
 Z = -Z
For the joystick mode too would come in handy some test.
Someone help me? Please :)
Ideally, the test program was in the form of a disk image (EX-DOS).

EDIT:
This may be an already existing program.
What can you recommend me ?
« Last Edit: 2015.October.06. 08:23:10 by pear »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #222 on: 2015.October.06. 11:42:38 »
Yes, that coordinate differences exist , and are caused by how and where we start counting the coordinates. No major problem.

For better test the Entermice I recommend you to use the Enterprise Graphical Interface or EGI. It was written on 1987 and has some limitations, but gives you a good idea of what you can expect of your interface.

The only problem is that on that era the Boxsoft interface only had one button. It can be tested on System var 189.

I have modified the original mouse driver to deal with your interface, and now there is a new System Variable(190) that shows all the extra buttons and the Wheel. They can be tested with a simple Basic program:

First LOAD "MOUSE.XR". This can't be done inside the Basic program. It loads the driver as a system extension. But it doesn't work until you execute ":pb". Ignore the error it gives. I can make easily a version of the driver without the :pb initialisation stuff...

Then you must load a Basic program like this:


100 PROGRAM "mouse_tst.bas"
110 GRAPHICS
120 SET 189,4 ! 0=internal joy, 1=Joy1, 2=Joy2, 3=Boxsoft and 4=Entermice. Use Joy1 to test Entermice Joystick mode
125 SET 7,1 ! Key click off. It is annoying when using the internal Joystick and it autorepeats.
130 SET 180,101 ! Video channel to put mouse pointer on. Usually GRAPHICS is 101
140 SET 181,30 ! Position of coordinates on Status Line
150 SET 182,1 ! Show coordinates
160 SET 183,255 ! Colour of pointer
170 OPEN £1:"mouse:" ! Opens a channel to the mouse. Now you can see the pointer on the middle of the screen
180 ASK 188 A
190 ASK 190 B
200 PRINT "       ";A;"      ";B ! This prints the status of the main button, and the rest of buttons+wheel
210 GOTO 180

I can make you an auto-start disc image, but before I need to know your Enterprise configuration. Is it an English version or German? Do you have a SD-reader?
« Last Edit: 2015.October.06. 15:50:18 by gflorez »

Online pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #223 on: 2015.October.06. 11:53:45 »
Thanks. There's not a lot. I'll rewrite it myself :)
Today, I hope, the first tests of the firmware. It is no longer on the emulator :)

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 41.0 Firefox 41.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #224 on: 2015.October.06. 13:38:00 »
On the Boxsoft interface manual you can find more  examples useful of how to use the driver.