Re: machine ports
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> May 18, 1998
- 661 views
>At 04:39 PM 5/17/98 -0400, I wrote: >Ooops! I misread your message. I think Ralf's graphic >package uses a wait-for-retrace statement. > >Look for nextgfx.zip on my web site, or RDS archives. All graphix libraries use it, only the ports.e (from Jaques Deschenes) is quite slow for that kind of stuff, so I think it was Pete or Micheal Bolin that made an ASM- waitretrace. It has been posted on the list-serv about a year or so ago, and then used by me, hollow horse mode 19 engine, Pete's ModeX engine, etc. You could hack it from any of those libs, but here it is: global constant wait_retrace_code = { #50, -- PUSH EAX #52, -- PUSH EDX #BA,#DA,3,0,0, -- MOV EDX, 0x03DA #EC, -- IN AL, 0x08 #24,#08, -- AND AL, 0x08 #75,#FB, -- JNZ $-5 #EC, -- IN AL, DX #24,#08, -- AND AL, 0x08 #74,#FB, -- JZN $-5 #5A, -- POP EDX #58, -- POP EAX #C3 } -- RET then you can just call this machine procedure *before* you draw to the screen. An advice is to draw everything on a virtual screen (a sequence or a piece of allocated memory) and copy or poke that onto the screen. This will be the fastest and thus eliminate both the flicked due to mixing as the flicker due to another wait-retrace. (if you take to long to draw another wait retrace occurs) Ralf Nieuwenhuijsen nieuwen at xs4all.nl