RepositoryC++USUnited States
AndreaOrru

AndreaOrru/LaiNES

Compact cycle-accurate NES emulator

1.5kstars
113forks
7issues
0views

🎮 LaiNES: Minimal Cycle-Accurate NES Emulator

Run classic NES games with pixel-perfect timing in a tiny, self-contained emulator.

LaiNES is a compact, cycle-accurate NES emulator written in C++. It provides a simple GUI for loading ROMs, managing savestates, and configuring controls, while keeping the codebase small and readable. The emulator targets Unix-like systems and relies on SDL2 for rendering and input.

✨ Highlights

  • Cycle-accurate emulation: CPU and PPU step precisely per cycle, with the PPU advancing three times for each CPU tick.
  • Broad mapper support: Implements over a dozen common mappers, including MMC1, MMC3, MMC5, VRC6, and more.
  • Savestate system: Save and load the full emulator state, preserving CPU, PPU, APU, mapper, and expansion audio.
  • Fast forward mode: Hold Tab to run at 8× speed, indicated by an on‑screen indicator.
  • SDL2 GUI with controller support: Built‑in file browser, menu navigation, and native support for Xbox, PlayStation, and Switch controllers via SDL2’s GameController API.
  • Compact codebase: Meta‑programming keeps the CPU and PPU implementations under 300 lines each while supporting full unofficial opcodes.
  • VRC6 expansion audio: Optional audio channel support for games using the VRC6 mapper.

💡 Why it matters

LaiNES demonstrates that a fully functional NES emulator can be built with remarkably little code, making it an excellent reference for understanding console emulation internals. Its cycle‑accurate timing and extensive mapper coverage let it run a wide range of games faithfully, while the built‑in GUI and savestate features make it convenient for casual play.

The project’s focus on minimalism without sacrificing accuracy appeals to both developers who want to study emulation techniques and retro gaming enthusiasts who prefer a lightweight, self‑contained emulator.


#NES #Emulator #C++ #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
Provenance-Emu/Provenance

iOS & tvOS multi-emulator frontend, supporting various Atari, Bandai, NEC, Nintendo, Sega, SNK and Sony console systems… Get Started: https://wiki.provenance-emu.com |

6.4k
Nov 26, 2026
RepositoryKotlin
Swordfish90/Lemuroid

All in one emulator on Android!

4.6k
Nov 24, 2026
RepositoryAssembly
gregkrsak/first_nes

Create your own games for the Nintendo Entertainment System! This "starter" game is easily extensible for your own projects. Includes references.

170
Oct 4, 2026
RepositoryRust
tedsteen/nes-bundler

Transform your NES-game into a single executable targeting your favourite OS!

167
Nov 24, 2026
RepositoryC++
cemu-project/Cemu

Cemu - Wii U emulator

10.3k
Nov 30, 2026
RepositoryC++
huzongyao/NostalgiaLite

Three game emulators: FC(Nes), GG, GBC for Android

187
Jul 13, 2026
RepositoryJavaScript
bfirsh/jsnes

A JavaScript NES emulator.

6.4k
Nov 24, 2026
RepositoryJavaScript
EmulatorJS/EmulatorJS

A web-based frontend for RetroArch

4.4k
Dec 1, 2026
RepositoryC
punesemu/puNES

Qt-based Nintendo Entertaiment System emulator and NSF/NSF2/NSFe Music Player (Linux, FreeBSD, OpenBSD and Windows)

824
Sep 1, 2026