Re: 'Snow' in TEXT_GUI

new topic     » goto parent     » topic index » view thread      » older message » newer message

As I understand it, to prevent snow on cga systems, one must wait for
the video to begin a horizontal retrace before writing a character to
memory.

here is a small routine to do this, first written by Pete for the
vertical retrace and then hacked some by me for horizontal.  WARNING:
Untested assembly!

-- wait_h_retrace()
global constant wait_retrace = allocate(20)
poke(wait_retrace, {
    #50,        -- PUSH EAX
    #52,        -- PUSH EDX
    #BA,#DA,3,0,0,-- MOV EDX, 0x03DA
    #EC,        -- IN AL, DX
    #A8,#01,    -- TEST AL, 0x01
    #75,#FB,    -- JNZ -5
    #EC,        -- IN AL, DX
    #A8,#01,    -- TEST AL, 0x01
    #74,#FB,    -- JZ -5
    #5A,        -- POP EDX
    #58,        -- POP EAX
    #C3 } )     -- RET

Try calling this just before any text mode writes to the screen.
From memory, the routines to change are to be found in screen.e, namely
put_colours() and put_shadow(), I think.  I don't know how
display_text_image() will go, but that may require alteration or
replacement as well.
This should really only be done on CGA systems, so some way of sensing
the video card type may also be necessary.

Let me know how you go.
--Nick

Bruce M. Axtens wrote:
>
> Dear Euphorities
>
> My client is running a 386 with a CGA screen and 1.6 Mb RAM. The application
> which I wrote for him last night uses TEXT_GUI and the TEXTMODE.E file and
> runs
> so much snow on the screen that it looks like a blizzard. What can I do about
> this?
>
> Bruce.
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu