Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
forked from binji/smolnes

NES emulator in <5000 bytes of C. Zero dependencies Win32 version

License

Notifications You must be signed in to change notification settings

xrip/smolnes-win32

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smolnes

A NES emulator in ~5000 significant bytes of c.

Zero dependencies Win32 build using cutomized older version of MiniFB with frame limiting and keyboard handling.

Features

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

Screenshots

Batman Kirby's Adventure Mega Man 3 Little Nemo the Dream Master River City Ransom Super Mario Bros. 2 Super Mario Bros. 3 Teenage Mutant Ninja Turtles 2 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. Try gcc or clang.

$ 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 19 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.

About

NES emulator in <5000 bytes of C. Zero dependencies Win32 version

Resources

License

Stars

Watchers

Forks

Languages

  • C 98.2%
  • CMake 1.8%