One nes controller, two consoles.

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

dashv
Posts: 12
Joined: Mon Jan 27, 2014 10:24 pm

One nes controller, two consoles.

Post by dashv »

Folks I want to drive two consoles simultaneously with one controller.

The reason being I want to test various clones against the real nes with the same games to test for lag.

I have spliced 2 nes extension cables into a y adapter and quickly learned it's not as easy as that.

Has a one done this before? Tips?
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: One nes controller, two consoles.

Post by thefox »

NES controller transfers data serially. There's a shift register inside the controller that is used to latch the 8 button states and shift them out one by one when the shift register is clocked (clock is generated by the program reading $4016).

So, because the controller reading from both consoles may be out of sync with each other, you will need two shift registers. I'm not sure what would be the easiest way to achieve this, possibly you could just take two controllers, and connect the 8 button traces from one to the other.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: One nes controller, two consoles.

Post by tepples »

You'd probably need three 8-bit shift registers and an oscillator: one SIPO (serial in, parallel out) connected to the controller, and a PISO (parallel in, serial out) connected to each console. The oscillator would have the SIPO poll each controller every 10 milliseconds or so, resulting in a set of eight signals on the PCB. The PISOs are the same chips found in the controller itself (the "controller IC" at the bottom of this page) and turn these signals back into a serial stream for each console. In practice, unless you can precisely control the timing of the power supply to the consoles, they're gonna desync.

I have better ideas to test for lag. A year ago, I made a ROM that continuously reads the A button and turns the screen white while it is held. Even with an authentic NES console, HDTVs have far more lag than SDTVs.
User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: One nes controller, two consoles.

Post by cpow »

tepples wrote:I have better ideas to test for lag. A year ago, I made a ROM that continuously reads the A button and turns the screen white while it is held. Even with an authentic NES console, HDTVs have far more lag than SDTVs.
Doesn't he mean differences in the performance of the NES console not the differences in performance of the display media?
3gengames
Formerly 65024U
Posts: 2281
Joined: Sat Mar 27, 2010 12:57 pm

Re: One nes controller, two consoles.

Post by 3gengames »

Put two shift registers in the same controller. Connect the output pins to different consoles, and the clock/reset pins to the different consoles, too. I believe there's enough space for it in the controller, adding the 2nd wire shouldn't be too bad either.
Last edited by 3gengames on Wed Jun 18, 2014 11:05 am, edited 1 time in total.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: One nes controller, two consoles.

Post by tokumaru »

Here's some basic explanation of how the controller works so that you can understand better what all these suggestions mean:

Inside the NES controller there's a chip, which receives the state of all 8 buttons. In order to read the controller, the NES commands this chip to "freeze" the current state of all buttons, and then reads it bit by bit (button by button).

Simply splitting the cable and connecting the controller as is to 2 consoles won't work, because you can't have the controller receive commands from 2 consoles. The simplest solution would indeed be borrowing the chip and cable from another controller and feed the button states to both chips. Each console would be free to "freeze" the controller state and read the bits at its own pace.

Tepples's suggestion is more complex, because it doesn't involve modifying the controller. His idea was to convert the serial data back into 8 individual signals and feed that to the chips that are connected to the 2 consoles, like in the basic solution.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: One nes controller, two consoles.

Post by rainwarrior »

Could you just stack the second chip on top of the second one, and solder it right on with the latch/clock/data pins going to the second plug?

What about the two 5V and ground lines from both consoles? Is it safe to just tie them together?
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: One nes controller, two consoles.

Post by tepples »

cpow wrote:Doesn't he mean differences in the performance of the NES console not the differences in performance of the display media?
Yes, that's what he means. However, the same ROM can be used to test both, and this test procedure is simpler than rigging up one controller to go to two consoles. Besides, if both consoles aren't on CRT SDTVs, differences in performance of the display media may mask differences in performance of the consoles being tested.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: One nes controller, two consoles.

Post by tokumaru »

rainwarrior wrote:Could you just stack the second chip on top of the second one, and solder it right on with the latch/clock/data pins going to the second plug?
That's exactly what I imagined.
What about the two 5V and ground lines from both consoles? Is it safe to just tie them together?
I also had doubts concerning this. Tying them together wouldn't be my first guess... I'd first try using only one of the 5V signals and ignoring the other.
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Re: One nes controller, two consoles.

Post by MottZilla »

dashv wrote:Folks I want to drive two consoles simultaneously with one controller.

The reason being I want to test various clones against the real nes with the same games to test for lag.

I have spliced 2 nes extension cables into a y adapter and quickly learned it's not as easy as that.

Has a one done this before? Tips?
Hardware clones using the "NOAC" or actual CPU and PPU clones will not have "lag". There is no need to test. These are exact (almost) clones of the circuitry in the original system. No emulation is being performed. Any "lag" one might experience would be related to their display.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: One nes controller, two consoles.

Post by tokumaru »

Indeed, you will most certainly not see any differences in performance if you're comparing an NES to a NOAC. The audio or the colors might differ sometimes, but the gameplay will be identical if the game runs. Some might not run because of how some signals are wired in the cartridge connector, but that doesn't mean that the CPU or PPU are inaccurate.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: One nes controller, two consoles.

Post by tepples »

A wireless controller as seen in the "Generation NEX" NOAC famiclone might contribute to lag, but that won't affect use of a wired controller.
dashv
Posts: 12
Joined: Mon Jan 27, 2014 10:24 pm

Re: One nes controller, two consoles.

Post by dashv »

MottZilla wrote:
dashv wrote:Folks I want to drive two consoles simultaneously with one controller.

The reason being I want to test various clones against the real nes with the same games to test for lag.

I have spliced 2 nes extension cables into a y adapter and quickly learned it's not as easy as that.

Has a one done this before? Tips?
Hardware clones using the "NOAC" or actual CPU and PPU clones will not have "lag". There is no need to test. These are exact (almost) clones of the circuitry in the original system. No emulation is being performed. Any "lag" one might experience would be related to their display.
Folks, thanks for all the input and suggestions. with all your help and insights I now understand why my simple splitter made from 2 extension cords (didn't want to ruin 2 controllers) will not work without additional hardware. And here I though I was clever because I was smart enough to clip the extra 5volt feed. :)

For additional context.

I'm comparing an original NES first to itself (another nes). Then to a Retron 5. It's emulation based not NOAC. with extra features like HDMI upscaling, graphics filters, Etc.

Input lag, display lag, and emulation performance are all possible factors.

I have 2 nes systems, 2 identical SMB 1 and Punch Out! cartridges, a CRT and a 55inch LED. I have a series of side-by-side control and variable tests planned to detect input, display, and emulation speed issues separately.

What I need to remove however is the ham handed "one guy trying to mash two buttons on two controllers simultaneously".

I'll be recording the feeds from both devices using separate DVRs with lagless passthrough and also two 5D MKIIs camera's aimed at the displays running at 30fps at high shutter to eliminate motion blur (at least from the camera). So I can do frame by frame comparisons.

Yeah it's ambitious. Probably even overkill. But everybody's gotta have a hobby, right? ;)

Thanks again for all of the advice. It honestly sounds like the controller project may be a bit more than I can handle right now. I'd rather not take an iron to my controllers and while I'm good with replacing worn caps and dead batteries, building custom circuits is beyond my abilities at present.
Drag
Posts: 1350
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: One nes controller, two consoles.

Post by Drag »

The main problem I can think of would be the fact that you'd need both machines to run in a perfectly synchronized way, unless you're just looking for whether both Marios move at exactly the same time. It'd be difficult to play the first couple of SMB stages, for example, without both games getting out of sync at some point.
User avatar
Memblers
Site Admin
Posts: 3901
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: One nes controller, two consoles.

Post by Memblers »

Drag wrote:The main problem I can think of would be the fact that you'd need both machines to run in a perfectly synchronized way, unless you're just looking for whether both Marios move at exactly the same time. It'd be difficult to play the first couple of SMB stages, for example, without both games getting out of sync at some point.
Yeah, one could wire a button to the reset both machines, but even then they'll go out of sync eventually, because the clocks will be slightly different.
Post Reply