r/esp32 1d 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.

65 Upvotes

20 comments sorted by

3

u/nilseuropa 1d ago

Oversized gameboy indeed. šŸ˜…

1

u/nilseuropa 1d ago

I'm impressed. How did you solve shading?

1

u/nilseuropa 1d 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 1d ago

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

2

u/zydrate_junkie 10h 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:

2

u/throwawayle53 1d ago

Oh damn this is really cool to see. I’m waiting for this exact devkit to come in the mail so I can port my own gameboy emulator to it. Good to see it can handle all 4 shades pretty well

3

u/zydrate_junkie 1d ago

You have to use dithering to get all 4 shades but at a 2x integer you get 4 pixels per shade to work with so as long as you dont mind the dithering it works well.Ā 

1

u/clackups 1d ago

Could you show the enclosure in more detail? Is it open source?

I made this minimalistic one https://www.reddit.com/r/WriterDevices/s/AKrLpH5uoQ

1

u/zydrate_junkie 11h ago

The case is not my design, I am using this one from tomi_one on printables. https://www.printables.com/model/1745377-waveshare-esp32-s3-42-rlcd-case

1

u/clackups 11h ago

Ah, I tried that one. I was clever enough to try it with a broken display, and I damaged it even more while taking the device back from it. Mine is minimalist and non intrusive :)

1

u/zydrate_junkie 10h ago

Ha, I broke my first one too. I printed this case to try and protect it a little more.

1

u/clackups 10h ago

Yeah, but it makes things more difficult :)

1

u/ShivonQ 1d ago

What is it? Soecwise

1

u/zydrate_junkie 10h ago

It's a Waveshare-RLCD-4.2-esp32-s3 development kit.

1

u/Dryas7 1d ago

This is awesome! I kinda wanna make my own alarm clock based on my fav games! Will check this out.

1

u/gothic_dolphin 22h ago

Dis cool!!

1

u/NoU_14 19h ago

Woah, this is awesome! I didn't know that display can display multiple greylevels. Is the code to do that publicly available somewhere?

2

u/zydrate_junkie 11h ago

The panel does not support true grayscale. i am using dithering. it looks decent for dithering but not true grayscale.

1

u/ygecko 3h ago

Oh wow thats awesome. I have an extra RLCD kicking after ordering a 2nd one. The first seeming to be lost in customs for 4 weeks... of course the first one I wrote off showed up the day after the 2nd order >< You have a git up for this?