Hotswapping controllers

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Hotswapping controllers

Post by jeffythedragonslayer »

Is it safe to hotswap controllers? I think this is okay on the N64 because the multiplayer mode of Banjo Tooie detects how many controllers are currently plugged in, but I've been warned against doing this on the NES, so I turn the power off before plugging in or unplugging controllers. What about the SNES?
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Hotswapping controllers

Post by Pokun »

It's electrically supported (as in it works fine with games) but Nintendo doesn't recommend it on any of their systems (until they started using Bluetooth and USB) because of possible voltage spikes which could damage hardware. The controllers are active devices on all Nintendo systems with power supply and GND pins (unlike Atari and earlier Sega joysticks/-pads). In fact the SNES controllers (as well as Virtual Boy controllers) works identically to NES controllers with just an extra shift register chip to allow more buttons, and it's possible to use SNES controllers with NES games (B will be A and Y will be B). Some NES homebrew even supports the extra buttons.

I did hotswapping a lot as a kid and problems never happened to me AFAIK, but now when I know better I generally avoid it.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Hotswapping controllers

Post by jeffythedragonslayer »

There is nothing in the official documentation in "Chapter 13. Standard Controller" about this. But I did find this in Chapter 9 MultiPlayer 5 Specifications:
9.4.2 CAUTION #2
Games should be programmed so that game play can be continued if the MultiPlayer 5 or one of the devices connected to it becomes disconnected.
From this caution alone, it appears to be supported. If this was dangerous I would hope the caution would instead be to display a message scolding whomever may have yanked the cable out and disconnected it not to do that. :lol:
Last edited by jeffythedragonslayer on Tue Jun 28, 2022 11:16 pm, edited 1 time in total.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Hotswapping controllers

Post by Pokun »

It wouldn't be in the manual for developers, I'm pretty sure it's in the user manual though, I remember reading it myself as a kid on many Nintendo systems.

Supporting hotplugged controllers is important for a developer because otherwise the player may be forced to power cycle the game if accidentally pulling out the controller, even though that shouldn't be done normally if it can be helped. Normal controllers would always work, hotplugged or not, but special peripherals (Mouse, Super Scope etc) are normally detected by the game and if the detection routine is only done at boot, hotplugged peripherals wouldn't work, so games must continue to check the controller port for what's connected as the game runs, that's probably what that caution note is about.

If the GND pin is longer than the other pins so that it's disconnected last when pulling out the connector it would be safe, but I don't think it is like that. The same can be said about cartridges on many Nintendo systems (except for more recent ones like 3DS and Switch) and hotswapping them is not recommended by Nintendo. The chance for damage might be small (I don't really know) but Nintendo don't want you to be able to say that they didn't warn you and cause trouble for them.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Hotswapping controllers

Post by jeffythedragonslayer »

Just eyeballing the 7 pins (I have board revision SNSRGB01) they all look the same length.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Hotswapping controllers

Post by tepples »

Sometimes a flash cart's menu doesn't support a specialized controller connected to port 1. This interferes with ability to launch something like Mario Paint using a flash cart. And sometimes (at least on NES; haven't tried much with Super NES), plugging or unplugging a controller causes the CPU to freeze. I've ended up doing this:
  1. Connect standard controller
  2. Turn on the Control Deck
  3. Select game from flash cart menu
  4. Disconnect standard controller and connect specialty controller
  5. Press the Reset Button (don't hold it long enough to cause the flash cart to return to the menu)
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Hotswapping controllers

Post by jeffythedragonslayer »

tepples wrote: Wed Jul 13, 2022 7:16 pm [*]Press the Reset Button (don't hold it long enough to cause the flash cart to return to the menu) [/list]
I thought pressing the Reset Button just causes the CPU to jump to the reset vector - do you mean to tell me there are different reset handlers for how long the Reset Button is held? That kind of thing sounds more like the software way the N64 handles reset; with the separate Pre-NMI and NMI.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Hotswapping controllers

Post by lidnariq »

The flashcart can pay attention to how long reset has been pressed (both CPU A0 and M2 stop oscillating and float) and change what it does in response to different lengths of time.
Post Reply