resend: small DOS vga improvement

Christian Costa titan.costa at
Sun Jan 19 02:53:11 CST 2003

Andreas Mohr wrote:

>Hi all,
>please disregard my previous patch.
>I discovered that
>        case 0x3da:
>           /*
>            * Read from this register resets register 0x3c0 address flip-flop.
>            */
>           vga_address_3c0 = TRUE;
>            /* since we don't (yet?) serve DOS VM requests while VGA_Poll is running,
>               we need to fake the occurrence of the vertical refresh */
>            ret=vga_refresh?0x00:0x0b; /* toggle video RAM and lightpen and VGA
>refresh bits ! */
>            if (VGA_IsTimerRunning())
>                vga_refresh=0;
>            else
>                /* Also fake the occurence of the vertical refresh when no graphic
>                   mode has been set */
>                vga_refresh=!vga_refresh;
>            break;
>is WRONG since VGA_IsTimerRunning() is always true:
Not exactly! It is false before an application sets a video mode.

>VGA_InstallTimer gets called in both VGA_DoSetMode() (graphics) and
>VGA_SetAlphaMode() (text).
>(doh !)
>Talk about too many people having done too many changes in one and the same
>code part :-))
>So until there is further information about how to do it properly,
>I'll just remove the vga_refresh reset in the VGA_IsTimerRunning() case,
>and of course this makes Turbo Pascal 6 usable (although screen update is
>a bit slower than IDA, most likely due to using int 10h instead of video
>mem and also probing I/O port 0x3da).
Sure it will help your app but others that need video sync will not work 
properly. :-)

In your case, VGA_Poll_Text is called periodicaly and should be running 
at 33 fps.
Since 33 fps is just half the standard speed (70Hz), all should be fine.
But is VGA_Poll_Text running at 33 fps?
I suspect this function is too slow (maybe due to the console code).



More information about the wine-patches mailing list