Building FPGABee Version 2

FPGABee version 2 came about once I realized that I'd taken a slightly wrong path with the first version. I'd originally planned to emulate much of the disk functionality in software but came to realize this made it just another emulation project. The point of this was to learn about hardware.

So after some careful thought I set aside most of the second CPU/console mode/PCU functionality and reverted to the plain Microbee core. From there I decided to target a Microbee Premium 128K with hard disk. I chose the hard disk model because it's more convenient to use and the disk controller is actually simpler to implement.

  • 128K RAM including all the port 50h paging modes.
  • Supports all the relevant 6545 CRTC registers including character and screen dimensions, base address etc...
  • Colour video - 2K colour RAM
  • Extended PCG graphics - 16K PCG RAM, 2K attribute RAM
  • WD1002 disk controller for HDD and FDD access.
  • Reads virtual disk images from SD card formatted with a custom file system format.
  • fbfs tool for manipulating SD disk images.
  • New simpler PCU (Peripheral Control Unit) implemented by hijacking the Microbee's Z80 processor via non-maskable interrupt (NMI). In other words, no second processor is necessary.
  • Could easily be extended to 1Mb RAM and 32K PCG RAM (as per Premium Plus spec).
FPGABee v2

Part 1 - Change of Plans

Why I decided to backtrack and take a fresh approach with FPGABee.

Part 2 - Screen Geometry

Designing a more complete 6545 CRTC implementation including better geometry calculations, a smaller character set and an improved aspect ratio.

Part 3 - Colour and Extended PCG Graphics

Updating the video controller to support color, extended PCG graphics, more graphics RAM and character attributes.

Part 4 - More RAM!

Moving from on-chip FPGA RAM to external SDRAM to ramp up to 128K RAM. Also covers the Microbee memory bank switching mechanisms.

Part 4 - Disk Geometry

Implementing a hardware component to calculate disk goemetry. ie: mapping cylinder, head and sector numbers of virtual disk block numbers.

Part 6 - Disk Controller

Emulating the WD1002 disk controller found in the Microbee Hard Disk models and interfacing it to the FPGABee's Z-80.

Part 7 - First Boot

Trying to boot only to find a bug in the Z-80 CPU core.

Part 8 - Testing and Fixes

Fixing bugs with the shift key handling and with the video controller.

Part 9 - FBFS File System

Designing a custom file system for the SD card to allow multiple virtual disk images to be referenced from the same device.

Part 10 - Hijacking the Z80

Explains how FPGABee hijacks the main CPU to run FPGABee's custom on-screen overlaid menu

Part 11 - PCU Supporting Hardware

Implementing some additional circuitry to allow the PCU software access to the screen and keyboard.

Part 12 - PCU Firmware Working

Implementing the PCU software for selecting disk images. Also, covers adding support for soft reset from the PCU menu.

Part 13 - Better Aspect Ratio

Switching to a higher screen resolution to support a better (ie: less squashed) aspect ratio.

Part 14 - ROM in RAM

Removing the need to flash ROM images into the FPGA bit files by putting them on the SD card and making for much quicker and easier firmware updates