Use ~10€ to connect modern mouse to MSX

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

By Sky_hawk

Champion (267)

Sky_hawk's picture

12-10-2014, 21:03

NYYRIKKI, you documented the protocol in this thread, could you add it to the Wiki maybe?

I'm building a Wiimote converter for MSX using a Raspberry PI. Seems overkill maybe but, its the cheapest and easiest way to connect convenient way to a Wiimote (bluetooth) that I found so far.

Now I have read about your mouse-extention protocol, I want to add it to my project too!
It would be perfect to map wiimote movements (pitch and roll) to the mouse and the nunchuck + A/B buttons to the joystick and buttons.

I think the 4-byte protocol is very nice, and I understand it, I think, but
I don't understand the hardware interface of the MSX mouse, is the mouse outputing a continuous stream of bits and a fixed clock or....

Greetings,

Jan

By NYYRIKKI

Enlighted (5020)

NYYRIKKI's picture

13-10-2014, 01:18

Sky_hawk wrote:

NYYRIKKI, you documented the protocol in this thread, could you add it to the Wiki maybe?

It's in there already, see: http://www.msx.org/wiki/Mouse/Trackball

Quote:

I'm building a Wiimote converter for MSX using a Raspberry PI. Seems overkill maybe but, its the cheapest and easiest way to connect convenient way to a Wiimote (bluetooth) that I found so far.

Actually you can do that with Arduino as well if you like. See ie. here...

Quote:

I think the 4-byte protocol is very nice, and I understand it, I think, but
I don't understand the hardware interface of the MSX mouse, is the mouse outputing a continuous stream of bits and a fixed clock or....

No, you need to follow the PIN 8 status changes and output accordingly.

By Sky_hawk

Champion (267)

Sky_hawk's picture

13-10-2014, 09:08

The arduino usb shield alone costs $25 so i would not safe that much cash, also, i have been unable to find how to pair with a device using arduino, i think you must specifiy the bluetooth address of a specific wiimote in code. Maybe this can be solved by enumerating all bluetooth devices and creating a selection-mode, not sure. The other thing i could not find is wether the nunchuck can be read using the arduino wiimote library. I think it should be possible, but appeareanty nobody did it so far Smile

Thanks for you answer!

By Sky_hawk

Champion (267)

Sky_hawk's picture

19-10-2014, 16:10

Ok, so does the msx start by setting or resetting pin 8 and the mouse outputs a nibble on the 4 joystick direction pins?
Do they stay ready for reading until the msx toggles pin 8 ?, like what you descrive for the trackball, or is an edge needed, to trigger the next byte?

I read somewhere, that the msx can support joystick and mouse on the same port and the same time, is that done by time-sharing the pins, using this protocol when pin 8 is actively used and the joystick can be read the rest of the time?

Greetings,

Jan

By NYYRIKKI

Enlighted (5020)

NYYRIKKI's picture

19-10-2014, 20:03

Sky_hawk wrote:

Ok, so does the msx start by setting or resetting pin 8 and the mouse outputs a nibble on the 4 joystick direction pins?

Reading starts with reset. See the page 2 of this threat. There is the whole Mouse / Trackball routine commented as BIOS handles it. It should give you a picture how mouse actually works.

Quote:

Do they stay ready for reading until the msx toggles pin 8 ?, like what you descrive for the trackball, or is an edge needed, to trigger the next byte?

Yes, they stay until MSX toggles the pin. Note that transfer is done one nibble at a time so byte start is always reset.

Quote:

I read somewhere, that the msx can support joystick and mouse on the same port and the same time, is that done by time-sharing the pins, using this protocol when pin 8 is actively used and the joystick can be read the rest of the time?

Yes, this works when BIOS is used, but may cause problems with software that uses joystick port directly. Therefore I suggest that you make this optional feature.

By gflorez

Supporter (10)

gflorez's picture

06-12-2014, 18:59

Hello NYYRIKKI, I'm Gflorez from Spain.

I'm not a MSX user......but my computer uses a MSX mouse.

I'm talking about the Enterprise. The machine was not created with that option, but a third party company, Boxsoft, adapted a Neos mouse bundled with a drawing program. Much the same like the "Mouse Cheese" for the C64/128 or the "CPC Mouse Pack" for the CPC family.

Now that Prodatron is adapting SymbOS for that computer(indeed he owns one of them), it's necessary some standard for an Enterprise mouse, and an easy and fast way is using your project plus a very simply intermediate adapter.

I've just ordered an Arduino nano to test it. When it arrives I will test it...

By Prodatron

Paragon (1787)

Prodatron's picture

07-12-2014, 20:38

I hope this works with the Boxsoft adapter! Having USB mouses and the mouse wheel working on the Enterprise, too, would be very cool! Tongue

By gflorez

Supporter (10)

gflorez's picture

07-12-2014, 22:22

Well Prodatron.... I've tested on the Boxsoft a PS/2 adapter from Kevin Mount, copied from the project from Luciano Sturaro(Brasil), modified from Anikun's (Japan)....

It works some... X and Y are interchanged, and the pointer runs excessively fast. I managed to fix the Enterprise driver to cope that errors, but then it only runs perfect if I move slowly the mouse. if you pass the limit then the pointer jumps erratically at the screen. Disappointing. On the other side the adapter wasn't cheap...

I then ordered a PIC programmer(by the way I needed an universal one to program the Enterprise's ROMs...) to see in the code If I could change "some byte" of the internal program, but then I found that the code is exactly the same from Luciano's page(I'm a little angry with Kevin Mount for profiting from another's project without at least naming him.). I'm determined someday to learn PIC assembler and fix that adapter, but for now I'll leave it, because I'm looking for an easier solution. And NYYRIKKI's project is easy, cheap and complete for us the Enterprisers. And better, you support it completely....

Thanks.

By sd_snatcher

Prophet (2837)

sd_snatcher's picture

08-12-2014, 00:47

@gflorez

The adapter from MSXpro has a jumper to configure it to halve the mouse resolution, so higher resolution mice can be supported.

Does your adapter has this jumper? It it hasn't, all you need to do is to solder a wire connecting the pin-12 of the 16F628A PIC to the ground.

By gflorez

Supporter (10)

gflorez's picture

08-12-2014, 06:57

I have no complaints about that adapter. It is very well constructed and has that jumper. The problem is: Enterprise needs even lower resolution, and modifiyng the code to suit my computer is harder (for me) than in the present project. On the other hand I also want that wheel movement to the SymbOS version on the Enterprise......

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