Using PC as ROM\EPROM emulator???

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Using PC as ROM\EPROM emulator???
by on (#56022)
Can a computer\laptop somehow emulate a ROM? I mean using a cable whose one end can be connected to a computer(USB) and the other end is a 60/72 pin cartridge connector which can be inserted in an NES\Famicom.

I know that all the files stored on a computer's HD are managed by native file system. But is there a possibility for an intermediate program which translates the request/data between the nes and the computer on request?

by on (#56026)
From time to time someone mentions this idea, and the responses usually say that the multitasking nature of modern OS's prevents the computer from responding in time.

Even though computers are really fast and could theoretically decode the address and return a byte (maybe even emulating mappers), modern software is many layers of abstraction away from the hardware in order to stay synchronized with the NES.

So I guess the answer, unfortunately, is no. I'd love if someone could prove me wrong though.

by on (#56039)
You would still need hardware to emulate the mapper and store the data. So what you would end up with is a powerpak which is loaded via usb instead of from a memory card.

That would be a great dev-kit! The current powerpak is useless for developing since there are alot of steps between compiling and testing where you have to fiddle with memory cards and menus and stuff.

An usb-loaded powerpak-like device would own though!

by on (#56040)
In addition, no recent computer bus (ISA might have worked, maybe, maaaybe) has been designed for sufficiently low latency to even allow all the data to go through the computer -- googling finds http://forums.ni.com/ni/board/message?b ... ge.id=4475 which shows PCI express being closest (at ~400ns).

I mean, if the computer was fast enough to feed every memory fetch manually, you probably could do the mapper logic "for free", so, given the fictional computer that could do this, you wouldn't also need a mapper.

At that point, you're going to have a RAM cart into which you download data. I thought one already existed, though.

by on (#56041)
lidnariq wrote:
At that point, you're going to have a RAM cart into which you download data. I thought one already existed, though.

You're probably thinking of PowerPak Lite, but it needs a mod soldered onto the NES.

As for Anders_A's request: USB interfaces on carts for Nintendo systems have been done before; see EFA-Linker.

by on (#56043)
Anders_A wrote:
You would still need hardware to emulate the mapper and store the data. So what you would end up with is a powerpak which is loaded via usb instead of from a memory card.

That would be a great dev-kit! The current powerpak is useless for developing since there are alot of steps between compiling and testing where you have to fiddle with memory cards and menus and stuff.

An usb-loaded powerpak-like device would own though!


Useless? It's far from useless. Most people have no way of getting their programs to even run on the NES since they don't have a cartridge with EPROM sockets and an EPROM programmer. But I agree it would be nice if you could somehow hookup a device to the PC that would allow instant changes.

The closest thing to what you describe would be the FDS Loader though. But FDS has a much lower transfer rate than MaskROMs for NES which I think need to be 250ns.

by on (#56055)
MottZilla wrote:
Anders_A wrote:
You would still need hardware to emulate the mapper and store the data. So what you would end up with is a powerpak which is loaded via usb instead of from a memory card.

That would be a great dev-kit! The current powerpak is useless for developing since there are alot of steps between compiling and testing where you have to fiddle with memory cards and menus and stuff.

An usb-loaded powerpak-like device would own though!


Useless? It's far from useless. Most people have no way of getting their programs to even run on the NES since they don't have a cartridge with EPROM sockets and an EPROM programmer. But I agree it would be nice if you could somehow hookup a device to the PC that would allow instant changes.

I think the most usable solution for this would be to transfer the data using controller port/ports with special "mapper" running on PowerPak. The transfer speed isn't that great but for deving it wouldn't really matter that much since the PC side could watch for changes and only transfer those parts.

by on (#56057)
Maybe something similar to this is what you are after. Well maybe not, but I still think it's pretty interesting. I'm sure we could make good use of a NES version if there was a 100% accurate emulator out there.

by on (#56058)
Just thought I'd throw this out there as far as fast dev cycle times go, there is the CopyNES that uses USB. You can use the PowerPak Lite for simple mappers and I think for more complex ones you can make a custom RAM cart conversion using original mapper chips. So really if you are seriously in need the solution already is out there.

by on (#56067)
MottZilla wrote:
Just thought I'd throw this out there as far as fast dev cycle times go, there is the CopyNES that uses USB. You can use the PowerPak Lite for simple mappers and I think for more complex ones you can make a custom RAM cart conversion using original mapper chips. So really if you are seriously in need the solution already is out there.


What's the difference in PowerPak and PowerPak Lite? How much I'll have to pay to get them?

by on (#56073)
Nadia wrote:
What's the difference in PowerPak and PowerPak Lite? How much I'll have to pay to get them?

Although the PowerPak Like is more like what you wanted when you started this thread, the regular PowerPak is better for common users. The PowerPak Lite can only be used with a CopyNES, which requires some hardcore modifications to your console in order to be installed (most people that are not into electronics can't do it by themselves).

To test your programs on the PowerPak you do have to copy the files to the CF card (hat you'll be constantly moving from the PowerPak to your PC and back), so you really can't use it to test every build of your programs, but it certainly is a good tool for testing your software from time to time, while emulators are used for everyday development. You can also use the PowerPak to verify how the NES reacts to conditions that are not yet well emulated and to make sure that programs using special tricks will work on hardware.

For prices and stuff check the manufacturer's site: http://www.retrousb.com/index.php?cPath=24

Not that you will need a CopyNES (which you'll need to install yourself) in order to use the PowerPak Lite, so it's not that much cheaper in the end. Also remember that these products don't work on clones, so you need an actual Nintendo console.

by on (#56075)
[quote="tokumaru"
Not that you will need a CopyNES (which you'll need to install yourself) in order to use the PowerPak Lite, so it's not that much cheaper in the end. Also remember that these products don't work on clones, so you need an actual Nintendo console.[/quote]


That's another problen then!!!
The console I am using I think is a Famicom clone. Where would I get an original console? OR can the clone console be "fixed" so that powerpak lite works on it?

by on (#56078)
Nadia wrote:
OR can the clone console be "fixed" so that powerpak lite works on it?

PowerPak Lite requires CopyNES, and CopyNES does not work on clones. So no.

by on (#56082)
Nadia wrote:
Where would I get an original console?

Depends on where you live. In most countries where the NES was sold it's easy to find them in auction sites. If it was popular in your country, sometimes you'll even get lucky just by asking about the NES around people you know that were kids back in the early 90's, and someone will just give you one. If the NES wasn't a popular console in your country you can always find a US seller who is willing to ship worldwide. All you need to use eBay and PayPal is a credit card.

Quote:
OR can the clone console be "fixed" so that powerpak lite works on it?

No, they can't be fixed. Clones are just "close enough" replicas of the real deal, which means they are different in some areas, and these details are enough to prevent some carts with specialized hardware that depends on them to not work, including the PowerPak and games using the MMC5 mapper. And like it's been said, the CopyNES does not work on clones.

Anyway, if you are serious about programming for the NES you NEED the real console. Clones generate the wrong colors, the wrong sound, and some are even known to have timing issues, so they do not make good testing platforms for NES software.

by on (#56083)
Nadia wrote:
Where would I get an original console?


I have a few PAL-NES which looks like crap (missing game door and semi-broken top case), but they work and is compatible with copynes...

so if you are interested i could send you one if you want to pay for the shipping from sweden, don't know how much it would cost though (location: earth doesn't really help)

by on (#56107)
tokumaru wrote:
Nadia wrote:
Where would I get an original console?

Depends on where you live. In most countries where the NES was sold it's easy to find them in auction sites. If it was popular in your country, sometimes you'll even get lucky just by asking about the NES around people you know that were kids back in the early 90's, and someone will just give you one. If the NES wasn't a popular console in your country you can always find a US seller who is willing to ship worldwide. All you need to use eBay and PayPal is a credit card.

Quote:
OR can the clone console be "fixed" so that powerpak lite works on it?

No, they can't be fixed. Clones are just "close enough" replicas of the real deal, which means they are different in some areas, and these details are enough to prevent some carts with specialized hardware that depends on them to not work, including the PowerPak and games using the MMC5 mapper. And like it's been said, the CopyNES does not work on clones.

Anyway, if you are serious about programming for the NES you NEED the real console. Clones generate the wrong colors, the wrong sound, and some are even known to have timing issues, so they do not make good testing platforms for NES software.



Are there easier ways to find out if a system is a clone or the actual NES\famicom? I mean can there be systems which are exact replica of original NES\famicom in terms of hardware etc?

by on (#56111)
As far as I know there are no clones that are an exact replica. Instead of using multiple chips they use a single chip (NOAC NesOnAChip). It is much cheaper than having multiple chips, but they rely on their own programming and therefore differ from original hardware programming. The USB CopyNES requires you to desolder the original CPU and attach it to the CopyNES board, so that eliminates all famiclones/NOAC consoles.

Besides, nothing beats the accuracy and authentic feel of the original IMO.

by on (#56112)
It's possible to make a perfectly accurate single-chip NES, with CPU, PPU, and two 2Kx8-bit RAMs on one die, especially now that all mask work rights and patents on the NES have expired. But whatever firm designed the APU and PPU for the NOAC in common use simply didn't care.


EDIT: thinkos

by on (#56114)
Nadia wrote:
Are there easier ways to find out if a system is a clone or the actual NES\famicom?

It should be obvious just from looking at the console... Not many clones had the exact same appearance of the original consoles. None that I know of looked like the NES, but a few looked like the Famicom. If you can't be sure, post a few pictures of it and we should be able to tell, but I think it's highly unlikely that you'd purchase an original Famicom by accident unless you lived in Japan.

Quote:
I mean can there be systems which are exact replica of original NES\famicom in terms of hardware etc?

I know you must be a little upset to know that your console is not good for development, but accurate commercial clones simply don't exist, so that's much likely not the case. Like tepples said, it is perfectly possible to make an accurate clone, but no one has yet (at least not for selling).

by on (#56127)
Actually there are general-purpose EPROM emulators that will do exactly what you want. I'm sure there are some decent ones around now, but they've always been kind of expensive and are definitely becoming of old-fashioned by now (when I looked around I see some people use them for hacking their car/engine computer though). The one I have was made in 1992, it does 8kB to 512kB, I've had it for about 10 years. It cost me a small fortune at the time, I think almost $200, but was well worth it.

It's great because with this you can totally ditch NES emulators. Hell, I've made several unique NES boards, testing code for those on an NES emulator is not even an option. I also much rather prefer not having to alt+tab around between crap when I could just be writing the code and only have to hit 1 key and look over to see the result.

Making a devkit that's ALMOST that easy was one of the main design goals of my Squeedo project. It uses FlashROM instead of SRAM though, so it's slower to upload for the advantage of keeping it's programming (but you can load to it's 32kB WRAM if you use the right program origin). I started that project back in 2004, work stalled out while I had other real-life issues to deal with. But finally this year I will be getting some prototypes into the hands of a few certain developers. Having more software for it definitely makes it easier for me to put into production. Unlike the PowerPak, it doesn't emulate mappers, it's a 100% original design.

by on (#56133)
Memblers wrote:
[My EPROM emulator] cost me a small fortune at the time, I think almost $200, but was well worth it.

It's great because with this you can totally ditch NES emulators.

How well does your EPROM emulator support single-stepping or breakpoints or watchpoints?

Quote:
I also much rather prefer not having to alt+tab around between crap when I could just be writing the code and only have to hit 1 key

I configured Gedit on my Ubuntu laptop so that when I press F5 in a project's source code folder, it looks for a makefile in the parent folder and runs it. The default action of this makefile is to build the iNES ROM and run it in an FCE Ultra window. To go back to the editor code, I need only press Esc.

Each method has its advantages: yours works for custom mapper development, and mine works on the bus.

by on (#56154)
MottZilla wrote:
Just thought I'd throw this out there as far as fast dev cycle times go, there is the CopyNES that uses USB. You can use the PowerPak Lite for simple mappers and I think for more complex ones you can make a custom RAM cart conversion using original mapper chips. So really if you are seriously in need the solution already is out there.


Yup. That's what I use.

It would be alot neater if it all was contained in a cart though, so you didn't have to mod the NES.

I know it couldn't do all of the things a copynes can do, but for developing it would do.

by on (#56163)
tepples wrote:
Memblers wrote:
[My EPROM emulator] cost me a small fortune at the time, I think almost $200, but was well worth it.

It's great because with this you can totally ditch NES emulators.

How well does your EPROM emulator support single-stepping or breakpoints or watchpoints?


This old ROM emulator doesn't do any of that. The schematic is little more than buffer chips and an SRAM in the middle. The only special feature is that it has some wire posts for positive and negative reset. So that can be wired to the reset button for an auto-reset after upload. I'm thinking I may provide for that if I do a later Squeedo revision. But JMP ($FFFC) is enough when the program is under control.

Single-stepping the hardware would be a mess, it would definitely take some rewiring of the system. Or better yet, some logic to take over the ROM "Game Genie-style" and output a NOP/wait loop. I wonder if the PowerPak could do that. kevtris wrote a single-step mode on CopyNES, it's actually implemented as a 6502 emulator on the 6502. It certainly works well, but when it comes to disassembling or mucking around with the Program Counter I find that easy to do in FCEU or Nintendulator (because then you've got cycle-perfect video).

When I was working on Squeedo there were times when I would take certain values and print hex chars to the screen as sprites. That worked alright. Squeedo also has an LED which has been greatly useful as a debug output. Blinking, toggling, or watching it glow brighter/dimmer depending on the main loop's idle time, for example.
Quote:
Quote:
I also much rather prefer not having to alt+tab around between crap when I could just be writing the code and only have to hit 1 key

I configured Gedit on my Ubuntu laptop so that when I press F5 in a project's source code folder, it looks for a makefile in the parent folder and runs it. The default action of this makefile is to build the iNES ROM and run it in an FCE Ultra window. To go back to the editor code, I need only press Esc.


Ah, I miss using the escape key. They might as well call it the "do nothing key" in Windows. Good idea, now I should make a keyboard macro and save myself more time, heheh. :)

Quote:
Each method has its advantages: yours works for custom mapper development, and mine works on the bus.


Yep, exactly. There really is no tool that will do every job. I just like having a 2nd monitor to work with, and if it's gonna be NES work then it might as well be a TV with a real NES. :)

by on (#56251)
tokumaru wrote:
Nadia wrote:
Are there easier ways to find out if a system is a clone or the actual NES\famicom?

It should be obvious just from looking at the console... Not many clones had the exact same appearance of the original consoles. None that I know of looked like the NES, but a few looked like the Famicom. If you can't be sure, post a few pictures of it and we should be able to tell, but I think it's highly unlikely that you'd purchase an original Famicom by accident unless you lived in Japan.

Quote:
I mean can there be systems which are exact replica of original NES\famicom in terms of hardware etc?

I know you must be a little upset to know that your console is not good for development, but accurate commercial clones simply don't exist, so that's much likely not the case. Like tepples said, it is perfectly possible to make an accurate clone, but no one has yet (at least not for selling).


somehow I managed to get an old(but original) NES console. On its main board "Nintendo 1987" is printed. But the console is in a pathetic state. I will have to do the below to get it running:

1. redo the controller wiring
2. redo the power switch/reset wiring
3. clean the 72 pin connector.
4. get controllers. I have a controller(for an nes clone) but that has 9 pins in it. Can it be used with the original NES?
5. What should be the current and voltage ratings of the input adaptor for supplying power to the unit?

by on (#56252)
3. and if you still doesn't get it to work you can always buy a new one on ebay :)
4. yes they should work (found this, it might be useful: http://davr.org/snes/joystick.txt
5. 9v AC, (DC works too)

by on (#56253)
hyarion wrote:
3. and if you still doesn't get it to work you can always buy a new one on ebay :)
4. yes they should work (found this, it might be useful: http://davr.org/snes/joystick.txt
5. 9v AC, (DC works too)


nice link!! it shows the pinout of both the original and clone controllers.