FDS RAM Adapter - NES Version

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
FDS RAM Adapter - NES Version
by on (#174887)
As a kind of ultimate mod or challenge, I think it is quite possible today to make a NES version of the FDS RAM Adapter given the skills in the collective community. You need to put much of this inside a NES cartridge shell :

Image

The board will have to be custom designed and will probably take up 2/3rds of the cartridge shell, maybe more. However, if you do it the way I suggest that Nintendo would have done it, you can save a bit on the complexity.

First, you do not need to implement the expansion port shown in the top right of the above picture.

Second, the NES provides a system clock signal on pin 37, so you can save some space and routing there. This signal is not on the expansion connector and I believe Nintendo put it on the cartridge connector specifically for this purpose.

Third, you don't need the right-angle cartridge connector, saving space and complexity.

Fourth, you don't need to use a cable, you use the expansion pins. You have 10 pins and you need 9 signals : Audio Out, Serial In, Serial Out, $4025W.0, $4025W.1, $4025W.2, $4032R.0, $4032R.1, $4032R.2. You tie EXT7/BATT to ground to tell the adapter that battery power is always good.

Fifth, mixing happens inside the NES, so you can simplify the audio mixing circuit a bit.

The schematic for the FDS RAM Adapter is here : file:///D:/FC_HVC-FMR-01-04_05.pdf

The chief difficulty is desoldering that 64-pin RP2C33 and soldering it to a board without destroying the chip. There must be the customary space for the lockout chip. You will also need an ENIO board to route the signals from the RAM Adapter to either a disk drive or an FDSStick or similar. Take the +5v and GND from the expansion connector.

This design works for a front loader but not a top loader. For a top loader, you will need to route the cable signals to a cable, which requires a hole somewhere in the cartridge shell. You will probably need to swipe the crystal from the donor FDS RAM Adapter as well. Of course, given that you can use the FDS RAM Adapter with top loader and a 60-to-72 pin adapter and a resistor mod (vertical support strongly suggested), this would only have any real benefit for front loaders.
Re: FDS RAM Adapter - NES Version
by on (#174898)
Great Hierophant wrote:
The board will have to be custom designed and will probably take up 2/3rds of the cartridge shell, maybe more.
Nah, it'll be roughly the same size as a TKROM board.

Quote:
Fifth, mixing happens inside the NES, so you can simplify the audio mixing circuit a bit.
Uh... mixing happens inside the expansion port. Whether you use an ENI/O or a permanently-attached resistor, or even put a real FDS drive on the expansion port...

Quote:
The schematic for the FDS RAM Adapter is here:
http://green.ap.teacup.com/junker/119.html

Quote:
The chief difficulty is desoldering that 64-pin RP2C33 and soldering it to a board without destroying the chip.
Even though it's DIP, hot-air rework stations are still up to the task. This really just comes down to having the right tools.
Re: FDS RAM Adapter - NES Version
by on (#174901)
Quote:
file:///D:/FC_HVC-FMR-01-04_05.pdf
Can't link local files like that, chummer.
Re: FDS RAM Adapter - NES Version
by on (#175570)
I think it would just be easier to design a dongle that lets you connect the RAM component to the pin connector of the NES. Not to discourage the idea here, because it would be neat and I'd like one, but the fact it hinges on harvesting chips from an already working RAM adapter pretty much kills the likelihood of any large scale production.
Re: FDS RAM Adapter - NES Version
by on (#175577)
... You mean like this?

The right-angle connector in the FDS base, combined with the long NES cartridges and the door on the front-loader's enclosure, basically ruins any practical chance on using it on a front-loading NES without extensively modifying the NES itself.

As a result, you may as well re-engineer the whole thing at that point, it's really not that hard to get a solder pot or a hot-air rework station to move the 2C33 and two/five RAMs over.
Re: FDS RAM Adapter - NES Version
by on (#176071)
I had plans to make something like this, where I'd cut down or rebuild the FDS adapter to fit in an NES shell, wire up the cart slot, and fit one of Loopy's FDS boards in there too.
Re: FDS RAM Adapter - NES Version
by on (#176090)
Look up a 'Honey Bee Family Adapter'. It would be simpler to wire an extension from a 60 to 72 pin adapter for the same effect, basically.

I've been tempted to cut a ram adapter down into a NES cart too for myself, you can get yellow plastic shells, think how appropriate that would be to slap a pair of Diskun eyes on the face of it.
Re: FDS RAM Adapter - NES Version
by on (#180463)
I have been thinking about this also. And working toward a solution. I like the FDS a lot. I like Nintendo too, and electronics...

I've been learning Verilog for almost a year now. It is much fun. So I wanted to do something cool (in my opinion) with my new knowledge. Of course, first thing to mind is "better FPGA cartridge!"...yeah, we're working on that, but it's not so exciting (lacking innovation). I wanted to make a RAM Adapter for the NES. This project started as just an idea...I began checking on various things for the project; such as that cable used to connect to the disk drive, how to actually route the cable (expansion port is nice...), what types of "extras" can something like this have. Lots of positive feelings about the project at this point, so I pulled out my FPGA dev board and opened up ISE...

Some weeks later, I have a fully functioning (minus the sound) RP2C33 implementation. I have tons of ideas for the thing. Like disk emulation built-in, disk duplication features, NSF player...what else?

The BIOS is an issue, there will be an SD card slot on the cartridge. Used mainly for storing the disk images for the built-in disk emulation solution ("Magic Wild Card Pro"), but will also be the place where the user provides a disk system BIOS file.

Just for fun a made a video of the thing hooked up to my CopyFami, and I load some games with it.

https://youtu.be/ZzIYUHOwfPo
Re: FDS RAM Adapter - NES Version
by on (#180465)
Has anyone documented all entry points into the FDS BIOS used by commercial games and which are timing-sensitive? The possibility that a game might jump into the middle of a routine is the big barrier to just pulling a Compaq.
Re: FDS RAM Adapter - NES Version
by on (#180466)
tepples wrote:
Has anyone documented all entry points into the FDS BIOS used by commercial games and which are timing-sensitive? The possibility that a game might jump into the middle of a routine is the big barrier to just pulling a Compaq.


The list on the wiki page https://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System and the list in Brad Taylor's document are all that I've ever encountered messing with the FDS bios some years ago. I managed to get HLE bios stuff working for most of the games out there with my emulator nesemu2. You can see my HLE code which gets most games working. The issue that i stopped at was the bios call $EC22 which does some strange logic i never reversed, which prevents that strange mario brothers with the same image on the screen as that one rice seaweed packet flavoring things I used to get from my Japanese aunt as a kid. Wow, I really got off there.
Re: FDS RAM Adapter - NES Version
by on (#180472)
Was going to ask what the pinout for the cable was, then checked the wiki, found it wasn't there, found that the schematic on http://green.ap.teacup.com/junker/119.html pointed at a text file back here with the parodius version of http://nesdev.com/FDS%20technical%20reference.txt whch DID have it, so I put it on the wiki
Re: FDS RAM Adapter - NES Version
by on (#180481)
deadbody wrote:
Some weeks later, I have a fully functioning (minus the sound) RP2C33 implementation. I have tons of ideas for the thing. Like disk emulation built-in, disk duplication features, NSF player...what else?
https://youtu.be/ZzIYUHOwfPo


All of those are good ideas, but an FDSStick does disk emulation and disk duplication. Ultimately what we need is an accurate PR2C33 hardware implementation. Loopy, krikzz and kevtris, in the NES Powerpak, Everdrive N8 and the Hi-Def NES all tried hard but their solutions are lacking.
Re: FDS RAM Adapter - NES Version
by on (#180485)
Do you have specifics, or is it simply the general "we need a delayered/RE'd RP2C33 and nobody's funded/done it yet"?

Hmm, no 2C33 pinout on the wiki, other than bits from an old doc. The schematic upthread on junker has one, though.

Though, it would seem like a Japanese enthusiast would get there first, if there's a corresponding central community, simply because they need not import to get the Famicom, FDS…
Re: FDS RAM Adapter - NES Version
by on (#180502)
I'm pretty certain that the problem GreatHierophant referred to in the FDS is the sound simulation ... so deadbody having not touched that part yet just leaves a big question mark for now.

I'd arbitrarily assume that the "solution" is implementing the sound using only nsfplay as reference, and not the other subtly-wrong documents about how the FDS audio works.
Re: FDS RAM Adapter - NES Version
by on (#180504)
Yes, I was referring specifically to FDS Audio and its modulation unit. No one has documented how it works in hardware and games like Bio Miracle Bokutte Upa require an exacting simulation or they will not sound correct. That game sounds wrong in all three devices I mentioned.
Re: FDS RAM Adapter - NES Version
by on (#180505)
Great Hierophant wrote:
Yes, I was referring specifically to FDS Audio and its modulation unit. No one has documented how it works in hardware and games like Bio Miracle Bokutte Upa require an exacting simulation or they will not sound correct. That game sounds wrong in all three devices I mentioned.

Bio Miracle was a challenge to get working, but it's not "undocumented" at this point. Specifically, I documented it on the Wiki 3 years ago: Wiki: FDS audio

The PowerPak has the "excuse" of not having an official update in 6 years. Don't ask me why Krikzz or Kevtris didn't get it right, they may have been using older information for reference, or maybe just didn't test Bio Miracle.
Re: FDS RAM Adapter - NES Version
by on (#180510)
No reason it can't be fixed. There are emulators that do it right. I didn't have a good reference back when I wrote it. I've dusted off my powerpak, look for an update in a day or two.
Re: FDS RAM Adapter - NES Version
by on (#180513)
The usual problem with Bio Miracle is to do with $4085.

A lot of emulators that seem to get it right are treating $4085 as a modulator phase reset, which does not happen, but it works around a different problem. Bio Miracle is the only game I know of that will try writing $4085 when the modulator is not halted (via $4087). It writes it very soon after $4087 resumes the modulator, so in accurate emulation the modulator will not have time to tick and get out of tune before $4085 is supposed to reset it.

The code for NSFPlay's FDS emulation should be an accurate reference for this, but sadly its CPU synchronization is not accurate enough for it, so it has an option for the $4085 phase reset hack on by default. ;P I plan to improve CPU synch in a future version. (Currently it ticks the audio units for 1 sample, then ticks the CPU for an equivalent number of cycles, and unless high oversampling is used it's not good enough to meet Bio Miracle's tight timing constraints). So... the FDS part of the code is fine, I think?

I don't know in which ways the existing FPGA emulations are failing, but it might be that they're correctly implementing $4085 as not resetting the phase, but don't synchronize the timing? Not sure. Might also be that $4087 halt needs to reset the time until next modulator tick, which is important for giving Bio Miracle enough time to slip in the $4085 write before the tick.


Also worth noting that the wrapping behaviour of the modulator is different than used to be believed, mostly that it goes from -64 to 192, rather than -128 to 128. The details of this are on the wiki page.
Re: FDS RAM Adapter - NES Version
by on (#180517)
rainwarrior wrote:
The usual problem with Bio Miracle is to do with $4085.
...

Anything specific I should be listening for? (NSF track / SFX to use as a test case?)
Re: FDS RAM Adapter - NES Version
by on (#180526)
I don't have any references to check it against, but my NSF player appears to handle Bio Miracle correctly. I use (slow) single-cycle emulation, so the timing should be accurate at least.

Source attatched, in case it helps. Note that reads from $4090 and $4092 are handled elsewhere, and are very important for correct emulation. They return fds_audio.vol_gain and fds_audio.mod_gain in the low 6 bits, respectively.
Re: FDS RAM Adapter - NES Version
by on (#180527)
loopy wrote:
rainwarrior wrote:
The usual problem with Bio Miracle is to do with $4085.
...

Anything specific I should be listening for? (NSF track / SFX to use as a test case?)

Track 2 in the NSF, about 12 seconds in you'll hear pitches constantly sliding up if it's doing the "wrong" thing.
Re: FDS RAM Adapter - NES Version
by on (#180529)
For loopy's benefit (and anyone else that comes across this thread).
Re: FDS RAM Adapter - NES Version
by on (#180947)
Funny enough, I've been working on something like this for a few weeks now. I've got an adapter board done that you should be able to use to replace the right-angle connector and then use a low-profile FC/NES adapter to connect it to the NES, manually wiring the cable connections o the exp pins. Since I was just using it for testing I only gave it a Famicom connector, but now that I know there's a schematic about I could just go ahead and make a nicely-sized NES board for it. My main question is whether or not I keep the 2C33 route for the audio mixer intact to get the FDS lowpass or just leave it as raw 2C33 output to pin 54.

Image
Here, everything above the blue line can be removed.
Image
Re: FDS RAM Adapter - NES Version
by on (#188089)
Hi,
Sorry to bump the topic. But I've been searching all over for something like this and just want to say I'm really happy that some of you are actually working on an NES FDS repro cart!

I was actually looking online to see if anyone can help me mod my FDS Ram Adapter to put an fdsstick/fdsemu inside it to eliminate the wired dongle. And at the same time wondering if someone can work that into a Famicom or NES cart.

If any of you have this for sale, or a service for the modding, please let me know! I'll be happy to pay for a product or service of this!

Thanks everyone! :)

8.bit.fan
Re: FDS RAM Adapter - NES Version
by on (#189992)
The best solution is to re-create a PCB on NES cartridges, integrate FDS Stick or similar
Re: FDS RAM Adapter - NES Version
by on (#229902)
I've been thinking about this and finally have a little bit to show.

https://twitter.com/muramasa_ninja/stat ... 4709395456
Re: FDS RAM Adapter - NES Version
by on (#229903)
Looks like you did the transplant I'd expect. How did you choose to map EXP pins to 2C33 signals?
Re: FDS RAM Adapter - NES Version
by on (#229905)
lidnariq wrote:
Looks like you did the transplant I'd expect. How did you choose to map EXP pins to 2C33 signals?


Yeah more then a transplant is a bit out side of my skill range at the moment. I went ahead and made the board with footprints for the 4 dram version or the single dram version. That way no matter which fds ram cart I get it should work for me. I mostly wired them up according to what I thought would be easy to route here is how they turned out.

EXP0=$4032.R1
EXP1=$4032.R2
EXP2=$4025.W1
EXP3=$4025.W2
EXP4=SER.OUT
EXP5=SER.IN
EXP6=AUDIO
EXP7=$4025.W0
EXP8=$4032.R0
EXP9=BATT

I also did jumpers so I can connect Audio to EXP9 in the case I want to do a cartridge that will work with a Top Loader.
Re: FDS RAM Adapter - NES Version
by on (#229926)
I remember playing with that FDS RAM adapter on a Famicom with CPU (UA6527P), PPU (UA6538) and crystal (26.601712MHz) replaced from a Dendy and it immediatelly hang out after showing the loading screen, so be prepared that it might not work on PAL console without modification of the FDS Bios.
Re: FDS RAM Adapter - NES Version
by on (#229931)
muramasa wrote:
I've been thinking about this and finally have a little bit to show.

https://twitter.com/muramasa_ninja/stat ... 4709395456


Too modest! This is great work and rather gratifying for me as it goes a long way to confirming my original theory of how a(n) NES Disk System would have worked.

I see that bakuten has also done an adapter for Famicom, but I'm trying to make sense of it. http://bakutendo.blog87.fc2.com/blog-entry-319.html Why make a straight through 60-pin version when the original right angle version works fine in just about any 60-pin console ever made? Also, his board doesn't have holes for the unusual single DRAM chip Nintendo used in the later revisions of the FDS RAM Adapter which replaced the standard four DRAM chips.
Re: FDS RAM Adapter - NES Version
by on (#229955)
krzysiobal wrote:
I remember playing with that FDS RAM adapter on a Famicom with CPU (UA6527P), PPU (UA6538) and crystal (26.601712MHz) replaced from a Dendy and it immediatelly hang out after showing the loading screen, so be prepared that it might not work on PAL console without modification of the FDS Bios.


Thanks for the heads up! I don't actually own a PAL console but it is good information to have.

Great Hierophant wrote:
Too modest! This is great work and rather gratifying for me as it goes a long way to confirming my original theory of how a(n) NES Disk System would have worked.


Thanks! Yeah I still have a ways to go on it and things to test.

Great Hierophant wrote:
I see that bakuten has also done an adapter for Famicom, but I'm trying to make sense of it. http://bakutendo.blog87.fc2.com/blog-entry-319.html Why make a straight through 60-pin version when the original right angle version works fine in just about any 60-pin console ever made? Also, his board doesn't have holes for the unusual single DRAM chip Nintendo used in the later revisions of the FDS RAM Adapter which replaced the standard four DRAM chips.

Bakuten's adapter was designed to work with portable Famicom systems, or any other famicom that has a deeper spot for the cartridge. He talks about it here.
http://bakutendo.blog87.fc2.com/blog-entry-319.html