Emulating Systems


invinciblegod

Member
Joined
Oct 18, 2005
Messages
158
I was playing gngeo2x today when I wondered, NeoGeo is a much more powerful system than the super nintendo, yet it is emulated pratically perfectly (after overclocking of course). So I was wondering, is super nintendo harder to emulate? The neogeo emulator seems to have come out pretty quickly with everything emulated, does it have a simple architecture or what? I'm curious.
 
I don't think the difficulty in emulating SNES comes from raw speed so much as it does complicated custom hardware.
 
The NeoGeo uses common computer and console/arcade hardware components for the majority of its processing, the Motorola MC68000 and Zilog Z80 microprocessors for main and audio processing, respectively, as well as Yamaha YM26xx series synth for audio generation in realtime from FM audio data and PCM samples. Nothing uncommon or poorly documented as all were released as SEPARATE products and merged for the production of NeoGeo systems (the Sega MegaDrive/Genesis used mostly the same parts with different speeds, the YM2612 was a different model of the same series of synth, etc. as well.)

Because of this, ARM9 ASM cores exist for most of the components-- e.g. the very fast Cyclone 68000 and DrZ80 Z80 core. These are code that emulates the operation of these CPUs, using code that is native to the ARM9 architecture, that used by the GP2X's main CPUs (ARM920T/ARM940T.) This code executes much faster than generic C code that will run on any hardware (X86 PCs, PowerPC Macintoshes, etc.) But it is harder to come by for less common hardware.

ARM9 ASM 6502 cores are harder to come across, although I believe 1 or 2 exist. These must be added to NES emulators to achieve the kind of stellar performance you see from 7.67 Mhz and 12 MHz MC68000s and ~4 MHz Z80s in Neo Geo and MegaDrive/Genesis emulation; with straight C usually even efficiently-emulated 6502 CPUs at 1.79 Mhz like that in the NES will run rather sluggishly on a 200 MHz ARM9 processor.

As for the SNES, the CPU is an anemic 65c816 processor, a 16-bit 'hack' of the 8-bit 6502 in the original NES operating at ~2.68 MHz in most games. The hard thing to emulate is the custom Nintendo video hardware and audio hardware, which is peculiar, not off-the-shelf and rather poorly documented (OFFICIAL documentation is rare if it is even available to the public in any regard, while processors like the 68000 have publically available documentation available in HEAPS, and clones of the hardware are even authorized by Motorola.) This will make it much harder to effectively emulate on any system, even the PC, much less the GP2X.

When all is said and done, with a fast ARM9 ASM core for the 6502, a NES emulator should run at full speed with the GP2X's ARM920T at ~100-133 MHz in theory. While 60 FPS at 200 MHz is fully acceptable, it's still slow by relative standards.
 
Back
Top