Another change I hadn't mentioned previously was an update to my VGA card. There wasn't much in the way of changes to the hardware. I mainly wanted to move the design from Proteus which I was using previously to KiCAD. While I was making the change, I did make a couple of improvements to the board. The main different was changing the number of colours displayed. The original board was using 12-bit colour, the VGA output path has been expanded from the 12-bit (4:4:4 RGB) to 16-bit (5:6:5 RGB) colour that allows 65,536 colours instead of 4,096.
While the hardware changes were fairly minor, there has been a lot of changes to the VHDL code for the FPGA. In the previous version, the bitmap modes were working well but the code was becoming a mess and the design was not easily expandable. The decision was made to go back to basics and redesign the code to make it mode modular and expandable.
This change took the card back having two video modes:
- 80x30 character text mode with a fixed palette of 16 colours and 16 background colours per character.
- 640x480 16-bpp framebuffer bitmap mode
I have also been looking at getting EmuTOS running on Y Ddraig as well. With some help I was able to get EmuTOS console mode up and running reasonably quickly. The serial terminal, RTC, IDE, VGA text mode and Keyboard controller were all working well.
While that was working well, I wanted to get the desktop mode working. I ended up writing a fVDI driver for the VGA card. One good thing for starting with the fVDI diver is that it only needs a minimum of two functions, c_write_pixel and c_read_pixel to get it working. With those implemented I was able to get a working desktop up and running. The downside of just using the two functions is the drawing was painfully slow. There were some software routines in the 16_bit driver in the fVDI code that improved the speed somewhat, but to make it useable, I needed some hardware accelerated drawing ability.
Just adding some rectangular fills and line drawing made a huge difference to performance and combined with some of the features that the desktop uses like XOR and pattern drawing, the desktop became an actual usable OS.
Stephen Moody
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.