Use ~10€ to connect modern mouse to MSX

Page 14/18
7 | 8 | 9 | 10 | 11 | 12 | 13 | | 15 | 16 | 17 | 18

By Prodatron

Paragon (1787)

Prodatron's picture

08-12-2014, 10:56

I wonder why there are overflows on the Enterprise while it's working fine on the MSX. Both check the mouse at 50Hz, both should read 2x4bits for each of the X/Y differences, so how can there be a difference... Maybe the Enterprise only reads the lower 4 bits?

By gflorez

Supporter (10)

gflorez's picture

08-12-2014, 19:39

I don't think so. The original Neos mouse +Boxsoft doesn't gives that error. The movement of the pointer Is smooth and complete no mater how I move the mouse.

By raymond

Champion (318)

raymond's picture

08-12-2014, 20:16

Where can I find the most recent script for in the Arduino Nano? As I would like to build one Big smile

By gflorez

Supporter (10)

gflorez's picture

09-12-2014, 22:17

I need it too.

----------------------------
On the other side, somebody know what is the difference between the mouse and trackball protocols?

By NYYRIKKI

Enlighted (4996)

NYYRIKKI's picture

10-12-2014, 13:23

Here is the latest, not finished version of the mouse software for Arduino:

http://msx.fi/temp/mouse_draft.zip

It is not cleaned up and some new functionality is experimental stage. I've just had way too much things to do, so this project is currently sleeping. I hope during Christmas holiday I finally find some time to pick up the project again, but no promises.

In order to make the mouse working also with Roland samplers, I think JoyHigh-routine should be changed to:

void JoyHigh()
{
     DDRD=(DDRD | 0x3C);
}

I didn't put that in as I've not tested it and at the moment I don't have the mouse adapter & real MSX nearby.

By raymond

Champion (318)

raymond's picture

11-12-2014, 18:51

Thanks NYYRIKKI! Now I have something to do during the Chistmas holiday Tongue

By gflorez

Supporter (10)

gflorez's picture

15-12-2014, 14:31

I've finished and tested this fine Arduino adapter on the Enterprise.

It works much better than the PIC adapter, it gives the correct coordinates and doesn't lose the pointer when I fast move the mouse.

But..... the resolution is very high an so the movement is "squary" and jumpy. I have set the resolution to the minimum with the wheel but still it's higher for the Boxsoft driver...

I will try modifying some parameters in the script to fit it better to the Enterprise...

By raymond

Champion (318)

raymond's picture

26-12-2014, 11:18

This is a realy nice project. It works like a charm Big smile Finally an optical mouse for MSX!

By gflorez

Supporter (10)

gflorez's picture

28-12-2014, 21:27

Only one thing. In the script, at the mouse initialisation, it's send first the magic sequence "200,200,80" and then if received mouse_id=4 it sends "200,100,80".

But in that pages:

http://www.win.tue.nl/~aeb/linux/kbd/scancodes-13.html
http://www.computer-engineering.org/ps2mouse/
https://bbs.archlinux.org/viewtopic.php?id=65669

They say the order is inverse, first "200,100,80"(Intellimouse three buttons), then checking id=4, and then "200,200,80"(Intellimouse explorer five buttons).

I can't test it because I don't own a five buttons mouse.

By gflorez

Supporter (10)

gflorez's picture

04-04-2015, 20:21

I've managed to make work this project on the Enterprise 128. The problem was that I was trying to emulate a Neos mouse, which supposedly had the same protocol that MSX mouses.

It has a different pinout, but until recently I've not realised that the triggering of the reading cycle also is different. The STROBE signal is normally LOW so the start is putting the signal HIGH. I don't know why but the STROBE of the Neos mouse(utilized on a C64)is normally HIGH so his triggering is putting the signal LOW.

So then I've modified that lines:

Quote:

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:

Quote:

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));
}

And also modified this:

Quote:

void JoyHigh()
{
DDRD=(DDRD | 0x3C);
}

To:

Quote:

void JoyHigh()
{
DDRD=(DDRD | 0xFF);
}

Page 14/18
7 | 8 | 9 | 10 | 11 | 12 | 13 | | 15 | 16 | 17 | 18
My MSX profile