[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/diy/ - Do It Yourself

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now being accepted. Click here to apply.


[Advertise on 4chan]


File: Untitled.png (21 KB, 1280x720)
21 KB
21 KB PNG
So, together with a friend, we have decided to make our own console for fun and giggles. This surely is an undertaking but this is an idea we were considering for a long time and as we got more and more experienced with circuits, embedded programming, 3d printing and stuff like that, I feel like it would be finally in our reach.

I never really looked at other people's similar projects, I have no idea what I'm doing honestly, but I can write code and I can use google so I think we will figure it out and get there eventually.

I will post our progress in this thread.
>>
File: 20250718_224135.jpg (628 KB, 4032x3024)
628 KB
628 KB JPG
Since I know pretty much noting about electronics, my friend will be taking care of designing the hardware. It will take a while and since I also do not want to start "production" before I know if this all even makes any sense, I decided to get all the components and assemble a sort of dev board to test things on first. Today I got all the parts needed so I can try to get something working.
>>
Just so you're aware there is a decently large industry for single board computer handheld emulator devices.
I'm not telling you to just buy one but I am bringing this up because if you use a common chipset it is feasible that you could steal a compatible operating system easily so you can focus on the hardware side of things.
E.g. Anbernic Rg35xx
See: retrogamecorps on youtube
>>
File: 20250718_230917.jpg (447 KB, 4032x3024)
447 KB
447 KB JPG
I did not expected to have to solder pins, but I guess it won't be a problem with some more flux.
However, the problem is that this esp module is too thick for the breadboard. I really do not want to route all the wires under it.
Should I have gotten two and put the module across two of them?

>>2932435
Well, honestly, I am more interested in the software side. Like I said, I won't be designing hardware, it's what my friend just wants to do.
>>
>>2932429
Just build a portable wii or something. You'll want to kill yourself less afterwards.
>>
File: _2zTlyqix6A.jpg (213 KB, 1600x1200)
213 KB
213 KB JPG
>>2932429
https://www.hackster.io/megazoid/crokpocket-a0ff83
>>
File: 20250719_145028.jpg (526 KB, 3024x4032)
526 KB
526 KB JPG
Fuck, I pasted everything without realizing there is a protective foil on this plate.

>>2932466
Yea, but that's just hardware modification, it's boring.

>>2932559
That's cool. Maybe we can use this to figure out how to do d-pad. The problem with d-pad is that we are quite limited in space AFAIK.
>>
>>2932429
None of these chips have clock rates > 1 GHz or RAM in excess of 1 GB. You can't emulate much on that. Unless you're slapping a FPGA in there you need at least 1 GHz clock rate and 1 GB RAM to emulate everything SNES and before.

A FPGA would also allow you to prototype hardware for what is essentially your motherboard, so you could design it in the FPGA with the plan to integrate it with the FPGA. Then from there implement it in hardware and work out the bugs.
>>
>>2932987
Not OP but the SNES has a clock speed of a few MHz (less than an arduino uno) and less than 1MB of RAM. Obviously running an emulator would require more processing power than having dedicated hardware but how did you arrive at the conclusion that nothing short of a microprocessor clocked at 1GHz at least and coupled with no less than a Gigabyte of ram will do?

This guy made an NES emulator using an ESP32 and an AVR chip to interface with the controls, none of which have specs even remotely close to the ones you listed: https://www.instructables.com/ESP32-Handheld-Game-Console/
>>
>>2932987
Gameboy is like 8MHz + 16 KB RAM. ESP32 should be more than enough for that.
>>
I think you should be focusing on building something that can run existing emulators rather than thinking about building a device that games could be made for.
If you got no games, you got no gaming console.
>>
>>2933116
That would be more productive, but it's not something I would like to focus on to be honest. Porting and debugging whole ass emulator to an embedded environment is not really most interesting thing to do. Especially considering that I rather use Rust and would like to learn more about using it for embedded programming and Lua.

However there might be a nice way to do both actually. I might simply use PICO-8 API for making games, making this effectively a hardware to run PICO-8 games. This would be the best of two worlds, I would have an existing database of games, a software emulator and I would get to write some embedded Rust+Lua code. And PICO-8 API is tiny, it's only like 20-40 non-standard Lua functions.
>>
File: out.mp4 (3.88 MB, 1280x720)
3.88 MB
3.88 MB MP4
Yey

Anyone has any idea why does the screen grid is offset? The absolute size is correct but top left corner of physical pixel grid seems to actually be at x=1, y=2. I have to be drawing to 1..160 x 2..129 inclusive in order for the image to properly align with the pixel grid. Might this be specific to this particular display model or maybe manufacturing problem?
>>
>>2933176
>6 breadboards
>1.9" screen
Nice Gamebuoy
>>
File: 20250729_011400.jpg (524 KB, 4032x3024)
524 KB
524 KB JPG
Update. I had to rewire stuff to fit everything but now it's all connected(except for gain). Still haven't programmer and tested it but that will come next.
In the mean time, I tried to get Lua running but that's not exactly straightforward for Rust on esp32. I don't think anyone has done it yet and the existing libraries only really target x86 and wasm. But there exist a C++ IDF Lua module and WIP Rust Lua interpreter, which gives a couple of options:
>get that interpreter running on esp (currently it causes stack overflow for some reason, even at 32k stack. some corruption maybe?)
>get lua-src to compile Lua on xtensa, trying to imitate that IDF Lua, so mlua library can work
>try to integrate IDF Lua module directly into the project and write my own bindings/wrapper
Every option requires some non-trivial work and neither is guaranteed to work. However the first one would probably be the nicest since it would give us full control over the interpreter. We could emulate Pico-8 fixed point precision and whatever other wacky idea they had. But I have no idea how stable and usable this project is. The author still seems to be actively working on it so I could try contacting him. Alternatively second option, if it works, it would give us really nice, battle-tested bindings, since mlua is quite popular library.
3rd option would probably take most work and would suck so better save it for last.
>>
>>2934941
Also, I forgot to mention. The first option is probably the only one that would allow us to ditch esp-idf and FreeRTOS altogether and go pure Rust + esp-hal + embassy. esp-hal seems to be nicer to work with since it cuts down all these abstractions and is better documented. Also async > RTOS.

>>2933300
These things, they take time.
>>
>>2934948
Yes, these things do take time. They also take 6 breadboards.
>>
>>2935026
Final hardware will be designed later. Think of this as a devkit.
>>
>>2935029
Is that a devkit on 6 breadboards in your pocket, or are you just happy to see me?
>>
what are you all doing
>>
>>2935031
Right now? I'm carving a watermelon for Summerween.
>>
>>2935031
Speedrunning work so I can start testing if all the components works properly.
>>
>>2933300
>>2935026
>>2935030
I don't see how the number of breadboards that are used matters at all.
>>
>>2935092
The more breadboards the betterer. The Atari Lynx started out on 37 breadboards.
>>
Got Lua working using piccolo(Lua interpreter in Rust)!
Turned out sdkconfig should be in the workspace root rather than specific crate's directory. Without that it defaulted to 3k stack size.
Also got analog stick working and implemented deadzone. I also ditched embedded graphics core and wrote my own functions that operate on framebuffer instead of directly on screen. Drawing framebuffer is still synchronous since that's how the random st7735 library I found works, so I will have to write custom driver based on DMA and interrupts. It will probably require double buffering/swap chain I guess.
>>
>>2935536
Bro what do you want to run on it
>>
>>2935539
Pico-8 for now
>>
>>2932429
>ESP32

You need the Bluetooth version so you can hack satellites.

Why not include a minidisc player while you’re at it for Sony PSP emulation
>>
File: out.mp4 (3.56 MB, 1168x962)
3.56 MB
3.56 MB MP4
Calibration.
Now, all the peripherals are connected and tested(except sdcard). Next, I will try to get rig off ESP-IDF and FreeRTOS and try to get it all running on baremetal with embassy. I hope this will enable me to do get high framerate and sound in the background while main task will be taking care of Lua side of things.

>>2935876
>Why not include a minidisc player
That would require dedicated hardware and emulating real console is too much work.
>>
>>2936462
4/10
needs moar breadboards
>>
>>2936462
+1 breadboard for microSD breakout
+1 breadboard for charge circuit
+1 breadboard for audio amp
+1 breadboard for speaker
+1 breadboard for battery
+1 breadboard for power switch
+1 breadboard for volume pot
+1 breadboard for power LED
+1 breadboard (with SMA connectors) for external wifi/BT antennas
>>
File: 1521863139109.jpg (37 KB, 800x734)
37 KB
37 KB JPG
>>2938086
>>
>>2932429
Not a diy, more of a humanities type of guy but I can point out a couple of things you should look out for based on the OP image.

>emulation
Would have a lot of legal concerns if encouraged by you, or made profit off of you. It's still technically illegal, so letters would start piling up. A way around it would be to make it have an OS that had emulation systems built in already, like android, and provide a legal way for customers to emulate (also for free?)

>easy to make games for
Modern game engines require some heft, if you want it to be have games on a larger scale you might want to have beefy specs. Also consider what game engines are compatible with which OS, and how multilayer would work
>>
>>2934941
So now you're porting Pico-8 instead of a normal emulator anyway. You wanted to avoid porting but you still have to do it.
Coulda had good gaymes but now you've got Pico 8.
>>
File: out.mp4 (3.66 MB, 1920x1080)
3.66 MB
3.66 MB MP4
>>2938143
I'm just making a console for myself and friends. There will be no legal concerns, it's not a commercial product.

>>2938265
Well, I do not know of any open source pico-8 emulator, so it's more like writing a new one from scratch rather than porting. This is close to what I originally planned which was just our own Lua based runtime for games that would be yet to be written. But now we have a reference and an existing library of games to play. Emulating real hardware or porting an existing emulator would take quite more work and wouldn't really be that interesting imo, even if the games could potentially be more interesting to play. We could always add more emulation options later, I am already considering porting doomgeneric to this too.
We have already got a basic emulation, memory layout and IO going and now we are tackling API functions one after another. However the lua library we use depend on std so it will have to be ported to the nostd environment. In the meantime I made this tool that lets me dump profiling data from chip and displays it on a time chart when I press the boot button on dev board. Tracking task timings was made trivial thanks to ditching rtos/esp-idf for embassy/esp-hal. The size of flash has decreases from 1.3MB to 50KB too and gave me more control. It's much nicer to work with embedded Rust this way.
>>
File: 1755962020771972.png (41 KB, 1814x869)
41 KB
41 KB PNG
Bump because I am back from vacations and the project is still ongoing.

Only after moving to esp-hal, I realized I2S support is not that great compared to SPI/DMA. I only use it for sound which probably won't be needed for a while, but since I already set my oscilloscope up and prepared test program, I might as well go for it and implement other standards beyond the most basic stereo TDM Phillips.
Well, if I knew just how many different standards and moving parts there is to I2S I would probably procrastinated on it longer, but it's too late now. Now I bury myself in technical references to see how to properly implement at least remaining TDM standards and channel configurations it for the whole esp32 family.
>>
>>2932429
Im just gonna buy one.
>>
File: 1755954126492516m.jpg (155 KB, 1023x1024)
155 KB
155 KB JPG
>>2938086
Fuck off... haha. I just came here to laugh at you. The portapack has all that and more, but i dont want your faggotry infecting the discord. Keep your zoomer Gameboy in the trash where it belongs.
>>
>>2941117
How many breadboards does it take to prototype a Breadboy?
>>
>>2941221
this is now officialy named the breadboy
>>
>>2941225
It could have different cases like white, rye, whole grain, pumpernickel, etc. Tomato, sliced pickle, onion, and bun for buttons. Make the SD card slot like a little toaster with orange LED. Put bezel art around the screen that looks like a lunch box.
>>
I've thought about making my own handheld, but I realized that if I'm just going to make something that just emulates old handheld and console games then I might as well just not bother. But if I have fun with it and create a custom UI, I either need to figure out how to make it compatible with existing games, find games that might already work with similar controls, or I'd need to make games explicitly for that interface, all of which just seems like it'd suck the fun out of it.

>>2933116
>If you got no games, you got no gaming console.
That never stopped Sony before.

>>2932466
>Just build a portable wii or something.
How exactly would that even work with games that need motion controls?
>>
>>2941346
>That never stopped Sony before.
So you think they're shit and that's the project you want to follow in the footsteps of?
>But if I have fun with it and create a custom UI
You can make a UI that launches an existing emulator.
>I either need to figure out how to make it compatible with existing games.
That's called an emulator.
>find games that might already work with similar controls
How are you going to run those games to even accept those controls? It's an emulator again.
>or I'd need to make games explicitly for that interface
Not going to happen.
You're bumping up against the fact that the hardware side of this is just some buttons and an abstraction layer, and it's the software that is actually significant work.
You're basically saying that the frontend sounds fun, and the backend sounds boring, but for some reason you refuse to use a pre-existing backend.
>>
File: 1213141032685.jpg (28 KB, 541x343)
28 KB
28 KB JPG
>>2941413
>So you think they're shit and that's the project you want to follow in the footsteps of?
Memes.

>You can make a UI that launches an existing emulator.
I meant the actual, physical interface. I don't just want to copy the same button layout every game console has had since the Dual Shock came out on PS1.

The Wii was the last game console I can think of to actually do something different with its controls.
>>
File: 1567516632083.gif (382 KB, 960x616)
382 KB
382 KB GIF
Check out muh Nitender Oui-oui.
>>
>>2941566
>I meant the actual, physical interface. I don't just want to copy the same button layout every game console has had since the Dual Shock came out on PS1.
All games are going to be based on a pre-existing console. All you would be doing is putting your buttons in a different physical location, but still mapping them to the locations a normal controller would have.
It's still just buttons + abstraction + emulation. You're just putting the buttons somewhere else. The game has no way of knowing that and doesn't care.
What alternative to this do you see? I don't understand what you're driving at or what you want from this project.
>>
>>2941630
You can do whatever you want. I'm just saying that I've thought about making my own custom handheld, but felt that if I couldn't really do something better than what's already out there then there really isn't a point to making custom hardware for gaming.

If I remember right, the PS2 had analog/pressure sensitive face buttons, but barely any games took advantage of that fact besides MGS3. And the Sega Genesis port of Street Fighter II had a clunky control scheme where pressing Start switches between punches and kicks on the 3 face buttons with the 6-button controller made for better compatibility with arcade ports.

But at what point does it all just become an excessive amount of shit?
>>
>>2941346
>How exactly would that even work with games that need motion controls?
While that design doesn't specifically have it installed, you just need to rewire in the bluetooth module from the original board and hotglue two IR leds in the case. Yeah you'd need a separate wii control for it but this mod is specific for gamecube games. Also I think there are software options to map motion controls to the sticks. Pick your poison I guess.
>>
>>2941709
>I'm just saying that I've thought about making my own custom handheld, but felt that if I couldn't really do something better than what's already out there then there really isn't a point to making custom hardware for gaming.
Ah, I see. I thought you were still trying to find some way to make the project worthwhile, but that was my misunderstanding.
I agree that this is a pointless project. The kind of thing you do for the sake of doing it.
>But at what point does it all just become an excessive amount of shit?
I get what you mean. There's only so much space we actually need to map out.
I'm actually pretty happy with the standard DualShock layout. I think you can do some interesting stuff with layers and context dependency like MGSV.
>>
Back to square one(0-indexed).
I got I2S driver to do what I needed and rewrote everything to no-std.
Now it's time to port the lua vm to no-std.
Pic related is current, improved communication with the touch screen. Since I got oscilloscope hooked I also checked how did the previous one perform and I have no idea how did it even work. It completely shit on the protocol, yet somehow managed to work by pure chance. No wonder why I was getting sort of noise in position, it is so much more precise now. Not that I will even be needing touch screen much but it's still nice to see things work properly.
>>
File: 20250910_054402.jpg (693 KB, 3024x4032)
693 KB
693 KB JPG
>>2943777
>Now it's time to port the lua vm to no-std.
And it's done. It took me way less time than I expected. It turned out that someone has already been working on a no_std PR some time ago and it was just manner of rebasing it to newest changes.
Since I already had interface for pico8 prepared for the test native emulator, it only took a little wrestling with psram to just get it running on the chip.
Now it's time to implement rest of pico8 api.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.