Welcome, Guest. Please login or register.


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

Offline pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #90 on: 2015.June.12. 15:59:54 »
The time source need not be neither the CPU nor the RTC.
I asked, because maybe 20ms time is not accidental.
This is exactly the screen refresh time.

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Unknown Unknown
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #91 on: 2015.June.12. 16:42:36 »
It can be, Enterprises go at 4Mhz and MSXs go at 3,5Mhz, but both are PAL(or Secam) if European(50Hz).
« Last Edit: 2015.June.13. 08:27:39 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #92 on: 2015.June.15. 00:24:41 »
Alternate current in USA is 120v-240v 60HZ, but in Europe is 220v 50HZ. Even I remember when here in Spain it was 125v, but always it was 50Hz.

Analogic Television image was highly dependant of that frequency and so NTSC video system had 60Hz and PAL 50HZ.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #93 on: 2015.June.15. 00:34:26 »
I asked, because maybe 20ms time is not accidental.
This is exactly the screen refresh time.
Yes, the driver (MOUSE.XR) ask the mouse in every 50Hz (video) IRQ.

Offline pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #94 on: 2015.June.15. 06:23:22 »
And that's what I meant.
So period of polling the mouse will not change regardless of the CPU clock frequency.
Thanks :)

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #95 on: 2015.June.15. 09:51:44 »
Forgive me, I was rambling and rambling about video frequencies.





Offline pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #96 on: 2015.June.15. 11:16:02 »
Do not worry :)
I came up with another idea to become independent of the timings, at least to some degree.
If the mouse polling cycle is constant and independent of the CPU clock frequency, that is enough to know only one, the shortest time from the RTS edge signal to read data from the Control port.
For the EP with 10MHz clock the time is 24us and during this time the MCU must issue the data to be read.
On the other hand, the timeouts may remain as the original Neos mouse.

If a little bored, then I'm sorry, but now I have time only for theoretical, so I write it all, to remember and to be able to come back, when I come to practical tasks :)

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #97 on: 2015.June.15. 11:49:00 »
No problem with me, I like that boring things... It is a disappointment when things work right the first time....

Offline pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #98 on: 2015.June.15. 12:24:11 »
I don't like surprises, especially unpleasant.
I prefer the hard work in advance and then instantly obtain a things which properly working :)
In this way, it's cheaper.

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #99 on: 2015.June.15. 13:20:50 »
I like the same, only joking....

Offline pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #100 on: 2015.June.15. 18:44:37 »
The connection matrix compiled and fitted to the XC9572-PC44 according to control map.
Signals:
JS1_sss - joystick 1
JS2_sss - joystick 2
M_BL,M_BR - mouse buttons
M_D0..M_D3 - mouse data
KB_0..KB_9 - keyboard rows
KB_J..KB_L - keyboard columns
J0_M1 - the switch to avoid conflict of joystick 1 Fire2, Fire3 and mouse left, right buttons (logic 0 - joystick select, logic 1 - mouse select)
Code: [Select]
=========================================================================
*                            Final Report                               *
=========================================================================
Final Results
RTL Top Level Output File Name     : entermice.ngr
Top Level Output File Name         : entermice
Output Format                      : NGC
Optimization Goal                  : Speed
Keep Hierarchy                     : Yes
Target Technology                  : XC9500 CPLDs
Macro Preserve                     : YES
XOR Preserve                       : YES
wysiwyg                            : NO

Design Statistics
# IOs                              : 34

Cell Usage :
# BELS                             : 7
#      AND2                        : 2
#      AND3                        : 1
#      AND7                        : 1
#      AND8                        : 1
#      OR2                         : 2
# Tri-States                       : 20
#      BUFT                        : 20
# IO Buffers                       : 34
#      IBUF                        : 31
#      OBUFT                       : 3
# Others                           : 2
#      OR2B1                       : 2
=========================================================================
« Last Edit: 2015.June.15. 18:54:29 by pear »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #101 on: 2015.June.15. 22:31:31 »
OK. Very good work!

Only one thing, I think the Joy1 spare fire buttons and the mouse buttons don't conflict. You only need an OR gate, not a switch. Much more easier.

We have been talking about conflicts with some programs that expect a Joystick on the control port and find a strange fast activity on the direction switches, even incongruence on the movements(Up and Down or Right and Left at the same time, three or even all the four switches pressed).

I think it's the mouse data bus what conflicts on some programs, not the buttons. And we have isolated it already.

But I can be wrong....
« Last Edit: 2015.June.15. 23:05:11 by gflorez »

Offline pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #102 on: 2015.June.16. 07:57:47 »
Instead of the switch, I can do priority. Mouse first :)
I have to do something, because combined are the same lines.

Pressing any mouse button disconnects the buttons Fire2&3 of joystick 1.
« Last Edit: 2015.June.16. 09:05:45 by pear »

Offline Zozosoft

  • EP addict
  • *
  • Posts: 13534
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
    • http://enterprise.iko.hu/
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #103 on: 2015.June.16. 09:06:10 »
Something more trick needed for the joystick mode: if the mouse in joystick mode, then it is replace the Joy1.

Offline pear

  • EP lover
  • *
  • Posts: 786
  • Country: pl
  • Z80 only
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 38.0 Firefox 38.0
    • View Profile
Re: EnterMice (Joy & PS/2 mouse interface)
« Reply #104 on: 2015.June.16. 09:17:18 »
Just reprogram matrix, but it later :)