jamulator
See the writeup for this project: Statically Recompiling NES Games into Native Executables with LLVM and Go
Note: This project is discontinued. See the above article for the explanation.
Features
- Recompile NES games into native executables
- Only known supported game is Super Mario Brothers 1
- 6502 assembler / disassembler
- Unpack & disassemble NES roms and then put them back together
- Adds a small custom ABI which gives you
putchar
andexit
for making test roms.
Getting Started Developing
-
Set up your
$GOPATH
. Make sure thebin
folder from your go path is in$PATH
. -
Install the lexer:
go get github.com/blynn/nex
-
Install llvm-3.1 or llvm-3.2 from your package manager.
-
Install gollvm (replace 3.2 with 3.1 if you want):
export CGO_CFLAGS=$(llvm-config-3.2 --cflags) export CGO_LDFLAGS="$(llvm-config-3.2 --ldflags) -Wl,-L$(llvm-config-3.2 --libdir) -lLLVM-$(llvm-config-3.2 --version)" go get github.com/axw/gollvm/llvm
-
Install the rest of the go dependencies:
go install
-
Install the C dependencies:
sudo apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libglew1.6-dev libxrandr-dev
-
Compile, run the tests, and then try it!
make make test ./jamulator -recompile game.nes