-
MicroPython Branch
01/08/2019 at 15:05 • 0 commentsI just realized that while this project page links to the repository with the plain python portion of the library, the portion that is written in C is harder to find. So here it is: https://github.com/deshipu/micropython/tree/stage
The branch is a little bit dated, since I didn't upgrade it in a while, but if you look at the three last commits, you will see all the required code. It's not much, just enough to make the plain python version fast enough. Enjoy!
-
This Just Arrived
06/29/2018 at 11:55 • 0 commentsThe ODROID GO is here:
![]()
For now I just tested the default firmware, which contains all the emulators. It works as advertised, though I have to say that the buttons feel rather cheap — much worse than on the #µGame. The sound is super-loud and kinda annoying, but you can mute it.
-
More Players
06/20/2018 at 17:37 • 0 commentsLooks like my decision to abandon #µGame Turbo and instead focus on improving this library and making it work better on the original #µGame might have been right. New devices are popping up left and right. Adafruit has recently leaked some information about the Arcade FeatherWing they are working on, and now @Jarrett alerted me about a new device made by Odroid: https://wiki.odroid.com/odroid_go/odroid_go#arduino
From the point of view of hardware, it uses the same stuff as the M5Stack, so this library should already work on it. I ordered one ($48 with shipping for me), and of course will attempt to get my games to run on it. Still a bit more than the $11 I paid for the TTGO 1.0, but this one has the button and a case already. We will see how good those buttons are...
-
Support Larger Resolutions
03/11/2018 at 18:45 • 0 commentsAfter a bit of work, I can now use the whole 320×240 screen of the M5Stack — unfortunately I had to change the C sources a bit, to use 16-bit variables for the coordinates. That was a lack of foresight on my side, but it's now fixed and the pull requests for the change are up.
I also optimized the sprite drawing routines a little bit, and fixed a bug that would sometimes make the library fail to refresh some sprites. You can now also use floating point values for the sprite positions, and they will be rounded during the rendering.
![]()
-
Porting to M5Stack
03/10/2018 at 23:39 • 0 commentsOne of the nicer MicroPython-capable boards with integrated color display out there is the M5Stack. It's a bit pricey, but you get a really nice enclosure, and if you get the "faces" thing, even several keyboards. So I decided to try porting the Stage library to it first. After a day of work, mostly spent writing the driver for the ILI9341 display, I ended up with something like this:
![]()
The small square area is the 128×128 pixels for which the library was originally written. Of course with a bigger screen you can make games that use a larger area. But the rendering doesn't look quite right. After half a day of debugging, I considerably simplified the driver, but I didn't solve the issue until I tried to reduce the speed of the SPI clock down to 40MHz. I have forgotten that ESP32 has really fast SPI, which apparently this display can't handle reliably. With that, I have proper rendering:
![]()
Now, the buttons. The keyboard attachments all use an ATmega328p chip working as an I2C slave on address 0x08 and reporting the pressed keys as a simple bit mask — pretty much like #D1 Mini X-Pad Shield or #LAMEBOY - another ESP12 handheld. That's a problem, because I have to poll the bus, and if I do it only once a frame, I might lose keypresses. For now I used the naive code that just returns the current state of the buttons. I will need to see if I can use a timer to have a proper button handling, with a buffer and all that.
I also didn't explore the sound yet. The ESP32 has a DAC, and the M5Stack has an amplifier and a speaker — you can tell, because you can hear every single GPIO toggle in that thing. But there is no ready-to-use functionality in MicroPython to simply play WAV files in the background, like there is in CircuitPython, so I might need to do some work there.
deʃhipu


