This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Raspberry Pi to NES for Online capability?

Raspberry Pi to NES for Online capability?
by on (#111265)
This is just a hypothetical question, but I was wondering if any one here had ever thought of trying to interface the Raspberry Pi with the NES to create an online capable NES for online multiplayer.

Realistically, I think the NES is way to underpowered to be able to communicate on the Internet alone. Offloading the responsibilities of the TCP/IP stack to something like a Raspberry Pi makes more sense to me. Logically I think it would play out like this.

1. Connect NES to raspberry pi via custom communication cable from the NES expansion port.

2. Raspberry Pi runs a custom program listening for controller input from the NES.

3. Pi sends the input to a server which routes the input to another Pi connected NES across the Internet.

Again, this is me just wondering how feasible such a thing would be. Would love to to hear some input.

Thanks!

-M
Re: Raspberry Pi to NES for Online capability?
by on (#111266)
Can't the raspberry pi just emulate 50 NESes anyway?
Re: Raspberry Pi to NES for Online capability?
by on (#111269)
Fifty? If you're trying to extrapolate PocketNES benchmarks to the Raspberry Pi, you may have been spoiled by the hardware acceleration of the GBA and the lower accuracy expectations of GBA users. How many copies of, say, The Magic of Scheherazade or Big Bird's Hide and Speak can it emulate?
Re: Raspberry Pi to NES for Online capability?
by on (#111272)
QuickNES ran about 20 instances simultaneously on a 400 MHz PowerPC G3. I'd imagine at least that on a Pi.
Re: Raspberry Pi to NES for Online capability?
by on (#111273)
Sound like Chykn80's ENIO project if you ask me.

Oh and Tepples, if you love Big Bird's Hide and Speak so much, why don't you marry it and have little Big Bird's Hide and Speak baby :lol:
Re: Raspberry Pi to NES for Online capability?
by on (#111287)
At least it's no Action 52, Right?! :wink:
Re: Raspberry Pi to NES for Online capability?
by on (#111291)
I was referring to all games that use audio output through timed writes to $4011. An emulator that Dwedit maintains has problems with those games.
Re: Raspberry Pi to NES for Online capability?
by on (#111301)
tepples wrote:
I was referring to all games that use audio output through timed writes to $4011. An emulator that Dwedit maintains has problems with those games.


I know, I was just teasing you because I know you always point out to that game voice sample lol. I found the information you posted on that game really interesting.
Re: Raspberry Pi to NES for Online capability?
by on (#113480)
I've thought about this too. The way I envisioned it, rather than connecting to the expansion port, the Raspberry Pi would be housed inside the game cartridge and interface with its circuit board.

If you remove enough components from the Raspberry Pi it will fit in a NES cart along with a USB wireless adapter and lithium-ion battery.
Re: Raspberry Pi to NES for Online capability?
by on (#113571)
there's something about appropriate use of technology here...

Why not use a Raspberry Pi as a ROM emulator (load a pair of SRAMs, then get out of the way).
Why not use a Raspberry Pi to build a flash chip programmer with a decent user interface.
Why not house a Raspberry Pi in an NES case (from a broken system), then use the native controller ports as input into the emulator? (the bit shifting is technically SPI, but there's no MOSI, just MISO).
Why not use a Raspberry Pi as a documentation server, to read walkthroughs or gameplay hints.


Okay. So here's the rub. If you wanted to do simultaneous 2-player, you might as well just connect to the front controller ports. Each game would have to be patched to wait if it doesn't receive a controller input ready signal, because:
1) both systems have to start the game code at exactly the same time to get to the same place.
2) neither clock crystal is running at exactly the same speed. Laws of the physical universe, etc. over the course of minutes one system will get to be a frame ahead of another system.
3) Internet latency, while low, is still tough to guarantee the 16 ms ping time needed for 60 Hz frame sync.
4) Games might read the controller input on their own, instead of using the automatic read every frame. A very few might also randomize based on miniscule differences on how long a given button(s) is pressed.
Re: Raspberry Pi to NES for Online capability?
by on (#113577)
whicker wrote:
Okay. So here's the rub. If you wanted to do simultaneous 2-player, you might as well just connect to the front controller ports. Each game would have to be patched to wait if it doesn't receive a controller input ready signal

XBAND had to patch games as well. But I've been told that things like GGPO have demonstrated best practices in writing netcode for fighting games, which are historically among the twitchiest, most lag-sensitive, and least dead-reckonable games.

When the patched game reads the controller, it won't act on it. Instead, it feeds the presses into a queue of timestamped reads: "At frame 3412, the state of controller 2 changed to Right+B." It allows this queue to fill for about two-thirds to three-fourths of a ping time before it acts on presses. The randomizer would agree on a common seed before starting.
Re: Raspberry Pi to NES for Online capability?
by on (#113582)
Basically it won't be seamless for existing games. You could code new applications that are aware of the issues and function correctly.

Also, it's not just the Raspberry Pi you can do this with. There's an excellent Arduino Ethernet board I've worked with in the past. You can also do this with an NES to PC interface. Also, it seems like there was a project a while back that did offer internet connectivity to the NES.