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).
Why I decided to backtrack and take a fresh approach with FPGABee.
Designing a more complete 6545 CRTC implementation including better geometry calculations, a smaller character set and an improved aspect ratio.
Updating the video controller to support color, extended PCG graphics, more graphics RAM and character attributes.
Moving from on-chip FPGA RAM to external SDRAM to ramp up to 128K RAM. Also covers the Microbee memory bank switching mechanisms.
Implementing a hardware component to calculate disk goemetry. ie: mapping cylinder, head and sector numbers of virtual disk block numbers.
Emulating the WD1002 disk controller found in the Microbee Hard Disk models and interfacing it to the FPGABee's Z-80.
Trying to boot only to find a bug in the Z-80 CPU core.
Fixing bugs with the shift key handling and with the video controller.
Designing a custom file system for the SD card to allow multiple virtual disk images to be referenced from the same device.
Explains how FPGABee hijacks the main CPU to run FPGABee's custom on-screen overlaid menu
Implementing some additional circuitry to allow the PCU software access to the screen and keyboard.
Implementing the PCU software for selecting disk images. Also, covers adding support for soft reset from the PCU menu.
Switching to a higher screen resolution to support a better (ie: less squashed) aspect ratio.
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