NES86 is an IBM PC emulator for the NES.
The goal of this project is to emulate an Intel 8086 processor and supporting PC hardware
well enough to run the
Embeddable Linux Kernel Subset (ELKS),
including a shell and utilities.
It should be possible to run other x86 software
as long as it doesn't require more than a simple serial terminal.
Download the NES ROM containing NES86 and ELKS from the releases page. See the Binaries section for descriptions of the available binaries. NES86 is not supported on all platforms. The following platforms have been tested and Mesen2 or an Everdrive N8 Pro is recommended.
platform | working? | issues |
---|---|---|
Mesen2 | ✅ | none |
FCEUX | ✅ | overscan, keyboard detection |
Rustico | ✅ | overscan, no keyboard |
ksNes (Animal Crossing) | ✅ | overscan, no keyboard, special ROM required, mapper hack required |
Nestopia | ❌ | not enough cartridge RAM |
Mesen | ❌ | not enough cartridge RAM |
BizHawk | ❌ | not enough cartridge RAM |
Everdrive N8 Pro | ✅ | none |
Everdrive N8 | ✅ | special ROM required, mapper hack required |
PowerPak | ❌ | many |
file | description |
---|---|
nes86.nes | standard NES86 ROM |
nes86.dbg | standard NES86 ROM debug symbols |
nes86_ksnes.nes | NES86 ROM built for Animal Crossing |
animal_crossing.gci | Animal Crossing save file with an NES item |
mmc5_patch.gci | Animal Crossing MMC5 mapper patch |
nes86.gci | NES86 ROM injected in a GameCube save file for use with Animal Crossing |
nes86_edfc.nes | NES86 ROM built for the original Everdrive N8 |
005.RBF | Everdrive N8 MMC5 mapper patched to support NES86 |
NES86 supports the Family BASIC Keyboard as an input device. If a keyboard is detected at boot then it will be used automatically.
If no keyboard is detected at boot then an on-screen keyboard will be made available. Pressing SELECT will open/close the on-screen keyboard. With the keyboard open, pressing B will type the selected key and A serves as a dedicated Enter key.
Joypad buttons are mapped directly to the following keys when the on-screen keyboard is closed.
This is done to make it easier to play ttytetris
without a keyboard.
joypad button | keyboard key | purpose |
---|---|---|
A | k | rotate clockwise |
B | j | rotate counterclockwise |
START | p | pause |
SELECT | open keyboard | |
UP | Space | hard drop |
DOWN | s | soft drop |
LEFT | h | move left |
RIGHT | l | move right |
- Clone the project and its submodules.
git clone --recurse-submodules https://github.com/decrazyo/nes86.git
- Install dependencies.
apt install make cc65 gcc-ia16-elf
The following steps will build an ELKS image that is compatible with NES86.
- Enter the
elks
directory.
cd nes86/data/elks/elks/
- Create a
cross
directory.
mkdir cross
- Setup your environment.
. ./env.sh
- Build the cross tool chain. This will take a while.
tools/build.sh
- Copy or rename the provided configuration file.
cp nes86.config .config
- Build ELKS.
make all
By default, the NES86 build process will use the ELKS image that was built in the previous step.
If you would like to run some other x86 software then you'll probably need to modify
data/Makefile
, src/x86/rom.s
, and conf/ld.cfg
- Return to the top level NES86 directory.
cd ../../../
- Build NES86.
make all
The resulting NES ROM can be found at nes86/bin/nes86.nes
.
Contributions and ports are welcome. See STYLE.md for the project's coding style guidelines.