News:

Welcome to the Retrode Community Forums

Main Menu

NES plug-in prototype created and working (last update: 2016-12-11)

Started by Wannado, 02/Dec/2014 01:32:45 AM

Previous topic - Next topic

Wannado

You probably didn't expect this to happen anymore, but ...

With some help from JonY, Muzer, and of course Matthias, and using lots of information from the Nesdev website and similar sources, I designed and built a prototype of a NES plug-in for the Retrode. I also implemented experimental firmware support for this prototype. (Right now, it only exists as a branch and is not included in the standard firmware.)

I have attached a text file describing the pin assignments and an archive containing the PCB layout and schematics.
WARNING: My prototype uses a NES 72-pin connector. The PCB must be exactly 1.2 mm thick to fit into that connector. (Warning added 2015-11-08)

Firmware Features

The experimental firmware has built-in support for NES cartridges with the following boards/mappers:
NROM, AxROM, CNROM, UxROM, SxROM/MMC1, TxROM/MMC3, HKROM/MMC6.
I have successfully tested it with all of my NES games.

Auto-detection of the above boards/mappers as well as the ROM/RAM sizes is working for all tested games.

Support of many other mappers is possible by implementing small "mapper drivers", which you can load at runtime by overwriting a particular file on the Retrode's file system (retained until the Retrode is disconnected/reset).

The ROM is presented in two ways:
- As an emulator-friendly ".nes" file (original iNES format, not NES 2.0). The information in the header is incomplete (and the battery flag isn't 100% reliable), but emulators should be able to deal with it. Some homebrew or pirate carts may be too large for this format.
- As separate files for PRG ROM and CHR ROM (which may also be RAM).

Detection of whether CHR is ROM or RAM is based on the frequency of the byte values (hex) F0, E0, C0, 03, 07, 0F. This is relevant for the ".nes" file, which only includes CHR ROM, not CHR RAM, for obvious reasons.

Savegame SRAM reading and writing is supported.


Status

2016-12-11: As stated previously, everything that is possible with the plug-in prototype is implemented in the experimental firmware and works quite well, and NES plug-in development retains its slow and irregular pace. However, my hopes that I could complete it in 2016 have proven illusory. It looks like it will still take months.
If I'll manage to do anything NES plug-in related in the few days this year has remaining, I will most probably be working on the improved PCB design.


To-do List

These are the major remaining items on my to-do list:
- Design an improved PCB, aiming to simplify assembly and use of the plug-in.
- Try to integrate NES plug-in support into the standard firmware.
- Maybe build another prototype with some modifications.
- Maybe improve detection of SRAM battery, if possible.


Update 2015-01-08: PCB and schematics added; formatting.
Update 2015-04-16: MMC6 (StarTropics) now supported, including SRAM reading.
Update 2015-11-08: Warning added; to-do list updated; spelling; new features: iNES file support, CNROM tested, SEROM now auto-detected like other SxROM.
Update 2016-03-20: Status, to-do list.
Update 2016-07-03: SRAM writing is now supported, size detection and CHR RAM detection improved; battery flag issue; status, to-do list.
Update 2016-12-11: Status.

Matthias_H

https://www.retrode.org

I no longer sell the Retrode. For sales inquiries, please contact our friends at DragonBox.

nitro322

that's absolutely fantastic news.  Congrats, Wannado.  It sounds like you still have some work to do, but based on the previous discussion I've seen about this it sounds like just getting a working prototype is an incredible feat, and for my own purely selfish reasons I'm really hoping you can see this through to a final product.  :-)

For the "Implement emulator-friendly '.nes' file" part, for simplicity could you use something like the NES Cart Database XML file, which already contains details and checksums about most (if not all) known NES carts to identify the game via checksum and assemble the file as appropriate?  It seems like that'd be a fairly straightforward way to handle this part, though I'd guess it'd introduce some other challenges since embedding the whole XML file within the firmware would be rather wasteful.  Just an idea.

Nori

That's absolutely awesome. I wish Matthias would do a reprint of the Retrode and a print of this plugin too. But I guess it's not going to happen. :(

Matthias_H

There's more happening right now than you think :) Keep an eye on DragonBox...
https://www.retrode.org

I no longer sell the Retrode. For sales inquiries, please contact our friends at DragonBox.

hammer

Will you email the mailing list if anything gets released?

BTW, since I was not able to buy an Atari 2600 adapter, I am trying to make one myself. I had 10 copies of the PCB made (and if this works, I will offer the extras to whoever might need them), and I'm in the process of getting a 2600 cartridge connector. Hopefully I can solder it without screwing it up.

Nori

Awesome. Please be sure to let us know here when it's available. :p

When this gets sram support it will be epic.

Matthias_H

Quote from: hammer on 07/Dec/2014 07:12:03 AM
Will you email the mailing list if anything gets released?

BTW, since I was not able to buy an Atari 2600 adapter, I am trying to make one myself. I had 10 copies of the PCB made (and if this works, I will offer the extras to whoever might need them), and I'm in the process of getting a 2600 cartridge connector. Hopefully I can solder it without screwing it up.

Careful: that adapter didn't work for all titles. I guess 30-year-old technology has higher switching currents than Retrode's controller can handle. I have done a new design for the 2600 plug-in (with additional resistors), but it's not tested yet.

Cheers,
Matthias
https://www.retrode.org

I no longer sell the Retrode. For sales inquiries, please contact our friends at DragonBox.

Khaz

Quote from: Matthias_H on 06/Dec/2014 08:57:52 PM
There's more happening right now than you think :) Keep an eye on DragonBox...
I'm glad I checked back on the forum, I was under the impression everything had basically ground to a halt.

Is there actually a mailing list?  I would absolutely love some way to be notified of any new developments.  I don't want to risk missing another thing.

Oh yeah, and I should also say it's great to see this NES development!  Thank you very much for the work you've done Wannado!

hammer

Quote from: Matthias_H on 08/Dec/2014 09:28:40 AM
Quote from: hammer on 07/Dec/2014 07:12:03 AM
Will you email the mailing list if anything gets released?

BTW, since I was not able to buy an Atari 2600 adapter, I am trying to make one myself. I had 10 copies of the PCB made (and if this works, I will offer the extras to whoever might need them), and I'm in the process of getting a 2600 cartridge connector. Hopefully I can solder it without screwing it up.

Careful: that adapter didn't work for all titles. I guess 30-year-old technology has higher switching currents than Retrode's controller can handle. I have done a new design for the 2600 plug-in (with additional resistors), but it's not tested yet.

Cheers,
Matthias

Didn't work like it just didn't work, or didn't work like it broke the Retrode somehow??? I already spent a bunch of effort on this mini-project... :)

hammer

Quote from: Matthias_H on 08/Dec/2014 09:28:40 AM

Careful: that adapter didn't work for all titles. I guess 30-year-old technology has higher switching currents than Retrode's controller can handle. I have done a new design for the 2600 plug-in (with additional resistors), but it's not tested yet.

Cheers,
Matthias

And also, which titles didn't it work for?

Wannado

Quote from: hammer on 24/Dec/2014 03:38:02 AMDidn't work like it just didn't work, or didn't work like it broke the Retrode somehow??? I already spent a bunch of effort on this mini-project... :)
Quote from: hammer on 24/Dec/2014 03:39:13 AM
And also, which titles didn't it work for?

The way I understand it, the Retrode randomly froze when reading Atari 2600 cartridges. The theory is that the freezing is caused by high switching currents.

If the currents really exceed the Retrode's specifications, damage is possible, though no symptoms of damage have been observed yet.

I don't know which A2600 titles are affected. But even if a cartridge reads fine, the currents may still strain the hardware.

hammer

That's annoying...after I went to all this trouble to make the PCB and source the connector....but thanks for the heads up. Is any work going to be done on this anytime in the not-so-distant future?

Wannado

Quote from: hammer on 28/Dec/2014 07:54:44 PM
That's annoying...after I went to all this trouble to make the PCB and source the connector...

You might still be able to improvise something using the PCBs you had produced. Maybe you could solder the Atari connector onto one of those cheap generic single-sided 100 mil raster PCBs. There, you could attach a resistor to each address and data pin. From the other end of each resistor, run a wire to the respective SMD solder pad on your SNES edge connector PCB.

You might also connect the long (stiff) wire legs of the resistors to the SMD pads directly, without additional (flexible) wires. That might simplify soldering. On the other hand, it will make it more difficult to avoid mechanical strain of the solder joints when inserting the edge connector into the Retrode.

Add wires for VCC and GND. Do not insert resistors into the VCC and GND lines.

Carefully consider the dimensions and location of each part. Keep in mind that you want to insert the SNES edge connector into the SNES slot of the Retrode and a cartridge into the Atari connector. There must be room for that. Mind the alignment (front/back) of the connectors and cartridge.

Oh, about the resistor value: In my NES plugin prototype, I have used 470 ohms resistors for this purpose, and it worked. Since the Atari is similarly ancient technology, I guess 470 ohms could work there, too. More is probably not necessary. IIRC, Matthias told me to use at least 100 ohms.

Matthias_H

The simplest and cleanest solution is probably to sand off the solder stop (if any), use a cutter knife to interrupt the data lines, tin both ends, add a bit of flux, and bridge them with SMD resistors.

Cheers,
Matthias
https://www.retrode.org

I no longer sell the Retrode. For sales inquiries, please contact our friends at DragonBox.