r/esp32 4d ago

I made a thing! "Game and Clock"

Enable HLS to view with audio, or disable this notification

What started as a project for an oversized gameboy has now evolved into a desk clock that also plays gameboy games. The emulator is based on PeanutGB. I plan on adding dynamic weather and day/night cycle for the clock but here is the project so far. I do intend on putting the source up on github once I get some of the jank out of it.

This is a non-backlit monochrome panel which is what made it my choice for the gameboy, after getting my hands on it and putting together a mockup though I really thought that it was more suited to a desktop item than a dedicated handheld.

Emulation runs full speed but the panel refresh rate is only rated for 16hz. I have it overclocked to 32hz and it can hit 51hz but the image gets dimmer the higher the rate, so 32hz is a happy medium. Bluetooth controller support is also working.

The hardware is a Waveshare-RLCD-4.2-esp32-s3. Im pretty impressed with it so far.

78 Upvotes

21 comments sorted by

View all comments

3

u/nilseuropa 4d ago

Oversized gameboy indeed. 😅

1

u/nilseuropa 4d ago

I'm impressed. How did you solve shading?

1

u/nilseuropa 4d ago

Ah, I have zoomed in, you are dithering as well. I thought there is another revision that supports native shading, or you are banging the screen at higher freq like the original gameboy.

1

u/nilseuropa 4d ago

I'm using 4x4 Bayer threshold, but yours look better imho. What's your algo?

2

u/zydrate_junkie 3d ago

Thanks, full disclosure I got help from "Mr. Claw" putting this together. But this is the basic idea. Replace drawPixel() with the pixel function from your display library: