cNES is a Nintendo Entertainment System (NES) emulator written in C. This project aims to provide an accurate and efficient NES emulation experience while serving as an educational resource for understanding the NES architecture.
- CPU Emulation: 6502 processor emulation using a lookup table for efficient instruction dispatch.
- PPU Emulation: GPU-accelerated Picture Processing Unit (PPU) rendering via
SDL_gpu. - UI Enhancements:
- Settings menu with save/load functionality.
- Performance profiler with flame graph visualization.
- FPS overlay with an optional performance graph.
- UTF-8 support and icons in the UI.
- ROM Loading: Supports iNES ROM format.
- Debugging Tools:
- Disassembler for analyzing ROMs.
- Logging system with SDL-based error dialogs.
- A C compiler (e.g., GCC, Clang).
- SDL2 library for windowing, input, and audio.
- SDL_gpu library for GPU-accelerated 2D rendering.
- Vulkan SDK (if SDL_gpu is built with Vulkan backend).
- Set up a MinGW environment (e.g., MSYS2 with MinGW-w64).
- Install SDL2, SDL_gpu, and Vulkan development libraries.
- Compile the project using the provided Makefile or build scripts.
(Build instructions for other platforms like Linux/macOS can be added here.)
- Core Emulation:
- Add support for more Mappers to improve game compatibility.
- Implement APU (Audio Processing Unit) emulation.
- Improve PPU cycle accuracy and rendering details.
- UI Improvements:
- Complete UI rework for better usability.
- Add input configuration and remapping UI.
- Implement plugin loading system.
- Save states and screenshot functionality.
- Development Tools:
- Develop a comprehensive testing framework.
- Add cross-platform build system support (e.g., CMake).
- Set up Continuous Integration (CI) for automated builds and tests.
- NESDev Wiki: The go-to resource for NES development and emulation.
- Test ROMs: NES Test ROMs by christopherpow
- SDL Shader Compiler: SDL_shadercross
| Mapper ID | Name | Supported | Notes |
|---|---|---|---|
| 0 | NROM | ✅ | Basic mapper, 16KB/32KB PRG, 8KB CHR. |
| 1 | MMC1 | ❌ | Planned for future implementation. |
| 2 | UxROM | ❌ | Planned for future implementation. |
| 3 | CNROM | ❌ | Planned for future implementation. |
| 4 | MMC3 | ❌ | Planned for future implementation. |
| 7 | AOROM | ❌ | Planned for future implementation. |
| Feature | Supported | Notes |
|---|---|---|
| Pulse Channel 1 | ❌ | Not yet implemented. |
| Pulse Channel 2 | ❌ | Not yet implemented. |
| Triangle Channel | ❌ | Not yet implemented. |
| Noise Channel | ❌ | Not yet implemented. |
| DMC (Delta Modulation) | ❌ | Not yet implemented. |
| Feature | Supported | Notes |
|---|---|---|
| Background Rendering | ✅ | Basic background rendering implemented. |
| Sprite Rendering | ✅ | Partial implementation, needs refinement. |
| Sprite 0 Hit | ✅ | Implemented but needs testing. |
| Vertical/Horizontal Mirroring | ✅ | Fully supported. |
Contributions are welcome! If you'd like to contribute, please fork the repository, create a feature branch, and submit a pull request. For major changes, open an issue first to discuss your ideas.
- SDL3_NET
- add different loaders and mappers
- add sdl3 software renderer support
This project is licensed under the MIT License. See the LICENSE file for details.