ENIO - NES Ethernet & USB KB Adapter

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

Moderator: Moderators

User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

ENIO - NES Ethernet & USB KB Adapter

Post by chykn »

As I used to hear so often in my childhood, it's time to poop or get off the pot. I'm ready to put together a few ENIO boards for those who are interested in adding ethernet/USB KB capabilities to their game. It consists of two boards. The first is the EXP adapter board which contains the 3.3v regulator and the CPLD. The second is the CPU board which contains the PIC32, USB and ethernet components. It adds a few bucks to the design, but this way it's easier to connect the ethernet/USB cables and see the ethernet lights. The CPU board could also be attached to a custom cart for those who use a toploader or NES clone.

The EXP Adapter board
The CPU board

The cost will be $50 plus shipping. This includes both boards and the 26-pin IDC cable connecting them. The first couple users will be beta testers and will need to have a Pickit3 programmer. The SD card bootloader has not been rolled into the firmware yet. The board in the picture does not have the micro SD slot, but the next couple will. As you can tell from the picture, I'm etching the boards myself right now. I'll have a batch fabbed after getting input from the beta testers.

If anyone is interested in paying to be a guinea pig, let me know so I can get the necessary parts on the next Digikey order.

Thanks!
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Post by infiniteneslives »

Nice work!

I'd like to pick one up from you. I'm not much of a pic guy so I have to ask, why won't my pickit2 work for programming it?

How soon do you plan to implement the sd card bootloader? I'd like to avoid buying a pickit3 if I can, not a deal breaker just preferred.

I know you've covered somethings in other posts and such but will you provide schematics and such for aid in interfacing and such? Also what's it's current state of operation? Any sort of demo or anything that can be run currently assuming the user has a devcart? Also curious what code you'll be sharing (nes, firmware, etc).

EDIT: also curious what the EXP connector looks like.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu »

Super, SUPER awesome. :D
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

Thanks guys! Let's see...

Bootloader - I'll try to get the SD bootloader done in the next two weeks. That would be enough time to get the next batch of parts in and build another couple boards. I say the Pickit3 because the Pickit2 does not support the PIC32 chips. But hopefully I'll get the bootloader working and it will be a moot point.

Schematics - Not sure about the schematics, but I'lll definitely provide a pinout of the connectors, description of the signals and a general diagram showing the functions of each piece. I could see someone using the EXP Adapter to interface the NES with their own device. Or use the CPU board to give network capabilities to another legacy system.

Operation & Code - Right now there is a basic command set that the cart can use to tell the ENIO to open up a channel to an IP host. It's barebones but functional. You specify the IP to connect to, TCP or UDP, the port number and the virtual channel ID you want to give the connection. I'll provide the command set as well as ASM usage examples. The command set will be refined as beta testers provide feedback.

Demo - The demo I came up with is a guy walking around the DW1 overworld. Which is trivial except for the fact that the map data is not stored on the cart. It's streamed from a map server on a Linux box as the player walks around. Player moves up, map server sends another row of map tiles. Someone mentioned making a Google Maps 8-bit edition and I thought "what a waste of time!" Then I saw the Google April Fools joke they were referring to and started wondering if they had an ASCII rendering API I could integrate into the map server. :)

Connector - The EXP connector itself is the exact same as the one I used on earlier boards. I received a package yesterday with enough parts to make at least another 100 EXP connectors, so no worries there.
Early ENIO Board - Bottom
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Post by infiniteneslives »

Alright well if you can count me in. I'm more than willing to do some beta testing and look forward to it. Fair warning though, I'm no guru when it comes to networking. I know the difference between TCP/UDP and what ports are and such but don't have enough experience to be too savvy with it. Perhaps that's a good thing though, I can follow directions and provide somewhat novice problems/feedback from a networking perspective.
User avatar
noattack
Posts: 147
Joined: Tue Feb 13, 2007 9:02 pm
Location: Richmond, VA

Post by noattack »

I am REALLY happy to see this project revived.

So how would the adapter work with a game programmed to interface with it? (Sorry for the basic question, but I don't quite understand how it works.)
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

Good question. Think of the ENIO as broker. It does all the heavy lifting as far as IP communications and USB input. The NES simply tells it where to connect and how to connect to it. The NES talks directly to the ENIO over a command channel, VCID x01. USB KB data is input from VCID x02. IP sessions are dynamically assigned x10 and above. These numbers are subject to change, but the idea will stay the same.

A sample session goes like this...

Code: Select all

--- Session Startup ---
NES -> ENIO (VCID x01) HELLO
ENIO -> NES (VCID x01) HELLO

--- Check for valid DHCP or Static IP ---
NES -> ENIO (VCID x01) Have an IP?
ENIO -> NES (VCID x01) YES/NO

--- If we have a valid IP, let's connect to a server ---
NES -> ENIO (VCID x01) Connect to 192.168.1.10 on TCP port 10101
ENIO -> NES (VCID x01) Established, use VCID x10
NES -> ENIO (VCID x01) Switch input to VCID x10

--- NES sends data to server and gets reply ---
NES -> ENIO (VCID x10) <some data to server>
ENIO -> NES (VCID x10) <reply from server>

--- NES tells ENIO to close IP session  ---
NES -> ENIO (VCID x01) Close session on channel x10

--- Input some data from the keyboard ---
NES -> ENIO (VCID x01) Switch input to VCID x02
ENIO -> NES (VCID x02) 'A'   <-- User pressed 'A' last
This is a simplified version of course, but it should give you an idea of what a conversation between the NES and ENIO looks like.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu »

Any docs on the NES <-> ENIO communication protocol itself, aside from the simplified version? I'm looking for register interface details, packet formulation for things like src/dst IP address, IP vs. ICMP, IP protocol (TCP or UDP), port numbers, etc... :-)
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

Right now everything is in an Excel spreadsheet, but I'll put it up on a wiki before I send out any boards. I had it in Mediawiki on my site at one point but it got so much spam I took it down. Have to work on those security settings.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

chykn wrote:I had it in Mediawiki on my site at one point but it got so much spam I took it down. Have to work on those security settings.
These steps have ended up working for preventing spam on my own wiki:
  • Leave talk pages open to anons and new users, but require e-mail confirmation or autoconfirmed (two edits and four days) to edit pages in non-talk namespaces.
  • Use the QuestyCaptcha plug-in for ConfirmEdit and come up with questions that are relevant to the subject matter of your wiki. QuestyCaptcha has been far more effective for me than Google reCAPTCHA was.
  • Make Talk:Main Page a soft redirect to some other talk page and protect it.
  • Optionally, if you know regex, install AntiSpoof and AbuseFilter for any spam that makes it past these measures.
If you need help with setting them up in your LocalSettings.php, PM me or start a topic in General Stuff.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

tepples wrote:These steps have ended up working for preventing spam on my own wiki:
Thanks a bunch for the advice. I tightened things up a bit and re-enabled the site. I'll send you my settings file if I run into any more issues.
koitsu wrote:Any docs on the NES <-> ENIO communication protocol itself, aside from the simplified version?
This should get things started. I updated the basic project info and added more details on the CGP protocol. Still need to put up a section on buffering, though. Look for the CGP link at the bottom of the ENIO wiki...
http://enio.chykn.com

I etched and assembled another set of boards yesterday. The new CPU board has the MicroSD slot to test the bootloader. Will be working on getting that rolled into the firmware this week. A pic of the new CPU board is on the wiki under "ENIO CPU Board".
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Re: ENIO - NES Ethernet & USB KB Adapter

Post by chykn »

Posted a video on Youtube giving an initial look at the production EXP and CPU boards. Will try to post another in the next week or so with a more detailed look at the CPU board. Mostly information that's already on the project page, but presented with a twinge of southern drawl.

http://www.youtube.com/watch?v=KBSdktDG_tk
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: ENIO - NES Ethernet & USB KB Adapter

Post by infiniteneslives »

very NICE!

The cases and everything looks really good, I wasn't expecting that much polish originally. Good luck with the final touches!
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
User avatar
noattack
Posts: 147
Joined: Tue Feb 13, 2007 9:02 pm
Location: Richmond, VA

Re: ENIO - NES Ethernet & USB KB Adapter

Post by noattack »

Awesome work. Can't wait to see software up and running.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Re: ENIO - NES Ethernet & USB KB Adapter

Post by chykn »

The SD bootloader is now functioning. Still need to update the code to rename or remove the image.hex file after flashing. But, I was able to flash a fresh board with the bootloader, put in the MicroSD card with the image.hex file and within a few seconds the CPU board was up and running. Will add the cleanup code and test it out some more tomorrow. For those who wanted one of the first couple, I should be able to have them in the mail Tuesday.
Post Reply