FPGABee is a hardware emulation of a Microbee - the classic Aussie home computer of the 80's!

Building FPGABee v2 - Testing and Fixes

Wednesday, July 3rd, 2013     #version2 #everything

Over the last few nights I've been testing FPGABee after getting it to boot from a virtual hard disk image on the SD card. It's worming well and so far I've only found a few issues.

Shift Key Issues

This is an issue that FPGABee has had since version 1 when typing a colon (ie: Shift+Semicolon). If I released the shift key before the colon/semicolon key I'd get a colon and a semi-colon. eg: typing A: would yield A:;.

The cause of this turned out to be a problem with the way the PC to Microbee keyboard mapping worked. On a real Microbee keyboard the colon and semicolon are on different keys. FPGABee translates keys by simulating shift key presses and releases, but there was a bug where it was looking at the shift key state continuously - rather than remembering the state of the shift key at the time the other key was pressed.

Wrong Character Set for Inverse Characters

The next problem I noticed is that when in one of the small character modes (eg: 80x24 display) the inverse characters were using the larger character set:

microbee_init2.jpg

To generate inverse characters the Microbee reads the character ROM, inverts the pixel data and re-writes it to the PCG RAM.

The problem here is that when reading the character ROM, FPGABee's memory address decoding wasn't taking into account the 6545's base address registers which selects the smaller character set. To fix this I simply exported a signal from the 6545 component and used it in mapping memory reads of the character ROM.

Duplicated Character Rows and Incorrect Colours

Most games that I tested worked fine. One that showed some obvious problems however was Kilopede which had two display issues - a couple of rows at the top are duplicated and they're supposed to have a grey background.

Kilopede

The duplicated rows were caused by the video controller's row counter register only being 5 bits (max value 31). This game re-programs the video controller to an 8 pixel tall character cell which caused a wrap around issue and the top rows to be displayed a second time. Increasing the row counter to 6 bits fixed this.

The missing grey background colour was caused by a misunderstanding of the insensity flag in the colour values and some simple changes fixed it:

DSC_0053.jpg

(Note these articles are being retro-written and the original code I showed for generating the colours a few posts ago was already correct)

Next Steps

All things considered, FPGABee is now working remarkably well and I've not found any other issues. Next will be to support multiple disk drives (ie: floppies) and a mechanism for switching disks.


« Older - Building FPGABee v2 - FBFS File System Newer - Building FPGABee v2 - First Boot »