gfreige, on 12 Jan 2017 - 01:18 AM, said:
Any way to reuse the analog joystick support already present in ROM (as used by MESS) ?
That's only in the 99/4 ROM, the 4A dropped it.
Little known fact not known by a lot is the UberGrom has a very powerful microcontroller on it with lots of potential.
Not due to any lack of trying on my part.
Anyway, to get on topic...
How would you prefer to interface an analog joystick to the TI?
While it's not my ultimate preference, joystick/steering wheel was one of my envisioned uses for the UG's analog inputs (it has FOUR of them - that's enough for a nice flight stick too ).
They work best wired as a voltage divider - using the three leads of a standard potentiometer, connect each end to +5v and ground, and the wiper pin goes to the analog input.
For an old-school PC analog joystick, I haven't outright tried one. I would expect it should work to run them in, but it'd be worth testing. They usually don't have the ground connection, so I'm not sure how the ADC responds. Should be able to get something...
Another interesting effect is the analog inputs, if left floating (just run to copper pads, for instance) can actually work as touch sensors. You could put four touch pads on your cartridge -- this is actually how I tested the initial carts analog support.
Reading the position is simply reading a GROM address, very simple. There are also 6 general purpose inputs for reading the buttons... these have (optional) built-in pull-up resistors so can be connected directly to the buttons with no extra hardware.
What I'd like to do is interface the wired Playstation controllers. They have a really simple clocked protocol and provide all the inputs we could want. I had started that ages ago and then the project to mod Genesis pads came around, so I dropped it. It could run through the joystick port, though we'd need to pull power from somewhere... I always envisioned something like JoyTalk, stealing power from the video modulator port.
Downside with all those plans is no compatibility with CALL JOYST, although if you included a microcontroller you could add an emulation mode, I guess.