Waiting for a retrace..

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

I have some assembly code i like to translate...
        I dunno asmebly, i just know that this piece of code waits until a
screen redraw is done. The automatic refresh rate says how many times
per sec this is done.
        With this you will have no flicker on ANY Fast computer and the same
speed on all fast computers. On the slower ones (386 & slow 486)
there may be still some flickering.
        I need this for my virtual screens and sprites library, so things
are drawn with no flickering....
        It will be finished tomorrow (i hope)
        I just finished CopyVS and it took me really long, about 5 hours!!
        (It's 9 and a half of screens in the Editor from David Cuny!)
        STill not much code is executed each time, and it is REALLY fast..
        (You can have memory, sequence and image screens)
        In pixel modes, images screens (2D sequences) are the fastest
        In modes with a video memory accasible, memory is zillions times
faster, i've noticed.
        The screen can be of any size too, and you can set the view, that's
a section where all input and output of the screen happens, really
need for scrolling effects...!!
        Does anyone know how to calculate a new position from on old when
you have an angle (360 degrees, no radians) and a distance?

        The WaitRetrace Code:
        Well here's the code as is should be typed in C:
        What's the Euphoria equilevent?

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl
---------------------------Code: Turbo C -------------
void WaitRetrace() {

  _DX = 0x03DA;

  l1: asm {
 in  al,dx;
 and al,0x08;
 jnz l1;
  }

  l2: asm {
 in  al,dx;
 and al,0x08;
 jz  l2;
  }
}
------------------------------
BTW This is from the Asphyxia Tutorials by Denthor updated by SnowMan

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

Search



Quick Links

User menu

Not signed in.

Misc Menu