GithubHelp home page GithubHelp logo

alanjian85 / marius Goto Github PK

View Code? Open in Web Editor NEW
19.0 1.0 0.0 11.95 MB

A tiny emulator of Nintendo Entertainment System (NES)

Home Page: https://alanjian85.github.io/marius/

License: MIT License

CMake 2.42% C++ 95.42% HTML 2.16%
6502 emulator nes sdl2 wasm ppu

marius's Introduction

Marius

Marius ([ˈmäriʊs̠], the Latin root of the Italian name "Mario") is a tiny emulator of NES (Nintendo Entertainment System). It illustrates the fundamental workings of NES by emulating its core components through straightforward algorithms. It also supports various configuration options, debug utilities and a range of common catridge mappers. Moreover, it can be run directly in modern browsers thanks to the powerful WebAssembly technology.

Mario GIF Pacman GIF Donkey Kong GIF

Key Mappings

Button Controller 1 Controller 2
A J X
B K Z
SELECT RSHIFT LSHIFT
START ENTER TAB
A
W
D
S

The log of executed 6502 instructions is dumped when F1 is pressed, and the game console states are reset upon pressing F2.

Build Instructions

To build Marius, the following libraries are required (you can install them using the package manager of your operating system):

After the dependencies listed above are all installed, run the following instructions to build Marius:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

The compiled binary can then be found in the directory build/marius. The path to the ROM file that is to be emulated should be provided as the first command line argument.

WebAssembly

It is possible to compile Marius to WebAssembly using the Emscripten compiler. By default, it emulates the famous "Super Mario Bros." game on a blank web page. However, due to license limitations, its ROM file should be placed in marius/res and renamed as mario.nes manually.

Run the following instructions to compile the WASM version of Marius. Note that the required files such as index.html will be copied to the build directory automatically. Also, ensure that the dependencies are compiled and installed using the same instructions.

mkdir build && cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
make

References

marius's People

Contributors

alanjian85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.