16

Every NES emulator I've found runs off ROM dumps. Would it be possible to run an emulator using the original cartridges directly? It's probably not the most practical way of doing things, but the "cool factor" of plugging Super Mario Bros. into the front of your computer is definitely there.

18

You can, provided that you have a cartridge reader that you can plug to the computer that runs the emulator. One such reader is Retrode; if you google "nes cartridge reader" you will find references to more similar products, even DIY kits.

  • 3
    Beyond using the original cartridge, one nice feature of the Retrode is that it allows you to use the original controllers too... – Stephen Kitt Apr 29 '16 at 20:29
  • 3
    I wonder how they dealt with ROM mappers that were so typical in NES cartriges. – DmytroL Sep 7 '16 at 10:26
  • @DmytroL I wondered that myself. – cbmeeks Feb 2 '17 at 14:47
  • 4
    @DmytroL A cartridge reader (for any system, not just NES) just provides a way to read and write the cartridge memory from the emulator, any mapper present is an "implementation detail" of the cartridge itself that can be handled with just that capability. E.g. in MSX MegaROM cartridge mappers you write the value N to a certain address and this means "make the 8K/16K page N visible (starting at a predefined address)" - the software in the cartridge knows that and writes to that address as appropriate, the cartridge acts accordingly, and the reader doesn't need to know anything about that. – Konamiman Aug 24 '17 at 8:40
  • 2
    That's almost certainly not how the Retrode device you linked works. The interface it provides to the emulator is an emulated file system, one that the emulator reads a ROM file from just like it would read a ROM file copied onto a hard disk. This interface doesn't provide a way for the emulator send a command to the device that indicates that a value was written to a certain address. If it supports ROM mappers, then it must have specific support for each mapper in order to create working ROM file images. – Ross Ridge Nov 13 '18 at 19:01
6

It depends what you mean by "run off the real carts".

If you mean dump the cart and then immediately run the dump, that is perfectly possible, though in some cases dumping the cart requires prior knowledge of the carts internals (IIRC there is a big database of known NES carts and how to dump them).

If you mean actually reading the cart in real-time as the game runs, that isn't really practical for software emulators (though it's perfectly possible for a FPGA based reimplementation of the hardware).

The thing is emulators don't run in real-time. Some aspects of the original hardware are slow to emulate and the host OS can take away the CPU from you for far longer than the clock period of the thing you are emulating.

The solution to this is to separate "emulated time" from "real time". When emulating regular code, emulated time advances significantly faster than real time, this makes up for the inevitable stalls in emulation due to the OS, complex to emulate hardware, IO processing etc. To keep the overall execution speed correct the emulator will pause periodically (most likely once per frame).

But that renders running directly off the cart impractical, when the emulator is racing ahead it will be reading the memory very quickly, almost certainly quicker than the cart and its reader can cope with.

  • In support of this answer: Pi1541 cbm-pi1541.firebaseapp.com is a rare real-time emulator, using a Raspberry Pi to emulate the Commodore C-1541 disk drive, which is a computer in all meaningful terms with a CPU, some ROM and some RAM and various timers. A connected C64 can submit code to the C-1541 and expect real-time feedback; this emulator achieves that when connected to a real C64. To achieve that, the author had to eject the OS and write bare metal, sitting atop Circle github.com/rsta2/circle — the Pi ends up dedicated to doing exactly the one thing. – Tommy Nov 13 '18 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.