GithubHelp home page GithubHelp logo

pebri86 / esplay-retro-emulation Goto Github PK

View Code? Open in Web Editor NEW
420.0 16.0 85.0 13.09 MB

Retro Emulation Collection for ESPlay Hardware, an ESP32 based game console

Home Page: https://www.makerfabs.com/esplay-micro.html

License: MIT License

C 97.80% Makefile 0.09% C++ 0.33% Objective-C 1.71% Shell 0.02% HTML 0.06%
sms gb gameboy gbc esp32 retro console emulator gamegear odroid-go

esplay-retro-emulation's Introduction

ESPlay Retro Emulation

retro-emulation GitHub release Github All Releases Github Last Commit

Description and Video Review

Youtube Video

This projects is a set of firmware for playing second and third generation gaming platform and to be runs on esplay-micro-hardware, an ESP32 Devices with WROVER Module (4MB PSRAM) which you could find the details on my hackaday page. This hardware also commercially available on the Makerfabs Online Store. Due to small Flash ROM (only 4MB) currently only 3 game emulator could be bundled altough this device support 7 emulator including Atari, PC Engine, ZX-Spectrum, MSX, etc. The main feature of this projects is bundled as follow:

  • Nofrendo NES Emulator for play Nintendo ROM
  • GNUBoy for play GameBoy and GameBoy Color
  • SMSPlusGX could play Sega Master System, Game Gear and Coleco Vision ROM
  • In-Game menu on Emulator
  • NEW! Built-in Audio Player for playing music, support WAV, MP3, OGG, and FLAC audio files.
  • Esplay launcher, new code base using UGUI library

Place your Audio files that supported (mp3, flac, wav and ogg) to audio folder on the root of sdcard, if folder not exist just created one and place audio files on them.

esplay-audio1

esplay-audio2

Launcher Option

Now you have options to choose launcher, Retro-ESP32 launcher by 32teeth or ESPlay launcher by me. ESPlay Launcher has Wifi AP options so you can upload rom by using web interface via phone or your computer.

Here spoiler Retro-ESP32 launcher running on esplay-micro-hardware esplay-micro-hardware

Compiling

This code is an esp-idf project. You will need esp-idf to compile it. Newer versions of esp-idf may introduce incompatibilities with this code; for your reference, the code was tested against release/v3.3 branch of esp-idf. edit mkrelease.sh with correct location for your mkfw. Find mkfw tool in the base firmware in my repository.

Also to get compiling correctly you need ffmpeg installed on your system and included in the PATH Environment.

edit mkrelease.sh to match your setup path(to match your location installation of esp-idf and clone of this repo). and simply execute mkrelease.sh then you'll find esplay-retro-emu.fw in the root of repo.

run mkrelease.sh to compile and make an .fw file that could be flashed by base firmware bootloader. Place .fw file in esplay/firmware folder on sdcard, power on esplay device while press B button until bootloader screen appear. select .fw then A -> Start to flash firmware.

Base firmware is a modified bootloader fork from odroid-go.

ROM

Extract skeleton.zip from docs, and copy to the root of sdcard. Please provide ROM by yourself and place them in the appropriate folder on sdcard.

DONATION

The software are free to use but we also accept small donation to make the project lives and continue development Donate

Source Author and Special Thanks

  • Audio Player based on ogo-shell projects by [Passpartout], thank you very much for sharing awesome code.
  • All emulator based on Go-Play for Odroid-go by OtherCrashOverride.

All Contributors

Thanks to contribute your work for this project.

esplay-retro-emulation's People

Contributors

32teeth avatar ln93 avatar pebri86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esplay-retro-emulation's Issues

NES emulator failed to save

Hi, pebri.
When I save the NES game ,The game will restart and fail to save. but other simulators can be saved successfully.
I used ESP32-WROVER-IB .
I don't know why.

GBC games slower with upscaling via bilinear interpolation

I've noticed when playing GBC games (Pokemon Gold/Silver) that when using bilinear interpolation upscaling, game is running slower and audio is choppier comparing to "native" resolution or upscaling with "nearest neighbour".

I suppose it's because bilinear interpolation is more complicated algorithm to calculate, so CPU is probably not powerful enough to handle it. However, is there any way how this can be optimised? Using "nearest" upscaling looks pretty bad and "native" resolution is just small to play comfortably. Or maybe using different display with 4x resolution of GBC like (320x288) would be possible? Then upscaling would be simple to do without compromising graphic quality.

Application fails to start

Hi, I recently made this fun project, but I'm running into a problem. The base firmware works fine, but when I select esplay-retro-emu. ESPlay will be black screen, reboot. I wonder if this is caused by the difference in Flash space.
Below is my configuration:
ESP32-WOROVER-E 8MB PSRAM + 8MB Flash

serial message:
...
OK: [3] Length=0x119860
write_partition_table: startTableEntry=4, startFlashAddress=0x050000
Booting application.
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
...

settings.h: No such file or directory

/home/davy/Downloads/esplay-retro-emulation-1.5.1-esplay-micro/esplay-launcher/main/main.c:15:22:
fatal error: settings.h: No such file or directory
compilation terminated.

I have esp-idf 3.3 and edited mkrelease.sh to use the proper path for mkfw but my attempts to compile keep being met with this error and I can't seem to find settings.h anywhere in the include path. I've tried releases 1.5.1 and 1.5 with the same error so far.

Am I missing something?

Thanks for the awesome project!

how to add video output

I know that there was a module name fabgl can realize the goal.
I found the other device was out via vga.

Header Mismatch Error

I have a new ESPlay micro received this week (red case and button caps). I am trying to update the firmware with the Retro ESP32.fw file. I have copied the file into the firmware folder by windows 10. I place the sd card into the ESPlay Micro and boot to the bootloader screen. I see 3 choices in the bootloader screen

esplay-retro-emu
mp3-player_dac
Retro ESP32

If I select the Retro ESP32 i am greeted by screen that says

01 Retro ESP32

HEADER MATCH ERROR

{START}

{B} Cancel

If I choose start it will attempt to write by continuously report write error and at the conclusion I will be returned to the bootloader menu with the same choices. I can return the device to the original state by selecting the first choice

esplay--retro-emu

And then i am back to square 1.

I have tried the newest Retro ESP32.fw file as well as older versions of the file but all give the same HEADER MISMATCH error.

mkfw.exe ?

./mkrelease.sh: line 27: /home/Peruri/esp/esplay-base-firmware/tools/mkfw/mkfw.exe: No such file or directory

/home/Peruri/esp/esplay-base-firmware/tools/mkfw/mkfw.exe Retro-Emulation assets/tile.raw 0 16 1310720 launcher esplay-launcher/build/RetroLauncher.bin 0 17 524288 esplay-nofrendo esplay-nofrendo/build/esplay-nofrendo.bin 0 18 458752 esplay-gnuboy esplay-gnuboy/build/esplay-gnuboy.bin 0 19 1179648 esplay-smsplusgx esplay-smsplusgx/build/esplay-smsplusgx.bin

where is this file?

edit:

edit mkrelease.sh with correct location for your mkfw.
Find mkfw tool in the base firmware in my repository.

https://github.com/pebri86/esplay-base-firmware/tree/master/tools
I see it here, sorry, I didn't read the documentation thoroughly

mkfw error

esp-idf 3.3

/Users/admin/esp/esplay-retro-emulation/retro-esp32/main/main.c:1241:15: error: implicit declaration of function 'set_rom_name_settings' [-Werror=implicit-function-declaration]
set_rom_name_settings(file_to_load);

Flashing battery during switch on

Hi i have an issue where when i turn off the esplay and back on again it shows empty flashing battery, i have to press menu button then it starts, and has full battery, also when sound is 100% it mutes also screen brightness goes dim at 100 i have to set to 95 this is when using latest esplay. Fw

Can't read games from SD card

I DIY an Esplay Micro compatible device using ESP32 WROVER, flashed esplay base firmware to it, and then successfully flashed "esplay-retro-emu.fw" from SD Card. However once it rebooted into Esplay Retro main interface, it could not find the *.nes games under the \roms\nes folder, always showed "0 games available", do you know what's the issue? Based on my understanding, the base firmware could read and flashed "esplay-retro-emu.fw" file from SD Card, it means the SD Card had been detected successfully. I have made sure the folders on SD Card were unzip from your "skeleton.zip" file.

NES simulator mapper Incomplete

Hi pebri,
When I use it, I find that some NES games can't run, and they crash and restart repeatedly. After querying the data and checking the code, the mapper of the simulator is incomplete. Is there any way to improve it?
Or add a mapper to the emulator.
Thank You.

settings.h missing

/home/username/esp32/esplay-retro-emulation-master/esplay-nofrendo/main/main.c:21:22: fatal error: settings.h: No such file or directory
#include "settings.h"
^
compilation terminated.

all the emulator builds fail due to this

/home/username/esp32/esplay-retro-emulation-master/esplay-launcher/main/include/event.h:4:21: fatal error: gamepad.h: No such file or directory
#include <gamepad.h>

gamepad.h also missing

edit: I was able to find what might be the correct headers in esplay-sdk but I can't figure out how to modify the mkrelease.sh to incorporate them

Coleco Roms Crash system

I'm enjoying my ESPlay but have noticed that any Coleco Rom I try to load up crashes the system. Basically it throws a loading loop. The only way for me to get out of the loop is to reset the board with the Menu button on startup. All the ROMS I've tried work with my OpenEmu (Mac) and are in .col format.
NES, Gameboy, Gameboy Color, and Game Gear all run great. SMS is a little slow, especially with Sonic the Hedgehog. I finally picked up a speaker and finished printing a case for it.

Now if I could get Coleco running, everything would be peachy. Any thoughts?

Can you update to the latest IDF

/home/gm/esplay-retro-emulation/esplay-launcher/components/acodecs/src/xmplite/loaders/xm_load.c: In function 'xm_load': /home/gm/esplay-retro-emulation/esplay-launcher/components/acodecs/src/xmplite/loaders/xm_load.c:645:38: error: 'snprintf' output truncated before the last format character [-Werror=format-truncation=] snprintf(tracker_name, 20, "%-20.20s", xfh.tracker); ^ /home/gm/esplay-retro-emulation/esplay-launcher/components/acodecs/src/xmplite/loaders/xm_load.c:645:2: note: 'snprintf' output 21 bytes into a destination of size 20 snprintf(tracker_name, 20, "%-20.20s", xfh.tracker); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[1]: *** [/home/gm/esp/esp-idf/make/component_wrapper.mk:298: src/xmplite/loaders/xm_load.o] Error 1 make: *** [/home/gm/esp/esp-idf/make/project.mk:649: component-acodecs-build] Error 2 make: *** Waiting for unfinished jobs....
When I manually compile esplay launcher, the above error will appear. Other things are compiled normally.
I use idf4.4.1. I don't know why this error occurs
I can't compile others, for example, gnuboy lacks display h. Nofrendo is missing settings h

possible optimization to avoid psram for gnuboy

Hello,

I see that you have 2 modes to load the ROM... one directly from an sdcard file to PSRAM, and the other is directly flashing a partition. (gnuboy)
I don't know if you a using PSRAM elsewhere, but for the case where you load from a partition, do you now that you can avoid to copy to PSRAM and directly mmap the partition? look at esp_partition_mmap() function. Of course, the address will be read-only.

cheers

How to restart config the project?

This is a great project. but I am a new esp32 learner.Can you guide me how to configure the project?
I have git checkout esp-idf branch to release/v3.3, and install ffmpeg. when I run ./mkrelease.sh, I have to restart config the project. The following is print out:
GENCONFIG
*

  • Restart config...
  • Application manager

Use time/date stamp for app (APP_COMPILE_TIME_DATE) [Y/n/?] y
Exclude PROJECT_VER from firmware image (APP_EXCLUDE_PROJECT_VER_VAR) [N/y/?] n
Exclude PROJECT_NAME from firmware image (APP_EXCLUDE_PROJECT_NAME_VAR) [N/y/?] n
The length of APP ELF SHA is stored in RAM(chars) (APP_RETRIEVE_LEN_ELF_SHA) [16] (NEW)
*

  • ESP BLE Mesh Support

ESP BLE Mesh Support (BLE_MESH) [N/y/?] (NEW)n

  • SPI RAM config

Initialize SPI RAM when booting the ESP32 (SPIRAM_BOOT_INIT) [Y/n/?] y
Ignore PSRAM when not found (SPIRAM_IGNORE_NOTFOUND) [Y/n/?] y
SPI RAM access method

  1. Integrate RAM into ESP32 memory map (SPIRAM_USE_MEMMAP)
  1. Make RAM allocatable using heap_caps_malloc(..., MALLOC_CAP_SPIRAM) (SPIRAM_USE_CAPS_ALLOC)
  2. Make RAM allocatable using malloc() as well (SPIRAM_USE_MALLOC)
    choice[1-3?]: 1
    Type of SPI RAM chip in use
  1. Auto-detect (SPIRAM_TYPE_AUTO)
  1. ESP-PSRAM32 or IS25WP032 (SPIRAM_TYPE_ESPPSRAM32)
  2. ESP-PSRAM64 or LY68L6400 (SPIRAM_TYPE_ESPPSRAM64)
    choice[1-3]: 1
    Set RAM clock speed
  3. 40MHz clock speed (SPIRAM_SPEED_40M)
  1. 80MHz clock speed (SPIRAM_SPEED_80M)
    choice[1-2?]: 2
    Run memory test on SPI RAM initialization (SPIRAM_MEMTEST) [Y/n/?] y
    Enable workaround for bug in SPI RAM cache for Rev1 ESP32s (SPIRAM_CACHE_WORKAROUND) [Y/n/?] y
    Enable bank switching for >4MiB external RAM (SPIRAM_BANKSWITCH_ENABLE) [Y/n/?] y
    Amount of 32K pages to reserve for bank switching (SPIRAM_BANKSWITCH_RESERVE) [8] 8
    Allow .bss segment placed in external memory (SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY) [N/y/?] n
    SPI host to use for 32MBit PSRAM
  1. HSPI host (SPI2) (SPIRAM_OCCUPY_HSPI_HOST)
  1. VSPI host (SPI3) (SPIRAM_OCCUPY_VSPI_HOST)
  1. Will not try to use any host, will abort if not able to use the PSRAM (SPIRAM_OCCUPY_NO_HOST)
    choice[1-3?]: 2
    SPI PSRAM WP(SD3) Pin when customising pins via eFuse (read help) (SPIRAM_SPIWP_SD3_PIN) [7] 7
    Enable SPI PSRAM 2T mode (SPIRAM_2T_MODE) [N/y/?] (NEW)y
  • Wi-Fi

Max number of WiFi static RX buffers (ESP32_WIFI_STATIC_RX_BUFFER_NUM) [10] 10
Max number of WiFi dynamic RX buffers (ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM) [32] 32
Type of WiFi TX buffers

  1. Static (ESP32_WIFI_STATIC_TX_BUFFER)
  1. Dynamic (ESP32_WIFI_DYNAMIC_TX_BUFFER)
    choice[1-2?]: 1
    Max number of WiFi static TX buffers (ESP32_WIFI_STATIC_TX_BUFFER_NUM) [16] 16
    WiFi CSI(Channel State Information) (ESP32_WIFI_CSI_ENABLED) [N/y/?] n
    WiFi AMPDU TX (ESP32_WIFI_AMPDU_TX_ENABLED) [Y/n/?] y
    WiFi AMPDU TX BA window size (ESP32_WIFI_TX_BA_WIN) [6] 6
    WiFi AMPDU RX (ESP32_WIFI_AMPDU_RX_ENABLED) [Y/n/?] y
    WiFi AMPDU RX BA window size (ESP32_WIFI_RX_BA_WIN) [6] 6
    WiFi NVS flash (ESP32_WIFI_NVS_ENABLED) [Y/n/?] y
    WiFi Task Core ID
  1. Core 0 (ESP32_WIFI_TASK_PINNED_TO_CORE_0)
  1. Core 1 (ESP32_WIFI_TASK_PINNED_TO_CORE_1)
    choice[1-2?]: 1
    Max length of WiFi SoftAP Beacon (ESP32_WIFI_SOFTAP_BEACON_MAX_LEN) [752] 752
    WiFi mgmt short buffer number (ESP32_WIFI_MGMT_SBUF_NUM) [32] 32
    Enable WiFi debug log (ESP32_WIFI_DEBUG_LOG_ENABLE) [N/y/?] n
    WiFi IRAM speed optimization (ESP32_WIFI_IRAM_OPT) [Y/n/?] y
    WiFi RX IRAM speed optimization (ESP32_WIFI_RX_IRAM_OPT) [Y/n/?] (NEW) y
  • LWIP

Enable copy between Layer2 and Layer3 packets (L2_TO_L3_COPY) [N/y/?] n
Support receiving and sending ethernet packets with VLAN header (ETHARP_SUPPORT_VLAN) [N/y/?] (NEW)n
Enable LWIP IRAM optimization (LWIP_IRAM_OPTIMIZATION) [N/y/?] n
Max number of open sockets (LWIP_MAX_SOCKETS) [4] 4
Randomize the local port for the first (LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS) [Y/n/?] (NEW) y
Support LWIP socket select() only (USE_ONLY_LWIP_SELECT) [N/y/?] n
Enable SO_REUSEADDR option (LWIP_SO_REUSE) [N/y/?] n
Enable SO_RCVBUF option (LWIP_SO_RCVBUF) [N/y/?] n
Enable fragment outgoing IP packets (LWIP_IP_FRAG) [N/y/?] n
Enable reassembly incoming fragmented IP packets (LWIP_IP_REASSEMBLY) [N/y/?] n
Enable LWIP statistics (LWIP_STATS) [N/y/?] n
Enable LWIP ARP trust (LWIP_ETHARP_TRUST_IP_MAC) [N/y/?] n
Send gratuitous ARP periodically (ESP_GRATUITOUS_ARP) [Y/n/?] y
GARP timer interval(seconds) (GARP_TMR_INTERVAL) [60] 60
TCPIP task receive mail box size (TCPIP_RECVMBOX_SIZE) [32] 32
DHCP: Perform ARP check on any offered address (LWIP_DHCP_DOES_ARP_CHECK) [Y/n/?] y
DHCP: Restore last IP obtained from DHCP server (LWIP_DHCP_RESTORE_LAST_IP) [N/y/?] n
Enable IPV6 stateless address autoconfiguration (LWIP_IPV6_AUTOCONFIG) [N/y/?] (NEW) n
TCP/IP Task Stack Size (TCPIP_TASK_STACK_SIZE) [2560] 2560
TCP/IP task affinity

  1. No affinity (TCPIP_TASK_AFFINITY_NO_AFFINITY)
  1. CPU0 (TCPIP_TASK_AFFINITY_CPU0)
  2. CPU1 (TCPIP_TASK_AFFINITY_CPU1)
    choice[1-3?]: 1
    Enable LWIP ASSERT checks (LWIP_ESP_LWIP_ASSERT) [Y/n/?] (NEW)y

Finally,not build anything, just jump to Restart config...

Some games always on loading state

ISSUE DESCRIPTION
Some games always on loading state

How to reproduce
Play some some, and found out some rom are in loading state forever.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.