VGA Resolution Settings
Prop
Posts: 4
Hello,
I'm using the "VGA_HiRes_Text" code (from OBEX) for a display interface, running on a serial-VGA board.
The "VGA_HiRes_Text" file has pre-defined resloution settings, and allows user-defined characters. I use 640x480 display settings and have modified many of the characters (fonts), on top of other interface changes.
I would like to change the display resolution from 640x480 (80x40 characters) to a much lower 24x12 or 32x15 characters. I found on OBEX the "VGA_Text" demo program which does just that, but uses only internal ROM characters. Is there a way to integrate the "VGA_Text" resolution settings into the "HiRes_Text" code?
The VGA interface assembly code and display parameters in both programs look very different, and I wouldn't know where to start.
Is there a simple way to change the display parameters to acheive this, or integrate the two programs?
Appreciate the help.
NZ
I'm using the "VGA_HiRes_Text" code (from OBEX) for a display interface, running on a serial-VGA board.
The "VGA_HiRes_Text" file has pre-defined resloution settings, and allows user-defined characters. I use 640x480 display settings and have modified many of the characters (fonts), on top of other interface changes.
I would like to change the display resolution from 640x480 (80x40 characters) to a much lower 24x12 or 32x15 characters. I found on OBEX the "VGA_Text" demo program which does just that, but uses only internal ROM characters. Is there a way to integrate the "VGA_Text" resolution settings into the "HiRes_Text" code?
The VGA interface assembly code and display parameters in both programs look very different, and I wouldn't know where to start.
Is there a simple way to change the display parameters to acheive this, or integrate the two programs?
Appreciate the help.
NZ
Comments
(ROM fonts have font data in alternating bits).
I'd not be surprised if there is already a driver that does what you want though - have you scoured the Obex for all VGA drivers?
Unfortunately I haven't found any existing code which allows user-defined fonts that match the ROM characters (32x16 and interleaved).
I decided to stick with the VGA_Text program and not try to combine it with the HiRes code. But I'm still missing user-defined characters.
Any idea?
How would I point to RAM instead of location $8000 in ROM?
And how would I create the character map? I found a few different methods (defining long arrays) to create new font, but they don't match the ROM assignment and interleaving, or the VGA_Text code.
Do I need to modify the VGA_Text Print(c) routine to replace ROM character "c" with the address of alternate user fonts?
screen[row * cols + col] := (color << 1 + c & 1) << 10 + $200 + c & $FE
Thanks!
drivers is the very limited cycles per character scanline, adding complexity to the font addressing will likely lose
you the timing you need. Simply changing the fontbase pointer is easy, but will need a couple of modifications
to the code I'd guess.
Once you're accessing font from RAM you can copy and alter any ROM chars you like into that RAM table.
I defined the constant NUM_CUSTOM_CHARS to 32. You can change this to some other number. You'll have to put your own font in RAM, and if you want to map 97-122 to this area you'll have to add some code to the print routine to change the values 97-122 to 224-249 prior adding the NUM_CUSTOM_CHARS offset.