Just so I understand, you would not accept 25 rows by 80 columns display, but 32 row by 128 column in ram though you may have enough ram? I am not sure about your code, but, this project properly written should squeeze into ~50 macrocells.
That was my original plan, although at the moment Im trying to achieve the use of some 2K DPRAMs - the video card side is constantly set to output, and the CPU can then write into the other side without needing to go through all of the bus time sharing malarky. My original design had two banks of RAM so that the video card would be reading out of one, and the CPU could read/write the other, and then set a flag to switch the banks at the next vsync. Havent ruled this out yet, but if I can make it work with the 2K DPRAMs I'll be very happy for now.
If I can make the current method work, then I can e.g. take some 8K standard RAMs, have two banks, and then have 4 pages in each bank, as an example. So there are still some advantages to be had from making this work I think.
You are using 9x16 instead of 8x16, is this correct as the pixel clock and generating that extra pixel does eat some logic?
Yep thats correct. Most characters are only 8 pixels wide, with the 9th pixel being a spacer (results in a H res of 720 as opposed to 640). But box drawing characters in the 0xCX and 0xDX range get stretched out to 9 pixels so they meet up with their right hand neighboring column for continuous lines.
Colour wise Im doing 16 foregroung colours and 8 background colours, with the MSb indicating blinking text - basically classic VGA text mode (that I grew up with anyway).
Note that for your font rom, I would have made it compatible with the standard PC/Atari/Commodore font layout where the lower 4 address bits contain the Y coordinate/line in the font and the upper address bits contain the character index. However, I have not read deeply into your code. This makes it faster to change character's font or generate animation like the old video games.
I hadnt actually looked how a standard font ROM was organised, so I just whipped something up for proof of concept purposes. For sure I can change it easily enough once I get everything working, if it would make it easier for people to copy existing fonts. Eventually the font ROM will be banked to allow switching between multiple character sets, but that will happen externally to the CPLD, so none of that is included.
Hardware scrolling isnt something I had intended to support for this first version.
Lots of good ideas for a future version though, and Im tempted to build something more capable. But for now I really just want to fix this adder issue and I'll have reached my current goal.
I'll play around with some different counter bit widths and see if something else will work. I have an Altera programmer on the way, wont be here until next week, so for the time being if I can fit it in 128MCs then I can still program my existing 128MC Atmel CPLD, and then switch to 160 if I run out of room.