XB
Libxnes
A lightweight, portable pure C99 NES emulator library.
Getting Started
Just type make at the root directory, you will see some binary of examples for usage.
cd libxnes
makeTo compile the example, you need to install SDL2, In ubuntu systems:
sudo apt-get install libsdl2-devHow to running
After compiling all of files, you can running an example or drag some nes file to xnes:
cd examples/linux/output/
./xnes <rom.nes>Screenshots
Keyboard
| Description | Player 1 | Player 2 |
|---|---|---|
| UP | W | Arrow Up |
| DOWN | S | Arrow Down |
| LEFT | A | Arrow Left |
| RIGHT | D | Arrow Right |
| A | K | Numpad 6 |
| B | J | Numpad 5 |
| SELECT | Space | Numpad 8 |
| START | Enter | Numpad 9 |
| Description | Key |
|---|---|
| RESET | ESC |
| SLOW SPEED | F1 |
| FAST SPEED | F2 |
| REWIND | R |
Joystick
| Description | Joystick 1 | Joystick 2 |
|---|---|---|
| UP | Up | Up |
| DOWN | Down | Down |
| LEFT | Left | Left |
| RIGHT | Right | Right |
| A | A | A |
| B | B | B |
| SELECT | Select | Select |
| START | Start | Start |
| REWIND | L | L |
| FAST SPEED | R | R |
Links
License
This library is free software; you can redistribute it and or modify it under the terms of the MIT license. See MIT License for details.
On this page
Languages
Assembly75.0%C21.4%Python3.2%Makefile0.5%Batchfile0.0%
Contributors
MIT License
Created September 12, 2024
Updated February 15, 2026
















