Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: NES to USB side project  (Read 12078 times)

0 Members and 1 Guest are viewing this topic.

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
NES to USB side project
« on: December 27, 2004, 11:50:30 pm »
Well my wife's starting to really get the arcade bug (or at least the Super Mario Brothers bug) so I took some time off from building my cabinet to put together something to let her use original NES controllers to play games on her laptop.

walls83

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:July 10, 2017, 02:58:45 pm
  • beer is good
Re: NES to USB side project
« Reply #1 on: December 29, 2004, 09:24:51 am »
Ill take two!
"A true warrior enters the arena with all his powers at the ready." ~ Gouki

spiffyshoes

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 620
  • Last login:September 20, 2015, 01:24:46 pm
Re: NES to USB side project
« Reply #2 on: January 01, 2005, 09:57:14 pm »
Wow thats way cool!

Is there a tutorial on how to do this, or could you make one?

How exactly did you connect the encoded signals from the NES pads to the keyboard?
Is there any chance this could be done with a NES 4-Score?

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #3 on: January 02, 2005, 12:52:25 am »
Wow thats way cool!

Thanks!

Is there a tutorial on how to do this, or could you make one?

It's just something I worked out on my own.

maraxle

  • Guest
  • Trade Count: (0)
Re: NES to USB side project
« Reply #4 on: January 02, 2005, 09:10:23 am »
If you're wiring controller 1 to a row on a keyboard encoder, and controller 2 to another row, aren't you potentially going to run into blocking/ghosting issues?  Or did you pick them out in such a way that it won't be an issue?

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #5 on: January 02, 2005, 09:20:27 am »
If you're wiring controller 1 to a row on a keyboard encoder, and controller 2 to another row, aren't you potentially going to run into blocking/ghosting issues?

spiffyshoes

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 620
  • Last login:September 20, 2015, 01:24:46 pm
Re: NES to USB side project
« Reply #6 on: January 02, 2005, 01:58:01 pm »
Cool, thats what I figured you did.

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #7 on: January 03, 2005, 12:30:37 am »
I think it might be possible to build a convertor from 4-score to USB but it would have to be a totally custom job and probably pretty expensive if you ended up using an IPAC4 or equivalent to handle all the inputs.  I guess you'd also have to hack up a broken NES for the female connectors too.  I couldn't find anyone selling NES extension cables.

spiffyshoes

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 620
  • Last login:September 20, 2015, 01:24:46 pm
Re: NES to USB side project
« Reply #8 on: January 03, 2005, 10:37:20 am »
Why would you need more female conectors?  Is the 4 that come on  the 4-Score not enough?  I don't think an IPAC would decode the signals either.  I thought the IPAC was an encoder not a decoder.  Also there is a guy on ebay who sells NES extension cables for $5 each.
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&category=41045&item=8142612449&rd=1&ssPageName=WD1V

This is a picture of a 4-Score
http://www.sealiecomputing.com/retrozone/images/fourscore1_large.jpg

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #9 on: January 03, 2005, 01:04:46 pm »
Sorry there's some misunderstandings going on here.

starnix17

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:December 19, 2011, 11:00:29 am
Re: NES to USB side project
« Reply #10 on: January 19, 2005, 07:19:29 pm »
Would it be possible to make a USB SNES controller doing this?

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #11 on: January 19, 2005, 09:19:22 pm »
A SNES only has two extra buttons right?  If so, you could do the same thing.  The keyboard I used had several extra inputs I didn't use.

quadmasta

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 214
  • Last login:May 18, 2022, 03:23:00 pm
    • Approximate Arcades
Re: NES to USB side project
« Reply #12 on: January 20, 2005, 12:06:20 am »
A SNES only has two extra buttons right?  If so, you could do the same thing.  The keyboard I used had several extra inputs I didn't use.

4 extra: L, R, Y, X

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #13 on: January 20, 2005, 05:36:51 am »
So it needs 4 inputs for the directional pad, select, start, A, B, L, R, Y, and X?

That should still work.  My keyboard had 14 rows and 14 columns.  Using a row for each controller common you get up to 14 inputs per controller.

starnix17

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:December 19, 2011, 11:00:29 am
Re: NES to USB side project
« Reply #14 on: January 20, 2005, 08:25:14 am »
One more question, doesn't keyboard require a wire on both sides of the encoder to get input? I can't tell from the picture, but it looks like the VGA connector only has one wire coming out of each pin thingy going to the encoder (I've never worked with any other inpput other then a keyboard so correct me if I'm wrong).
.::Edit::.
How did you figure out where to solder those wires (on the NES controller)?
« Last Edit: January 20, 2005, 09:05:40 am by starnix17 »

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #15 on: January 20, 2005, 12:40:01 pm »
One more question, doesn't keyboard require a wire on both sides of the encoder to get input? I can't tell from the picture, but it looks like the VGA connector only has one wire coming out of each pin thingy going to the encoder (I've never worked with any other inpput other then a keyboard so correct me if I'm wrong).

If I understand you correctly the two wires on the right side of the encoder are what you're looking for.

starnix17

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:December 19, 2011, 11:00:29 am
Re: NES to USB side project
« Reply #16 on: January 20, 2005, 03:36:00 pm »
Ok... now I understand everything. I might give this a try since I have most of the parts around. Would it be possible for you to show me a drawing or something so I don't have to map out the switches?

dweebs0r

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 944
  • Last login:January 16, 2025, 02:40:36 pm
  • Ascendo tuum!
Re: NES to USB side project
« Reply #17 on: January 20, 2005, 04:20:56 pm »
Any chance of you building some of these and selling them?

I just want to hook up 2 snes controllers to my Linux PC and I like the looks of this.

I may break down and buy the 2 adaptors from the Lik-Sang website if noone is interested in putting together something like this.

--Dweebs

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #18 on: January 21, 2005, 12:58:38 am »
Would it be possible for you to show me a drawing or something so I don't have to map out the switches?

I don't have a SNES controller so I can't be much help there.

starnix17

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:December 19, 2011, 11:00:29 am
Re: NES to USB side project
« Reply #19 on: January 22, 2005, 12:50:23 pm »
I might give that a try. I probably won't get the parts today thought, big snowstorm

starnix17

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:December 19, 2011, 11:00:29 am
Re: NES to USB side project
« Reply #20 on: January 27, 2005, 08:35:25 am »
Finnally got the parts last night so I'll probably start it later on when I'm not busy.

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Re: NES to USB side project
« Reply #21 on: February 02, 2005, 10:20:10 am »
Finnally got the parts last night so I'll probably start it later on when I'm not busy.

I'll be curiously wathcing this thread.  I'd like to build a usb controller for NES, SNES, SMS, Genesis, Intellevision, Colecovision and Atari controllers.    I have no experience with soldering, and I only own a couple of those controlelrs already so I've been putting off starting.   I'm working on my arcade controller first also!  No soldering with the iPac and quick disconnects!

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Re: NES to USB side project
« Reply #22 on: February 02, 2005, 10:47:12 am »
Here's a side thought.  Could a PC USB gamepad be hacked to connect to a Nintendo/Atari/Sega style female connector?  You could put the gamepad in a project box and wire the female connectors in parallel so that you would just need to plug in the type of controller you want to use to the appropriate port and go to it. 

Any comments?

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #23 on: February 02, 2005, 12:17:30 pm »

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Re: NES to USB side project
« Reply #24 on: February 02, 2005, 12:35:25 pm »


Yes that should work just fine and be fairly cheap and simple.

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: NES to USB side project
« Reply #25 on: February 02, 2005, 01:05:52 pm »
Do you know if the PIC16C74 micropossecors are easy to find elsewhere?  Maybe radio shack or a local electronics store?

You'd have to have a pretty good local electronics store for it to carry microcontrollers.  Radio Shack sells some Basic Stamp kits but no PICs as far as I know.

If you don't specifically need the C74 there are some cheap ($3) one-time programmable PICs at http://www.allelectronics.com.  If you do specifically need the C74 (maybe because you aren't up to adapting code to another PIC) you can get the 16C74A and 16C74B versions at suppliers like http://mouser.com or http://www.digi-key.com

But for the prices you'll pay for the one-time programmable (C) versions, you could as easily buy the reflashable version, the 16F74.  There's not much reason to buy non-flash PICs in small quantities any more.  The price advantage has pretty much disappeared.
---GEC

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Re: NES to USB side project
« Reply #26 on: February 02, 2005, 01:21:01 pm »
Thanks for the reply tetsujin.  Unfortunately everything you said went right over my head.  it's all greek to me.  Maybe this noob is better left to hack a gamepad or just order the kit from Retrozone!

Thanks again.

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: NES to USB side project
« Reply #27 on: February 02, 2005, 02:56:42 pm »
Thanks for the reply tetsujin.  Unfortunately everything you said went right over my head.  it's all greek to me.  Maybe this noob is better left to hack a gamepad or just order the kit from Retrozone!

Thanks again.

Maybe this will be clearer.  First, what is the 16C74 for?  I don't think I got that part.

As for the other stuff, it boils down to a few things.

- PIC chips with "C" in the number are either programmable just once, or some are reprogrammable but you have to erase them with UV light.  These chips are generally older types.  The Flash types with "F" in the number can be re-programmed repeatedly.  If you buy a PIC it's usually better to get flash.  (A 16F74 will otherwise be equivalent to a 16C74)

If you have PIC code already available to you that's written for the '74, then you should probably get the F74.  Otherwise, if you're writing your own code, you should probably get one of the higher-end PICs (usually start with 18F instead of 16F) as these work better with C compilers and such if you're not assembly-inclined.

If you're interested in learning more PIC stuff I can point you to a few resources.  But if you're not set up to work with PICs, and not looking to learn about PICs, then probably the options you mentioned (Retrozone or gamepad hack) are the way to go.  Neither option is terribly expensive and both are pretty straightforward.  :)

The retrozone circuit will let you connect an unaltered NES controller.  For a USB gamepad hack you would need to remove the NES controller's internal 4021 chip as Samstag did.  (The 4021 is a serial encoder that allows the NES controller to use fewer pins in its controller connector.)  There are some old controllers that aren't encoded at all, so you can hook up to them without a decoder and without altering the controller: Atari/Commodore joysticks and Sega Master System controllers are all simply wires connected to switches.  If you want to hook up NES, SNES, or Genesis controllers without having to alter them, Retrozone's probably the easiest way.

For SNES, at least, there's also a cheap adaptor you can buy:
http://www.lik-sang.com/info.php?category=183&products_id=4234&

There may be other pre-made USB adaptors out there for other consoles' controllers...  I'm not really sure.
---GEC

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Re: NES to USB side project
« Reply #28 on: February 02, 2005, 03:32:07 pm »

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #29 on: February 02, 2005, 03:46:54 pm »

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: NES to USB side project
« Reply #30 on: February 02, 2005, 04:29:01 pm »
First, what is the 16C74 for?  I don't think I got that part.

According to this web site the 16C74 is the main piece of hardware in the Retrozone kit.

Ah, I see.  It's a typo.  I was confused about that because the 16C74 isn't a USB chip.  It must be the 16C745 (which, unfortunately, has no flash version..).  Thanks for the link, though.  It's nice to have a little more information on the Retrozone controller and how it's used.

(In case it wasn't clear before - the 16C745 is a general-purpose device.  To use it to interface gamepads to the computer you need to load the right software into its ROM.)

Damnit, now I want to make a USB gamepad out of an NES controller.  :)  (I should've bought more USB microcontrollers when I placed my order...)  I guess it's contagious or something.  I didn't really think I would want an NES gamepad for the PC given that I already have PSX->USB interfaces and such...  but now it seems like a really fun idea.

Quote
The retrozone circuit will let you connect an unaltered NES controller.  For a USB gamepad hack you would need to remove the NES controller's internal 4021 chip as Samstag did.

Ok, here's where I get confused because the above referenced web site and as far as I can tell Samstag USB keyboard hack didn't involve removing the internal chip from the NES controller.  It appears that the signals from the controller were captured by the chip before reaching the PC.  In the web example they were captured inside of the box of the controller by the 16C74 before being sent down a soldered on USB cable.  In Samstag's box, the signals were sent down the original NES cable to a new connector then captured by the chips in the hacked USB keyboard.

In reply #5 he shows a picture of the NES controller's insides.  The place where the 4021 should be is empty, with wires connected out of it.  Plus he's replaced the NES controller connector and cable with a VGA-type cable.  If you look at the picture the board also shows where the original cable attached to the circuit board at the top-left: his altered controller has the VGA cable connected to the holes where the IC was.

Quote
There are some old controllers that aren't encoded at all, so you can hook up to them without a decoder and without altering the controller: Atari/Commodore joysticks and Sega Master System controllers are all simply wires connected to switches. 

I did notice that the SMS pin-out was different.  Would I be able to connect one of these controllers directly to my serial or parallel port after wiring on a new connector?

I found a lot of good information on this web site: Deathskull Labs

Thanks again for you time in explaining all this.

The serial port would need some interfacing circuitry.  It doesn't have enough input lines to interface with an SMS or Atari controller.  With the right software on the PC side you might be able to hook up a serial controller like the NES/SNES/PSX/etc. without much difficulty - maybe just by translating the voltage levels from one side to the other.  But I don't know if anyone's written the software to do that, and from what I understand  when people try to use them for things like this it may work on one machine's COM ports but not on another.

But now that you mention the Parallel port, you can, in fact, wire all sorts of game controllers to a PC printer port.  There are drivers online as well as hook-up instructions.  Supposedly you can connect up to five PSX or SNES control pads to a single port and use them in Linux or Windows as game devices.  I think the Windows driver was "DirectPad Pro"  I know it was compatible with other console gamepads, too, including old Atari and SMS stuff, NES, etc.

http://www.arcadecontrols.com/Mirrors/www.ziplabel.com/dpadpro/

I say "Supposedly" because I once tried this to get a PSX controller going (in Linux) and I couldn't get it to work.  I think it depends on your system, maybe has something to do with what chipset drives your parallel port.  I was very happy when I got my first PSX->USB converter and it just worked with no effort.  :)  It might be worth your time to try a DPP interface, it doesn't require too many parts - just keep it real simple on the first try so that if it doesn't work it's not a big deal.  Hook it up in such a way that if you need to change things, you can.  Then, if it works, you can make it more permanent...
---GEC

jcroach

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 444
  • Last login:March 01, 2012, 09:36:56 am
  • I'm a llama!
Re: NES to USB side project
« Reply #31 on: February 02, 2005, 05:16:20 pm »
Look up near the top of the post where I added a photo of the internals of the USB box and the controller.

fitzy

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:January 11, 2012, 12:47:52 am
  • I want to build my own arcade controls!
Re: NES to USB side project
« Reply #32 on: February 05, 2005, 03:25:33 am »
Wow this is a great thread.
I've been doing some research myself and stumbled across this.

Similar to jcroach, I've been looking at ways to connect snes/atari/etc controllers to usb.

fitzy

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:January 11, 2012, 12:47:52 am
  • I want to build my own arcade controls!
Re: NES to USB side project
« Reply #33 on: February 07, 2005, 02:38:36 am »
Still looking.

Samstag

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1378
  • Last login:December 16, 2016, 01:41:19 am
  • That's not a llama!
Re: NES to USB side project
« Reply #34 on: February 07, 2005, 06:07:14 am »
The Clock/Strobe is still a little bit of a grey area for me?

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: NES to USB side project
« Reply #35 on: February 08, 2005, 08:18:23 pm »
I'm not a EE or even all that familiar with building circuits but was researching anyway.

...

The Clock/Strobe is still a little bit of a grey area for me?  Please help if you can.

Hi,

Nice work so far, though I don't know enough about the ICs involved to say if it'll work.  :)

Maybe this'll help a bit:
http://www.airborn.com.au/8051/2wio8051.html

It's a circuit somebody designed for serial-to-parallel I/O for a microcontroller that uses 4021's for input and 4094's for output.  Especially good is the play-by-play of the circuit at the bottom.

I'm not sure what your question is about strobe.  I've been trying to figure out the circuits, and here's what I've got so far.

The 4094 is a "shift register".  That means that as data comes in, it's "shifted" down the line.  So when the first bit comes in, it'll land in bit 0.  When the next bit comes in, the bit in bit 0 will be copied to bit 1, and the bit in bit 0 will be set from the serial input.  That continues down the line until it spills off into the 4094's serial output (which in your circuit is daisy-chained to the next 4094's serial input).

However, the parallel outputs of the 4094 are not tied to the values in the buffer.  They're inactive unless "output enable" is high, and their values only change (to reflect what's in the buffer) when "strobe" is high.  So on the 4094 side, you want to put "strobe" each time exactly 16 bits (for the SNES) have been read from the controller.

The 4021 is also a shift register, but instead of having a strobe which copies the values of the buffer to a set of parallel outputs, it has a "Parallel/Serial select" line which allows you to copy a set of parallel inputs into the register's buffer.  When the line is high, the register's value matches what's on the inputs.  Then, when the line goes low again, the data shifts down the line with each clock pulse, from the 4021's serial input into bit 0, up the line to bit 7, and out the serial output.

So to drive the NES or SNES controller, you need to set the P/S line high momentarily, and drive the clock while monitoring the data line.  To use the 4094's to turn this into parallel data, you need to use the same clock, stream the data into the shift register buffer, and then when the right number of bits have been read in, strobe the 4094 outputs to match the buffer contents.  Then repeat.  (Note that the 4021 strobe and 4094 strobe may happen at the same time because the process repeats...)

I'm not sure when the strobe is supposed to happen relative to the clock signal...
---GEC