187 votes
Accepted

Why does the infamous "ENGAGERIDLEYMOTHERFUCKER" Metroid password break NES emulators?

Let's take a look at the code! A few seconds of Googling led me to a high-quality annotated disassembly by Kent Hansen and Nick Mikstas: https://www.metroid-database.com/source-code/ Whenever the user ...
user avatar
  • 5,074
97 votes
Accepted

Fixing obscure 8080 emulator bug?

The General Advice Answer For a failure that happens so quickly (at most 89 instructions) I'd recommend simply looking at what your emulator does at each instruction and determine if did everything ...
user avatar
90 votes
Accepted

What makes accurate emulation of old systems a difficult task?

Speaking from my personal experience of writing a PET emulator, a C64 emulator and a Sinclair Spectrum emulator,, here are the issues I had: Getting the Speed Right It's no good just making a ...
user avatar
  • 10.1k
76 votes
Accepted

Is it possible to make a ROM converter?

Note: This answer mainly focuses on the NES, since that's what I'm most familiar with. Yes; this is called static recompilation or static binary translation, and it is theoretically possible -- ...
user avatar
  • 5,074
63 votes

Is there still no "digital version of PCBs and ICs" software that all future emulators can use?

Taken most literally, what you are proposing is complete analog simulation of the entire electronic circuit. Analog circuit analysis is not cheap. Generally, every point in the circuit has to be ...
user avatar
  • 9,396
55 votes
Accepted

Did Windows NT 4 emulate x86 on non-Intel platforms?

There was x86 emulation on Windows NT, on MIPS, Alpha, and PowerPC — in fact, more than x86 emulation, PC emulation. The operating system itself ran natively, and applications could be built natively ...
user avatar
  • 95.7k
50 votes
Accepted

Can x86 processors run 8-bit applications?

There are several aspects to consider to answer your question. The x86 architecture is backwards-compatible with the first CPU of the line, the 8086 (and its sibling, the 8088). What this means is ...
user avatar
  • 95.7k
50 votes
Accepted

Why are different emulators needed to run platforms that use 6502 assembly code?

The 6502 CPU is just one piece of the puzzle Emulators emulate entire machines, not merely CPUs. Even the likes of QEMU emulate an entire generic computer. It helps if you think of the Apple II and ...
user avatar
  • 596
47 votes

Simplest system to create an emulator for

I'm putting CHIP-8 forward. This system is essentially a virtual machine developed for some reason. There are games written for the CHIP-8. It has a few opcodes, a stack, a couple of timers, and a ...
user avatar
  • 34.3k
39 votes

How do arcade ROMs work

The way I understand it, ROMs are like virtual games, Not really. ROMs are a piece of hardware storing a bit image. Like a disk, a tape or a punch card. It holds an image of the game's software. ...
user avatar
  • 168k
38 votes

Are there any good, non-abandoned PC emulators?

As others have mentioned, PCem is still perfectly usable, even if it’s no longer maintained by its original author (who is, or at least was, open to handing over maintenance to someone else, should ...
user avatar
  • 95.7k
35 votes
Accepted

How do old computer emulators work?

I wrote my first emulators somewhere in the mid-to-late '90s, my first cycle-accurate emulator circa 2000 and have managed to outdo even that, writing a clock-sign-transition-accurate emulator — ...
user avatar
  • 32.4k
33 votes

Is there still no "digital version of PCBs and ICs" software that all future emulators can use?

It is feasible, but not in software, because software is not fast enough. But indeed, it would basically let "anyone" build machines by picking out digital versions of components which ...
user avatar
  • 21.3k
33 votes

Why does the infamous "ENGAGERIDLEYMOTHERFUCKER" Metroid password break NES emulators?

Fundamentally these 'passwords' aren't really passwords as such, but map back to a string of bits that control the state of the game - so it's more of a string representation of the current state of ...
user avatar
  • 431
32 votes
Accepted

How can I emulate MS-DOS on OS X?

The nicest DOS emulator for macOS is Boxer, which is a macOS-specific version of DOSBox. Not only is it free, it's free software (or open source if you prefer); its source code is available and freely ...
user avatar
  • 95.7k
32 votes

Why are different emulators needed to run platforms that use 6502 assembly code?

There are many answers to this and none might satisfy you. First of all, an emulator doesn't just do a CPU, but a machine. The same way you can't run an NES game on an Apple II. So while one emulator ...
user avatar
  • 168k
32 votes

What makes accurate emulation of old systems a difficult task?

The best description of this problem that I've seen was written by Byuu, one of the developers of the bsnes emulator. That's about as authoritative as they come, but I'll try to summarize it here. ...
user avatar
  • 779
31 votes
Accepted

Why is a BIOS dump not required to emulate Nintendo 64 games in most modern emulators?

The Nintendo 64 ROM is only 2KB in size and apparently easy to emulate. It seems to only check the validity of the inserted cartridge's ROM and set up a limited environment. Nintendo 64 cartridges ...
user avatar
  • 95.7k
31 votes
Accepted

What are the laws concerning emulation in the US?

Note of course that I'm not a lawyer, this is not legal advice etc. The laws that apply here are "intellectual property" laws: copyright, patent law and perhaps trademark law. Emulators themselves ...
user avatar
  • 95.7k
30 votes

Can x86 processors run 8-bit applications?

The 8086 is source-code compatible with the 8080 (the other way around is not true). This means that most assembly code written for the 8080 can be assembled so that 8086 instructions are emitted. The ...
user avatar
30 votes
Accepted

Install Commodore 64 on VirtualBox

It's not possible. VirtualBox only supports emulating IBM-compatible x86 and x86-64 systems. The Commodore 64 uses a 6510 CPU and a wildly different architecture. In order to run Commodore 64 ...
user avatar
  • 8,373
29 votes
Accepted

Why are there two, different, Kickstart 1.3 ROMs with the same 34.5 version number?

The first change is to patch this code: 00fc0196 266E003E movea.l $3e(a6), a3 00fc019a B7FC00080000 cmpa.l #$80000, a3 00fc01a0 622C ...
user avatar
  • 9,380
29 votes
Accepted

What exactly is a cycle-accurate emulator?

For an emulator to be "cycle accurate" means the interactions between the components are timed accurately enough so that the emulation behaves the same way as the original machine for any given input. ...
user avatar
29 votes

How to detect a real Commodore 64, THEC64, or VICE emulator in software?

In general, no there is no reliable way to detect an emulator (if it's any good). Especially if it's actively developed. The trick that worked yesterday probably don't tomorrow as emulation improves. ...
user avatar
  • 4,348
29 votes

Is there a standard interface for connecting debuggers to emulators?

If you're looking for a standard to adhere to, I'd consider implementing the GDB remote protocol. (Link is to Embecosm's guide on writing a GDB Remote Serial Protocol server.) It needs GDB to support ...
user avatar
  • 4,018
28 votes

Do instruction exercisers exist for 8086 and 68K (and other) CPUs?

Throwing some things out there that might fit the bill: 6502: AllSuiteA which assembles into a single binary and exits, leaving a failure or success code in memory; 6502 and 65C02: Klaus Dormann's ...
27 votes
Accepted

How does the Gameboy Link Cable work?

You'll need to manipulate the memory address 0xFF02, and shift the data (MSB first) into 0xFF01, as stated below. If there is no cable - ergo, no gameboy connected - then 0xFF is received, in 0xFF01. ...
user avatar
  • 1,817
26 votes
Accepted

Is there a seamless, Wine-like AmigaOS emulator for Linux, specifically for text-based programs?

A solution like that already exists: it's called vamos (Virtual AMiga OS) and emulates a 68k CPU and a bunch of libraries - enough to get terminal only programs (like compilers and assemblers) running:...
user avatar
  • 1,389
24 votes
Accepted

Are there runnable Multics systems available?

There are a number of ways to use Multics today. One option is to run it locally under an emulator. The source code that's available should run (under emulation) on most Linux systems, Mac OS X, and ...
user avatar
  • 8,892
23 votes

Can x86 processors run 8-bit applications?

A few 16-bit processors can run 8-bit code: the NEC V20 series. The V20 and V30 are the ones you might encounter in a PC. The V20 is a pin-compatible substitute for the 8088, and the V30 for the 8086. ...
user avatar
  • 5,882

Only top scored, non community-wiki answers of a minimum length are eligible