This is a relatively short post 🤠, but I just want to write that I had a lot of fun during the hackathon at Dräger - this was in fact my first hackathon. We, the interns, formed a little group and decided to port games to the Alcotest A7000 devices, which are used by the police to measure the alcohol levels of pulled over car drivers.

We first explored how the device works, especially how to program animations and shapes (since there are no graphics libraries, everything is handeled by frame buffers) as well as how to handle IO. Once that was done, we started working on an implementation of pong, a menu and I decided to port my old Intel 8080 emulator to the A7000. The reason I decided to port it is that both my emulator and the A7000 use frame buffers, so all I had to do was to take the existing code, remove the GTK frontend and rewrite some functions so that they could work on the microprocessor (a STM32l4).

It was an great experience - since microprocessors don’t have (usual) file systems, I couldn’t use fread(), instead I wrote the game ROM into a 8-bit C-array (saved in a header file) using the Linux command xxd -i rom rom.h. And after a long segmentation fault hunting session of the new code, which was a salad of C and C++ code mixed together, the game finally showed up on the screen - the emulation speed is slow and the input wasn’t working as it should, but I was more than satisfied to see the emulator on one of these devices 😁