Skip to content

Commit 2f7e166

Browse files
committed
Updated emulator portation for using with ESP-BSP and latest IDF.
1 parent 693e378 commit 2f7e166

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+6321
-1612
lines changed

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
build/
1+
managed_components/**
2+
build/*
3+
dependencies.lock
4+
sdkconfig
25
sdkconfig.old
3-
*.nes
4-
6+
.vscode/*
7+
.devcontainer/*
8+
games/*
9+
temp/*

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# For more information about build system see
2+
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
3+
# The following five lines of boilerplate have to be in your project's
4+
# CMakeLists in this exact order for cmake to work correctly
5+
cmake_minimum_required(VERSION 3.5)
6+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
7+
add_compile_options("-Wstringop-truncation")
8+
project(nesemu)

Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# ESP32-NESEMU, a Nintendo Entertainment System emulator for the ESP32 (IDF v5)
2+
====================================================================
3+
4+
This is a quick and dirty port of Nofrendo, a Nintendo Entertainment System emulator. It lacks sound, but can emulate a NES at close to full speed, albeit with some framedrop due to the way the display is driven.
5+
6+
The portation of NES emulator is based on [ESP-BSP](https://github.com/espressif/esp-bsp) code and it allows to change the board quickly.
7+
8+
| Selection of the game | Super Mario | Donkey Kong | qBert |
9+
| :----------: | :-----------: | :----------: | :----------: |
10+
| <img src="doc/images/gameselection.jpg"> | <img src="doc/images/supermario.jpg"> | <img src="doc/images/donkeykong.jpg"> | <img src="doc/images/qbert.jpg"> |
11+
12+
## Warning
13+
-------
14+
15+
This is a proof-of-concept (only for demo) and not an official application note. As such, this code is entirely unsupported by Espressif.
16+
17+
## USB HID Controller
18+
---------
19+
20+
The games are controlled by USB HID SNES GamePad.
21+
22+
<img src="doc/images/controller.jpg">
23+
24+
## Build and flash
25+
---------
26+
27+
```
28+
idf.py -p COMx flash monitor
29+
```
30+
31+
## Board selection
32+
---------
33+
34+
For change the board, please edit the [`components/esp_nes/idf_component.yml`](components/esp_nes/idf_component.yml) file and change these lines to another BSP component:
35+
36+
```
37+
ws_7inch:
38+
version: "bsp/7inch_update"
39+
path: "SquareLine/boards/custom_waveshare_7inch/components/ws_7inch/"
40+
git: https://github.com/espressif/esp-bsp.git
41+
```
42+
43+
For example, you can use this for ESP-BOX:
44+
45+
```
46+
esp-box: "*"
47+
```
48+
49+
## ROM
50+
---
51+
This NES emulator does not come with a ROM. This demo allows to select between three games, each game must be flashed to right flash region:
52+
53+
1. Game: `0x00100000`
54+
2. Game: `0x00200000`
55+
3. Game: `0x00300000`
56+
57+
You can use this command for flash the game into right flash region:
58+
59+
```
60+
python esptool.py --chip esp32s3 --port "COM3" --baud $((230400*4)) write_flash -fs 4MB 0x100000 .\games\supermario.nes
61+
```
62+
63+
## Copyright
64+
---------
65+
66+
Code in this repository is Copyright (C) 2016 Espressif Systems, licensed under the Apache License 2.0 as described in the file LICENSE. Code in the
67+
components/nofrendo is Copyright (c) 1998-2000 Matthew Conte (matt@conte.com) and licensed under the GPLv2.
68+

README.rst

Lines changed: 0 additions & 68 deletions
This file was deleted.

components/esp_nes/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file(GLOB_RECURSE T_SOURCES *.c)
2+
file(GLOB_RECURSE IMAGES images/*.c)
3+
4+
idf_component_register(
5+
SRCS ${T_SOURCES} ${IMAGES}
6+
INCLUDE_DIRS "."
7+
PRIV_REQUIRES driver nofrendo hid nvs_flash
8+
)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: "1.0.0"
2+
description: esp_nes
3+
dependencies:
4+
idf: ">=5.0"
5+
ws_7inch:
6+
version: "bsp/7inch_update"
7+
path: "SquareLine/boards/custom_waveshare_7inch/components/ws_7inch/"
8+
git: https://github.com/espressif/esp-bsp.git

0 commit comments

Comments
 (0)