Welcome, Guest. Please login or register.


Author Topic: BoxSoft Mouse Interface (Read 40706 times)

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #210 on: 2015.April.03. 10:46:02 »
Yes! It caused  a shift in the  nibbles  and so the jumps, 1 or -1 was received as a 15 or -15...

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #211 on: 2015.April.03. 10:48:11 »
I must go, tonight I will post the modified script and will begin detailed instructions.

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #212 on: 2015.April.03. 21:07:35 »
I'm back again.

First of all we must think about a way to invert the STROBE signal. I have a nice Phillips MSX mouse, so I can do test with it.(Lab rat, never better said.....)

I've found this on the same web page:



Tomorrow I can buy the components and try. Then I'll put a selector.
« Last Edit: 2015.April.03. 21:12:25 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #213 on: 2015.April.04. 01:55:42 »
I can use one more resistor and a triple commutator like this:



Then I can weld its pins as this:
« Last Edit: 2015.April.16. 10:31:49 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #214 on: 2015.April.04. 18:43:19 »
Holly Week and no electronics store open on Saturday....

Then I un-welded the pins of the transistor and put the 220 Ohm resistor to the +5v side.

I have a pin converter already made for my MSX mouse so it has not been necessary to change the pins on the OptoBoxsoft's D9 connector.

Of course it works!

Now we have three ways of effectively connecting a mouse to the Enterprise.... if we don't count the fated "Patkány".

This is the working MSX OptoBoxsoft interface schematic:(Observe that the pins are according to the MSX pinout)
« Last Edit: 2015.April.08. 17:19:59 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #215 on: 2015.April.04. 19:00:15 »
According to the MSX mouse reading routine, the first long delay (that triggers the lecture sequence), is of 95667 ns (429 ticks with a Z80 at 3,58Mhz). The following delays are of 35011 ns (157 ticks), 37687 ns (169 ticks) and again 35011 ns (157 ticks).

But the Neos needs 135500 ns(542 ticks with a Z80 at 4Mhz), then 119250 ns (477 ticks), 114500 ns (458 ticks) and again 114500 ns (458 ticks).

I doubt a MSX mouse can work directly (with a Boxsoft interface) on an EP128 as only the reading routine needs 239 ticks each nibble....


Now I have no doubts about that Neos and MSX mouses protocols are the same, but then the Enterprise doesn't need all that time to read the mouse.

May be we can make the Mouse.xr driver less processor-time hungry if we shorten the delays to the minimum possible.

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #216 on: 2015.April.04. 20:01:16 »
One question more: Why the different triggering(positive or negative) of the two mouses?

Can be because the resting state of the pin6 of the C64 Joystick port is +5v, an then the active state is 0v. Much like the resting state of the RTS signal is +12v.

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

Now I want to explain the modifications I've made to NYYRIKKI's script to work with the Enterprise+Boxsoft.

Here you can download the script and instructions.

His project lets the user to simulate various legacy devices on the MSX computer with a standard PS/2 mouse: mouse, extended mouse, extended mouse + joystick, Joystick, trackbal, and touchpad. Obviously only mouse simulation is important for us. Also the script has an option to transfer a program from PC-side to the MSX, but it can´t work on the Enterprise without re-writing the resident program.

First change:

void sendMSX(char c)
// Optimized for Atmel328
// NOTE: Fixed pins!
{
    while (digitalRead(JoyPin8)==LOW) {if (millis()>time) return;};
    DDRD = ((DDRD & 195)|((~ (c>>2)) & 60));
    while (digitalRead(JoyPin8)==HIGH) {if (millis()>time) return;};
    DDRD = ((DDRD & 195)|((~ (c<<2)) & 60));
}


To:

void sendMSX(char c)
// Optimized for Atmel328
// NOTE: Fixed pins!
{
    while (digitalRead(JoyPin8)==HIGH) {if (millis()>time) return;};
    DDRD = ((DDRD & 195)|((~ (c>>2)) & 60));
    while (digitalRead(JoyPin8)==LOW) {if (millis()>time) return;};
    DDRD = ((DDRD & 195)|((~ (c<<2)) & 60));
}


Second change:

*/
void JoyHigh()
// Optimized for Atmel328
// NOTE: Fixed pins!
{
     DDRD=(DDRD & 195);
}


To:

*/
void JoyHigh()
// Optimized for Atmel328
// NOTE: Fixed pins!
{
     DDRD=(DDRD & 255);
}



The first change is to match the negative triggering of the Neos, and the second is to leave the pins of the port in its rest state. If you leave it with 195 decimal, the buttons are always pressed.... But if you leave at 0 then the pointer always goes up.
« Last Edit: 2015.April.04. 21:27:24 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Unknown Unknown
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #217 on: 2015.April.05. 02:58:38 »
I was wrong with the calculation of the delays. Both the Neos and the MSX mouses do a first delay of aprox 135000ns. Then the following three delays must be of at least 70000ns aprox because it works on the MSX mouse.

But the Enterprise driver exceds that three delays on 45000ns each, time that is lost.

This time can be reduced some. I will test tomorrow how.




Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #218 on: 2015.April.05. 09:13:24 »
The driver puts 8, 5, 5 ,5 delay cycles, but is enough wth 8, 1, 1, 1 for a 4mhz Z80.




Edit:  I have checked it , if I SPOKE  the values 8, 1, 1, 1 the driver works exactly the same.  But Prodatron have already the old values....
« Last Edit: 2015.April.05. 12:27:17 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #219 on: 2015.April.05. 14:22:05 »
Even more. How to convert a Neos mouse to a MSX mouse and back?

We know yet that the pins at the D9 connector need to be rearranged so this isn't the quiz.


The two are equipped inside with the MB88201 processor but the Neos has the pin 5 of the chip directly connected to its STROBE pin at the D9 connector.

On the other side the MSX mouse has inside an inverter made....with a transistor and a resistor and then connected to its STROBE pin at the D9 connector.

Exactly a 2sc2405 marked "S.R", a smd NPN transistor, and a 4.7 resistor like in the image below.

So, on a MSX mouse we can disable the inverter when necessary. On the Neos we may add the transistor and resistor to make the inverter.


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

The MSX mouses also have the Joystick mode if we press the left button while plugging.
« Last Edit: 2015.April.05. 15:03:34 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #220 on: 2015.April.07. 15:41:38 »
This is the finished pulse selector I'm going to put in my OptoBoxsoft interface.

 I've decided to insert the transistor between the pins.

Then it only has four leads, 5 and 0 volts, RTS(in), and STROBE(out).


Edit: The weldings where wrong. I'ill put new images when fixed....
« Last Edit: 2015.April.08. 18:24:21 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #221 on: 2015.April.15. 01:41:23 »
Sorry my weldings are ugly.... please follow the drawing if you want a selector.

This is the final aspect of my Boxsoft clone. An used box of course. N and M stand for Neos and Msx. I can't plug two mouses at the same time, they not short-cut but their signals interfere.

Offline szipucsu

  • EP addict
  • *
  • Posts: 8098
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: BoxSoft Mouse Interface
« Reply #222 on: 2015.April.15. 12:38:34 »
This is the final aspect of my Boxsoft clone.
Wow, it looks cool! So many mice.
Anyway, you shouldn't play Caesar the Cat or Garfield with so many mice, I think. :D
SOUND SOURCE 3,STYLE 16,LEFT 16,RIGHT 64,SYNC 2
SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 2
SOUND PITCH 25,SYNC 2
Videos

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #223 on: 2015.April.15. 20:55:28 »
Sin problemas, estos ratones han crecido bastante duros...

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

No problem, these mice are grown quite tough...

Online gflorez

  • EP addict
  • *
  • Posts: 2668
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 37.0 Firefox 37.0
    • View Profile
Re: BoxSoft Mouse Interface
« Reply #224 on: 2015.April.22. 00:13:51 »
Sometimes  a mouse refuses to move the pointer on one of the axis, it may be caused by a misalignment due to impacts caused by falls to the ground....

I've found  an English language web page where a Magyar guy realises it after a hard search and two resistors replaced on the mouse's inner board.

At the end he fixed it only leaving loose a screw of the mouse's housing....