Login
Back to forumSee the full topicGo to last reply

Posted By

MMS
on 2016-05-22
04:36:58
 Re: Mouse for Plussy

@gerliczer
1) the name corrected at once happy
2) I do not say it cannot work, but may need extra attenion.
As you could see from the RS232 mouse protocol, in the first byte and the XY addresses and mouse buttons are coded together. So the complexity of the RS232 mouse handling comes from original RS232 design, and not from ours.

Sorry, but I cannot take responsibility for some guys' 35 years old crazy byte saving scottish protocol happy
(eg,
-if they would use 8 bits and not 7, then maybe 7 bits would be enough for the movement recognition (not 8), except very fast movements.
-Or if they would send 4 bytes packahge io. current 3 byte package, then it would be much simplier to get the positions and mouse button status.
The two button status could be on the upper 4 bits (Left) and lower 4 bits (Right).
The X6-X7 could be on the Bit 3 and Bit 2 (on lower 4 bits) of the 4th byte in package and Y6-Y7 on the Bit6 and Bit 5 on higher 4 bits of the 4th byte, and with few ROL you can get the final position)

We just try to manage the available protocol in a way.
The only problem is that if too many info packed into one byte, and the upper value position bits stored on the LOWER bits, then you need to do a lot of shifting and bitbanging.
We have nno problem with Byte 2 and Byte3, but handling of Byte1 really takes processor time.

The decoding in C is available there, maybe a well made and translated C routine will make it simpler. I had no real success with CC65, but you know I am lame :-)

Or maybe someone can do a brilliant and compact code in ASM may help too (I was never been really good with mathematics)

But the original PC or PCJr (8088 at 4.77Mhz) could manage it, so we are not SOOOO far from that, they have only 3x faster CPUs happy


OK, here is the first draft, just the HW part (and still without the protocol, photo about the final stuff, driver, etc. a lot of work to be done):
20160521_Plus4_RS232mouse_documentation_DRAFT_V1.pdf

I will check what TLC wrote, that a C64 module can do the same. It would be the easiest if they really connect the right User Port pins.



Back to top


Copyright © Plus/4 World Team, 2001-2024