In the function PDC_query_adapter_type() in dos/pdcgetsc.c, the DOS port
of PDCurses attempts to compensate for the CGA snow effect, by setting
writes to BIOS mode if CGA is detected:

        if ((retval == _NONE)
#ifndef CGA_DIRECT
        ||  (retval == _CGA)
#endif
        )
        {
                SP->direct_video = FALSE;
        }

However, this is thwarted, because PDC_query_adapter_type() is called only
from PDC_scr_open() in dos/pdcscrn.c:

        internal->adapter       = PDC_query_adapter_type();
 
where it's shortly followed by this code:

/*
 * If the environment variable PDCURSES_BIOS is set, the DOS int10()
 * BIOS calls are used in place of direct video memory access.
 */
        internal->direct_video = TRUE;
        if (getenv("PDCURSES_BIOS") != NULL)
                internal->direct_video = FALSE;

which resets it. I suggest moving the "internal->direct_video = TRUE;"
statement above the call to PDC_query_adapter_type(); i.e.:

        internal->direct_video = TRUE;
         ...
        internal->adapter       = PDC_query_adapter_type();
         ...
        if (getenv("PDCURSES_BIOS") != NULL)
                internal->direct_video = FALSE;

Alternately, the "internal->direct_video = TRUE;" statement could be
removed, and:

        else
                SP->direct_video = TRUE;

added to the lines from PDC_query_adapter_type(), above.

BTW, for my own use, I've made a no-snow direct video mode for CGA; but to
achieve it, I had to compile pdcdisp.c to assembly language and then hack
the asm. So I'm assuming that code is unsuitable for general PDCurses use.

-- 
William McBrine    | http://www.clark.net/~wmcbrine/
[EMAIL PROTECTED] | Think.

Reply via email to