+Eyvind Bernhardsen Posted January 19, 2021 Share Posted January 19, 2021 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: 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. 12 2 Quote Link to comment Share on other sites More sharing options...
777ismyname Posted January 19, 2021 Share Posted January 19, 2021 Thank you, @Eyvind Bernhardsen This is something within my skill set to build 1 Quote Link to comment Share on other sites More sharing options...
+mytek Posted January 19, 2021 Share Posted January 19, 2021 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 ? 2 Quote Link to comment Share on other sites More sharing options...
ascrnet Posted January 24, 2021 Share Posted January 24, 2021 (edited) what a nice project @Eyvind Bernhardsen, I also updated the Joy 2B+ repository to link to this. Edited January 24, 2021 by ascrnet update 2 Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted January 25, 2021 Author Share Posted January 25, 2021 Thanks @ascrnet ? I've just made a new release that fixes a few bugs and adds experimental C64 support (if that's of interest to anybody). I had to move the pins around a bit, but I'm happy with the firmware for now. Next up: PCB design. 1 Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 7, 2021 Author Share Posted March 7, 2021 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. 2 Quote Link to comment Share on other sites More sharing options...
Bobo Cujo Posted March 9, 2021 Share Posted March 9, 2021 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? Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 9, 2021 Author Share Posted March 9, 2021 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. Quote Link to comment Share on other sites More sharing options...
manterola Posted March 9, 2021 Share Posted March 9, 2021 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... Quote Link to comment Share on other sites More sharing options...
manterola Posted March 9, 2021 Share Posted March 9, 2021 (edited) 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 March 9, 2021 by manterola Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 9, 2021 Author Share Posted March 9, 2021 @manterola thanks for the offer! I have a good idea of what I want the end result to be and I’ve managed to design the circuit, but am finding it hard to get CAD files for the components I want and to draw the actual PCB. I’ll put my kicad files here tomorrow. Quote Link to comment Share on other sites More sharing options...
manterola Posted March 9, 2021 Share Posted March 9, 2021 Or in github.... Yes, sometimes it is necessary to take the datasheets and redraw from there, which it certainly time consuming... Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 10, 2021 Author Share Posted March 10, 2021 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. Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 10, 2021 Author Share Posted March 10, 2021 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. Quote Link to comment Share on other sites More sharing options...
manterola Posted March 11, 2021 Share Posted March 11, 2021 (edited) 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 March 11, 2021 by manterola Quote Link to comment Share on other sites More sharing options...
manterola Posted March 11, 2021 Share Posted March 11, 2021 (edited) First try, without including the 6 headers pins. Still a lot of free space if you want to make it smaller. Edited March 11, 2021 by manterola 1 Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 11, 2021 Author Share Posted March 11, 2021 Nice! I’m wondering if it will fit into eg. the XEGS joystick port when it’s that wide, and if two fit side by side on the more conventional Ataris. I’ll make some measurements. Quote Link to comment Share on other sites More sharing options...
manterola Posted March 11, 2021 Share Posted March 11, 2021 (edited) 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 March 11, 2021 by manterola Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 11, 2021 Author Share Posted March 11, 2021 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. Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 14, 2021 Author Share Posted March 14, 2021 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! 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. 3 Quote Link to comment Share on other sites More sharing options...
Bobo Cujo Posted March 15, 2021 Share Posted March 15, 2021 I think you meant to thank @manterola on this one ? Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 15, 2021 Author Share Posted March 15, 2021 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: 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. 2 Quote Link to comment Share on other sites More sharing options...
manterola Posted March 15, 2021 Share Posted March 15, 2021 Sorry was oityof town in the last days. I'll upload my design as well, to have, you know, more options. Yours looks great, congrats! Quote Link to comment Share on other sites More sharing options...
+Eyvind Bernhardsen Posted March 15, 2021 Author Share Posted March 15, 2021 Thanks! It turns out pcb design isn’t so hard after all, I just had to get over my fear of footprints ? (I should probably wait until I’ve tested it to say that.) More options are always good, this is a DIY adapter after all! Quote Link to comment Share on other sites More sharing options...
Bobo Cujo Posted March 17, 2021 Share Posted March 17, 2021 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.