1. 'Snow' in TEXT_GUI

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.

P.S. I am writing from a third world country, so don't start telling my client
to go out and buy something better with the money he doesn't have.

 ==========================================================================
Bruce M. Axtens       =====================================================
Macintosh/PC Support   ====================================================
Language Project.     =====================================================
 ==========================================================================

new topic     » topic index » view message » categorize

2. Re: 'Snow' in TEXT_GUI

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 message » categorize

3. Re: 'Snow' in TEXT_GUI

Bruce
   Try running the AUTOTEXT programs from the archive by Roy Sheppard
   that might just look OK on the your CGA. It has a file autodemo.ex
   try running that on the CGA and let me know how it looks and if it works.
Bernie

new topic     » goto parent     » topic index » view message » categorize

4. Re: 'Snow' in TEXT_GUI

Bruce Axtens wrote:

> What can I do about [CGA snow]?

Nick's solution is correct, although I can't tell if the assembly code will
work.

For text mode, the module to look at is TEXTMODE.E. The following routines
write to the screen:

        put_color_text()
        put_shadow()
        show_deferred()
        display_text_image()

The first two routines use poke() to write to the screen; the second two use
display_text_image(). Placing Nick's wait routine in front of the
poke/display_text_image calls should take care of the snow.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

5. Re: 'Snow' in TEXT_GUI

Thus spake "Cuny, David"  on Tue, 27 Jul 1999:
>Placing Nick's wait routine in front of the
>poke/display_text_image calls should take care of the snow.

Thanks, David, I'll give it a try. Have to wait till next Tuesday unfortunately.

Bruce.
 ==========================================================================
Bruce M. Axtens       =====================================================
Macintosh/PC Support   ====================================================
Language Project.     =====================================================
 ==========================================================================

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu