Help with extending highres VGA text driver
heapdump
Posts: 13
Hi all,
I tried to extend the 1024x768 / 8x12 px font graphics driver from Chip Gracey with the following changes:
+ use 8x16 font instead of 8x12 which results in 128x48 tiles
+ use full character set 0-255 instead of 0-127
+ use independent color for each tile (graphics memory contains 2 bytes per tile, char + color)
I know it will take a lot of memory, but for me that will be OK as I am using a dedicated Propeller chip for my GPU.
(Should result in about 12k for graphics mem + rom font + code)
I am new to this and decoding / adapting PASM code is a bit hard for me, so it would be nice if somebody is willing to help me out here :-)
Thanks in advance!
Patrick
I tried to extend the 1024x768 / 8x12 px font graphics driver from Chip Gracey with the following changes:
+ use 8x16 font instead of 8x12 which results in 128x48 tiles
+ use full character set 0-255 instead of 0-127
+ use independent color for each tile (graphics memory contains 2 bytes per tile, char + color)
I know it will take a lot of memory, but for me that will be OK as I am using a dedicated Propeller chip for my GPU.
(Should result in about 12k for graphics mem + rom font + code)
I am new to this and decoding / adapting PASM code is a bit hard for me, so it would be nice if somebody is willing to help me out here :-)
Thanks in advance!
Patrick
Comments
I'm pretty sure my 1024x768 8x8 driver is mostly based off of Chip Gracey's 1280x1024 driver, but I probably took parts of it from Chip Gracey's 1024x768 16x16 or 16x32 tile driver, which I've also attached. I had to base my driver off of the 1280x1024 driver because I needed more cogs to process the smaller tiles.
My 8x8 version might be half broken - I don't remember, as it's been a long time since I last used it. I might have gone back and fixed it at some point. If it is half br oken, it's because because colors are for every 2 tiles, which isn't what I wanted. I was going to modify it so that the first tile would use colors 0 and 1 and the second would use 2 and 3, to effectively give 2 colors/tile but that never happened, I think because I ran out of time to run the extra instructions.
Later today, I'll try to post a demo for my driver and see what its current status is.
You might use a diff utility to see what I've changed in my 8x8 driver. If you have git installed on your computer: or, if you have some sort of Unix and somehow only have plain diff:
EDIT: What happened to my attachments?!?
I also attached Chip Gracey's 1280x1024 driver for comparison, in case you don't have it.
@Electrodude:
Thank you very much! This looks like a very good base to start
I will try it tomorrow and see if it works for me...
Cheers
as I took a closer look this morning to the adapted driver I first was happy when I realised that it is using a address for tiles instead of an char index, but then I wondered how 10bit can archive this; it results in a fragmented memory by 64 bytes (2 longs, 16x32). I only need 2 bytes per character so the 10bit address resolution is too rough - 3/4 of the memory would be wasted. :-/
I am not sure if I understand how you did it with the 8x8 version... did you change addressing oder so?
It comes very close to what I wished to have - so after a few modifications I hope it works
Thanks so far!
Patrick
finally with the help of kuroneko I neary reached all my goals
Atteached you can find the current version of the driver which supports:
+ 1024x768 with: 64 colours for foreground and 4 palatted colours for background
+ it uses a 8x12 full full range character font set from zx81vga (Thanks for the permission!)
+ added support for compiling with bstc (formerly I was unable to handle constructs like '+4' etc. in PASM sections
It is still memory hungry und needs ~20k for RAM buffer + extra memory for code :-/
If anybody have so great idea to modify it to run with 8x16 it would be very nice!
Cheers,
Patrick