PgrAm
Experienced Member
Hey all,
I've been experimenting with getting a VGA card to produce an NTSC compatible signal, right now I'm using a box called TelevEyes. The box came with a little program to reprogram the VGA registers to output a 15khz signal, I have also tried using a utility called VGATV. The only problem is when a program (such as the game I'm working on), tries to mess with the vertical timing to change the resolution, strange things start happening. This then raises the question, is it possible to output a 320x240 mode-X signal to an NTSC television?
Since mode-X is at 60hz, the same as NTSC, I didn't think that this would be a problem. Unfortunately when I run the TV display program then try to set Mode X, I get a rapidly rolling image, so something is up with the vertical timing.
Here is my code for setting 320x240@60Hz mode X:
Does anyone know how I might be able to either make my code play nice with the TV utility or set my own mode for 320x240@60Hz on a TV? The issue is clearly when I mess with the vertical timing, if I keep the resolution at 320x200 it works fine.
I've been experimenting with getting a VGA card to produce an NTSC compatible signal, right now I'm using a box called TelevEyes. The box came with a little program to reprogram the VGA registers to output a 15khz signal, I have also tried using a utility called VGATV. The only problem is when a program (such as the game I'm working on), tries to mess with the vertical timing to change the resolution, strange things start happening. This then raises the question, is it possible to output a 320x240 mode-X signal to an NTSC television?
Since mode-X is at 60hz, the same as NTSC, I didn't think that this would be a problem. Unfortunately when I run the TV display program then try to set Mode X, I get a rapidly rolling image, so something is up with the vertical timing.
Here is my code for setting 320x240@60Hz mode X:
Code:
out16(SC_INDEX, 0x0600 | MEMORY_MODE); // set mode to unchained
out16(SC_INDEX, 0x100); //synchronous reset for safety
out16(SC_INDEX, 0x300); //undo reset
out16(CRTC_INDEX, 0x2c00 | V_RETRACE_END); // turn off write protect
out16(CRTC_INDEX, 0x0000 | UNDERLINE_LOCATION); // turn off dword mode
out16(CRTC_INDEX, 0xe300 | MODE_CONTROL); // turn on byte mode
//Set the vertical resolution to 240
out16(CRTC_INDEX, 0x0d00 | V_TOTAL);
out16(CRTC_INDEX, 0x3e00 | OVERFLOW_VGA);
out16(CRTC_INDEX, 0xea00 | V_RETRACE_START);
out16(CRTC_INDEX, 0xac00 | V_RETRACE_END);
out16(CRTC_INDEX, 0xdf00 | V_DISPLAY_END);
out16(CRTC_INDEX, 0xe700 | V_BLANK_START);
out16(CRTC_INDEX, 0x0600 | V_BLANK_END);
Does anyone know how I might be able to either make my code play nice with the TV utility or set my own mode for 320x240@60Hz on a TV? The issue is clearly when I mess with the vertical timing, if I keep the resolution at 320x200 it works fine.