Skip to content

Sega Saturn 3D Controller Bluetooth(BLE) Adapter

Notifications You must be signed in to change notification settings

GamingNJncos/BLE-3D-Saturn-Public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BLE-3D

Sega Saturn 3D Controller Bluetooth(BLE) Adapter

What does it do?

  • This is an open source and completely solderless adapter for the Sega Saturn 3D Controller that converts it to a Bluetooth(BLE) HID Gamepad.
  • The end result demonstrates a battery powered and solderless adapter that allows you to use one of the best controllers ever made to date across numerous consoles

Highlights

  • Zero modifications to the factory controller are neccesary to build, test, or play with this adapter.
  • Both Analog, and Digital mode (switch on controller) are fully supported
  • Want to revert back to OE? Simply plug the OE cable back in.
  • Latency testing pin on-pcb offers consistent and reproducible testing across code changes and development

Lowlights

  • This isn't a "retail ready product", it's a proof of concept
  • No case for this has been published yet (bare pcb)
  • Power circuit has a couple issues. More details in Caveats section

Compatibility

This is an area I'm extremely proud of as of writing the BLE3D is known to work with:

  • Windows, Linux, and Steamdeck

  • ALL supported Blueretro consoles

  • That means the 3D is now available on (in no particular order) - NeoGeo, Supergun, JAMMA

    • Atari 2600/7800, Master System
    • NES, PCE / TG16, Mega Drive / Genesis, SNES
    • CD-i, 3DO, Jaguar, Saturn, PSX, PC-FX,
    • JVS (Arcade), Virtual Boy, N64, Dreamcast, PS2, GameCube & Wii
    • I'm sure I'm missing a handful
  • Note: the analog pad/triggers support are per console, there is no 'digital emulation' on the analog stick.

Background

For years I've dreamed of a wireless Sega Saturn 3d Pad, just like the patents intended.

Fast forward many years, I stumbled across some work Hexfreq was doing with arduino and asked if I could take a look at the code. The rest is history. From there Humble Bazooka and I have spent countless hours to make sure this was a reality. I'd be remissed to leave out darthcloud has also been an immense help along the way.

PCBs

  • There are 2 publicly available DIY pcb's for "dev kits".
  • There are various issues or design misses with both pcbs
  • They aren't intended for retail use, but you can build one yourself today.
  • Beveling the controller facing pins is advised

LightWing

  • This is a 'new' revision of the BLE-Saturn-3D that focuses on core functionality. This was optimized as the low cost option for home builders. At current, this is the advised version to use until development can progress farther on the extra features of the HeavyWing
  • PCB: https://oshpark.com/shared_projects/7RqwDWJT

HeavyWing

  • The original PCB. Take the above patents put them in a blender. It adds LCD Support, Motion Controls & Rumble. You can use the LightWing code (better performance) on a Heavywing PCB but will need to change some pin mappings.
  • PCB: https://oshpark.com/shared_projects/ki7HbZV4


BOM

LightWing

HeavyWing

Assembly

  • Assembly is straightforward, it's just a PCB sandwhich and some solder
  • Orientation might be counter intuitive

LightWing - Assembly

  • When you build this lay Segata Face-Down, then set the Feather through the holes with the ESP, USB, and Battery plug facing you
  • This provies some additional space for the battery directly under the PCB which would closet match the original patent docs visually

LightWing - Installation

  • Sega Logo and Button Face top

  • Segata faces triggers or back of controller


    HeavyWing - Assembly

    • Pictures to be uploaded soon



Before you compile the code

  • PlatformIO installed in VScode, the platformio.ini, and the main.cpp for the Lightwing or the Heavywing
  • This has not been tested with Arduino IDE extensively but should compile fine however extremely slow
  • If you are mixing and matching LightWing code with the HeavyWing PCB, make sure you change the pinmapping.
  • This is well documented in the code if you jump to "Pinmappings for your PCB version"

Powering the Device

This is direct from the Adafruit Documentation

  • There's two ways to power a Feather:
  • You can connect with a USB cable (just plug into the jack) and the Feather will regulate the 5V USB down to 3.3V.
  • You can also connect a 4.2/3.7V Lithium Polymer (LiPo/LiPoly) or Lithium Ion (LiIon) battery to the JST jack. This will let the Feather run on a rechargeable battery.
  • When the USB power is powered, it will automatically switch over to USB for power, as well as start charging the battery (if attached).
  • This happens 'hot-swap' style so you can always keep the LiPoly connected as a 'backup' power that will only get used when USB power is lost.



Caveats and Gotchas

A Note on the Huzzah32 revisions

  • Check your WROOM version before flashing!

  • There is a NEW revision of the huzzah32 shipping with the Wroom-32-E that will have some problems initially when plugged into the controller

  • This is a result of changes to pin IO12 between the D and E modules (and a bootstrap pin)

  • PCB's were made based on result on the Wroom-32-D module and have no issues "out of the box"

  • On Wroom-E when the pcb is plugged into the controller at boot similar to boot:0x33 (SPI_FAST_FLASH_BOOT) invalid header: 0xffffffff

  • You can burn an efuse to work around this with the espefuse tool. Note this is irreversible, if you are uncomfortable with this try to find another vendor with the 32D in stock - How to burn the efuse: espefuse.py --port [com port] --baud 115200 set_flash_voltage 3.3V confirm the fuse status with espefuse -p [com port] --baud 115200 summary. At the bottom it will say Flash voltage (VDD_SDIO) set to 3.3V by efuse.

  • At the bottom it will say Flash voltage (VDD_SDIO) set to 3.3V by efuse.

Battery Warning

  • It is extremely important that you check the polarity on your battery jack is oriented correctly. There is 0 polarity protection. The charging circuit WILL fry if you plug it in and it's backwards.

Powering Down

  • Due to the design of the adafruit feather (esp32) there is no formal power switch.
  • You must either solder a physical switch on to the battery, or unplug it. This is not always easy with the JST connector used so be careful.

Charging

  • Another unfortunate aspect of the power circuit design on the feather is that the device must be powered on to charge.
  • There is no "charging mode" so anytime the controller needs to charge it will be broadcasting.
  • Deep sleep is the best solution for this long term but there are reassons it's not included just yet.

Missing Trigger

  • In windows if you go to look at the button inputs in joy.cpl the right trigger is not displayed.
  • The trigger is there, but you have to use another pad tester to "see it".
  • The picture below is the expected behavior and appears to be a problem with joy.cpl in particular.


Various Demos and feature teasers

Latency Testing

  • A significant amount of consideration went into making it easy to test code changes and the impact on latency
  • The Lightwing PCB has a dedicated solder pad for consistent testing methodology and code incorporates easy to toggle enable/disable for the pin
  • Documentation on the process is available here

Note on the Boot Logos (Supported on HeavyWing PCB)

This is documented in the code however if you want to convert images this tool is really useful


Whats with the Names?

  • Feather add-ons or expansions (hat equivalent for raspberry pi) are called "Wings".
  • Combine that with some Sega nerd-lore and you the Heavy Wing and Light Wing



Strange notes and pedantic details

Protocol Details and Resources

Saturn 3D supported Game list, patent details, and more

https://segaretro.org/3D_Control_Pad

Polling Oddity or Opportunity?

The Saturn only polls the 3D protocol at 16ms intervals (screen blank). There is however some suggestion in the below post that the Action Replay (this is firmware version specific) can attempt polling faster. It's worth taking a look at as it may be possible to force games into a faster mode with patching.

Qoute: "For whatever reason, it's only polling the controller for 14.25ms, with around 310us pauses in between, so it's polling much quicker, but the real issue is after this 14.25ms is up, it then drives the SEL line Hi and goes about it's business for ~2.5ms after that, then back to polling."

Other demos and informational links

Libraries in use

Details on the Feather

About

Sega Saturn 3D Controller Bluetooth(BLE) Adapter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages