-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated emulator portation for using with ESP-BSP and latest IDF.
- Loading branch information
Showing
57 changed files
with
6,321 additions
and
1,612 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
build/ | ||
managed_components/** | ||
build/* | ||
dependencies.lock | ||
sdkconfig | ||
sdkconfig.old | ||
*.nes | ||
|
||
.vscode/* | ||
.devcontainer/* | ||
games/* | ||
temp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# For more information about build system see | ||
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html | ||
# The following five lines of boilerplate have to be in your project's | ||
# CMakeLists in this exact order for cmake to work correctly | ||
cmake_minimum_required(VERSION 3.5) | ||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
add_compile_options("-Wstringop-truncation") | ||
project(nesemu) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# ESP32-NESEMU, a Nintendo Entertainment System emulator for the ESP32 (IDF v5) | ||
==================================================================== | ||
|
||
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. | ||
|
||
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. | ||
|
||
| Selection of the game | Super Mario | Donkey Kong | qBert | | ||
| :----------: | :-----------: | :----------: | :----------: | | ||
| <img src="doc/images/gameselection.jpg"> | <img src="doc/images/supermario.jpg"> | <img src="doc/images/donkeykong.jpg"> | <img src="doc/images/qbert.jpg"> | | ||
|
||
## Warning | ||
------- | ||
|
||
This is a proof-of-concept (only for demo) and not an official application note. As such, this code is entirely unsupported by Espressif. | ||
|
||
## USB HID Controller | ||
--------- | ||
|
||
The games are controlled by USB HID SNES GamePad. | ||
|
||
<img src="doc/images/controller.jpg"> | ||
|
||
## Build and flash | ||
--------- | ||
|
||
``` | ||
idf.py -p COMx flash monitor | ||
``` | ||
|
||
## Board selection | ||
--------- | ||
|
||
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: | ||
|
||
``` | ||
ws_7inch: | ||
version: "bsp/7inch_update" | ||
path: "SquareLine/boards/custom_waveshare_7inch/components/ws_7inch/" | ||
git: https://github.com/espressif/esp-bsp.git | ||
``` | ||
|
||
For example, you can use this for ESP-BOX: | ||
|
||
``` | ||
esp-box: "*" | ||
``` | ||
|
||
## ROM | ||
--- | ||
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: | ||
|
||
1. Game: `0x00100000` | ||
2. Game: `0x00200000` | ||
3. Game: `0x00300000` | ||
|
||
You can use this command for flash the game into right flash region: | ||
|
||
``` | ||
python esptool.py --chip esp32s3 --port "COM3" --baud $((230400*4)) write_flash -fs 4MB 0x100000 .\games\supermario.nes | ||
``` | ||
|
||
## Copyright | ||
--------- | ||
|
||
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 | ||
components/nofrendo is Copyright (c) 1998-2000 Matthew Conte ([email protected]) and licensed under the GPLv2. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
file(GLOB_RECURSE T_SOURCES *.c) | ||
file(GLOB_RECURSE IMAGES images/*.c) | ||
|
||
idf_component_register( | ||
SRCS ${T_SOURCES} ${IMAGES} | ||
INCLUDE_DIRS "." | ||
PRIV_REQUIRES driver nofrendo hid nvs_flash | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: "1.0.0" | ||
description: esp_nes | ||
dependencies: | ||
idf: ">=5.0" | ||
ws_7inch: | ||
version: "bsp/7inch_update" | ||
path: "SquareLine/boards/custom_waveshare_7inch/components/ws_7inch/" | ||
git: https://github.com/espressif/esp-bsp.git |
Oops, something went wrong.