Musings of a Fondue

FFmpeg Snippets

Batch scripts for useful FFmpeg actions. Posting for future reference. Perhaps others will also get use from them.

Games for the Computer

I hope to run some of the games for the PICO-8 fantasy console on my Homebrew Computer. For example,

The developers have spent a lot of time writing the code, designing the graphics and gameplay, and creating the music to make the games beautiful and fun. While they are not as CPU/GPU intensive as your typical AAA titles, it would be quite an achievement if my computer can run them at a decent frame rate!

A VHDL Take on Ben Eater’s CPU


As part of the Homebrew Computer Project, I have been exploring other CPU architectures and their implementations in order to broaden my understanding of CPU design.

An awesome one that I came across was Ben Eater’s 8-bit computer. It is well documented through a series of videos on Youtube and also on his blog. The architecture is simple which allows you to get a firm understanding of all its components.

Since it is a known working design, I saw it as the perfect opportunity to practice implementing a CPU in VHDL.

LCD Woes - Back With a Vengeance

After months of waiting the new LCD assembly finally arrived!

I noticed the PCB had a different layout than the one I had earlier. Gone was the onboard voltage regulator. Yay cost cutting! Also missing was the ZIF connector. In this one, the LCD flex cable was soldered directly onto the PCB, yay more cost cutting! Given the trouble I had earlier trying to resolder the four chunky traces of the touch screen cable, prospects looked dim for resoldering the many small traces of the LCD screen cable. Drilling mounting holes onto the PCB no longer looked like an option.

Before doing anything, I checked whether the LCD works. I connected it to an Arduino and loaded Adafruit’s graphics test. It sort of worked. But not quite. The screen flickered and what rendered looked glitchy. See the video* below for what I mean. Contrast this with what the test is supposed to look like.

Not quite right

LCD Woes


It was time to put the previously disassembled LCD assembly back together. Reconnecting the LCD to the PCB was easy enough (given that it was a ZIF connector). However reconnecting the touch screen would prove to be my undoing.

Designing a Case

I had a hard time figuring out how to mount the LCD assembly. It was designed for use as an Arduino shield and thus its PCB had no mounting holes. I wanted a solution that was sturdy but non-permanent so things like glue were not options. I came across these clips from Adafruit, but they didn’t seem rugged enough to support the handling the touch screen (and hopefully handheld computer) was going to receive.

RAM for the Computer


Internal RAM

My original plan was to use the FPGA for RAM, either by building the RAM in VHDL using flip flops or by using the FPGA’s dedicated RAM blocks.

Learning VHDL - VGA

Next in line in the awesome tutorial series from Nandland was VGA. I didn’t have a VGA connector for my FPGA, but wondered if I could jury-rig something with what I had on hand.

The wiring diagram below from Grant Seale’s Multicomp gave me a very good idea on how to go about it.

In the Nandland tutorial (image below), three signals are used per channel instead of two so my setup reflects that.

I had five 1Kohm resistors on hand, enough to control one channel. I used two of them in parallel to get the 500 ohms (close enough to 549), two in series to get the 2K ohms, and one on its own for the 1K ohms. Jumper wires were used to connect to the pins (red, green, blue, hsync, vsync). Luckily, all the ground pins were in-line (and the random pin in-between was an unused pin) so I just tied the whole line to ground using one wire (instead of several jumper wires). Here is the final masterpiece:


And the overall setup:



In theory it should have worked, but I was very skeptical. Imagine my shock when I uploaded the program to the FPGA, turned on the screen, and saw this: