Page 1 of 1

DIY controller not possible with AVR ?

Posted: Sun Jul 02, 2017 10:20 pm
by KanedaFr
Hi,

i was about to make a secret-product-to-Genny joypad when I read this interesting post of raphnet
So it seems you can't make "easily" a home made joypad with an avr (read arduino too)...
what do you thing of his experiment ?
Does it mean you need a better µC ? or just avoid AVR ?
What's bug me is I found several working homemade pad or converted but they all used a PIC, not an AVR

Re: DIY controller not possible with AVR ?

Posted: Sun Jul 02, 2017 10:46 pm
by Chilly Willy
Seems to me from reading the article, he skimped on the hardware. If he'd sprung for an external mux (one TTL), it would have been dead simple with the whole thing done in C without ints. Using an int to mux the output via code was virtually 100% of his problem. Move the muxing off the AVR and it all goes away. I suppose it was kind of a "challenge" he set himself to do it with nothing else, but if there's no good reason to do so, why make more work for yourself?

Re: DIY controller not possible with AVR ?

Posted: Mon Jul 03, 2017 5:04 am
by HardWareMan
Agree with Chilly Willy.

Re: DIY controller not possible with AVR ?

Posted: Mon Jul 03, 2017 9:59 pm
by KanedaFr
oh...so trying to handle everything with the µC isn't always a good idea ;)

But using a multiplexer, I don't see how you could force your own peripheral ID, like I asked on the another thread...

Re: DIY controller not possible with AVR ?

Posted: Mon Jul 03, 2017 11:14 pm
by Mask of Destiny
KanedaFr wrote:oh...so trying to handle everything with the µC isn't always a good idea ;)

But using a multiplexer, I don't see how you could force your own peripheral ID, like I asked on the another thread...
Strictly speaking, using a mux doesn't preclude you having a non-standard peripheral ID. The peripheral ID you get when using a mux is completely dependent on what you have attached to the mux. That said, it's worth pointing out that the tight timing is only needed if you're trying to be compatible with normal controllers. If you have a completely custom controller that needs special software, it can be as slow as you like. The mouse and Sega multitap are both kind of pokey and use a 3-wire protocol with explicit handshaking so that the 68K can know when the next nibble of data is available.

Re: DIY controller not possible with AVR ?

Posted: Tue Jul 04, 2017 8:28 pm
by Chilly Willy
If I were going for the full 6-button peripheral, I'd probably use a simple PAL/GAL. That would have enough gates to handle all the muxing and ID stuff. If you don't mind a few chips and a larger board, you could use more muxes and a counter to handle the 6-button inputs/ID. I've got a GAL programmer that I built back around '90 that I used for a number of hardware devices. That was pain - had to punch all the codes in by hand on a hex pad. Then the place I starting working at got a programmer that handled almost anything and connected to a PC. :lol:

Re: DIY controller not possible with AVR ?

Posted: Wed Jul 05, 2017 9:35 pm
by Mask of Destiny
Chilly Willy wrote:If I were going for the full 6-button peripheral, I'd probably use a simple PAL/GAL.
I'm actually fairly convinced that Sega used a 22V10 GAL. At the very least, the pin assignments on the chip they used are consistent with it being a 22V10. VCC and GND are in the right place. Buttons are connected to what would be the dedicated input pins (all 12 of them) with what would be the I/O pins handling output, the TH line input and what appears to be an RC timer circuit.

Re: DIY controller not possible with AVR ?

Posted: Wed Jul 05, 2017 10:41 pm
by Chilly Willy
Mask of Destiny wrote:
Chilly Willy wrote:If I were going for the full 6-button peripheral, I'd probably use a simple PAL/GAL.
I'm actually fairly convinced that Sega used a 22V10 GAL. At the very least, the pin assignments on the chip they used are consistent with it being a 22V10. VCC and GND are in the right place. Buttons are connected to what would be the dedicated input pins (all 12 of them) with what would be the I/O pins handling output, the TH line input and what appears to be an RC timer circuit.
That would make a lot of sense, and be (one of) the easiest ways to handle the 6-button protocol. I used the 22V10 a lot myself. It was an awesome chip for the time.