Jump to content
IGNORED

DIY Sega Mega Drive (Genesis) adapter


Recommended Posts

On 3/17/2021 at 5:52 AM, Bobo Cujo said:

I don't think it's a bad idea to have the ICSP header - imagine flashing different versions of the firmware if someone wants a different button layout...

Good point. I've uploaded a new version of my PR with three different PCB variants: the original ICSP version, the smaller version from my previous update, and a minified one with solder cup edge connectors like @manterola's (that one was tricky to design). Still waiting to receive my first lot from OSH Park.

 

Here's the new PCB:

 

1454836864_Screenshot2021-03-21at15_50_40.png.552c2acbfb4e24fd6dea58afb48bb8e5.png

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

The postal service finally delivered my PCBs! Now to learn 3D printing so I have something better than electrical tape to wrap the adapter in.

 

IMG_0101.thumb.jpeg.de40deae5ca5948d6233c6ea4cee5f9f.jpeg

 

I made one with header pins for programming, but skipped them on this one. The DE9 connector felt a bit wobbly so I secured it with a couple of machine screws.

  • Like 3
Link to comment
Share on other sites

Here's the BOM, with part numbers from Digikey. In addition you'll need the female end of a fully-connected joystick cable for the pigtail. 

 

The pin headers are optional, needed only if you want to enable C64 mode and/or program the PIC in-circuit. The nine-pin header easily snaps apart, just make sure you end up with a three-pin and a six-pin header.

Sega adapter BOM.csv

  • Like 1
Link to comment
Share on other sites

Hello Eyvind

 

5 hours ago, Eyvind Bernhardsen said:

In addition you'll need the female end of a fully-connected joystick cable for the pigtail.

 

Would a joystick extension cord work if a (female?) DB9 connector was soldered in?

 

Sincerely

 

Mathy

 

Link to comment
Share on other sites

1 hour ago, Mathy said:

Would a joystick extension cord work if a (female?) DB9 connector was soldered in?

As long as the extension cord is fully connected I see no reason why it shouldn't.

 

Here's the closest female correspondent to the male connector I could find that's in stock at Digikey: https://www.digikey.no/product-detail/no/te-connectivity-amp-connectors/5745131-1/A33980-ND/1123756. Others may work, the important thing is that it's a .318" mount.

  • Like 1
Link to comment
Share on other sites

I was working in a PCB version with both options: the edged D-Sub 9 connector or soldered pigtail + holes for plastic tie (for strain relief).

It is not ready yet. And I am not sure it really adds to what you have done.

image.png.1a2d8e12272efb11284a240453ba93b7.png

Edited by manterola
  • Like 3
Link to comment
Share on other sites

48 minutes ago, manterola said:

I was working in a PCB version with both options: the edged D-Sub 9 connector or soldered pigtail + holes for plastic tie (for strain relief).

It is not ready yet. And I am not sure it really adds to what you have done.

image.png.1a2d8e12272efb11284a240453ba93b7.png


That’s interesting! How did you come up with the idea for the strain relief slots?

 

I think the capacitor could be moved under the PIC (which would need to be socketed) and the pins for the pigtail could be squeezed closer together, if you wanted to make it even more compact.

Link to comment
Share on other sites

  • 3 months later...

This project has been on hold after long, possibly COVID related, shipping delays on pretty much everything I've ordered in the past year, but the last bits finally arrived and I'm ready to announce the next generation SEGA Megadrive controller adapter:

 

IMG_0199.thumb.jpeg.db7e0e5d5e63e920bed4fa0dfe5eb2e0.jpeg

 

The big changes are that it's smaller, and instead of a D-sub connector or a soldered-in pigtail it uses a detachable ribbon cable to connect to the computer. There's still a jumper to switch to C64 mode, for people so inclined.

 

Boards can be ordered from OSH Park, and there is a BOM with DigiKey part numbers in the GitHub project. Unfortunately the microcontroller seems to be out of stock at the moment.

 

This is still a DIY project, so you'll have to order parts, assemble them, and program the microcontroller yourself. It's open hardware: the source code is MIT licensed and the schematics are CC-BY-4.0.

 

I don't think I can make the board any smaller without switching to surface mount parts so the next step will be to make a 3D-printed case. Please don't hold your breath.

  • Like 5
Link to comment
Share on other sites

Minor breakthrough: I figured out that the reason I couldn't read the X, Y, Z, and MODE buttons was timing related, and managed to fix the problem.

 

I have some ideas for using the extra buttons. In the meantime here's a preliminary build where X, Y, and Z simply shadow the A, B, and C buttons.

 

segaprog.atr

 

Note that I still only have 8bitdo adapters to test with (an order of Sega controller knockoffs from China was one of the deliveries that never arrived), and since this was a timing problem, different controllers might not work. Please report back if it doesn't work for you.

  • Like 1
Link to comment
Share on other sites

Here's a build that has autofire for A, B, and C on X, Y, and Z, the simplest use I could think of.

 

segaprog.atr

 

The fire rate is around 12 Hz. I don't think it's possible to go above 12.5 Hz for buttons 2 and 3 (on PAL systems, 15 on NTSC) because charging the pot capacitors takes time and they are only drained once every frame, so the adapter needs to hold the button state for at least two frames to make sure the computer will notice. Could do a faster rate for button 1 or use the buttons for something else entirely, and the MODE button can be used to switch modes if necessary. Ideas welcome! :) 

Link to comment
Share on other sites

  • 11 months later...
On 8/29/2021 at 6:14 AM, Mr Robot said:

My mouser order has arrived. I’m still waiting for Oshpark. 
 

I have some really crap genesis knockoff controllers here. @Eyvind Bernhardsen pm me your address I’ll send you one to play with. 

@Mr Robot did send me a knockoff controller, which sadly did not work with the initial six-button support.

 

With the help of my shiny new logic probe I've finally been able to work out why! It turns out that microseconds count, especially when talking to dumb electronics.

 

Here's release v0.4, with more compatible six-button support and a slightly speeded-up autofire: segaprog.atr

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

I've used programmer T866II Plus for programming PIC 16F1847.

As PIC 16F1847 is not in the list of supported devices, I had to do the following trick:

 

Select PIC16F1827 @DIP18 (different version of this line with less RAM).

Disable option "Check ID" in order to force flashing.

Adapter works perfectly, it just makes me wondering whether this particular MCU is so uncommon that it was missing in the list...

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Oh, here's a small update I've been meaning to post. It's possible to stack adapters using 12 and 15 mm PCB spacers:

IMG_0220.thumb.jpeg.ae0b4c0d31c4395399b6829fc8ad127e.jpeg

 

12mm spacers go on top of the DE-9 connector, 15mm spacers either side of the IDC connector. I know @Mr.Holub's case won't fit this version, but maybe it could be stretched a bit? :)

Link to comment
Share on other sites

  • 2 weeks later...

Another update, this time to the firmware. After looking at the SNACK SNES controller adapter, I wondered if it would be possible to emulate its enhanced mode to be able to address all of the buttons (sort of) independently. It turned out to be tricky to do because of the way my adapter is wired: SNACK uses the pots for joystick X and Y axes, and getting the timing right to charge the pot capacitors to the right range with no resistors took some trial and error.

 

The A, B, X, and Y buttons are used for B, A, Y, and X to avoid mirroring the button layout (this might be familiar to you if you've ever switched between Nintendo and Xbox controllers). The Z and C buttons are the left and right shoulder button, respectively, and MODE is SELECT.

 

Only the shoulder buttons are completely independent of other buttons. A and B are independent of each other, but X, Y, SELECT, and START will override them, and only one of those buttons is registered at a time. This is how SNACK is able to read all of the buttons.

 

Left/right/up/down might be temperature dependent, may depend on your exact model of Atari and the length of your joystick cable, and I'm not sure if the timing works on NTSC, but here's a test version anyway. Holding down MODE switches between normal and SNACK mode.

 

segaprog-0.5-test1.atr

  • Like 2
Link to comment
Share on other sites

On 9/4/2022 at 5:24 PM, Eyvind Bernhardsen said:

Oh, here's a small update I've been meaning to post. It's possible to stack adapters using 12 and 15 mm PCB spacers:

IMG_0220.thumb.jpeg.ae0b4c0d31c4395399b6829fc8ad127e.jpeg

 

12mm spacers go on top of the DE-9 connector, 15mm spacers either side of the IDC connector. I know @Mr.Holub's case won't fit this version, but maybe it could be stretched a bit? :)

Well not sure if I would be able to do this in correct tresholds (I don't have these spaces), however it should be easy to remix my model to put 2 boxes together without need of spacers.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

I've now tested the SNACK support enough, by playing Attack of the PETSCII Robots, to make a proper release announcement: version 0.6 of the adapter firmware is available on the GitHub page.

 

The button mapping is different when using an Xbox or PlayStation controller connected to an 8BitDo Retro Receiver, so I've added an extra SNACK mode to support those controllers.

 

To switch to SNACK enhanced mode on a Mega Drive controller, press Mode+Start+C; on an Xbox or PlayStation controller, Mode+Start+left trigger. Mode+Start+Z (right trigger on Xbox/PlayStation controllers) switches back to Joy2B+ mode.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...