# NesEmulator **Repository Path**: ocfbnj/NesEmulator ## Basic Information - **Project Name**: NesEmulator - **Description**: C++开发的NES模拟器 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 11 - **Forks**: 2 - **Created**: 2021-12-27 - **Last Updated**: 2025-09-03 ## Categories & Tags **Categories**: games **Tags**: None ## README # NesEmulator [![CI](https://github.com/ocfbnj/NesEmulator/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ocfbnj/NesEmulator/actions/workflows/ci.yml) This is an NES emulator. It implements Mapper0-4, which cover about 80% of iNes rom. The following games have been tested, other games may or may not work: - Super Mario Bros. - Battle City - Contra - Teenage Mutant Ninja Turtles - Double Dragon - Zelda ## Usage ~~~bash ./NesEmulator ~~~ ### Controller #### Player1 | Button | Mapped to | | :----: | :-------: | | A | J | | B | K | | Select | Space | | Start | Enter | | Up | W | | Down | S | | Left | A | | Right | D | #### Player2 | Button | Mapped to | | :----: | :---------: | | A | Num1 | | B | Num2 | | Select | Right Shift | | Start | Num0 | | Up | Up | | Down | Down | | Left | Left | | Right | Right | #### Other | Button | Effect | | :----: | :-----------: | | R | Reset | | I | Quick Save | | L | Quick Restore | ## How to build ### Prerequisites - A compiler supporting C++20. - Python3 installed. - CMake installed. ### Building with Conan Package Manager 1. Install Conan ~~~bash pip install conan -U ~~~ 2. Clone and Build ~~~bash git clone https://github.com/ocfbnj/NesEmulator.git cd NesEmulator mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release cmake --build . ~~~ Now, you can find the binary in `build/src` directory. ## Screenshots ![Super Mario Bros](./images/Super%20Mario%20Bros.png) ![Battle City](images/Battle%20City.png) ![Contra](./images/Contra.png) ![Teenage Mutant Ninja Turtles III](./images/Teenage%20Mutant%20Ninja%20Turtles%20III.png) ![Double Dragon II](./images/Double%20Dragon%20II.png) ## References Developing an NES emulator is exciting and interesting 😀. If you also want to develop your own one, you can refer to the following tutorials and references. ❤️ ### Nesdev Wiki - ### Tutorials - - - ### Other NES implementations - - - - ### CPU - - - (This page was closed.) ### Graphic - - - ### Audio - - - -