Homebrew CPU Step 2: Rhythm Game Plan

Designing a Rhythm Game

We’re turning a movie-playing circuit into an actual interactive game. This video lays out what we need to do:

  • Use the HD44780 scrolling feature for the play field
  • Design custom CGRAM characters
  • Build a controller for user input
  • Build a health tracker to halt the circuit on game over
  • Tie it all together with new logic, opcodes and program code
Continue reading…

Flood Fill Mazes

paint bucket tool pouring a maze pattern

In this article we generate mazes using jupyter notebooks, numpy, matplotlib, and the scikit-image flood_fill function.

Almost since I could first draw I’ve been fascinated with creating and solving mazes. Graph paper and mechanical pencils were some of my favorite gifts. Recently I’ve rediscovered some of that same childlike excitement by designing a homebrew cpu, and the next game I’m building for it needs some custom mazes.

There are lots of existing maze generating algorithms but I wanted something that filled cells (not grid edges) and that is fast and simple to do in Python so it would be easy to tweak and customize.

Continue reading…

ckanext-scheming 3.0 and Dataset Form Pages

ckanext-scheming 3.0 form pages

ckanext-scheming is a CKAN extension for customizing dataset, group and organization metadata forms, validation rules and display templates.

With ckanext-scheming 3.0 CKAN dataset metadata forms may now be split across multiple pages using start_form_page.

Example ckanext-scheming schema:

- start_form_page:
    title: Detailed Info
    description:
      These fields improve search and give users important links

  field_name: tag_string
  label: Tags

Each start_form_page block marks a field at the beginning of a new page of fields. All following fields without a new start_form_page block will appear on the same page. This lets us maintain compatibility with existing schemas and makes it easy to reassign pages over time without affecting how metadata appears in the API.

Continue reading…

Video Encoding at 5 bytes/frame

Bad Apple on 32K EEPROM

This is part two of a two-part series. Read part one here.

In this post we use Python to encode the full Bad Apple video (3m39s) into 32 kilobytes. Our playback hardware has no CPU so our video “compression” is limited to the features of our HD44780-powered LCD display.

We create an illusion of a full bitmap display by carefully juggling 8 CGRAM characters across the 8 x 4 video area and lean on LCD display persistence.

Continue reading…

Bad Apple on 32K EEPROM

Bad Apple on 32K EEPROM

This is part one of a two-part series. Read part two here.

This post covers how we interface a 32K EEPROM, a clock and an address register to a 20 x 4 LCD character display module and use it to play a video. We “decompress” the video by expanding our 8-bit data stream to 9 bits for playback in hardware. There is no CPU or microcontroller involved.

Continue reading…