Jump to content
IGNORED

DIY Sega Mega Drive (Genesis) adapter


Recommended Posts

I've been wanting to use my 8BitDo Retro Receiver to play Joy2B+ games for a while. Last year I made a passive adapter that works for the B and C buttons, but reading A and Start from a Mega Drive controller requires active scanning.

 

Since I already had a JOY2PIC programmer after building @mytek's TK-II and 1088XEL projects, and a microcontroller seemed like a good fit for this application, I decided to use a PIC to do the job. I picked the 16F1847 because it's used in the 1088XEL and has enough I/O pins, and after some evenings of experimentation I ended up with a working Mega Drive adapter. It should work with a real Sega controller, possibly even a six-button one, but I've only tested it with the 8BitDo.

 

Of course, firmware is only half the story. My adapter looks like this:

 

IMG_0039.thumb.jpeg.a5a6fd11324f9a73011b0c900637a1bf.jpeg

 

I've never designed a circuit board but am planning to do it... eventually. In the meantime, the breadboard works!

 

Hopefully somebody else will find this useful :)

 

If you're interested in building your own adapter, the pinout for the chip is in the README file on Github. Programming binaries are attached to the v0.1 release in case you have a PIC programmer but lack the compiler.

  • Like 12
  • Thanks 2
Link to comment
Share on other sites

2 hours ago, Eyvind Bernhardsen said:

I've been wanting to use my 8BitDo Retro Receiver to play Joy2B+ games for a while. Last year I made a passive adapter that works for the B and C buttons, but reading A and Start from a Mega Drive controller requires active scanning.

 

Since I already had a JOY2PIC programmer after building @mytek's TK-II and 1088XEL projects, and a microcontroller seemed like a good fit for this application, I decided to use a PIC to do the job. I picked the 16F1847 because it's used in the 1088XEL and has enough I/O pins, and after some evenings of experimentation I ended up with a working Mega Drive adapter. It should work with a real Sega controller, possibly even a six-button one, but I've only tested it with the 8BitDo.

Nice ?

 

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

This looks like a really elegant solution for using Sega controllers without having to permanently modify them.

I may just have to try this with my 3-button Genesis controllers (which do work out of the box for 2 button mode, but not for 3 button mode).

 

@Eyvind Bernhardsen Out of curiosity, where did you source the DB9 joystick connectors with built-in ribbon cable/header? 

Link to comment
Share on other sites

It’s a cable I got from Digikey, https://www.digikey.com/en/products/detail/assmann-wsw-components/H7MFH-0906M/998942, that I cut in half and put 10-pin IDC headers on. It’s okay for prototyping, but a connector without the wings would fit better in the Atari, hence the extension cable in my photo.

 

My plan is to use a cable to connect to the Atari, providing strain relief for the joystick port and making it easier to put the adapter somewhere discreet. Haven’t found a source for just the female end of a joystick cable, but extenders are readily available and can be cut in half.

Link to comment
Share on other sites

On 3/7/2021 at 4:29 PM, Eyvind Bernhardsen said:

It turns out that PCB design is hard, but in the breaks between beating my head against KiCad I've added Amiga support (tested with Turrican, which really benefits from the A-is-Up mode!) to the PIC code in release 0.3, available on GitHub.

I am very interested in this project... and I would like to contribute. I am not an expert, but I have already put together some schematics and PCBs in KiCad (and to my surprise they worked!) and I can help you with that part. I would love to see this project working soon... 

 

Link to comment
Share on other sites

1 hour ago, Bobo Cujo said:

 

@Eyvind Bernhardsen Out of curiosity, where did you source the DB9 joystick connectors with built-in ribbon cable/header? 

you can built them using this:

https://www.ebay.com/itm/5Pcs-D-SUB-9-Pin-Female-IDC-Type-Adapter-Connector-For-Flat-Cable-DB9/182179833761

or this:

https://www.ebay.com/itm/5Pcs-D-SUB-9-Pin-Male-IDC-Type-Adapter-Connector-For-Flat-Cable-DB9/172249889605

Edited by manterola
Link to comment
Share on other sites

23 hours ago, manterola said:

Or in github.... Yes, sometimes it is necessary to take the datasheets and redraw from there, which it certainly time consuming... 

 

...and I have to learn how to draw components first. So much yak shaving.

 

Anyway, I made a PR with what I have: https://github.com/eyvind/sega-adapter/pull/1

 

I've added an ICSP header but /C64 is on the MCLR pin, which means that C64 mode is incompatible with programming. Simple solution: put an SPDT switch in there to switch between C64 mode and programming. Switches are expensive and there are too many types though, so I'll probably go with the simpler solution: three-pin header.

 

The headers can be completely ignored if you want an Atari mode adapter and can program the PIC outside the circuit, and C64 mode can be enabled with a wire.

Link to comment
Share on other sites

Ah, I should probably mention what I’m struggling with. I need to pick out DE9 connectors from the multitude of options (leaning towards https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/747467-1/298422 because a plastic shroud seems right for joystick connectors), get pcb design files for the components I choose, route the signals, and finally make the board as small as possible.

 

I’ll only be putting the male connector on my boards because I want an attached cable for the Atari end of the adapter, but I thought it’d be a good idea to make it possible to put a connector on both sides. The connectors I picked in KiCad are just placeholders from the built-in component library.

Link to comment
Share on other sites

yes.. the easy and cheap way is to put d-sub 9 with solder cups and just choose the edge mounted footprint for both female and male. Maybe, to not put artificial limits, one can have different PCB versions: some with pigtail cable and other with edge mounted DB9. Other option is to try to make a PCB very small and make it fit inside a large d-sub 9 backshell. too many options. I think the option with 2 connectors soldered to the edge is the easier, and might work as V0.1 and later keep improving with what it is learned in the process.

 

 

 

Edited by manterola
Link to comment
Share on other sites

What is the use of the 6 pin header?. 

Maybe that can be eliminated. 

The 3 pin header, for what I understand can be replaced by a 2 pin header, or even a solder kind of jumper (just pads no thru-hole) that can be placed on the back of the Pcb. 

Regarding the width, it could be made the same size of the PIC plus some margin because that position of Pic makes the routing simpler, and the pcb smaller, but if it is too wide, it is just a matter of rotating the PIC, or another option, change the shape of the PCB, not rectangular anymore. 

For the pigtail version, what the idea? Some kind of connector,  or just solder the cable and provide strain relief for example using plastic zip ties. 

 

 

 

Edited by manterola
Link to comment
Share on other sites

I really like looking at the render, it makes the adapter seem real. Is that a KiCad feature?

 

On the XEGS there's about 4mm clearance on the left side of the connector, looking at the computer. The 800XL has about 2 cm of empty space between the joystick connectors, and my 1088XEL's case has about 1.5 cm. Looking at pictures of a 1200XL, I'm not sure anything wider than a standard joystick plug will fit at all.

 

For reference, the connector on the end of the ribbon cable in my photo above is 3cm wide; it only just fits in the XEGS and won't go in completely because the case gets in the way. The JOY2PIC (which uses an edge-soldered connector) is a snug fit in the XEGS even though it has fairly low profile components and no case. It also makes me nervous for being a rigid lever that sticks out of the side of the Atari, which is another reason I want a pigtail.

 

The six-pin header is for in-circuit programming, which is handy if the PIC is soldered. Most people probably won't need it, but it'd be useful for me at least.

 

The three-pin header could just be jumper pads, though that would make it harder to move the adapter between systems. The reason it's three pins is that the /C64 pin is also used for programming. As you note, only two pins are required if there's no programming header.

 

I was planning on just soldering the cable, don't know which connector I would use other than a D-sub. IDC seems like it would be a pain to wire? Strain relief is doable with zip ties as you suggest, or something like this thing. Haven't given much thought to the case yet, to be honest.

Link to comment
Share on other sites

Deciding to go with a jumper for C64 mode finally kicked me into finishing the KiCad tutorial, and I've now sent a trial PCB off to OSH Park for manufacturing. Thanks, @Bobo Cujo!

 

474323108_Screenshot2021-03-14at17_10_38.thumb.png.2cef386d89f0e4cd5272b65727ac5a17.png

 

I kept the Atari-side connector on the schematic, but I'm still planning to use a pigtail.

 

The pull request is updated with the latest changes, I'll merge it once I've tested the board.

 

  • Like 3
Link to comment
Share on other sites

12 hours ago, Bobo Cujo said:

I think you meant to thank @manterola on this one ?

Right you are ? Sorry, @manterola, I don't know where my mind was. As penance I've updated my github PR with a much more compact circuit:

 

924919662_Screenshot2021-03-15at20_16_28.thumb.png.07bfd18fbff5138b89ef334e790027c8.png

 

I realised that I'm probably the only person who is interested in the ICSP header. It would definitely be possible to make a smaller version by using edge connectors and moving the cap and jumper above/below the PIC.

  • Like 2
Link to comment
Share on other sites

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...

 

Also - if this is to be mounted in a (3d-printed?) case, would it be advisable to expand the PCB to include some screw holes for mounting?

Or would such a case simply be a snap-fit held in place by the DB9 sockets?

 

(I have no specific preference here; I'm mostly asking out of curiosity)

 

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...