RSSAmplifier

Blog

Craig J. Bishop

craigjb.comRSS feed ↗25 posts

Latest posts

SoundSlab: How it Started

“But what if every button is also a screen?” That’s the question that started a multi-year project to build a custom electronic music production device, the SoundSlab. One glorious day it will be part sequencer, part sampler, part synthesizer, and part slab. Today it’s a never-ending hobby project. Here I’ll show you how that project started with impulse buying, a CNC milled PCB, self-inflicted…

Convincing probe-rs to Work with VexRiscv

Over the last few years, Rust tooling for embedded development has become quite good. Specifically, the probe-rs and defmt (with RTT ) projects address common needs like downloading firmware, running tests in-situ, logging with minimal overhead, and catching crashes. ARM-based microcontrollers, such as the STM32 family, are well supported nowadays. RISC-V support is still expanding, but the basics…

Debugging VexRiscv Over a JTAG Tunnel with OpenOCD

Wouldn’t it be nice if the same JTAG cable used to configure a FPGA could also debug a RISC-V core implemented in the fabric? Turns out, it’s possible! For a new project using a VexRiscv core to control a few things, I wanted to try tunneled JTAG access. Also, I may have forgotten to add a separate JTAG header on my board design… Anyway, I’ll share how to configure VexRiscv and OpenOCD to use one…

From eBay junk to JTAG on a gigantic FPGA board

eBay is a magical place, somewhere in the middle of the vast AliExpress-Digikey spectrum… well, it is magical for those interested in giant FPGA parts anyway. In previous posts , I detailed the Gameslab, which is a handheld game console built around reballed Zynq (XC7Z035) parts off eBay, which turned out to be perfectly fine after fixing my own mistakes . So, I’m no stranger to the hopes and…

Rust on Risc-V (VexRiscv) on SpinalHDL with SymbiFlow on the Hackaday Supercon Badge

What do Rust, Risc-V, and SpinalHDL all have in common? They can all run on the Hackaday Supercon 2019 badge! In this rather lengthy post, I go through how to get started with SpinalHDL on the badge, how to setup a Risc-V soft core using VexRiscv, how to assemble a basic program for it, and finally how to target and build embedded Rust for it. What is SpinalHDL SpinalHDL is one of what seems like…

Interview with David Galloway - Retro game dev, Game Boy dev and more!

This week I had the awesome opportunity to interview David Galloway, a long-time game developer across many platforms. We met because I was wrong about the nature of the Game Boy CPU in this post , and I’m glad I made that mistake, because what an amazing guy to meet! In this extra-length interview, we discuss early 6052 games, Apple II game development, early 1990s game dev, Game Boy dev,…

STM32L0 Rust Part 1 - Getting Started

The embedded Rust development ecosystem is changing fast. A bunch has changed even since early 2019 when I started prototyping firmware for the Gameslab’s system controller (STM32L0). Most of the changes are incredible! Device support crates, hardware abstraction layers (HALs), and even USB support are all very usable now for Cortex-M devices. In this post, I’ll summarize the ecosystem and show…

Desert Rust slides: crate organization

These are the slides from a talk I gave at Desert Rust , our Phoenix metro area Rust developer meetup.

Gameslab schematic

Here’s the Gameslab schematic in all of its completely non-cost-optimized glory! I had linked to it in a previous post, but this makes it more obvious. Made with KiCad!

Gameslab case in detail

The Gameslab case is made of three custom-machine aluminum plates and held together by only four screws. Notice there aren’t any screw holes showing on the front. Notes Manufactured by Front Panel Express I saw that they were used by audiophiles for custom audio gear amongst other things The front face is anodized and brushed The front has no screw holes Held together by four M4 screws Bought a…

Fried by design and fried by accident

On the way to a working Gameslab, I had a few failures, some more “fun” than others. For example, it turns out that when your giant Zynq FPGA heats up to 70C while idling without any configuration, you might have a problem somewhere. Also, don’t solder while batteries are plugged in. Things die when you do. And, let’s not forget my newly found, strong distaste for QFP parts. QFP aggravations If…

Gameslab project overview

If you went to Hackaday Supercon 2019, you might have seen someone wandering around with a badge that was way too heavy looking. That was me! And that badge was a Gameslab, my FPGA-powered handheld game console. As the blog posts from years ago prove, I’ve been thinking about building Gameslab for a long time, and over the last few months, I have finally done it. In this post, I’ll explain what…

A large BGA, DDR3, & impedance control on a 6-layer PCB

A few months ago, I bought a couple Xilinx Zynq XC7Z035s off of eBay. These are beefy parts, even today! Each one has a dual core ARM Cortex A9, DDR controller + other peripherals, and a giant FPGA fabric (275k “logic cells”). The description did say “refurbished”, and hopefully that means just reballed, which isn’t uncommon for these expensive parts. Anyway, since I bought them, I’ve been itching…

Zynq Bare-Metal Blinky

I recently scored a couple of XC7Z035s on Ebay from a chip seller in China! These are huge chips! The XC7Z010 on my Digilent Zybo dev-board has 28K logic cells and 240 KB of block RAM, while the XC7Z035 has 275K logic cells and 2 MB of block RAM (“logic cell” is a hazy term, but 275K is a lot!). So I’m excited to design a board for them, probably the forever-ongoing project, Gameslab. The prices…

FPGA Game Boy Part 5: Direct & indirect load instructions

So far, the SlabBoy CPU can perform arithmetic operations and load 8-bit immediate values. Neither of these operations require accessing memory at an address other than the program counter (PC). In this post I’ll quickly implement the register-to-register load instructions, and then go on to implementing indirect addressing. Even though the indirect addressing will only support addressing by…

FPGA Game Boy Part 4: Loading immediate values and halting the CPU

It’s been a little while, but in the last post I showed my SpinalHDL implementation of the Z80-ish ALU, part of the Game Boy’s LR35902 CPU. We could compile and run a program with NOP, INC, DEC, etc. However, because the microcode doesn’t support load instructions yet, building complex values is a bit difficult. In this post, I’m going to briefly show how I added the 8-bit LR35902 load-immediate…

FPGA Game Boy Part 3: ALU and some microcode

In the last post, I showed the test bench that loads an assembled Game Boy binary program, and we looked at the waveform output showing that the instruction fetch cycle worked. However, the instruction itself didn’t do anything. This time, I’m going to work on implementing the basic register-to-register arithmetic instructions, which are some of the simplest out of the whole instruction set .…

FPGA Game Boy Part 2: CPU Scaffolding and test bench

In the last post , I started talking about the internal cycles of the LR35902 CPU. In this post, I’d like to start implementing some instructions. Building a CPU RTL description is a large task, so it’d be crazy to try to implement everything all at once. Instead, I’m thinking of starting with the easy arithmetic instructions and then iterating from there. To make testing quick, I want to use an…

FPGA Game Boy Part 1: SpinalHDL and Z80-ish T-Cycles

For a long time now, I’ve wanted to build some hardware emulators of older game consoles on an FPGA. In fact, that was one of the reasons I started designing a handheld game console, the Gameslab, based on the Xilinx Zynq FPGA+ARM combo. Eventually, I envision the Gameslab ARM CPU running an OS that allows you to pick a game, and each game can include custom hardware that is also loaded with the…

Reverse engineering away an annoying pop-up

I recently started using an app called Be Focused Pro for focusing using the Pomodoro technique to focus a bit better. The free version of the app has ads and some pop-ups, so I paid $5 for the pro version to remove the ads. Afterward, I was unhappy to discover the app still persisted in annoying its pro users. Periodically, when you enter a 5-minute break, the app triggers a pop-up notification…

Atlys FPGA reset shenanigans

I’ve been playing around the last few days building a Microblaze processor system on the Digilent Atlys Spartan 6 board. I think my end goal is to boot Linux on it–but for now I’ll settle for booting Das U-Boot. It’s definitely been an interesting journey, since I decided against using the Xilinx-specific git repositories for everything, and instead I used mainline checkouts wherever possible. In…

Gameslab high-level design

I finally decided I might as well make an overall block diagram of the Gameslab system. I was working on changing the design schematics and realized I forgot a couple things. So, I made this block diagram to use as a checklist–makes sure I don’t forget pieces. It also helped to figure out which peripherals would connect to the Zynq PS versus the PL. For example, the LCD touch controller was…

Basic IBIS simulation with eispice

While working on the DDR3 interface of the re-imagined Gameslab, I wanted to do some simple sanity checks for signal integrity. Since I don’t really want to pay >$1000 for two PCBs with controlled impedance and a custom stackup, I just wanted to verify my cheap boards from PCB-POOL would work at all. PCB POOL lists the stackup for 6-layer boards on their site , so I plugged these specs into a…

Gameslab first steps

I bought one of the PSP LCD screens from Sparkfun forever ago, planning on building some kind of game console-like device with it. Slowly, I accumulated more hopeful parts, like the PSP-style thumb-sticks and a touchscreen that fits the LCD perfectly. All these parts are screaming at me to build something cool, so I’m going to build an FPGA based, hand-held game console. From scratch. Building a…

Looking back at Gamesphere

Before I write much about my Gameslab project, I think it’s worth looking back at my Gamesphere project from over four years ago. I still receive a handful of emails per month asking for schematics or help on building a new game console. Usually, these emails are desperate college seniors looking for an easy senior project. And, I’m afraid for the people that are legitimately looking for…