Cartridge Emulator?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Cartridge Emulator?
by on (#228388)
We have console emulators and there are devices that pretend to be cartridges using flash ram but why we don't actually have such a thing as a cartridge emulator? Is this at all possible to have something like an Arduino or Raspberry Pi loaded up with a ROM image via SD card/USB to emulate a full blown cartridge including enhancement chips?
Re: Cartridge Emulator?
by on (#228389)
I think flash cartridges do more or less that, emulate the cartridge and some mapper chips, on the NES' case.
With Raspberry Pi there's something like this that sounds like what you're asking.
Re: Cartridge Emulator?
by on (#228390)
You don't see full software emulation of the big five coprocessors (DSP-1, CX4, GSU, SA1, S-DD1) because there's too much latency. The S-CPU expects the memory to respond within 120-200 nanoseconds, a deadline that I'd be surprised if an ARM SOC can guarantee. As far as I'm aware, only an FPGA can respond that fast.
Re: Cartridge Emulator?
by on (#228391)
There is a ROM emulator for the Atari 2600 that just uses an ARM CPU ("Harmony Cart"). However:
1- that ARM CPU runs at 70MHz for a 1.2MHz 6502 CPU
2- that ARM CPU is using its own internal flash, rather than external RAM
3- heavier ARM CPUs (e.g. SoCs) usually have more state, and it takes time to swap state for different processes. (in other words, this can't be running under linux; it needs to be its own bare-metal program)
4- the Raspberry Pi in particular stalls regularly for many microseconds to handle DRAM refresh. This makes it wholly unsuitable to act as a ROM emulator anyway.
Re: Cartridge Emulator?
by on (#228470)
It seems a Raspberry Pi 3B(+) is bare metal mode is now fast enough that it can mostly handle a 1541(II) disk drive with "cycle exact", but even then the drive doesn't have to dance on a bus so it has a little leniency. While the SNES doesn't split the Phases like say a C64, it does need 3.5MHz to which 1Mhz loose timing is a stretch, 3.5 forget it. Even then it would be bare metal so no OS which will mostly defeat why you probably want it.