Expansion Port to IDE cable adapter

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

Moderators: B00daW, Moderators

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

Expansion Port to IDE cable adapter

Post by chykn »

I built this to support a couple NES peripherals I'm working on. It's a simple adapter which allows you to use a 40-pin IDE cable with the NES Expansion port. That way you can hack an IDE cable into the breadboard of your choice and you're ready to start testing your own hardware. I excluded the Audio In, Audio Out, Video Out, Unregulated VDD as well as the duplicate pins for a grand total of 39 pins to match the IDE cable pinout. All digital signal pins are passed through.

If anyone is interested in one of these for their own hardware project, I had two enhancements in mind. One, add a 3.5mm jack to the board for Audio In. Two, put a jumper on the board so the user can select between 5v and the unregulated DC line. I've found that running my peripheral off the 5v line can cause the 7805 on the NES mainboard to heat up drastically. Running a peripheral (mine is 3.3v) with a switched regulator off the ~8v unregulated DC line helps quite a bit.

I took these shots while dry fitting it prior to soldering everything together. If you look closely you'll see that the EXP connector is in fact a cut up ISA slot. Finally found a reliable way to reduce the outer wall thickness (to ~.025") as well as separate the two sides (for .125" width) without any damage to the pins. The connector fits snugly into the EXP port and provides sufficient tension to avoid becoming dislodged. If you decide to cut your own, a digital caliper is a must have. I used this as an excuse to finally get one. :)

Image

Image
User avatar
clueless
Posts: 496
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Post by clueless »

Looks nice and clean.

I must admit, however, when my eyes scanned the title of your post, I thought that you had hooked up an IDE interface to the NES, and written demo code to read sectors from disk into the NES. (The NES CPU should be able to handle this. A similar project for the Apple IIe was completed many years ago. Just need a latch to split the 16 bit IDE bus into 2x 8bit chunks.)
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

clueless wrote:I thought that you had hooked up an IDE interface to the NES, and written demo code to read sectors from disk into the NES.
Bunnyboy has already made an IDE interface that plugs into the cartridge slot, and I've bought two: one for me and one for Nova.


What I have is called a PowerPak. CompactFlash is IDE in a different form factor.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

tepples wrote:Bunnyboy has already made an IDE interface that plugs into the cartridge slot, and I've bought two: one for me and one for Nova.
I wonder if the PowerPak can use the Cart-EXP lines? With a firmware update, could it be used to send a /CE to a particular pin (say, EXP9) when a certain address is accessed? I've never had one and don't know if the FPGA is connected to those pins.
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox »

chykn wrote:
tepples wrote:Bunnyboy has already made an IDE interface that plugs into the cartridge slot, and I've bought two: one for me and one for Nova.
I wonder if the PowerPak can use the Cart-EXP lines? With a firmware update, could it be used to send a /CE to a particular pin (say, EXP9) when a certain address is accessed? I've never had one and don't know if the FPGA is connected to those pins.
At least EXP6 is connected because that's used for expansion audio. I don't know if the rest of them are connected, though (none of the expansion pins are defined in the .ucf that comes with the PowerPak mapper dev kit).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Expansion Port to IDE cable adapter

Post by kevtris »

chykn wrote: I excluded the Audio In, Audio Out, Video Out, Unregulated VDD as well as the duplicate pins for a grand total of 39 pins to match the IDE cable pinout. All digital signal pins are passed through.

Unfortunately, I think this is an oversight. You should provide Vunreg and audio in on there too.

The unregulated voltage should pass through so you can provide your own regulators. That way the regulator in the NES won't overheat. (And if you do use regulators, I suggest using switch mode regulators so your board doesn't get hot)

The audio input would be highly useful too. Audio out.. not so much.

Maybe cut out 2 of the expansion pins to the cartridge port? There's 10 of those, so cutting it down to 8 wouldn't hurt too bad.
/* this is a comment */
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

kevtris wrote:Unfortunately, I think this is an oversight. You should provide Vunreg and audio in on there too.

The unregulated voltage should pass through so you can provide your own regulators. That way the regulator in the NES won't overheat. (And if you do use regulators, I suggest using switch mode regulators so your board doesn't get hot)
I agree. In the first post I mentioned the possibility of adding a 3.5mm jack as well as a jumper to switch between 5v and unregulated. I'd like to keep all digital lines intact if possible. Putting a 3.5mm jack on the board itself would save a pin on the IDE cable and allow for audio in without a breakout board on the other end of the IDE cable. The use of a 3-pin jumper to switch between output voltages would save another pin.

So I have three questions...
1. Would an audio in jack on the board be acceptable or does the signal need to accompany the digital lines over the IDE cable?
2. If a jack is used, is 3.5mm acceptable? I've found plenty of SMT 3.5mm jacks but no SMT RCA.
3. For the VDD line going from the board over the IDE cable, should I use a jumper to switch between 5v and unregulated?

If it would be best to include Audio In, 5v and Unregulated going over the IDE cable, I would probably eliminate EXP3 and EXP4.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris »

chykn wrote:
kevtris wrote:Unfortunately, I think this is an oversight. You should provide Vunreg and audio in on there too.

The unregulated voltage should pass through so you can provide your own regulators. That way the regulator in the NES won't overheat. (And if you do use regulators, I suggest using switch mode regulators so your board doesn't get hot)
I agree. In the first post I mentioned the possibility of adding a 3.5mm jack as well as a jumper to switch between 5v and unregulated. I'd like to keep all digital lines intact if possible. Putting a 3.5mm jack on the board itself would save a pin on the IDE cable and allow for audio in without a breakout board on the other end of the IDE cable. The use of a 3-pin jumper to switch between output voltages would save another pin.

So I have three questions...
1. Would an audio in jack on the board be acceptable or does the signal need to accompany the digital lines over the IDE cable?
2. If a jack is used, is 3.5mm acceptable? I've found plenty of SMT 3.5mm jacks but no SMT RCA.
3. For the VDD line going from the board over the IDE cable, should I use a jumper to switch between 5v and unregulated?

If it would be best to include Audio In, 5v and Unregulated going over the IDE cable, I would probably eliminate EXP3 and EXP4.
Could add a jumper for exp 3/4 and unreg+audio in as well as putting a spot for the 3.5mm input.

it'd be useful to have 5V and unreg at the same time if you had some kind of circuit that needed more than 5V to run. If you put a spot for the connector then it's there and can be stuffed if it's needed or left off if it isn't. (and you don't see SMD RCA's because they would not be strong enough. they'd break off the board when you plugged a cable in)
/* this is a comment */
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

kevtris wrote:Could add a jumper for exp 3/4 and unreg+audio in as well as putting a spot for the 3.5mm input.

it'd be useful to have 5V and unreg at the same time if you had some kind of circuit that needed more than 5V to run. If you put a spot for the connector then it's there and can be stuffed if it's needed or left off if it isn't. (and you don't see SMD RCA's because they would not be strong enough. they'd break off the board when you plugged a cable in)
I appreciate the advice. I'll go ahead and rework it to include a spot for the 3.5mm audio in jack as well as add jumpers so the user can switch between EXP3/4 and unreg/audio.

Glad you mentioned the dual-voltage thing. The ethernet adapter runs on 3.3v, but the USB KB still needs 5v. Right now they're powered from the breadboard, but on the final build one will use a switching regulator feeding off unreg and the other will feed straight from the onboard 7805.
User avatar
Memblers
Site Admin
Posts: 3902
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

Well, I was hoping to get NES Audio-out to my synth so it can mix it in there. The DAC I'll be using has stereo output (I'll probably use both channels, hard to say until I do some benchmarking) and also has an audio-in that hopefully would be good for the NES audio. Connecting it to the NES's audio-in wouldn't be all that bad, though. Both options would be ideal.

Out of the expansion port pins, do we need PRG A15 for anything? Other than redirecting it back to a cart (which also seems semi-useless) I don't think it can be used for anything, since we'll have a decoded /CE, it's just a lonely address line.

If the PowerPak doesn't have the expansion pins needed, it (and any other cart) theoretically could communicate with the device over the port at $4017 (connected to a PIC's SPI port (which doubles as a UART). NES Out1 would be SPI DI, $4017.D1 would be SPI DO, $4017 /OE would be CLK, and Out2 can be UART /CTS (allows a degree of flow-control, the PIC32 seems to be configurable for that, just one flow-control pin).

I'm kinda wondering if it would be a good idea to put the switching power suppy right there on the exp port connector, and put switched 5V and 3V through that way. Man, that's the thing that's crazy about designing this, all the deciding between which hardware goes on what board. :D Personally I'm fine either way, I want my hardware to work even without an NES, and support relatively large amounts of 5V power, so I'll have a power supply for sure.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

Memblers wrote:Well, I was hoping to get NES Audio-out to my synth so it can mix it in there.
You're right about the A15 line. Since the cart should be providing /CE over EXP5, we can use this for the audio out.
Memblers wrote:I'm kinda wondering if it would be a good idea to put the switching power suppy right there on the exp port connector, and put switched 5V and 3V through that way.
I'd like to keep it simple and refrain from putting too much on the adapter board. However, just about every MCU I've looked at lately requires 3.3v. I'm afraid someone might make the same mistake I did and use a linear regulator to get the 3.3v. Feeding a 3.3v LDO from the onboard 7805 overheated the 7805. Feeding the same LDO from the unregulated overheated the LDO. If I can save someone else that headache by adding a couple bucks to the cost, it's a good investment.

I'll go ahead and do another layout with the 3.3v switched regulator. I just got an order from Mouser with the necessary parts, so I'll work on that this weekend. One last thought - if we used EXP3 (or EXP4) for the 3.3v line, a custom cart could use 3.3v without having it's own switched regulator. The only potential problem I'd see with this would be any existing carts (PowerPak?) that are actually connected to EXP3.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris »

chykn wrote:
Memblers wrote:Well, I was hoping to get NES Audio-out to my synth so it can mix it in there.
You're right about the A15 line. Since the cart should be providing /CE over EXP5, we can use this for the audio out.
Memblers wrote:I'm kinda wondering if it would be a good idea to put the switching power suppy right there on the exp port connector, and put switched 5V and 3V through that way.
I'd like to keep it simple and refrain from putting too much on the adapter board. However, just about every MCU I've looked at lately requires 3.3v. I'm afraid someone might make the same mistake I did and use a linear regulator to get the 3.3v. Feeding a 3.3v LDO from the onboard 7805 overheated the 7805. Feeding the same LDO from the unregulated overheated the LDO. If I can save someone else that headache by adding a couple bucks to the cost, it's a good investment.

I'll go ahead and do another layout with the 3.3v switched regulator. I just got an order from Mouser with the necessary parts, so I'll work on that this weekend. One last thought - if we used EXP3 (or EXP4) for the 3.3v line, a custom cart could use 3.3v without having it's own switched regulator. The only potential problem I'd see with this would be any existing carts (PowerPak?) that are actually connected to EXP3.
The LDO was making the 7805 on the system get too hot? Just how much 3.3V were ya pulling? Unless you had LEDs or something similar on there it seems like that's quite a bit of power.

Also be sure your regulator you choose can handle up to 15VDC or so on the input (actually many LDOs cannot handle this high) since the unregulated voltage will be significantly higher than 9VDC. I calculated around 11.5V fully loaded, so it will probably read 13-14V with a light load. A 15-16V reg will probably be safe but try to find a 20V input one. Those "simple switchers" actually are quite good and an SO-8 regulator can provide at least 400-500ma without getting too hot.

Something like the LM2594M-3.3-ND from digikey will do 500ma. All you need are 2 caps, a diode, inductor and the chip. Note you must use high quality low ESR capacitors for it or it won't work too hot. Prolly cost around $7 for a complete solution in 1's, maybe $4 in 100's. I have used the 5V version of this on a couple products and it works great.

There's also another similar part.. LM2674M-3.3-ND It's the same but is 260KHz instead of 150KHz so your inductor can be a bit smaller. Otherwise about the same.
/* this is a comment */
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

kevtris wrote:The LDO was making the 7805 on the system get too hot? Just how much 3.3V were ya pulling?
I don't have an ammeter, but the 3.3v line supplies power to a PIC32 @ 80MHz as well as an ENC28J60 and ethernet magnetics. The USB keyboard runs off the 5v line.

EDIT: Found my old meter. The LDO was drawing 230mA from the 5v line and my dev board is drawing 160mA from the 3.3v line. Haven't checked how much the switched circuit is pulling from the unregulated line since I'd have to cut the trace on the PCB. Good news is that I can actually touch the onboard 7805's heatsink and not get burned.
kevtris wrote:Also be sure your regulator you choose can handle up to 15VDC or so on the input (actually many LDOs cannot handle this high) since the unregulated voltage will be significantly higher than 9VDC.
I ended up getting an AP5100 (1.4 MHz) that advertises a 4.75-24V range. There are a total of 10 components - the AP5100, 5 caps, 3 resistors, and a 3.3uH inductor. Prior to shipping, each circuit costs around $2.50 to build in single quantities. This is my first time dealing with switched regulators, so I went with the least expensive option I could find when I placed the order last week. I'm guessing the other regulators you mentioned are higher quality or have some other benefit.

Finally got the first board with a regulator assembled and running. The onboard 7805 is running MUCH cooler with the 3.3 switched regulator circuit feeding off the unregulated line. I didn't put the 3.5mm jack pads on there, but Audio In (over EXP6) and and Audio Out do run through the cable. Also, there is a jumper on the bottom left to switch between 3.3v and unregulated. The 5V line runs through the cable. EXP4 and A15 were left out altogether on this PCB.

Here are a few pics.

Board Installed
Front of board
Rear of board

EDIT 2: Learned a painful lesson about IDE cables. Use ONLY 40-wire cables. The 80-wire cables not only tie every other wire to GND, but the cable headers themselves tie pins 2, 19, 22, 24, 26, 30, 34 and 40 to GND. Apparently IDE controllers check to see if pin 34 is tied to GND to determine the presence of an 80-wire vs. a 40-wire cable. It resulted in one dead NES (overheated CPU) and messed up the lockout chip on another. Inserting any cart resulted in the 1Hz reset; disabling the lockout chip worked around the problem.
User avatar
Memblers
Site Admin
Posts: 3902
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

Ah, I didn't consider that there are no more conductors left on the cable.. I was thinking more like having the switched power in addition to unregulated. A power select jumper sounds like it'd be too easy to fry a board.

I looked up the IDC cable parts, 50-pin cables with 3 connectors (for 2 devices) could be built for around $2 each. It looks like some SCSI drives used 50-pin so they seem to be available pre-built too (not sure if there's anything physically different about them though). If you want, I could order parts and assemble a few, they're easy to do with a good tool that can press evenly. It's an option, it sounds like if this is produced then cables are going to need to come with it anyways, so 40-wire won't be much cheaper than 50-wire.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

Memblers wrote:Ah, I didn't consider that there are no more conductors left on the cable.. I was thinking more like having the switched power in addition to unregulated. A power select jumper sounds like it'd be too easy to fry a board.
At this point I'd have to agree with you. The jumper came off while I was moving stuff around and I accidentally put it on the wrong spot at first. Going with the 50-pin cable and running all the lines straight through seems like the safest idea. After smoking a NES by plugging in an 80 wire IDE cable, I'd say it's likely that someone else may accidentally do the same if given the opportunity. Using an IDC 50-pin cable should ensure this doesn't happen. I have a couple old 50-pin SCSI cables and cards I can salvage connectors from. Should be able to cut another PCB in the next couple days.

But yeah, if this idea works it might be a good idea to whip up a few cables. Do you etch & drill your own boards? If so, I'll send you the Gerber files as well as couple of the EXP port connectors I made.
Post Reply