-
Notifications
You must be signed in to change notification settings - Fork 162
Beginner, Requesting help in porting to ESP32 WROOM #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, 1°) I think it should be easier to directly go with the ESP32 wrover or ESP32-S3 with at least 2MB of PSRAM. I don't think it would be possible to adapt the firmware to only use 520KB of RAM or it would probably be very uncompatible and very very difficult. Anyway, good luck for your port ! |
Thanks @raphatex , |
Alright, so here are some recomendations to at least get it to boot:
|
@raphatex, thank you for the detailed instructions! I have a couple of additional questions:
I do have a few more questions in mind, but I think it’s best to address them after I’ve implemented your suggestions. I’ll follow up with an update soon. Once again, Thank you for all the recommendations! |
Yes of course disabling audio can free up some space but more importantly ram ! |
I think rapha-tech gave you good advice, you should ignore fmsx, gwenesis, prboom (delete them in rg_config.py) because they simply will never work without PSRAM anyway. Here's a few additional ideas of where you can reduce memory usage: branchUse the dev branch, I have made changes over the past year that allow retro-go to work better in a low memory environment and that isn't in master yet. retro-core double bufferingMost emulators in retro-go use double buffering but each framebuffer is big (50-150KB) and you can't possibly fit two in internal memory and still have enough memory for the rest. The best way to get rid of double buffering is a bit beyond my comment and will vary by app, but one thing you could try to get started is to allocate a single buffer and alias it. For example in updates[0] = rg_surface_create(NES_SCREEN_PITCH, NES_SCREEN_HEIGHT, RG_PIXEL_PAL565_BE, MEM_FAST);
updates[1] = rg_surface_create(NES_SCREEN_PITCH, NES_SCREEN_HEIGHT, RG_PIXEL_PAL565_BE, MEM_FAST);
currentUpdate = updates[0]; and you could replace it with: updates[0] = rg_surface_create(NES_SCREEN_PITCH, NES_SCREEN_HEIGHT, RG_PIXEL_PAL565_BE, MEM_FAST);
updates[1] = updates[0];
currentUpdate = updates[0]; (you will find similar lines in all emulators) retro-core static memoryEach emulator that is part of retro-core "wastes" 1-10KB even when it's not in use, because of static allocations. I suggest you get rid of all emulators that you don't (or can't) run on your setup. Simplest way to remove an emulator is to comment its two lines (the launcher framebufferThe launcher uses a big framebuffer (150KB) to draw itself but it can technically work without one, it will just be very flickery. I haven't tested it recently, but I think it can be as simple as commenting this line in gui.surface = rg_surface_create(gui.width, gui.height, RG_PIXEL_565_LE, MEM_SLOW); networkingBuilding with --no-networking is a good idea, the wifi stack does waste a lot of memory even if you don't connect it. This will only help the launcher, though. soundDisabling sound is a bit complicated because most emulators are tightly coupled to their sound emulation, and also retro-go uses sound hardware to synchronize emulation speed. The most you'll save if you entirely get rid of sound (emulation and playback) is about 10-12KB. In my opinion there are easier changes to do before that. |
Thanks @ducalex , |
Hi,
I am trying to port the project to an ESP32 WROOM (4 MB flash, 520 KB SRAM). The hardware components I plan to use are:
I have already set up the environment as per BUILDING.md, cloned the repository, and verified the environment by creating a .img file for the esp32s3-devkit. The next step, as I understand it, is to modify the configuration and other files. I have a few questions:
I am a beginner, so any advice, recommendations, or instructions would be greatly appreciated.
(Forgot to mention: I am new to GitHub and unsure if the Issues section is the right place to ask for help. I apologize if this violates any community guidelines.)
Thank you!
The text was updated successfully, but these errors were encountered: