Jump to content
IGNORED

"Universal" Joystick schematic for 2600, 7800, SMS, Untested


Andromeda Stardust

Recommended Posts

I've been mulling over the problem for a while now and I think I've figured out a solution. My proposed joystick uses two fire buttons, and a third button for SMS and 2600 homebrew compatability. Inspired by a post I made some time ago when someone posed the question if it would be possible to add a third button to the 7800 joystick for SMS support.

 

I was wondering, can a three button controller be made based on a Sega Genesis controller. I've been told that the C button can work on a 7800 game if was programmed to use that button.

 

Not quite. Even if you added extra buttons, the signal formats would conflict with each other.

  • 1-button operation in either 2600 or 7800: pins 5 and 9 should always be low but most joystick games ignore these inputs so it usually doesn't matter. Pin 6 is normally high but is pulled low whenever the fire button is pressed. Either 7800 button will register as fire button. Only the "B" button on the Genesis controller works in this capacity.
  • 2-button 7800 mode requires pin 6 to remain always high and pins 5 and 9 to be normally low; pin 5 and 9 are high only when the corresponding button is pressed. If at any time pin 6 is pulled low a fault condition is generated and the game reverts to 1-button operation.
  • 2-button "Genny" mode requires pin 5 to be always high, and pins 6 and 9 are normally high; pin 6 is low only when "B" button is pressed; pin 9 is low only when the "C" button is pressed.

 

2-button "Genny" and 2-button 7800 modes are mutually incompatible because one mode expects high input on pin 9 whereas the other expects low input and visa versa. Adding a 3rd button to the 7800 schematic will not resolve this conflict. Even if fancy logic were employed, it is not possible for the controller to tell which setting needs to be used for two button operation unless the user manually changes settings, ie flips a switch or otherwise rewires the controller.

 

Read on for a more thorough explanation:

 

In standard 2-button mode, the 7800 sends a strong +5 signal to the fire pin on the 7800 controller. The buttons on the 7800 controller connect the fire pin 6 two the two paddle pins, 5 and 9. There are 620 ohm resistors pulling down pins 5 and 9 to produce a low signal. I used 560 ohm resistors since Radio Shack doesn't carry 620, but realistically anything in the ballpark between 470 and 680 should work fine. Anyway, in one-button or 2600 mode, the 7800 will produce a weak +5 signal on pin 6, which will be pulled low by either of the 620 ohm resistors in the controller, causing both buttons to act like standard fire buttons. In two button mode, the "strong" high logic from pin 6 will override the 620 ohm pulldown resistors during a button press event, causing pin 5 or 9 to go high. So in two button operation, the buttons supply high logic on pins 5 and 9, but during one button operation, they both produce a low on pin 6.

 

(This can actually cause a potential short condition when a 2600 joystick is hooked up and the 7800 game expects a two button controller, putting strain on the transistor pump responsible for the "strong" current. The programmers planned for this in software by immediately switching to one-button operation whenever a low signal condition is detected on pin 6. IMO not the most elegant solution to use software to prevent a potentially damaging fault condition).

 

2600 games cannot differentiate the 7800 controller inputs because the 2600 nor the 7800 operating in 2600 mode is capable of providing sufficient current on pin 6 to pull the paddle pins 5 or 9 high. However, it is a commonly known practice to use common Genesis gamepads on the 2600. Genesis uses a different VCC pin to Atari, so the Atari supplies +5 volts to the select input on the Genesis controller. VCC on the Genesis controller is pin 7, which is held high by a pullup resistor connected to the Select line. Fortunately, there is enough current running through this pullup resistor to allow the Genesis controller to properly operate. The presence of a high logic signal on the Select line effectively disables Start and A, while mapping the Dpad and B button to the Atari joystick and Fire. Paddle 1 (pin 5) is permanently held high by the pullup resistor inside the Genesis controller. Paddle 2 (pin 9) is normally high due to the logic output of the Genesis controller chip (74157). However, when C button is pressed, the output on pin 9 goes low. Game logic can detect the presence of this signal.

 

7800 games could in theory use the same logic to read the Genesis controller, however they must be programmed to do so. 2-button 7800 games will not operate correctly with a Genesis controller. The "strong" output on pin 6 will override the 74157 chip preventing the B button from functioning. Additionally, pin 5 and 9 will both remain high making it appear to the console as though both red buttons on the 7800 controller are continuously pressed. This creates an interesting effect in Xevious allowing the continuous deployment of bombs and bullets, but will otherwise make the majority of two-button 7800 games unplayable.

 

I posted schematics on the previous page on how to build a dual mode 7800/SMS controller (using a toggle switch to swap modes) that also works with 2600 2-button homebrew. [Link] Since the red buttons on the 7800 controller do not share a common ground with the joystick, a dual mode controller that doesn't require either a complex switching mechanism or advanced logic, is impossible. I finished my mini 7800 arcade controller build earlier today and decided not to implement the switching mechanism because drilling extra holes to install switches would have ruined the simple design. So no SMS or twin button 2600 homebrew with my 7800 stick, sadly.

 

Least not until I realize my "ultimate" Genesis/SNES arcade controller. By design, it will be backwards compatible with Atari and SMS on the Genny side, and NES on the SNES side. 7800 two button support is not doable due to the aforementioned lack of a common ground, hence the need for a separate controller.

 

I have devised a solution that would allow switching between 7800 and SMS function with the use of a third button. A toggle switch is required to switch modes. Most 2600 games will function in either position. Games which use paddles as an alternate input method will need to use 7800 mode. Homebrews that use the "C" button on a Genesis controller will need to use SMS mode. Read on for a technical explanation.

 

post-33189-0-84298400-1439957078_thumb.jpg

 

Here we have 3 buttons A, B, and C. In 7800 mode, the controller functions like a standard 7800 controller. A is Left Fire and B is Right Fire. In 2600 mode, both fire buttons work simultaneously like a normal 2600 controller. In SMS mode, buttons A and B still activate input I or Fire as they would on a standard VCS joystick. However unlike real SMS controllers, both paddle lines are held high by the diode connected to pin 7 (Atari VCC) of the VCS, allowing homebrew games to detect the presence of a "Genesis" controller. Real SMS controllers are not connected on pins 5 and 7, and pressing II will only pull paddle pin 9 to ground, which will have zero effect because it is already held low by the Atari. Furthermore, certain SMS games are incompatible with Genesis controllers because they pull the select line (pin 7) low instead of high. This shifts buttons I and II to the Start and A button on the Genesis controller, and additionally causes some inputs on the Dpad not to respond, breaking the game. If used on a real Sega Master System, incompatible games should work normally. Genesis/SMS VCC (pin 5) will pull the II button high via the 10k resistor until it is pressed. Because the diode effectively prevents reverse current to pin 7 (select), the SMS joystick will have no effect on the state of Pin 7 as if it weren't connected to begin with.

 

Because the 7800 buttons do not share a common ground with the directional controls or the SMS I and II buttons, they cannot be made to work as SMS buttons without extensive rewiring. As it stands, only a DPDT switch needs to be added to the circuit to switch operating modes. SMS setting and 7800 setting both function as a normal 2600 joystick on 2600 games that ignore the paddle lines. Using the wrong setting should not break anything. 7800 setting on an SMS game will function like a normal 2600 joystick and button II will not work. SMS setting on a two button 7800 game will behave like a Genesis controller with both buttons pressed continuously. Useful for Xevious if you are lazy and just want non-stop autofire; will probably not work for most other games.

 

Comments? Thoughts? Any potential issues? I'll definitely have to try this design out if I ever decide to build a sequel to this baby:

16441775328_9c87053299_z_d.jpg

Now if only I could magically extend the box to the right by 1.5 inches... :P

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

  • 1 year later...

Update: I've built a working cigar box prototype off this schematic:

 

post-33189-0-08069100-1474949168.jpg

 

Atari mode:


Two red buttons can function independently on a 7800 in two-button mode. Both act as Fire on single button games or 2600. Blue "extra fire" button does not function in Atari mode.

 

Sega mode:


Both red buttons function as primary Fire. Blue button functions as secondary Fire. 2600 homebrew games that utilize "extra button" function when used with Genesis controllers can read input from the blue button.

  • Like 2
Link to comment
Share on other sites

Don't know how I missed this! Very cool! For the resistors, what wattage should they be? Thanks!

The wattage doesn't matter really since they are signal currents and unlikely to exceed the resitor rating. I actually used three 560 ohm resistors for my prototype controller build with the Atari/Sega switch because that's what's available at RadioShack. The half watt resistors are better IMO for soldering directly to the switch lugs since the leads are stiff enough that they won't bend or break with minor tugs. Though if you're placing the resistors inline with the wiring harness and using heat shrink tubing, a smaller wattage resistor may be better because it adds less bulk.

 

One issue to consider is the higher the value on the pullup resistor for the Sega button, the longer it will take for the paddle cap to recharge. So maybe 1k would be a better option than 10k because it will recharge the paddle cap 10x faster. Most paddle games use up a pretty pig chunk of the frame to measure the timing since discharge. Pressing the extra button when playing Batari Basic homebrew will immediately discharge the paddle cap but it will take a few scanlines to recharge when the button is released.

 

The resistor will charge this cap back up pretty quickly, and most paddle games respond to values in between 100k to around 400k or so. The 10k resistor is pretty small by comparison so the time required to charge the paddle cap is marginal. However, there was an issue with Batari Basic during the development of Princess Rescue. The Batari kernel was resetting the paddle pots every frame which dropped the VCC to the Genesis controller chip, and when the game polled the paddle pins for button inputs, classic 3-button controllers with 74xx logic functioned normally, but the 6-button controllers which used a custom ASIC microcontroller to switch inputs could not reset the controller in time to ensure proper operation.

 

This bug was fixed by Sprybug modifying the Batari Basic kernel so that it did not discharge the paddle cap every frame. I'm not sure exactly the time constant between when the older Batari Basic kernel discharges the paddles then reads them back. If the time between discharge and reads is less than the time required to charge the cap using a 10k resistor, then older Batari Basic games using the bugged kernel to read Genesis controllers, may or may not read this button properly if the value is too high. So I would recommend changing the pullup resistor value to 1k instead of 10k. This will drain 5mA whenever the button is pressed instead of .5mA with the 10k resistors, but the console is rated 500mA so it should be a non-issue. The 7800 mode buttons pull more current than this when pressed, whether or not the switch is in Atari or Sega mode.

 

EDIT: Correction 560k changed to 560.

Edited by Kosmic Stardust
  • 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...