ESP32 GAMEBOY EMULATOR banner

ESP32 GAMEBOY EMULATOR

38 devlogs
98h 3m 38s

This is a basic physical emulator using a CYD (LINKS FOR BUILDING AT END). This project runs on Peanut GB, which is a emulator meant to translate ROMS into code for the ESP32. Do keep in mind the CYD I used has no PSRAM, which means most power hea…

This is a basic physical emulator using a CYD (LINKS FOR BUILDING AT END). This project runs on Peanut GB, which is a emulator meant to translate ROMS into code for the ESP32. Do keep in mind the CYD I used has no PSRAM, which means most power heavy games won’t run that well or run at all. For example, Pokemon Red. For more details please check out my Github Repo. THE DEMO IS A VIDEO SINCE THIS IS A HARDWARE PROJECT, go to the demo page, which leads to my website and scroll down untill you find the video section.

This project uses AI

AI was used in this project for debugging and optimization and feature ideas. MODELS USED: Claude Opus 4.6 Extended, Gemini 1.5 Flash.

ALSO: THE WEBSITE IS NOT VIBECODED, HOWEVER AI HELP WAS USED
AI-CODED AND OR ASSISTED FEATURES:

  • BYTE: ASSISTED
  • CYD DIAGRAM: AI-CODED
  • MUSIC & ACHIVMENTS: AI ASSISTED
    -THEMES: AI ASSISTED
Demo Repository

Loading README...

pd541664

Shipped this project!

Hours: 5.4
Cookies: 🍪 148
Multiplier: 27.5 cookies/hr

Ok, so i don’t have too much to say, but here’s a couple bugs that im working on fixing

BROWSER:

The text goes off the screen - STATUS: pending

Site taking to long to load - STATUS: pending, im moving all the images into a assets folder

=====================================================================

THESE ARE THE BUGS THAT IM WORKING ON, ANY OTHER BUGS WITH THE WEBSITE COULD BE A DEVICE PROBLEM, such as:

The website is black: this might be a driver issue, as it works for me and many others.

Thats really it. ALSO, please see the entire project, not just the demo website, since i spent so long on the wiki and read me, please check that out :)

Otherwise, vote what you think is appropiate, and remember,

Happy Hacking ;)

-PD

pd541664

ok so, for the past 3 days i’ve been making more assets for the V2 release.

This includes more customization options, such as:

Customizable Cartdriges and Gameboys (DIGITAL)

Multiple folder colors for the upcoming file system

A e-reader Icon

Wallpapers such as BALANCE, ZIMOLLIZ, & ABSTRACT, (ZIMOLLIZ is the one featured down below.)

A update to the WIKI.

I’m working on a new wiki with new features for the V2 release, I might keep the old WIKI as a file in the repo, or in a legacy/previous versions tab.

Thanks for reading all the way here :D, thats really it ;)

Attachment
0
pd541664

Shipped this project!

Hours: 5.22
Cookies: 🍪 145
Multiplier: 27.8 cookies/hr

uhh really basic, but PLEASE check out the entire project, NOT JUST THE DEMO, i spent so long on other features like a entire project wiki and i dont want that to go to waste, ALSO, most website bugs are a problem with YOUR device, There is a section for the demo video, which is on the website. Please don’t dock points for this as it’s something that I can’t fix. Also for the website, if you don’t like something about it tell me, and ill probably change it.

pd541664

ok i didnt spend too long today, but i mostly just made more spritesheets and more assets.

this will be much shorter cuz i am really sleep since its 2:16 AM where i am.

Attachment
0
pd541664

Shipped this project!

Hours: 8.16
Cookies: 🍪 207
Multiplier: 25.35 cookies/hr

Alright so, in this ship I added

  • Assets for a graphics update (coming soon)

  • Proper Organization

  • A entire project wiki (check that out)

pd541664

ok so, this was a massive update, i built a entire wiki for my project, please check that out, i also organized the folders and other things a bit

0
pd541664

the image might be a bit blurry since its desgigned for 32x32, but i made a bunch of pixel art, for things like bootscreens, setttings, games etc, im spending most of today on assets since the console is a bit bland.

Attachment
0
pd541664

Shipped this project!

Hours: 8.0
Cookies: 🍪 113
Multiplier: 14.08 cookies/hr

ok so, i added a optimization list due to your requests, PLEASE, PRETTY PLEASE CHECK OUT THE REPO, I SPENT OVER 4 HOURS MAKING THAT LIST, WHICH WAS 1/2 OF MY TOTAL WORKING TIME TODAY, i also turned the logo into a arrary so you can have the boot image be that, im still working on that though, i also colored the readme logo. ALSO, IF YOU ALREADY VOTED THIS PROJECT, PLEASE LOOK THROUGH AGAIN, I MADE CHANGES SO DONT GIVE THE SAME SCORE, AS YOU MAT LIKE IT OR DISLIKE IT MORE.

pd541664

ok so, i spent this 6ish hours doing things with my github, i added a optimization list, and added a terminal style logo, and colored it

Attachment
0
pd541664

DASH-OS ESP32 DMG Emulator: Optimization Sprint
Hardware: ESP32-32E (240MHz, No PSRAM), ST7796 TFT (HSPI 80MHz), MicroSD (VSPI 25MHz), 8BitDo (Bluepad32 BLE).
Constraints: ~11KB free heap. Bluepad32 fragments heap before setup(). GCC requires vars at top. TFT_eSPI byte-swap quirk active.

Current Memory Layout (~92KB total):

fbuf: 46KB (160x144x2 RGB565)

bank0Cache/bank1Cache: 16KB each (LRU)

cram: 8KB | gbp (peanut-gb): 5KB | lbuf: 1KB

Proven Wins (Implemented):

Early Malloc: Allocate all large buffers first line of setup() to beat BLE fragmentation.

SD Boot: 400kHz init -> SD.end() -> 25MHz restart. Prevents white-screen crashes.

Block Reads: 16KB bank reads vs byte-by-byte (12.8x speedup).

Burst SPI: Single 46KB pushColors vs scanline calls (8 FPS -> 60 FPS).

Hot Path: IRAM_ATTR on gb_rom_read and lcd_draw_line.

Failed Attempts (Why):

3rd Bank Cache: OOM/SD failure. Hard limit is ~90% heap.

50MHz Init: Card handshake failed.

Shared SPI: HSPI/VSPI isolation is required for stability.

GBC: Palette array unpopulated; peanut-gb standard is DMG only.

Optimization Goals (Need C++ Implementation):

DMA Overlap: Implement SPI DMA on HSPI to run gb_run_frame while fbuf transfers. Can I avoid double-buffering given 11KB heap? Provide setupDMA(), startDMA_pushFrame(), isDMAComplete().

ROM Pre-fetch: 8KB buffer for sequential bank reads on ROMs >256KB. Suggest async/interrupt strategy for prefetchBuf[8192].

Matrix Easter Egg: Lightweight falling chars for 480x320. <2KB heap, 15 FPS. Provide matrixModeUpdate().

GBC Hook: Efficient way to extract palettes in peanut-gb without massive RAM overhead.

Batching: Can I batch multiple pushColors into one CS assertion?

Rules: Vars at top of functions. No non-ASCII. Use existing buffer names. Memory safety checks mandatory.

0
pd541664

Shipped this project!

Hours: 7.03
Cookies: 🍪 178
Multiplier: 25.36 cookies/hr

Alright, this was mainly just a voter chosen update,

From my last small ship, people said to make the Website less vibecoded, idk how to do that since SOME people don’t like the style and it seems to AI-y, and to make Byte’s text bigger, so I did both of those things, as well as some opotimization to improve website and game rendering time.

pd541664

I designed another case for the CYD

I also updated the website so byte would be more interactive and the text would be bigger due to some complaints

I also started a fresh rewrite of the code to bugfix and add new features.

lmk if yall want any new features cuz im running out of ideas

Attachment
0
pd541664

Shipped this project!

Hours: 4.37
Cookies: 🍪 46
Multiplier: 10.49 cookies/hr

Alright, this is just a basic RESHIP, this is NOT A MAJOR UPDATE, do NOT expect major features as this was just a bug fix, the next major update will be next saturday or in april.

pd541664

Ok, so i started a fresh rewrite of my code so I could add a couple new features, The one im working on right now, is animation packs, which will allow users to choose from animation packs allowing for more customization. Right now, im making a byte animation pack, which will add a assistant and add boot animations for loading roms, as byte blows the cartdrige before putting it into a random gam consle or smth, im figuring this out, this is devlog 2/2 on monday.

Attachment
0
pd541664

OK SO, I’m working on a couple more hours, i’m aiming for 30ish hours by next saturday
I’ll release 2 2 Hour and 15 minute devlogs so 4 hours and 30 minutes everyday


| |
| WHAT I DID |
|_______________|

SO, I just worked on my readme a bit, mainly the tables and perfecting the grammer so its more professional. That’s really it, my next scheduled thing is to work on my website, I might improve the text size of byte since one of my voters said to improve that.

-PD

Attachment
0
pd541664

Shipped this project!

Hours: 29.77
Cookies: 🍪 821
Multiplier: 27.59 cookies/hr

ok this update was all optomization

pd541664

more optomization, over a 50% increase for the first relase

Attachment
0
pd541664

MORE OPTOMIZATION
-Can run SOME gbc games at 40 FPS now

Attachment
0
pd541664

More optomization, what can I say? There was a 24% increase in FPS, using the built in FPS counter from the previous average FPS

Attachment
0
pd541664

again, mainly optomizations, so this devlog will be pretty short

Attachment
0
pd541664

ok so, im doing a power-thru for the next 2 weeks, i’ll be coding 8+ Hours every single day so I can hit my persoanl goal of 100 hours, and my 2nd goal of 246 hours. these devlogs will be pretty small and no changes will be added to the repo until the end the power-thru. A entire feature list will be published inn 30 hour intervals, for example, 30, then 60, then 90, then 120, then 150, then 180, etc until 246, and after that ig i’ll just code for prizes.

-PD

Attachment
2

Comments

Ahnaf
Ahnaf 19 days ago

do you think it will be able to run mario bros 3?

pd541664
pd541664 19 days ago

It depends if the board/CYD your using has PSRAM

pd541664

ok, so i mainly spent most of the time modeling something, my laptop is kinda buggy so the image might seem random, but it supposed to be a CYD & esp32 with psram

Attachment
0
pd541664

i made a case in tinkercad, thats really it

Attachment
1

Comments

lmarku30
lmarku30 20 days ago

pratik i found your account bakaaaa

pd541664

Shipped this project!

Hours: 23.38
Cookies: 🍪 590
Multiplier: 25.22 cookies/hr

Ok, this is a Gameboy emulator running on a CYD, it’s not too strong due to no external PSRAM, so it can’t run every game, but there are performance options if you are willing to get rid of some frames. I did some crazy optomizations with the help of AI, mostly me though, i managed to get 0.1fps to 100fps which is crazy

pd541664

FINAL UPDATE FOR SHIP #2
i added some more optomization and updated the website a bit, I also fixed the bug with GB_INIT and some SD card and rom errors, the next ship will be for 60 hours.

Attachment
0
pd541664

MORE OPTOMIZATION (hard word to spell btw, dont judge) you can get up to 100 fps on simpler games without performance mode!

Attachment
0
pd541664

OK, i added a bunch of opptomization this time, and i didnt use AI too much this time!
I can now hit like 60 fps on mario with the best performance settings.

Attachment
0
pd541664

I worked on the boot menu a bit, a added the ability to unlock a secret boot screen by using the konami code

Attachment
0
pd541664

ok i added some more features to settings, like mainly palletes

Attachment
0
pd541664

ok, so i took a break from programming a bit, and i went to redo and solder the wiring,

Attachment
0
pd541664

bro i hate programming so much, I got 15 errors in like the first 10 minutes, i managed to power through tho, I haven’t finished the website but im close, anyways, i opened up the case to show yall my makeshift heatsink

Attachment
0
pd541664

ok so i added some optomization, still no new photos cuz i keep forgetting, next one will have a new photo trust

Attachment
0
pd541664

I’m pulling a all nighter to overhaul frame rates etc, rn the main chip is over heating, so i used 3 pennies and some thermal paste to make a heat sink so it’ll play faster for longer, i forgot to take a photo sadly and i reglued the case so i dont have a photo. Enjoy this shot of my great tetris skills

Attachment
0
pd541664

OK so i added a crazy amount of optomization, so i can get around 45~ fps on super mario land on performance setting, this is nowhere near the 60 fps i need but its better than the 0.1fps i had when starting the project

Attachment
0
pd541664

Shipped this project!

Hours: 6.28
Cookies: 🍪 88
Multiplier: 14.05 cookies/hr

re-shipping DASH OS - 6h 43m total

fixed the file sync issues from the first build. it’s running on a $4 ESP32, so I’m pushing PeanutGB as hard as it’ll go. it’s not a perfect 60fps—there’s definitely some frameskipping when the screen gets busy—but for the hardware, it’s solid.

the updates:

Controller: Integrated Bluepad32 for wireless support.

Web: Added a chiptune toggle on the site for better UX/focus.

Workflow: All dev and editing done on Linux Mint.

check the readme for the demo video and the dashboard link. 🕹️

pd541664

I added a couple new features to the devlog website, like a live stats page for my github repo, it might be a bit broken though, i also added a poll and a cyd diagram.

Attachment
0
pd541664

Basic Bug Fixes such as:
-SD Card Error (Final Patch)
-Fixed pin configuration in v30
-Smaller bug fixes and quality of life updates

Attachment
0
pd541664

i stayed up to fix a error with the sreen not reciving commands

Attachment
0
pd541664

OK, this was a major bug fix, there were a bunch of errors with the micro sd after I released a faster script 😢. Thankfully I manged to fix it with the help of claude, I’ll release a commit on github tommorow cuz it’s getting late

Attachment
0
pd541664

I did some basic troubleshooting with ROMS and I managed to improve the framerate a bit. I might add up to 60 fps skipped just as a joke.

Attachment
0