Code Monkey home page Code Monkey logo

smolnes's Introduction

smolnes

A NES emulator in ~5000 significant bytes of c.

Features

Plays some mapper 0/1/2/3/7 games.

Screenshots

Bionic Commando Donkey Kong Dragon Warrior Adventures of Lolo Legend of Zelda Metroid Mega Man 2 Ninja Gaiden Rad Racer Super Mario Bros. Teenage Mutant Ninja Turtle Contra Goonies 2 Castlevania DuckTales Alwa's Awakening Witch n' Wiz Battletoads Wizard's and Warriors II Gradius

Source Code

Building

Probably only builds on Linux and macOS. Needs a compiler with the case range extension, so gcc or clang probably.

$ make

Running

$ ./smolnes <rom.nes>

Keys:

Action Key
DPAD-UP
DPAD-DOWN
DPAD-LEFT
DPAD-RIGHT
B Z
A X
START Enter
SELECT Tab

Updating keys

Look for line 21 in the source code. The following table shows which numbers map to which keyboard keys:

number default key NES button
27 X A Button
29 Z B Button
43 Tab Select Button
40 Return Start Button
79 Arrow Right DPAD Right
80 Arrow Left DPAD Left
81 Arrow Down DPAD Down
82 Arrow Up DPAD Up

Replace the numbers on this line with one from the SDL scancode list.

smolnes's People

Contributors

binji avatar margen67 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smolnes's Issues

Errors compiling on mac

Hi!

I'm trying to compile smolnes on MacOS version 12.0.1, Apple Silicon. I'm getting this error:

image

My gcc version:
image

Any ideas?

Why is this C++ and not C?

I might be missing something, but the only benefit I see of using C++ over C here is that #include <cstdint> is one byte shorter than #include <stdint.h>.

C would compile faster and is (well, at least theoretically) more portable.

Palette Source

Hey, could you show me where you got your palette, or could you give me the list of rgbs in the order used in the emulator? I would be grateful.

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.