So if you look at the table, you'll see that early on the value remains the same for index position 0-5 (= 1 x through the X or Y move loop). * Translate PS2 Move into Acceleration Loop Count*/ The LUT allows me to fine tune how much acceleration I will see for a given amount of movement. So once I have that X/Y distance data, I do two things I see if there has been any change (has it moved), and if so, how far has it traveled? The how far has it traveled value is used to index a look-up table (LUT) holding my desired rate of acceleration data (gives me a number that will get plugged into a loop that sends Gray Code - it'll loop as many times as the value taken from the table, incrementing or decrementing the Gray Code dependent upon direction). This gives me very good granularity from the PS/2 mouse to work with. I can read these registers at about 900+ times per second with the PIC MCU, even taking into consideration that part of my polling period includes a 1 ms delay for each Gray Code send that I make to the Atari (limitation of how fast the A8 can get a reliable read due to the RC input conditioning going into the PIA chip). Anyway the PS/2 mouse is constantly collecting mouse movement data and setting a count in it's X and Y registers which equates to distance traveled vs time. So here follows my feeble attempt to explain what I am doing.īasically most any PS/2 mouse will have a better DPI than the ST mouse, which I believe is 200 DPI, whereas PS/2 mice start at 400 DPI and go on up from there (400,800,1600). I'm still playing around with this but I am seeing encouraging results. I'm interested to know how hardware acceleration will work. Most likely I will also implement a way to adjust or possibly turn this feature off. This is something that we are used to seeing in modern day mouses and operating systems, but wasn't exactly the thing back in the Atari ST era. 'Accelerated' refers to the fact that I will be implementing an exponential acceleration aspect that will allow for fast excursions across the screen directly tied into fast mouse movement. The name MOUSE TARI will from this point forward be used to describe the MCU w/Firmware for the new PS/2 to ST/A8 mouse adapter (shown as the Mouse Chip on the previously posted schematic). I like giving my projects names so that they can more easily be identified, and I think that this is especially important with this new mouse project since there are so many variants already out there in the wild. Stay tuned for more info and eventually the firmware release. Īnyway I doubt if I'll be making any PCBs for stand-alone plug-in usage, but if someone is ambitious, I will be providing the PIC MCU Firmware (in JOY2PIC and Microchip file versions). Ohh and did I mention that I get lazy from time to time. And lets face it, PS/2 protocol is a hell of a lot easier to work with. Besides despite what the rumors would have you believe, there are plenty of NEW PS/2 mice and keyboards still available, as well as some that offer wireless support. Especially considering the learning curve required to implement this in USB as well likely needing to switch over to a different processor family to really do it right (yet another learning curve to climb). Yes I know people would love to have a USB mouse instead (as well as a USB keyboard interface), but with all that I have going on I'm afraid this is the best that I can presently do. Unlike the mouse support that existed on the early versions of TK-II firmware, and then was later abandoned, this one has true ST mouse emulation as its primary goal (plus some enhancements). So here's a look at how this new mouse chip will be implemented in my new project, along with of course a TK-II keyboard chip ( this schematic shows part of the I/O section). Anyway suffice it to say i am probably 85% done, with the last 15% dedicated to supporting mouse movement acceleration (very tricky stuff). However once I dived in, I quickly decided this would not be a good way to go, and so began my journey to write mouse code from scratch in my favorite development application FlowCode. Initially I looked at some of the GPL PS/2 mouse-to-ST/Amiga offerings, thinking that I would simply add what code I needed. It could have just as easily been used in an Atari ST, or with a bit of code finagling also made to work in an Amiga. Since I have a new compact motherboard design that will require an internal mouse interface with the ability to easily switch between joystick ports, and if desired completely disappear (stealth mode), I began work on a new mouse interface chip for the A8. Although this is slated for a bigger upcoming project, I figured it would likely be useful in a stand-alone application as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |