On Tue, Nov 12, 2024 at 10:58 AM Jim Hall <jh...@freedos.org> wrote: > > Testing on QEMU [..] > cirrus: > > max color: 320 x 200 @ 256 > max res: 640 x 480 @ 16 > > *However, I can run another program to test the XRES modes, and I can > set (and use) 256-color mode, but cannot set XRES 16-color mode. [I'll > share the XRES test program in a followup email] > > > std: > > max color: 320 x 200 @ 256 > max res: 640 x 480 @ 16 > > *If I run the other program to test XRES modes, I can set both > 256-color mode and 16-color mode .. but the 16-color mode doesn't > actually work.
Here's the XRES test program. It sets XRES at 256 colors, and draws a bunch of color stripes. You can make a 16-color version by changing _XRES256COLOR to _XRES16COLOR, and changing "color < 256" to "color < 16" and the DIV definition to use 16. At least on my QEMU, _XRES256COLOR works fine, but _XRES16COLOR can be set but not used (it generates a bunch of black/white vertical stripes instead). #include <stdio.h> #include <conio.h> /* getch */ #include <graph.h> int main() { int color; /* try highest colors */ if (_setvideomode(_XRES256COLOR) == 0) { puts("cannot set max color video mode"); return 1; } /* print colors */ #define DIV (1024/256) for (color = 0; color < 256; color++) { _setcolor(color); _rectangle(_GFILLINTERIOR, color * DIV, 0, 1023, 767); } /* done */ if (getch() == 0) { getch(); } _setvideomode(_DEFAULTMODE); return 0; } _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel