arkadiusz.makarenko wrote: 30 Oct 2023 17:43
As of mouse support I will add this to my todo list for this firmware, I am a little bit snowed in at work just now, but winters are long in Scotland.
@arkadiusz.makarenko
Yes, now that we got the keyboard working, we can start talking about the mouse support. :)
I did enhance the keyboard test one more time before I posted it on msx.org forums. In there someone pointed me that there is also another keyboard test program, but unfortunately I could not get it to run. :( In theory it might be interesting to you as it has also mouse test, but currently some more info is needed. The discussion is here:
https://www.msx.org/forum/msx-talk/hard ... ard-tester
While talking about MSX-mouse, one thing to keep in mind is that it is quite a low resolution device compared to modern mice (75dpi or so (?)) This means you need to implement some floating point/fixed point arithmetics in coordinate conversion to make it move smoothly. It should not be a big issue as long as you keep the resolution difference in mind from the start.
In theory MSX mouse is pretty simple device. It has two buttons, that work exactly like in joystick and beside that you only need to transfer X & Y deltas... Modern USB-mice are anyway more complex and have advanced features like scroll-wheel and extra buttons, that you may want to take into consideration.
If you just implement the basic mouse features (2 buttons & directions), it is more than enough... How ever, if you look the protocol specs that I posted all the way down, you will see that we enhanced the protocol to handle also these new features. I was personally involved making the new specs, but especially if you are worried about implementing useless features, I think you can more than safely skip this part... In theory, it sure is nice to scroll ie. Notepad window in SymbOS with scroll wheel same way as in Windows, but practically SymbOS is the only use case that even supports such things, and you can easily live without such features.
I did implement the enhanced protocol when I made PS/2 -> MSX mouse adapter on Arduino, but I also implemented another mode, where I can seamlessly adjust the mouse sensitivity/resolution with the wheel... And if you ask me now, what I use? It is running always in mode where I can adjust the sensitivity on the fly instead of having the scroll-functionality.