On Wed, Oct 25, 2023 at 5:58 AM Walter Oesch via Freedos-devel
<freedos-devel@lists.sourceforge.net> wrote:
>
> From Code:
>
>       if(_setvideomode(_SRES16COLOR) == 0) /* Switch to 800*600 mode with 16 
> colors */
>       {
>          printf("\n\nVideo mode not supported!!!\n");
>          printf("Maybe the VESA driver has not been loaded!\n");
>
>
> There must be used VESA driver.
>



If it helps to have a quick test program to try on your board, you can
find GRAFTEST.EXE here:

https://personal.freedos.org/temp/GRAFTEST.EXE


This just puts the display into graphics mode then draws a square,
circle, and diagonal line. The EXE is compiled with OpenWatcom C using
the defaults (using "WCL -q GRAFTEST.C") so it's without optimization
- it's just a demo program. Source code is in GRAFTEST.C (at same
location, also copied below)


#include <stdio.h>
#include <conio.h> /* getch */
#include <graph.h> /* graphics mode */

int main()
{
    if (_setvideomode(_VRES16COLOR) == 0) {
puts("cannot set video mode");
return 1;
    }

    /* draw shapes */

    _setcolor(1); /* blue */
    _rectangle(_GFILLINTERIOR, 50,75, 350,375); /* from 50,75 to 350,375 */

    _setcolor(2); /* green */
    _ellipse(_GFILLINTERIOR, 300,200, 500,400); /* from 300,200 to 500,400 */

    _setcolor(15); /* br white */
    _moveto(10,10);
    _lineto(600,400); /* line from 1,1 to 600,400 */

    if (getch() == 0) {
/* if getch is zero, then extended key. call getch again to clear
   it and get a new extended code */
getch(); /* but we don't really need it anyway :-) */
    }

    /* done */

    _setvideomode(_DEFAULTMODE);
    return 0;
}



(my code formatting may be messed up when copied/pasted into an email)

I'll delete the https://personal.freedos.org/temp/ URL around November 1.


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to