I'm trying to get cool effects by using text mode and uploading custom tiles/fonts to VGA. I already tested custom fonts on mode 3, and also changed cell size to 8x8, and disabled horizontal spacing so that 8x8 tiles fill the whole screen without vertical lines. That results in 640x400 resolution and it worked well on a real VGA, dosbox, PCem...
Now I want to set the screen resolution to 320x240 to create a 40x30 text mode with 16 colors, so that it resembles a graphic mode, and it is faster to update the screen. I found a code to set the mode to 40x25 and tweaked it to be 40x30. This worked on dosbox, PCem... but on a real vga it produed an incompatible signal for my LCD (It should generate 320x240 60 hz). I don't have a CRT to test, anyway if it is not working on LCD there is something wrong.
Emulators and even an fpga core generated this:
These are the values I entered to set vga registers, I used some values from 320x240 mode X, the important ones are CRTC_INDEX values, the others just set the text mode without using bios interrupts :
Now I want to set the screen resolution to 320x240 to create a 40x30 text mode with 16 colors, so that it resembles a graphic mode, and it is faster to update the screen. I found a code to set the mode to 40x25 and tweaked it to be 40x30. This worked on dosbox, PCem... but on a real vga it produed an incompatible signal for my LCD (It should generate 320x240 60 hz). I don't have a CRT to test, anyway if it is not working on LCD there is something wrong.
Emulators and even an fpga core generated this:
These are the values I entered to set vga registers, I used some values from 320x240 mode X, the important ones are CRTC_INDEX values, the others just set the text mode without using bios interrupts :
Code:
unsigned char g_40x30_text[] = {
//MISC_OUTPUT (0x03c2)
0x67,
//SC_INDEX (0x03c4)
0x03, 0x09, 0x03, 0x00, 0x02,
//CRTC_INDEX (0x03d4)
0x28, 0x28, 0x28, 0x90, 0x2B, 0xA0, 0x0D, 0x3E,
0x00, 0x87, 0x20, 0x0E, 0x00, 0x00, 0x00, 0xA0,
0xEA, 0xAC, 0xDF, 0x14, 0x1F, 0xe7, 0x06, 0xA3,
0xFF,
//GC_INDEX (0x03ce)
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0E, 0x00,
0xFF,
//AC_INDEX (0x03c0)
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07,
0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
0x0C, 0x00, 0x0F, 0x08, 0x00,
};