VGA emulation, text mode not working?

I've made a script to emulate a VGA (rendered line-by-line, Port&Memory I/O handled by functions), but for some reason I won't get any text output? (Graphics seem to work fine (except one of the b/w modes)

The main VGA script is in vga.c,
the main rendering function is at vga_screen/vga_screen.c;function VGA_generateScreenLine(). It's made to use multiple VGA systems side-by-side (currently one used by the CPU and one by the BIOS (which is seperate from the CPU, allowing for accessing it during runtime (changing mounted disks (removable drives), cpu-level debugging options, rendering options (currently two possible: direct (1:1 scaling, only when it fits the screen) and fitting it to the screen automatically. When direct is on, it automatically switches to fitting the screen if it's too big, except when set to Forced direct. This is rendered in the GPU renderer itself, not in the VGA module (as the GPU might be console/pc-specific)).

vga.c;function port_writeVGA and port_readVGA handle all port in- and output (on a byte-by-byte level).

Most data used by the renderer are precalculated at vga_screen/vga_precalcs.c;function vga_calcprecalcs().

The zalloc() function is simply a malloc function which clears its data with memset().

Link to the package with the files:

Are the addresses used in vga_screen/vga_sequencer_textmode.c correct? When I force it to use a letter A or B, the screen gets filled with that letter. Anyone knows the correct formula for the address of an character in text-mode VRAM (plane 0 and plane 1 (plane 0 is at 0x00000 and plane 1 is at 0x10000))?

Anyone knows what's going wrong? (I keep getting a black screen with all text modes, or could the cause be somewhere else?)
Last edited on
Topic archived. No new replies allowed.