Up till now, Protos was a “virtual console”, and I was making a Visual Editor for it. But really all it was boiled down was a Game Engine with WASM. It’s shtick was that it could run basically everywhere. Unity can do that. Not much of a console, eh? My original idea was for Protos to be a physical game console. I thought “maybe if I make this first I can get support to make the actual physical game console” .. But that wasn’t the original goal. Protos was meant to be a physical game console. Why did I chicken out and doubt?
So I decided to turn back and beat the fear and just work on what I originally planned. A physical 2D Retro Video Game Console. For the development, I started with Raspberry PI Zero 2w but then found out the memory speeds were not fast enough to be for the ‘virtual hardware’ and the game developers game at the same time by the tests I was running.
I decided to upgrade to an Orange Pi Zero 2w, and even made my own Yocto Linux Image Machine Layer for it (and put it on Github), but since I accidentally bridged some gpio pins and had no flux paste (my town doesn’t sell any!), I ordered some off of Amazon but it didn’t even ship yet after so long! So I just decided to go for the Orange Pi Zero 3 instead. This way the gpio pins are already there, along with the UART pins so I can just focus on development. Sure I spent quite a bit of time making my own machine layer, but hopefully other people can benefit from it.
Read this far? Awesome! Let’s shift to the ‘virtual hardware’ now. So I’m working on the “Windows Emulator” version, and the ‘physical version’.
Windows Protos Emulator
Using App Containers (for security), a game can’t go wild and just access things on your computer. It’s built to have a shared memory communication and the host does all the ‘hardware’ work (ROM access, virtual DMA, audio playing, gpu etc). The game can’t access anything else aside from some .dll’s to make C# runtime happy (so newcomers can use C# if they want).
Protos OS / Virtual Hardware
So the Orange PI Zero 3 has an AllWinner h618 cpu chip which has 4 cores. The first core is for the game process, the second is for GPU, the third is for Audio, and the fourth is where the Host shares with the custom Linux OS.
Progress
Where am I at? Well as you can see I don’t post very often! If I knew more people would be reading, I might update more regularly! But running games works for physical console (well it did for the RPI but I have to make the Orange Pi version work, but that’s planned), and it works running games for the Windows Emulator version (to ease development). Right now the GPU hasn’t been implemented, but Audio works for the most part. It’s a 32 audio channels (might change in the future) that runs 32khz stereo 32bit float. There is also a Gaussian filter that’s like the SNES audio source filter, so when you compress your audio you have that ‘warm’ sound. The audio sources also support ADSR envelope support.
The “GDK” is written in C#, but you can use whatever language you want, the app gets access to a shared memory map, so anyone can map that out to the language of their choice. Think like how SNES had access to I/O ports and addresses? Things like having a start voices and stop voices 32bit bitmask, etc, etc.
I also implemented a reference audio library for C# that plays .xm files using the “Audio Hardware”. It doesn’t support all commands yet, but plays “Sweet Dreams” by Elwood pretty nicely!
Planned
After I’m happy with the audio, I’ll move onto the GPU where we can work with sprites, tilemaps, etc, etc. Right now I’m hoping to find a hardware guy and some more people to give some good feedback and use it.
Ultimately I wanna be able to use the CPU SoC on a custom PCB, have our own controllers, inverted steel mould shell so we can create a great looking console with ABS plastic.
Discord
Feel free to join the Discord! https://discord.gg/paxPfuDSj5
There’s nobody there right now, but hey if people start showing up I might go on there more.