/rustness_monster

NES / Dendy emulator

Primary LanguageRust

NES Emulator

My tiny COVID-19 project

This is yet another emulator of NES platform written in rust. The project is far from being complete, but it can play first-gen NES games, including platformers.

I've tried it with:

  • Super Mario Bros (horizontal scroll)
  • Ice climber (vertical scroll)
  • Popeye
  • Baloon fight
  • Donkey Kong
  • Pacman

I also wrote a mini ebook on this topic. Check it out.

Running instructions

Prerequisites

  1. rustc
  2. cargo
  3. git

Installation

Macos:

brew install sdl2
git clone git@github.com:bugzmanov/rustness_monster.git

Linux:

  1. install sdl2
  2. Clone repo
git clone git@github.com:bugzmanov/rustness_monster.git

Windows

  1. install sdl2: Download SDL2-devel-<version>-VC.zip from releases page of SDL and extract all files to the library directory for Rust toolchain. For Windows on x86_64 platform, the directory is usually
C:\Users\<username>\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib
  1. Clone repo
git clone git@github.com:bugzmanov/rustness_monster.git

Windows via WSL2:

  1. install sdl2 to linux
  2. Clone repo to linux
git clone git@github.com:bugzmanov/rustness_monster.git
  1. Install any modern x11 server to windows e.g. VcXsrv. Note that old versions of Xming won't work because of outdated OpenGL support.
  2. Run the following commands (change DISPLAY variable to your X11 server parameters)
export LIBGL_ALWAYS_INDIRECT=1
export DISPLAY=192.168.0.5:0.0

Running the game

cargo run --release -p native <path_to_rom>

Control

  • Keyboard:

    Control Keyboard
    Arrows Arrows
    A,B a, s
    Start Enter
    Select Space
  • Joystick

    • Assumes joytick based controll if joystick is connected upon emulator start

Plan

  • CPU
  • ROM
    • Basic support
    • Mapper 0
    • Mapper 1
  • Bus, Interrupts
  • PPU
  • Registers
  • DMA
  • Rendering
  • Scorlling
  • [50%] Sprite 0
  • Controllers
  • Keyboard
  • Joystick
  • APU