Git Product home page Git Product logo

retro-go's Introduction

Table of contents

Description

Retro-Go is a firmware to play retro games on ESP32-based devices (officially supported are ODROID-GO and MRGC-G32). The project consists of a launcher and half a dozen applications that have been heavily optimized to reduce their cpu, memory, and flash needs without reducing compatibility!

Supported systems:

  • Nintendo: NES, SNES (slow), Gameboy, Gameboy Color, Game & Watch
  • Sega: SG-1000, Master System, Mega Drive / Genesis, Game Gear
  • Coleco: Colecovision
  • NEC: PC Engine
  • Atari: Lynx
  • Others: DOOM (including mods!)

Retro-Go features:

  • In-game menu
  • Favorites and recently played
  • GB color palettes, RTC adjust and save
  • NES color palettes, PAL roms, NSF support
  • More emulators and applications
  • Scaling and filtering options
  • Better performance and compatibility
  • Turbo Speed/Fast forward
  • Customizable launcher
  • Cover art and save state previews
  • Multiple save slots per game
  • Wifi file manager
  • And more!

Screenshots

Preview

Installation

ODROID-GO

  1. Download retro-go_1.x_odroid-go.fw from the release page and copy it to /odroid/firmware on your sdcard.
  2. Power up the device while holding down B.
  3. Select retro-go in the files list and flash it.

MyRetroGameCase G32 (GBC)

  1. Download retro-go_1.x_mrgc-g32.fw from the release page and copy it to /espgbc/firmware on your sdcard.
  2. Power up the device while holding down MENU (the volume knob).
  3. Select retro-go in the files list and flash it.

Generic ESP32

This method is intended to be used when .fw support isn't available (when porting to a new device) or undesirable (devices with smaller flash).

  1. Build a .img file (refer to Building Retro-Go below)
  2. Flash the image: esptool.py write_flash --flash_size detect 0x0 retro-go_*.img Note: Your particular device may require extra steps (like holding a button during power up), different esptool flags, or modifying base.sdkconfig.

Usage

Game covers

Game covers should be placed in the romart folder at the base of your sd card. You can obtain a pre-made pack here. Retro-Go is also compatible with the older Go-Play romart pack.

You can add missing cover art by creating a PNG image (160x168, 8bit) named according to the following scheme: /romart/nes/A/ABCDE123.png where nes is the same as the rom folder, and ABCDE123 is the CRC32 of the game (press A -> Properties in the launcher to find it).

BIOS files

Some emulators support loading a BIOS. The files should be placed as follows:

  • GB: /retro-go/bios/gb_bios.bin
  • GBC: /retro-go/bios/gbc_bios.bin
  • FDS: /retro-go/bios/fds_bios.bin
  • MSX: In folder /retro-go/bios/msx/ put: MSX.ROM MSX2.ROM MSX2EXT.ROM MSX2P.ROM MSX2PEXT.ROM FMPAC.ROM DISK.ROM MSXDOS2.ROM PAINTER.ROM KANJI.ROM

Game & Watch

The roms must be packed with LCD-Game-Shrinker and a tutorial can be found here.

Wifi

To use wifi you will need to create a /retro-go/config/wifi.json config file. Its content should look like this:

{
  "ssid": "my-network",
  "password": "my-password"
}

Multiple networks can be defined using the following format (then selectable in the Options menu):

{
  "ssid0": "my-network",
  "password0": "my-password",
  "ssid1": "my-network",
  "password1": "my-password",
  "ssid2": "my-network",
  "password2": "my-password"
}

Time synchronization

Time synchronization happens in the launcher immediately after a successful connection to the network. This is done via NTP by contacting pool.ntp.org and cannot be disabled at this time. Timezone can be configured in the launcher's options menu.

File manager

You can find the IP of your device in the about menu of retro-go. Then on your PC navigate to http://192.168.x.x/ to access the file manager.

External DAC (headphones)

Retro-Go supports the external DAC mod for the ODROID-GO which allows high quality audio through headphones. You can switch to it in the menu Audio Out: Ext DAC.

Pinout
GO PIN PCM5102A PIN
1 GND
2 -
3 LCK
4 DIN
5 BCK
6 VIN
7 -
8 -
9 -
10 -

Issues

Black screen / Boot loops

Retro-Go typically detects and resolves application crashes and freezes automatically. However, if you do get stuck in a boot loop, you can hold DOWN while powering up the device to return to the launcher.

Sound quality

The volume isn't correctly attenuated on the GO, resulting in upper volume levels that are too loud and lower levels that are distorted due to DAC resolution. A quick way to improve the audio is to cut one of the speaker wire and add a 33 Ohm (or thereabout) resistor in series. Soldering is better but not required, twisting the wires tightly will work just fine. A more involved solution can be seen here. Alternatively you can use the headphones DAC mod mentioned earlier in this document.

Game Boy SRAM (aka Save/Battery/Backup RAM)

In Retro-Go, save states will provide you with the best and most reliable save experience. That being said, please read on if you need or want SRAM saves. The SRAM format is compatible with VisualBoyAdvance so it may be used to import or export saves.

You can configure automatic SRAM saving in the options menu. A longer delay will reduce stuttering at the cost of losing data when powering down too quickly. Also note that when resuming a game, Retro-Go will give priority to a save state if present.

Theming

Instructions moved to THEMING.md.

Building

Instructions moved to BUILDING.md.

Acknowledgements

License

Everything in this project is licensed under the GPLv2 license with the exception of the following components:

  • fmsx/components/fmsx (MSX Emulator, custom non-commercial license)
  • handy-go/components/handy (Lynx emulator, zlib)

retro-go's People

Contributors

32teeth avatar akrobate avatar cralex avatar ducalex avatar fantasygmm avatar jdcanado avatar kd-mm2 avatar ladyada avatar ndrchvzz avatar tomzx 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retro-go's Issues

Start Screen: Auto always loads Carousel on boot

Describe the bug
Any time the start screen setting is set to auto, the system boots to the carousel when it should've booted to the ROM browser. Only setting it to Browser loads the Browser on boot. Tested on ODG with public release 1.34.

To Reproduce
Steps to reproduce the behavior:

  1. Opon the options menu and set Start Screen: to Auto
  2. Go to the ROM browser and turn off the unit. (It doesn't matter if you play a game first or not.)
  3. Turn on the unit again, and the Carousel for the previous system appears.

What's the status of the Retro ESP32 target?

I know that the account behind its stock firmware occasionally contributes, but it doesn't seem like anyone's building firmware images for it. I ask because there's definitely a number of these out in the wild (they were in stock as recent as November at https://www.tindie.com/products/handheld-gaming/retro-esp32/ ) and it would be nice to support them if the target is mature enough.

I can't test any builds for it unfortunately since I sold mine a long time ago. Part of that was because my casemodding skills left something to be desired, but another reason was that its stock firmware felt clunky to me.

Mortal Kombat 3 Europe Game Boy rom crashes on level loading

When loading a level most of the time the game crash there.

1 run the game
2 select and player and a level of difficulty
wait for the time juste after the line of symbols(game code)
and voila, crash

Expected behavior
no crash on level loading

If i can help in a way i will be happy to.

Have a nice day and thanks for all the things you do for the community.

Request to add an Atari800 emulator.

It would be nice to add the atari 800 emulator. There are many interesting games out there. In another esp32 based project I found a working emlator, but its drawback is that it only supports the * .rom format. Unfortunately, most of the interesting games are in the following format: (* .atr, * .com, * .xex, * .cas, * .bas). Unfortunately, my programming knowledge is very poor. I am a self-taught and it would take me years to adapt the emulator to support other formats.Maybe you could have a look at the project: (https://github.com/Jean-MarcHarvengt/MCUME).

xtensa-esp32-elf/bin/ld: region `iram0_0_seg' overflowed by 16152 bytes

Unfortunately I can't build the release 1.34 on my ESP32-WROVER 4MB:

$ RG_TOOL_TARGET=mtojek-go ./rg_tool.py build-img launcher retro-run
...
/Users/mtojek/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: retro-run.elf section `.iram0.text' will not fit in region `iram0_0_seg'
/Users/mtojek/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: IRAM0 segment data does not fit.
/Users/mtojek/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: region `iram0_0_seg' overflowed by 16152 bytes
collect2: error: ld returned 1 exit status
make[3]: *** [retro-run.elf] Error 1
make[2]: *** [CMakeFiles/retro-run.elf.dir/all] Error 2
make[1]: *** [CMakeFiles/app.dir/rule] Error 2
make: *** [app] Error 2
make failed with exit code 2
Traceback (most recent call last):
  File "./rg_tool.py", line 333, in <module>
    build_app(app, args.target, command == "profile", args.with_networking)
  File "./rg_tool.py", line 208, in build_app
    subprocess.run("idf.py app", shell=True, check=True, cwd=os.path.join(os.getcwd(), app))
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'idf.py app' returned non-zero exit status 2.

Is there an option to select only NES emulator and Doom :)?

Sega Megadrive/Genesis not available?

Can't seem to find Megadrive/Genesis emulator in the menu.
Using Retro Go 1.32.1 on an ODroid Go.
I am sure this is something silly or I am missing something.

.img Building Showing this error

So, im trying to port doom to the m5stickC Plus and while building the .img for the flashing I got this error

sudo python rg_tool.py build-fw launcher prboom-go
[sudo] password for thetest21:
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
IDF_PATH is not defined. Are you running inside esp-idf environment?

I have install esp-idf and requirements and even just building it as it is doesn't work

ESP32 Mini Game Box Port

As you may have seen on the forums, I was able to build a working firmware image! I'm building on windows 10 with ESP-IDF 4.1 based on version 1.3.3, since this is all what I had set up already.

Like you suggested, basing it off of the mrgc-g32 target worked for generating an image that the device's bootloader would allow to flash. After tweaking just a few values, I was able to build the launcher and gnuboy. The speaker, screen (with brightness controls), and buttons all work out of the box. The buttons match the vendor's firmware, so from left to right it's Start, Select, Menu, and Power. (You hold Menu/Sound on boot to access the bootloader.) If I enable the option button variable, I imagine the Option button will map itself to Power. (You have to hold down the Power button to shut the unit down, so this'll work fine.)

I'm attaching the modified target file that I used to build the firmware. (With the resolution flipped the right way around.)
mrgc-g32.zip

I noticed that current retro-go has made some changes in the target file, so now I'm working on building the release version for this device to see if it'll work and if I can get wifi working. The finer details, such as battery capacity, are unfortunately beyond me.

Regarding getting a serial console going... It appears on my computer as "USB-SERIAL CH340 (COM16)" whether or not Retro-Go is running. So I tried running rg_tool.py --port=COM16 --target=mrgc-g32 run launcher while Retro-Go was booted, but it failed to connect. I can give you the exact error message once I'm done trying to build more firmware. :)

Edit: I wasn't able to finish the build of the current version. Like my earlier build, this is with the sd-card fix and panic patches applied. Same IDF.
[518/673] Linking CXX static library esp-idf\newlib\libnewlib.a ninja: build stopped: subcommand failed. ninja failed with exit code 1 Traceback (most recent call last): File "C:\Users\Cralex\retro-go-new\retro-go\rg_tool.py", line 333, in <module> build_app(app, args.target, command == "profile", args.with_networking) File "C:\Users\Cralex\retro-go-new\retro-go\rg_tool.py", line 208, in build_app subprocess.run("idf.py app", shell=True, check=True, cwd=os.path.join(os.getcwd(), app)) File "C:\Users\Cralex\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'idf.py app' returned non-zero exit status 2.

Edit 2: Looks like the screen still needs some work. I'll add a margin and see if I can get it aligned properly. As you can see, the colors are also a bit off... Still, it's amazing to see how portable Retro-Go is and how well things work already. (Still running 1.3.3)
IMG_2632
IMG_2631

I thought I turned on the option button variable before my last build, but the power button still doesn't do anything in software. Since the stock firmware doesn't do anything with that button either other than power on and off, I'm wondering if they just don't have it talk to the firmware at all... Also, I don't think there's a disk LED, just power and charge indicators.

ESP32-WROVER ILI9341: LCD suddenly inverts colors

Follow-up on #25

Hi,

I'm trying to find the root cause of the color inversion that happens at random times while playing. It happens only once, it doesn't come back to the proper color palette.

More information:

  1. Current pinout. LCD MISO pin is connected to GND.
  2. I had to invert colors on startup.
  3. I tried to use the power from the USB charger, batteries, and laptop. Always the same results.
  4. It's only a gut feeling, but sometimes it looks like the problem happens when the in-game screen starts scrolling.
  5. I don't see any other glitches, or corrupted graphics. I assume that the breadboard and wires are fine.
  6. Once the color bug happens, we can only wait until the screen goes white (random moment). In this case, we have to reset the ESP32.
  7. Now, I'm thinking that it isn't really inverted, but rather only B (blue) part is rendered?
See photos

301732635_751017679341512_808025239104929634_n
301456839_376194494537573_6161497735981213556_n
300330443_500205648609245_1141412462760150898_n

Thank you for any help and guidance!

Flashing into generic ESP32 board

Board model
TTGO ESP32 WROVER-B (4MB)
TTGO32 4MB

Process

  1. Build an image directly (the 4MB flash wouldn't allow to have the goplay bootloader and install fw from there) with:
    ./rg_tool.py build-img

  2. Flashed into the generic ESP32 board succesfully after erasing all its flash previously with:
    esptool.py -b 921600 write_flash 0x0 retro-go.img

Flashing logs:

esptool.py v2.9-dev
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting.......
Detecting chip type... ESP32
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:0d:8e:e6:c1:b0
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 393216 bytes to 239105...
Wrote 393216 bytes (239105 compressed) at 0x00000000 in 21.8 seconds (effective 144.0 kbit/s)...
Hash of data verified.

Problem
Program is not booting into the esp32. The screen shows blank and no feedback.
From monitoring the esp32 boot we found this error log:

I (184) boot: Loaded app from partition at offset 0x10000
I (185) boot: Disabling RNG early entropy source...
E (197) spi_flash: Detected size(4096k) smaller than the size in the binary image header(16384k). Probe failed.
abort() was called at PC 0x40080f78 on core 0
0x40080f78: start_cpu0_default at /home/esp/esp-idf/components/esp32/cpu_start.c:485 (discriminator 15)

Additional info
We tried to flash smaller builds with only the launcher and emulators individually to see if the 4MB was not enough for the full retro-go build but the problem persists the same.

No sound on SNES emulator in Retro-Go 1.31.1, but sound works on the other emulators

I just received a MRGC G32 ESP32 Retro Gaming Console, and installed Retro-Go 1.31.1 for the SNES emulator. However, I have no sound from the several SNES games I have tried (F-Zero, Castlevania - Dracula X, Super Mario World, etc). The NES emulator plays sound just fine.

I have tried changing the "Audio out" option from "Ext DAC" to "Dummy", but that doesn't seem to be helping.

I'm happy to share debugging logs or whatever else you need - thanks for creating this lovely software package!

Can I use retro-go for commercial education?

Hi ducalex
We are an embedded education and training company located in Shenzhen, China. www.100ask.net is our official website homepage. Recently, in order to better use esp32 to carry out related project courses, we saw your game console comprehensive project retro-go,
retro-go is a great and amazing project, very impressive after experimenting! We want to let more people know about him through education. Our plan is:

  1. We will maintain and support our DShanMCU-Mio (Mio) (ESP32S3-R8 16MB Flash) development board game console version for a long time
  2. Add more features to retro-go, such as multiple input devices can be used at the same time, only need to configure in the settings, without recompiling and burning
  3. Introduce comprehensive documentation and tutorials, so that more people can better understand and use retro-go
  4. There will also be systematic video tutorials, so that more people can learn about esp32 and retro-go
  5. Release the LVGL GUI version, this is mainly for teaching, if you want we can merge branches at any time!

Our main contributions to LVGL:
lvgl/lvgl#3601
lvgl/lvgl#3408

Some demonstrations of our retro-go-based results:
https://youtu.be/Z7cNesAQYAo
https://youtu.be/hTvfZPf3qiw

We hope that after getting your approval and authorization suggestions, we will launch the PCB integrated board and the above 1-3 points in the next step. Before that, I would like to know your opinions and suggestions in order to better carry out this project. Very Looking forward to your reply!

Wish everything is well! YobeZhou

Stack smashing protect error while checking time with NTP

Hi,

I've been fighting with this issue for few hours:

$ xtensa-esp32-elf-addr2line -pfiaC -e launcher/build/launcher.elf Backtrace:0x400821b5:0x3ffd30a00x400900e1:0x3ffd30c0 0x40097c65:0x3ffd30e0 0x400d3844:0x3ffd3160 0x400e4dba:0x3ffd3180 0x400e4e71:0x3ffd3200 0x4016d742:0x3ffd3290 0x4016d279:0x3ffd32c0 0x4016d33d:0x3ffd3300 0x40093565:0x3ffd3320
0x00000bac: ?? ??:0
0x40097c65: abort at /Users/mtojek/Documents/esp-idf/components/newlib/abort.c:46
0x400d3844: __stack_chk_fail at /Users/mtojek/Documents/esp-idf/components/esp_system/stack_check.c:36
0x400e4dba: rg_network_sync_time at /Users/mtojek/Documents/retro-go/components/retro-go/rg_network.c:160
0x400e4e71: network_event_handler at /Users/mtojek/Documents/retro-go/components/retro-go/rg_network.c:55
 (inlined by) network_event_handler at /Users/mtojek/Documents/retro-go/components/retro-go/rg_network.c:33
0x4016d742: handler_execute at /Users/mtojek/Documents/esp-idf/components/esp_event/esp_event.c:145
0x4016d279: esp_event_loop_run at /Users/mtojek/Documents/esp-idf/components/esp_event/esp_event.c:598 (discriminator 3)
0x4016d33d: esp_event_loop_run_task at /Users/mtojek/Documents/esp-idf/components/esp_event/esp_event.c:115 (discriminator 15)
0x40093565: vPortTaskWrapper at /Users/mtojek/Documents/esp-idf/components/freertos/port/xtensa/port.c:131

I found out that serv_addr is being corrupted by memcpy. Apparently, in my case h_length= 24 (?!) and I couldn't find an explanation why does it happen. To fix it, I had to replace h_length with 4 (as IPv4):

memcpy(&serv_addr.sin_addr.s_addr, server->h_addr, 4);

I tried to print the content of hostent:

    RG_LOGI("addr bc: %s, addr_list: %d, h_length: %d\n", inet_ntoa(*server->h_addr), sizeof(server->h_addr_list), server->h_length);

    struct in_addr **inaddr_ptr;
    inaddr_ptr = (struct in_addr **) server->h_addr_list;
    while (*inaddr_ptr != NULL)
    {
       RG_LOGI("addr: %s\n", inet_ntoa(**inaddr_ptr));
       inaddr_ptr++;
    }

... and got this:

STACK:4936, HEAP:82+3635 (62+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:78.80
STACK:4936, HEAP:82+3635 (62+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:63.40
[info] network_event_handler: Connected! IP: 192.168.0.25, RSSI: -55
[info] rg_network_sync_time: addr bc: 94.23.94.78, addr_list: 4, h_length: 24
[info] rg_network_sync_time: addr: 94.23.94.78
[info] rg_network_sync_time: Received Time: Sun Oct 30 13:54:28 2022, we were 200206ms behind
[info] rg_system_save_time: System time saved to storage.

Bonus points: why does ESP32 return 36.1.128.63 (cn)? The other IP (94.23.94.78) is correct for my location (dig +short pool.ntp.org). ptr typo ;)

Pdoom has stack overflow

Describe the bug
There is a stack overflow, but I don't know which stack it is, but there is no error in the previous firmware, I would like to ask whether there has been any modification recently.

To Reproduce
Start the game, it may freeze, TASK_WDT may trigger, or it may prompt for stack overflow, but the image can be displayed

Additional context

========================================================
prboom-go 1.33-43-g7c49438f-dirty (Sep 13 2022 19:03:20)
 built for: ESPLAY-S3. aud=0 disp=0 pad=0 sd=0 cfg=0
========================================================

[info] rg_system_init: Chip info: model 9 rev0 (2 cores), reset reason: 3
[info] rg_system_init: Internal memory: free=227747, total=279563
[info] rg_system_init: External memory: free=8386191, total=8386191
I (846) gpio: GPIO[40]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (856) gpio: GPIO[41]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (866) gpio: GPIO[39]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
[info] rg_storage_init: Storage mounted at /sd. driver=2
[info] rg_settings_init: Settings loaded from /sd/retro-go/config/retro-go.json.
[info] rg_i2c_init: I2C driver ready (SDA:48 SCL:47).
[info] rg_input_init: Input ready. driver='ESPLAY-I2C', state=00000000 00000000
[info] rg_display_init: Initialization...
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCB8E88
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCB988C
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCBA290
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCBAC94
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCBB698
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCBC09C
[info] lcd_set_backlight: backlight set to 60.00%
[info] rg_display_init: Display ready.
[info] rg_alloc: SIZE=12800, CAPS=SPIRAM|8BIT, PTR=3D8025E8
[info] rg_gui_set_font_type: Font set to: points=12, scaling=1.00
[info] rg_gui_set_theme: Theme set to '(none)'!
I (1306) I2S: DMA Malloc info, datalen=blocksize=2136, dma_buf_count=8
I (1316) I2S: I2S0, MCLK output by GPIO0
[info] rg_audio_init: Audio ready. sink='Ext DAC', samplerate=11025, volume=45
I (1326) esp_image: segment 0: paddr=00100020 vaddr=3c040020 size=1b75ch (112476) map
I (1336) esp_image: segment 1: paddr=0011b784 vaddr=3fc96620 size=022a0h (  8864) 
I (1346) esp_image: segment 2: paddr=0011da2c vaddr=40378000 size=025ech (  9708) 
I (1356) esp_image: segment 3: paddr=00120020 vaddr=42000020 size=3fa60h (260704) map
I (1366) esp_image: segment 4: paddr=0015fa88 vaddr=4037a5ec size=0c028h ( 49192) 
I (1376) esp_image: segment 5: paddr=0016bab8 vaddr=50000000 size=00010h (    16) 
[info] rg_system_set_boot_app: Boot partition set to 16 'launcher'
[info] rtc_time_init: Time loaded from storage
[info] rtc_time_init: Time is now: Thu Sep  8 05:40:51 2022

[info] rg_system_init: Retro-Go ready.

[info] rg_alloc: SIZE=76800, CAPS=INTERNAL|8BIT, PTR=3FCC2950
[=] M_LoadDefaults: Load system defaults.
[=]  failed to read config from: /sd/roms/doom/prboom.cfg
[=] IWAD found: /sd/roms/doom/doom.wad
[=] prboom-go 2.5.0 (built Sep 13 2022), playing: DOOM Registered
PrBoom is released under the GNU General Public license v2.0.
You are welcome to redistribute it under certain conditions.
It comes with ABSOLUTELY NO WARRANTY. See the file COPYING for details.
[=] Save path set to: /sd/retro-go/saves/doom
[=] I_Init: Setting up machine state.
[=] D_InitNetGame: Checking for network game.
[=] W_Init: Init WADfiles.
[=]  added file:/sd/roms/doom/doom.wad (2194 lumps)
[=]  added data:prboom.wad (79 lumps)
[=] V_Init: Setting up video.
[=] V_InitMode: using 8 bit video mode
[=] M_Init: Init miscellaneous info.
[=] R_Init: Init DOOM refresh daemon:
[=] R_InitData: 
[=] R_InitData: Textures
[=] R_InitData: Flats
[=] R_InitData: Sprites
[=] R_InitData: Translucency
[=] R_InitTranMap: Gen from PLAYPAL(0)...
[=] done.
[=] R_InitData: Colourmaps
[=] R_InitLightTables [=] R_InitSkyMap [=] R_InitTranslationsTables [=] R_InitPatches [=] R_InitInterpolation
[=] P_Init: Init Playloop state.
[=] S_Init: Setting up sound.
[=] S_Init: channels=8, sfx=1, music=1
STACK:316, HEAP:1+7257 (0+7168), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:89.14
[=] HU_Init: Setting up heads up display.
[=] ST_Init: Init status bar.
[=] 
[=] mus2mid: Length: 42, Start: 1443, Channels: 11, Instruments: 13.
[info] update_viewport_scaling: [email protected] => [email protected] x_pos:0 y_pos:0 x_inc:320 y_inc:240
STACK:316, HEAP:0+6693 (0+6656), BUSY:100.00, FPS:16.00 (SKIP:12, PART:0, FULL:4), BATT:90.86
STACK:316, HEAP:0+6693 (0+6656), BUSY:99.17, FPS:35.00 (SKIP:0, PART:0, FULL:36), BATT:88.86
STACK:316, HEAP:0+6693 (0+6656), BUSY:100.00, FPS:35.00 (SKIP:0, PART:0, FULL:35), BATT:90.57
STACK:316, HEAP:0+6693 (0+6656), BUSY:100.00, FPS:35.00 (SKIP:0, PART:0, FULL:35), BATT:90.86
STACK:316, HEAP:0+6693 (0+6656), BUSY:100.00, FPS:35.00 (SKIP:0, PART:0, FULL:35), BATT:90.86
[=] G_DoPlayDemo: playing demo with doom/doom2 v1.9 compatibility
[=] mus2mid: Length: 24, Start: 9806, Channels: 7, Instruments: 4.
[=] P_GetNodesVersion: using normal BSP nodes
[=] R_PrecacheLevel: pre-cached 29 flats
STACK:316, HEAP:0+6446 (0+6400), BUSY:48.50, FPS:17.00 (SKIP:1, PART:0, FULL:16), BATT:89.43
[=] R_PrecacheLevel: pre-cached 186 textures
STACK:316, HEAP:0+6043 (0+6016), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:89.43
STACK:316, HEAP:0+5701 (0+5632), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:89.43
[=] R_PrecacheLevel: pre-cached 1029 sprites

***ERROR*** A stack overflow in task main has been detected.


Backtrace:0x403798be:0x3fcb59400x4037eee1:0x3fcb5960 0x4038182e:0x3fcb5980 0x4038076d:0x3fcb5a00 0x4037ef98:0x3fcb5a30 0x4037ef8e:0x3fcb5a50 0x4203df82:0x00000000  |<-CORRUPTED
0x403798be: panic_abort at /Users/fantasy/esp/idf-442/components/esp_system/panic.c:402

0x4037eee1: esp_system_abort at /Users/fantasy/esp/idf-442/components/esp_system/esp_system.c:128

0x4038182e: vApplicationStackOverflowHook at /Users/fantasy/esp/idf-442/components/freertos/port/xtensa/port.c:394

0x4038076d: vTaskSwitchContext at /Users/fantasy/esp/idf-442/components/freertos/tasks.c:3505

0x4037ef98: _frxt_dispatch at /Users/fantasy/esp/idf-442/components/freertos/port/xtensa/portasm.S:436

0x4037ef8e: _frxt_int_exit at /Users/fantasy/esp/idf-442/components/freertos/port/xtensa/portasm.S:231

0x4203df82: R_ProjectSprite at /Users/fantasy/CLionProjects/retro-go/prboom-go/components/prboom/r_things.c:543
 (inlined by) R_AddSprites at /Users/fantasy/CLionProjects/retro-go/prboom-go/components/prboom/r_things.c:664

rg_input_read_battery: noise to signal ratio

Hi,

Today I spent some time examining the battery status. I connect GPIO36 to GND via 10k resistor, and to VCC via 10k resistor. I measured the VCC voltage and it's ~4.787V. Unfortunately I can't get that value reported by retro-go:

STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.20 (4.80V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.80 (4.81V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:81.20 (4.81V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.60 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.40 (4.87V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.80 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:85.60 (4.86V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:97.80 (4.98V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:70.40 (4.70V) <--- !!!!
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.80 (4.81V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.00 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:86.00 (4.86V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.20 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.40 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.00 (4.87V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.60 (4.81V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:100.00 (5.09V) <--- !!!!
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.20 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.80 (4.89V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.80 (4.81V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.20 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:79.60 (4.80V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:86.00 (4.86V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:66.40 (4.66V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.00 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.60 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:81.40 (4.81V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:86.40 (4.86V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:86.60 (4.87V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:88.20 (4.88V)
STACK:4892, HEAP:62+3483 (48+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.80 (4.88V)

I tried:

  1. Put extra 104 capacitor and grounded it.
  2. Set the proper eFuse value (1177mv). BTW should this value be configurable via targets?
  3. Increased number of samples to 16.

Values are oscillating around 4.88V, but I'd like to achieve a higher precision.

Do you have any clues how can I improve readings?

Thanks for all suggestions!

How to build a mrgc fw

Sorry ,this is not a bug.
I want to build mrgc F/W myself.
I have cloned the project and configured the esp_idf 4.3.
After running " ./rg_tool.py build-fw" , I got the file :"retro-go_1.35.1-dirty_odroid-go.fw", but it is not for ESPGBC.
Which config file should I modify to build the mrgc F/W.
Thank you.

Save Previews not updated on 1.32 ODG

Describe the bug
If a save preview image does not exist for a game, saving does not generate one. If it does, the old one is retained even after saving again. Deleting the save state does correctly remove the save preview. Tested on OdroidGO after migrating to the new save directory. (I have no other device that runs Retro-Go.)

To Reproduce
Steps to reproduce the behavior:

  1. Set preview settings to an option that displays save previews.
  2. Pick a game and note the current save preview.
  3. Play the game and create a save state.
  4. Save preview is unchanged.

Expected behavior
Save preview is updated to whatever was onscreen at the time of the save state.

Pdoom panics while booting up

Hi,

I pulled the latest source code and unfortunately Pdoom panics right while loading:

STACK:4280, HEAP:3+3220 (1+3200), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:75.60
[=] HU_Init: Setting up heads up display.
E (21716) diskio_sdmmc: sdmmc_read_blocks failed (257)
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4010b5e4  PS      : 0x00060f30  A0      : 0x80100cd7  A1      : 0x3ffcecxtensa-esp32-elf-addr2line: 'a.out': No such file
40
A2      : 0x3f851d14  A3      : 0x88cf0fa2  A4      : 0x00000000  A5      : 0x00002022
A6      : 0x00000000  A7      : 0x3ffcec40  A8      : 0x3f80c674  A9      : 0x00000000
A10     : 0x00004d44  A11     : 0x3f811854  A12     : 0x00004d44  A13     : 0x00000001
A14     : 0x00000000  A15     : 0x3f80c67c  SAR     : 0x0000000b  EXCCAUSE: 0x0000001c
EXCVADDR: 0x88cf0fa2  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNTxtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
 : 0x00000000

Backtrace:0x4010b5e1:0x3ffcec400x40100cd4:0x3ffceca0 0x400e82fe:0x3ffcecc0 0x400e3e7c:0x3ffced00 0x400e443a:0x3ffcef50 0x400d6ef5:0x3ffcef70 0x40138702:0x3ffcf010

HU_Init
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/hu_stuff.c:345
D_DoomMainSetup
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/d_main.c:975
D_DoomMain
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/d_main.c:1055
app_main
/Users/x/Documents/Arduino/retro-go/prboom-go/main/main.c:561
main_task
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/freertos/port/port_common.c:129

SD card reader works well in other applications and the launcher. It just complains in Doom.

source code

Not connecting to WiFi

Describe the bug
A clear and concise description of what the bug is.
Not connecting to WiFi. Created the wifi.json file and added the wifi SSID and password, But not connecting WiFi.
Device ESP32 wrover 16Mb
To Reproduce
Steps to reproduce the behavior:

  1. Created the wifi.json file
  2. added the wifi SSID and password
  3. But not connecting WiFi. In system menu network status not configured

"GAME & WATCH" crashed

"GAME & WATCH" where to get roms with * .GW extension. Everywhere it finds only the extension * .MGW

Understanding how to put a retro go project together

Hi,

I am less familiar with ESP32 development and want to build your project. I have been able to flash a couple projects that use a ESP8266 either through my raspberry pi or using Visual Studio Code's PlatformIO IDE extension with success. SlimeVR-Tracker-ESP and ChickenManGame. Those projects either had robust documentation for hardware/software or had Youtube videos that showed a lot of the process and can be deduced for a complete understanding. I've been intrigued by some random Youtube videos and hackaday posts that use the ESP32 to run games such as Doom and Mario but a lot of the information is either scattered, missing, or inconsistent. Also I am interested in this project since it uses a screen which would be rather new for me.

I guess my questions can be summed as follows:

  1. I understand that building and flashing is governed by your a python script is there anything I need to install in order for that to run properly? (Sorry I mainly have experience in C/C++, and no serial knowledge)

  2. Where can I find information on how to wire up the hardware to get this working? (I have a ESP32-WROVER-E and ILI9341(240x320) screen that has a built in SD card reader)

Daedalian GB rom freezes

The Game Boy game Daedalian Opus loads to the title screen but once you press A or Start it freezes.

prdoom: Z_Malloc panics

Log:

Application: prboom-go
Version: Snes9x-1.60-9-g957acff5-dirty
Build date: Sep 24 2022 19:16:13
Toolchain: v4.4.1-dirty
Total memory: 213383 + 4192151
Free memory: 3815 + 3210799
Free block: 2432 + 3145728
Stack HWM: 4320
Uptime: 0s (0 ticks)
Panic message: Z_Malloc: Failure trying to allocate 4294967036 bytes
Panic context: I_Error

Log output:
nit: Init Playloop state.
STACK:4320, HEAP:4+3712 (2+3712), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.20
[=] S_Init: Setting up sound.
[=] S_Init: channels=8, sfx=1, music=1
STACK:4320, HEAP:3+3666 (1+3648), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:91.00
STACK:4320, HEAP:3+3618 (1+3584), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:91.60
STACK:4320, HEAP:3+3589 (2+3584), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:91.80
STACK:4320, HEAP:3+3550 (1+3520), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:86.80
STACK:4320, HEAP:3+3507 (1+3456), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:92.00
STACK:4320, HEAP:3+3478 (2+3456), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:90.60
STACK:4320, HEAP:3+3446 (1+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:87.80
STACK:4320, HEAP:3+3411 (1+3392), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:89.00
STACK:4320, HEAP:3+3371 (1+3328), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:91.80
STACK:4320, HEAP:3+3345 (1+3328), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:89.00
STACK:4320, HEAP:3+3301 (1+3264), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:90.40
STACK:4320, HEAP:3+3273 (1+3264), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:91.20
STACK:4320, HEAP:3+3242 (1+3200), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:93.00
STACK:4320, HEAP:3+3209 (1+3200), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:89.80
STACK:4320, HEAP:3+3135 (2+3072), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:91.80
[=] HU_Init: Setting up heads up display.


*** PANIC TRACE: ***


abort() was called at PC 0x400e1387 on core 0


Backtrace:0x40082131:0x3ffcfd200x4008dad1:0x3ffcfd40 0x40093c05:0x3ffcfd60 0x400e1387:0x3ffcfde0 0x400ee569:0x3ffcfe00 0x401183d7:0x3ffcff60 0x4010f3cc:0x3ffcff80 0x40104c2c:0x3ffcfff0 0x400ecb41:0x3ffd0010 0x400e89e1:0x3ffd0050 0x400e8c3a:0x3ffd02e0 0x400daa79:0x3ffd0300 0x40144e12:0x3ffd03a0 0x40090919:0x3ffd03c0 

It translates to:

abort
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/newlib/abort.c:46
rg_system_panic
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_system.c:841
I_Error
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/lprintf.c:85
Z_Malloc
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/z_zone.c:207
createPatch
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/r_patch.c:206
R_SetPatchNum
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/r_data.c:697
HU_Init
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/hu_stuff.c:345
D_DoomMainSetup
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/d_main.c:975
D_DoomMain
/Users/x/Documents/Arduino/retro-go/prboom-go/components/prboom/d_main.c:1055
app_main
/Users/x/Documents/Arduino/retro-go/prboom-go/main/main.c:561
main_task
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/freertos/port/port_common.c:129
vPortTaskWrapper
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/freertos/port/xtensa/port.c:131

Launcher: audio sink issues

Hi,

With latest source code I can observe some issues with audio sink.

  1. When I come back from the application (OPTIONS button), it just hangs and doesn't start the launcher:
[=] ROM: Mapper: 0, PRG:16K, CHR:8K, Flags: H---
[=] MMC: Mapper None (iNES 000)
[=] MMC: PRG-ROM: 2 banks
[=] MMC: PRG-RAM: 1 banks
[=] MMC: CHR-ROM: 1 banks
[=] NES: System type: NES-NTSC (NTSC-U)
[=] NES: System reset (hard)
[info] update_viewport_scaling: [email protected] => [email protected] x_pos:0 y_pos:0 x_inc:256 y_inc:224
STACK:5008, HEAP:61+4074 (45+4032), BUSY:37.18, FPS:37.09 (SKIP:1, PART:36, FULL:1), BATT:81.00
[info] rg_gui_dialog: text_buffer usage = 193
STACK:5008, HEAP:59+4074 (45+4032), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:81.80
STACK:5008, HEAP:59+4074 (45+4032), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:81.40
STACK:5008, HEAP:59+4074 (45+4032), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.60
STACK:5008, HEAP:59+4074 (45+4032), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.80
STACK:5008, HEAP:59+4074 (45+4032), BUSY:0.00, FPS:0.00 (SKIP:0, PART:0, FULL:0), BATT:80.60
[info] exit_handler: Exit handler called.
[info] rg_system_set_boot_app: Boot partition set to 16 'launcher'
[info] rg_audio_deinit: Audio terminated. sink='Ext DAC'
  1. When recovery-quitting Pdoom after the other issue, I chose the "back to launcher" and observed the panic:
[info] rg_alloc: SIZE=12800, CAPS=SPIRAM|8BIT, PTR=3F802424
[info] rg_gui_set_font_type: Font set to: points=12, scaling=1.00
[info] rg_gui_set_theme: Theme set to '(none)'!
[warn] rg_system_init: Button 00000000 01000000 being held down...
[warn] rg_system_init: Button 00000000 01000000 being held down...
[warn] rg_system_init: Button 00000000 01000000 being held down...
[warn] rg_system_init: Button 00000000 01000000 being held down...
[warn] rg_system_init: Button 00000000 01000000 being held down...
[warn] rg_system_init: Button 00000000 01000000 being held down...
[warn] enter_recovery_mode: Entering recovery mode...
[info] rg_gui_dialog: text_buffer usage = 126
[info] rg_system_set_boot_app: Boot partition set to 16 'launcher'

*** RG_PANIC() CALLED IN 'rg_audio_set_mute' ***
*** Assertion failed: `audio.sink != NULL` : Audio device not ready! ***


abort() was called at PC 0x400dcfef on cxtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
xtensa-esp32-elf-addr2line: 'a.out': No such file
ore 0


Backtrace:0x400818da:0x3ffcebf00x4008758d:0x3ffcec10 0x4008c272:0x3ffcec30 0x400dcfef:0x3ffceca0 0x400d72a6:0x3ffcecc0 0x400d6715:0x3ffcece0 0x400dd3c5:0x3ffced00 0x400dd48e:0x3ffced20 0x400dd4bb:0x3ffced40 0x400dda32:0x3ffced60 0x400d6e7c:0x3ffcef70 0x40138702:0x3ffcf010

??
??:0
spi_flash_chip_gd_get_caps
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/spi_flash/spi_flash_chip_gd.c:38
_vsnprintf
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_printf.c:526
application_show_file_menu
/Users/x/Documents/Arduino/retro-go/launcher/main/applications.c:631
scan_folder
/Users/x/Documents/Arduino/retro-go/launcher/main/applications.c:41
_ftoa
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_printf.c:342
_ftoa
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_printf.c:350
_ftoa
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_printf.c:370
rg_settings_set_string
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_settings.c:155
application_init
/Users/x/Documents/Arduino/retro-go/launcher/main/applications.c:101
??
??:0

source code

Need Help: Failed to read device's partition table!

Describe the bug

This is when attempting to flash onto a clean chip. Seems something is wrong with partition table

A fatal error occurred: Invalid head of packet (0x20)
An exception: ** Command '['/opt/homebrew/opt/[email protected]/bin/python3.9', '/Users/32teeth/esp/esp-idf-4.1/components/esptool_py/esptool/esptool.py', '--port', '/dev/cu.usbserial-110', '--baud', '2000000', 'read_flash', '32768', '3072', '/var/folders/vt/9b_057w16zbg29qggcndmfh40000gn/T/tmpaq1ryxuk']' returned non-zero exit status 2. ** occurred in _call_esptool.
Failed to read device's partition table!

To Reproduce
Steps to reproduce the behavior:

  • $PORT and $BAUD are in my ENV
  • all apps built
python rg_tool.py --target retro-esp32 --port $PORT --baud $BAUD flash all

Local Fix
If i revert the rg_tools.py to this commit i can run the above command with an --offset

python rg_tool.py --port $PORT --baud $BAUD flash all --offset=0x80000

compile error in prboom

had to comment this line out in "doomdef.h" to get the latest release to compile:

#define exit(x) rg_system_switch_app(RG_APP_LAUNCHER, RG_APP_LAUNCHER, 0, 0);

then it compiles OK but it crashes when exiting doom.

Can it compiled on idf 4.4.2๏ผŸ

I made a hardware for ESPlay (based on ESP32S3), I ported two ESPlay emulators and it can run normally, I would like to ask if it can be compiled under IDF4.4.2 now, this is the first version of S3 released

I might be able to port it to my hardware if I can compile it

I used the same DAC and audio amplifier as EsPlay, as well as the extended IO chip

The ESP32S3 has more performance and more memory, and I believe it will be better on the emulator than the old 32, and it will work with both SDIO and I2S without DMA errors

WiFi, WebUI turn ON/OFF control adding

I've added an Extra menu with WiFi and File server control. I'm building launcher for testing and everything works fine
see my branch: https://github.com/KD-MM2/retro-go/tree/96800a60d9bdbc29950503e6bbe26996ac0f7231

with the launcher, i was able to call function from webui, but when I start building release, the emulators conflicted with the code, I got no idea where to check.

Build log:

-- Build files have been written to: C:/Espressif/frameworks/esp-idf-v4.3/retro-go/retro-run/build
Running ninja in directory c:\espressif\frameworks\esp-idf-v4.3\retro-go\retro-run\build
Executing "ninja app"...
[789/790] Linking CXX executable retro-run.elf
FAILED: retro-run.elf
cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe  -mlongcalls -Wno-frame-address   @CMakeFiles\retro-run.elf.rsp  -o retro-run.elf  && cd ."
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/retro-go/libretro-go.a(rg_gui.c.obj):(.literal.file_server_cb+0x0): undefined reference to `webui_get_mode'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/retro-go/libretro-go.a(rg_gui.c.obj):(.literal.file_server_cb+0x4): undefined reference to `webui_set_mode'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/retro-go/libretro-go.a(rg_gui.c.obj): in function `file_server_cb':
C:/Espressif/frameworks/esp-idf-v4.3/retro-go/components/retro-go/rg_gui.c:922: undefined reference to `webui_get_mode'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Espressif/frameworks/esp-idf-v4.3/retro-go/components/retro-go/rg_gui.c:1069: undefined reference to `webui_set_mode'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Espressif/frameworks/esp-idf-v4.3/retro-go/components/retro-go/rg_gui.c:1071: undefined reference to `webui_get_mode'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Traceback (most recent call last):
  File "rg_tool.py", line 333, in <module>
    build_app(app, args.target, command == "profile", args.without_networking)
  File "rg_tool.py", line 208, in build_app
    subprocess.run("idf.py app", shell=True, check=True, cwd=os.path.join(os.getcwd(), app))
  File "subprocess.py", line 512, in run
subprocess.CalledProcessError: Command 'idf.py app' returned non-zero exit status 2.

GBC - Pokemon Trading Card Game 1 and 2 fail to run

Describe the bug
On 1.35.1, I can't get Pokemon Trading Card Game (CRC32 81069D53) and Pokemon Trading Card Game 2 English Patched (CRC32 D880DFC1) to run. If starting from a new game, both boot to a black screen, without locking up the system or triggering a crash. If starting from a previous save state, they'll run until the game needs to load something and then softlock. This happens on both the public release on OdroidGo and on my Game Box Mini port in development.

Feature Request: Downscaling for Small Screens

As mentioned in another issue, Retro-Go doesn't scale down gameplay on devices with small screens. On my WIP Game Box Mini port, games from all non-handheld systems always look great horizontally, but are cropped vertically. While Retro-Go's implementation of NES emulation, for example, is unspeakably good compared to the stock firmware's, there are a few games that can't be played properly on Retro-Go. Here's the NES release of Montezuma's Revenge, first on stock then on Retro-Go.
image
image

Would downscaling be worth considering sometime in the future, especially as Retro-Go is ported to the GBM and other tiny systems? I don't know if it would be difficult to implement without knowing the screen size beforehand or not... Thanks for the consideration. :)

Launcher: LCD backlight flickering

Hi,

The LCD screen seems to be flickering if I set the backlight level < 100%. I can observe it only in the launcher and it looks like the screen is being continuously redrawed.

[Feature Request] - Theming

Is your feature request related to a problem? Please describe.
As a contributor / user of retro-go, i would like to create themes

There is some SD card check for theme folder in gui.c

// Try SD card, then search the built-ins
sprintf(path, RG_BASE_PATH "/theme/%s", name);    

Describe the solution you'd like
Short documentation on how to

  • Image naming
  • Sub folder naming
  • Image size / format

Describe alternatives you've considered
Sticking things in the theme folder on the sd card and seeing what sticks

Additional context
I would like to add additional themes for users to be able to download and put on their sd card as well as creative assets and files associated to the theme... ...think 'retro pi themes'

Arduino mega chess port

There is a port for the m5 stack, which kind of runs ok on the retroesp32 with a few minor changes to the code, but the ui with 3 buttons is clumsy.
Maybe someone more skilled can do a proper port?
20220911_145331

Launcher - Incorrect Date Displayed in UI

Describe the bug
Some time ago, I noticed that both of my Retro-Go devices were showing a date of December 14th in the about section of the menu. Connecting to WiFi sets the time as normal, (at least, in the status bar) but the date isn't updating. I finally got around to looking in the web file browser, and the correct date seems to be appearing there.

Both pictures taken within minutes of each other.

Screenshots
image

image

NES emulation: high hopes by aspekt

Hi,

I used to test NES emulation using a set of demos, which use sophisticated 6502 tricks. I spotted MMC3 emulation issues while running high hopes:

  • DMC channel is not working/not implemented?
  • Some animations are just black

I will leave it here for further investigation.

Build Error on PRBOOM

Describe the bug

  • did a rebase
  • run python3 rg_tool.py --target retro-esp32 build-img
  • error components/retro-go/config.h:32:25: error: expected declaration specifiers or '...' before string constant #define RG_APP_LAUNCHER "launcher"
  • error prboom-go/components/prboom/doomdef.h:47:72: error: expected declaration specifiers or '...' before numeric constant #define exit(x) rg_system_switch_app(RG_APP_LAUNCHER, RG_APP_LAUNCHER, 0, 0);

Also tried full clean

SD Card Error

SD Card Error

Mount Error

  • Only building out launcher (no emulators)
  • ESP-IDF Version 4.1 with applied SD Card Patches

On flashing (to offset 0x1000)

First Screen

SD Card Error

Mount Failed.

OK

Monitor
========================================================
launcher 1.31-5-g63e2faee-dirty (Mar  2 2022 09:21:02)
 built for: ODROID-GO. aud=0 disp=0 pad=0 sd=0 cfg=0
========================================================

E (253) sdmmc_io: sdmmc_io_reset: unexpected return: 0x109
[error] rg_storage_init: SD Card mounting failed. driver=1, err=0x109
[warn] rg_storage_init: Failed to load settings from /sd/retro-go/config/retro-go.json.
[info] rg_input_init: Input ready. driver='GPIO'
[info] rg_display_init: Initialization...
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBB200
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBBC04
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBC608
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBD00C
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBDA10
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBE414
[info] ili9341_set_backlight: backlight set to 80%
[info] rg_display_init: Display ready.
[info] rg_alloc: SIZE=12800, CAPS=SPIRAM|8BIT, PTR=3F80001C
[info] rg_gui_set_font_type: Font set to: points=12, scaling=1.00
[info] rg_audio_init: Audio ready. sink='Speaker', samplerate=32000, volume=50

Pressing A button (Next Screen)

System Panic!

Unable to set boot app! App not found

OK

Again pressing A button (Next Screen)

Quick Hourglass and then previous screen with panic error

Monitor
========================================================
launcher 1.31-5-g63e2faee-dirty (Mar  2 2022 09:21:02)
 built for: ODROID-GO. aud=0 disp=0 pad=0 sd=0 cfg=0
========================================================

[error] rg_storage_init: SD Card mounting failed. driver=1, err=0x107
[warn] rg_storage_init: Failed to load settings from /sd/retro-go/config/retro-go.json.
[info] rg_input_init: Input ready. driver='GPIO'
[info] rg_display_init: Initialization...
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBB1A8
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBBBAC
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBC5B0
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBCFB4
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBD9B8
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFBE3BC
[info] ili9341_set_backlight: backlight set to 80%
[info] rg_display_init: Display ready.
[info] rg_alloc: SIZE=12800, CAPS=SPIRAM|8BIT, PTR=3F80001C
[info] rg_gui_set_font_type: Font set to: points=12, scaling=1.00
[info] rg_audio_init: Audio ready. sink='Speaker', samplerate=32000, volume=50
[info] rg_system_init: Panic log found, saving to sdcard...

Thoughts?

ESP32-WROVER: panic in rg_gui_init

Describe the bug

It looks like the application panics when the launcher tries to prepare the draw buffer.

To Reproduce

I used ESP32-WROVER with IDF SDK v4.4.1.

$ xtensa-esp32-elf-addr2line -fe launcher/build/launcher.elf Backtrace:0x4008b503:0x3ffbe5100x4008bc32:0x3ffbe530 0x400819fe:0x3ffbe550 0x40081a11:0x3ffbe580 0x40081c4d:0x3ffbe5a0 0x400dec65:0x3ffbe5c0 0x400db17b:0x3ffbe620 0x400de8f6:0x3ffbe640 0x400d5fbc:0x3ffbe820 0x400f85de:0x3ffbe910
??
??:0
heap_caps_malloc_base
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/heap/heap_caps.c:147
heap_caps_malloc
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/heap/heap_caps.c:167
heap_caps_calloc
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/heap/heap_caps.c:441
rg_alloc
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_system.c:865 (discriminator 4)
rg_gui_init
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_gui.c:41
rg_system_init
/Users/x/Documents/Arduino/retro-go/components/retro-go/rg_system.c:351
app_main
/Users/x/Documents/Arduino/retro-go/launcher/main/main.c:305
main_task
/Users/x/Documents/Arduino/esp-idf-v4.4.1/components/freertos/port/port_common.c:129

Full stacktrace

ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (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:1
load:0x3fff0030,len:5996
ho 0 tail 12 room 4
load:0x40078000,len:15320
ho 0 tail 12 room 4
load:0x40080400,len:4428
entry 0x4008069c
I (30) boot: ESP-IDF v4.4.1-dirty 2nd stage bootloader
I (31) boot: compile time 15:34:46
I (31) boot: chip revision: 3
I (34) boot_comm: chip revision: 3, min. bootloader chip revision: 1
I (41) qio_mode: Enabling default flash chip QIO
I (46) boot.esp32: SPI Speed      : 80MHz
I (51) boot.esp32: SPI Mode       : QIO
I (56) boot.esp32: SPI Flash Size : 4MB
I (60) boot: Enabling RNG early entropy source...
I (66) boot: Partition Table:
I (69) boot: ## Label            Usage          Type ST Offset   Length
I (76) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (84) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (91) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (99) boot:  3 launcher         OTA app          00 10 00010000 00050000
I (106) boot:  4 nofrendo-go      OTA app          00 11 00060000 00070000
I (114) boot: End of partition table
I (118) boot_comm: chip revision: 3, min. application chip revision: 1
I (125) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=18b64h (101220) map
I (146) esp_image: segment 1: paddr=00028b8c vaddr=3ffb0000 size=01bd0h (  7120) load
I (147) esp_image: segment 2: paddr=0002a764 vaddr=40080000 size=058b4h ( 22708) load
I (157) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=28764h (165732) map
I (181) esp_image: segment 4: paddr=0005878c vaddr=400858b4 size=077ach ( 30636) load
I (187) esp_image: segment 5: paddr=0005ff40 vaddr=50000000 size=00010h (    16) load
I (193) boot: Loaded app from partition at offset 0x10000
I (194) boot: Disabling RNG early entropy source...

========================================================
launcher 1.33-12-g30f929d0-dirty (Aug 26 2022 15:33:41)
 built for: ODROID-GO. aud=0 disp=0 pad=0 sd=0 cfg=0
========================================================

[info] rg_system_init: Welcome! Reset reason: 4
[info] rg_storage_init: SD Card mounted at /sd. driver=1
[info] rg_settings_init: Settings loaded from /sd/retro-go/config/retro-go.json.
[info] rg_input_init: Input ready. driver='GPIO', state=00000000 00100000
[info] rg_display_init: Initialization...
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFC2A2C
[ino] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFC3430
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFC3E34
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFC4838
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFC523C
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFC5C40
E (584) spi: spi_bus_initialize(756): SPI bus already initlized.
[info] lcd_set_backlight: backlight set to 80.00%
[info] rg_display_init: Display ready.
[info] rg_gui_init: gui.screen_width=320, gui.screen_height=240
[info] rg_alloc: Want to allocate: SIZE=12800, CAPS=SPIRAM|8BIT
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4008b506  PS      : 0x00060930  A0      : 0x8008bc35  A1      : 0x3ffbe510
A2      : 0xffffffff  A3      : 0xffffffff  A4      : 0x00000040  A5      : 0x00000080
A6      : 0x00000040  A7      : 0x00000000  A8      : 0x00000012  A9      : 0x00000007
A10     : 0x0000002b  A11     : 0x00003200  A12     : 0x00000012  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x0000002b  SAR     : 0x00000008  EXCCAUSE: 0x0000001c
EXCVADDR: 0x0000002f  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000


Backtrace:0x4008b503:0x3ffbe5100x4008bc32:0x3ffbe530 0x400819fe:0x3ffbe550 0x40081a11:0x3ffbe580 0x40081c4d:0x3ffbe5a0 0x400dec7d:0x3ffbe5c0 0x400db192:0x3ffbe620 0x400de90e:0x3ffbe640 0x400d5fc4:0x3ffbe820 0x400f85f6:0x3ffbe910




ELF file SHA256: a826076964f0fca7

Rebooting...

Side question: I'm also concerned about this line:

E (584) spi: spi_bus_initialize(756): SPI bus already initlized.

I'd like to use separate SPI buses for SD card and LCD, but I suppose it's impossible due to lack of DMA available on SPI3?

Issue with ESPlay micro

retro-go (mrgc-g32 last version) installs and launch in ESPlay micro but display remains white.
We can argue it installs since retro-go folder are created in the sd card.
ESPlay should be a clone of odroid-go.
Here are the specs :
ESP32 WROVER, Dual-core processor with Integrated 16MB Flash + 8MB PSRAM
Integrated WIFI and Bluetooth 4 BLE
2,4" ILI9341 TFT Panel
Micro SD slot connected to SDMMC Host in 1 Line Mode for saving GPIO pin
Integrated I2S DAC via UDA1334A
Is it a known issu with other odroid go clones ? Is there a workaround ? Thanks !

Help Needed: Multiple Errors on MacOS Venture

Describe the bug

  • Upgraded to Ventura
  • Using ESP IDF 4.1
  • Running python3 rg_tool.py build launcher produces multiple errors in compiling
# example errors (only copy pasted a few to illustrate)
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/emulators.c.obj 

error: implicit declaration of function 'rg_system_get_path'; did you mean 'rg_system_get_app'? [-Werror=implicit-function-declaration]
     crc_cache_path = rg_system_get_path(NULL, RG_PATH_CACHE_FILE, "crc32.bin");

error: 'tab_t' {aka 'struct tab_s'} has no member named 'is_empty'
     tab->is_empty = items_count == 0;

error: 'KEY_PRESS_B' undeclared (first use in this function)
     else if (event == KEY_PRESS_B)

error: too many arguments to function 'gui_save_config'

Bottom of log

Traceback (most recent call last):
  File "retro-go-32teeth/rg_tool.py", line 333, in <module>
    build_app(app, args.target, command == "profile", args.with_networking)
  File "retro-go-32teeth/rg_tool.py", line 208, in build_app
    subprocess.run("idf.py app", shell=True, check=True, cwd=os.path.join(os.getcwd(), app))

Line 208

subprocess.run("idf.py app", shell=True, check=True, cwd=os.path.join(os.getcwd(), app))

Line 333

        build_app(app, args.target, command == "profile", args.with_networking)

Self-compiled retro-go crashes constantly with "ROM Loading Failed!"

A bit of backstory: my odroid go has a flash error and cannot load emulators bigger than 1 mb. So I decided to compile retro-go with gnuboy-go only after not having used the odroid since september. But, everytime I boot up the odroid (even with B) will show an error message with the text "ROM Loading Failed!" in large friendly letters in the cover.

This is the crash.log file:

Application: gnuboy-go
Version: 1.32.1-37-gdb1d2ae3-dirty
Build date: Jun 18 2022 12:44:15
ESP-IDF: v4.1.3-46-g5ef3614e5f-dirty
Total memory: 267868 + 4194260
Free memory: 199784 + 4181460
Free block: 113804 + 4181460
Stack HWM: 5788
Uptime: 0s (0 ticks)
Panic message: ROM Loading failed!
Panic context: app_main

Log output:
[info] rg_system_init: Welcome! Reset reason: 7
[info] rg_storage_init: SD Card mounted at /sd. driver=1
[info] rg_settings_init: Settings loaded from /sd/retro-go/config/retro-go.json.
[info] rg_input_init: Input ready. driver='GPIO', state=00000000 00000000
[info] rg_display_init: Initialization...
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFCA8F0
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFCB2F4
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFCBCF8
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFCC6FC
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFCD100
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FFCDB04
[info] ili9341_set_backlight: backlight set to 80%
[info] rg_display_init: Display ready.
[info] rg_alloc: SIZE=12800, CAPS=SPIRAM|8BIT, PTR=3F80001C
[info] rg_gui_set_font_type: Font set to: points=12, scaling=1.00
[info] rg_audio_init: Audio ready. sink='Speaker', samplerate=32000, volume=50
[info] rtc_time_init: Time is now: Sat, 01 Jan 2000 05:00:00
[info] rtc_time_init: Time loaded from hardcoded
[info] rg_system_init: Retro-Go ready.

[info] rg_alloc: SIZE=46080, CAPS=8BIT, PTR=3FFD0844
[info] rg_alloc: SIZE=46080, CAPS=8BIT, PTR=3FFE436C
[=]  * gnuboy_load_rom: Loading file: ''
[=] !! gnuboy_load_rom: ROM fopen failed

*** PANIC TRACE: ***



End of trace

Looking at it, we can see that there's a line that most surely causes the error:

[=]  * gnuboy_load_rom: Loading file: ''

The thing is, in the retro-go.json configuration, the line

"RomFilePath":	"/sd/roms/gbc/crystal-clear-2.0-baby.gbc",

Is present. I've noted that

"StartAction":	0,

is declared just before the RomFilePath line, so probably it has something to do with it.

gnuboy shader

Is your feature request related to a problem? Please describe.
Not related to a problem

Describe the solution you'd like
A great feature to have a closer to hardware experience would be to add a pixel grid scanline overlay, this can be a boolean option in the gnuboy hud

Additional context
Pixalized look FTW!

shader

SNES - APU causes softlock after defeating Dark World boss in Zelda Link to the Past

Describe the bug
After beating a boss in the Dark World in Zelda Link to the Past for SNES, unexpected behavior occurs when grabbing the crystal that appears. If the APU is on, the game locks up. If the APU is off, gameplay continues, albeit skipping a delay that occurs normally.

To Reproduce
Steps to reproduce the behavior:

  1. Turn on the APU if it isn't on already.
  2. Load the included save state, which takes place immediately after beating a boss in the Dark World.
  3. Collect the Heart Container and Crystal that appear.
  4. If the APU is on, the game will lock up until it is turned off.
  5. If the APU is off, or has been off at any point since loading the save state, the fanfare delay mentioned below is skipped, leading directly into the cutscene and regular gameplay afterwards.

Expected behavior
When the crystal is collected, it's supposed to pause gameplay for about ten seconds to play a musical fanfare, then a cutscene begins where the maiden in the crystal starts talking.

Additional context
Tested on OdroidGo and GameBox Mini with both the vanilla game (777AAC2F) and the popular Redux hack version 10.1 (DC40F93E).

Legend of Zelda, The - A Link to the Past save.zip

Edit: Checked an old save against a Light World Boss as well. The game does not lock up, but the fanfare is also skipped there.

Selection list is shrinking on top and bottom.

Is your feature request related to a problem? Please describe.
I'm trying to solve a little visual situation on the game selection list, which is not really important for the functionality of the list itself but would make it look a lot cleaner imo.

The problem I found is that the selection cursor is always in the middle, even on top and bottom positions. That make the list cut from the top when the selector is inferior to the number of lines / 2 and cut from the bottom when the selector is above lines / 2. When the cursor is moving on the middle of the list is fine like it is (cursor in the middle and list moving around it), but when approachs the first positions of the list or the last positions, the list will shrink until the cursor ends in the middle with a blank space either on top if it's the first position or bottom if the cursor is in the last position.

Describe the solution you'd like
This image will describe perfectly what happens in the current state of the launcher (on the left of the image), and the desired display of the list when the selector is on the first element of the list (right of the image):
listbeforeafter

Describe alternatives you've considered
I think this shrinking of the list comes from this line because it tries always to maintain the cursor on the center:

top += ((gui.height - top) - (lines * line_height)) / 2;

I'm not really sure, but I think the condition would be something like (sorry for the pseudocode):

if (cursor position < middle of the displayed list && first element of the whole list is visible) {
//Move the cursor to the top so the list would not shrink into the end top position.
}

if (cursor position > middle of the displayed list && last element of the whole list is visible ){
//Move the cursor to the bottom so the list would not shrink into the end bottom position.
}

I'm not really sure if you got the idea or even the issue I'm stating here, as it is a little detail that doesn't add much to the whole launcher GUI but I think it would look a lot cleaner that way as the list will start with a full list from top to bottom instead of a cropped in the middle starting in the middle list.

I will try to do it myself, but I have first to understand first how the code is structured, pointers etc... So I need help to understand how to to put those conditions on the draw list function.

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.