Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wait &H3DA, 8?
#1
Im just asking someone please just explain this fully to me? i know that it stops the flickering for me sometimes but i also heard there was a longer version of it. im just so confused, please explain.
the mind is a beautiful thing, use it and make the world a more beautiful place.
Reply
#2
The answer:
Code:
GOOGLE.com: "wait &h3DA, 8"
Code:
WAIT &H3DA, 8
WAIT &H3DA, 8, 8

http://hem.passagen.se/hedsen/myprg/bigfexpl.htm

See, you don't need us. Forums on technology are obsolete, actually.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
Well agamemnus, people might not need us, but I'm going to explain anyway:
WAIT is just a simple loop. It WAITs for a certain status on a certain port. In WAIT &H3DA,8 it waits for the 3DAh port (The screen port, I think) to have a certain status, and while it does, it runs through a loop.
See, the screen is constantly flickering on and off, updating.
WAIT &H3DA,8 happens to work like this:
Wait for screen to flicker off (WAIT &H3DA,8 )
Draw graphics to screen

Meaning that you don't see the graphics being drawn, hence reducing flicker.

Now, the WAIT &H3DA,8 and WAIT &H3DA,8,8 used together work like this:
Wait for screen to flicker off (WAIT &H3DA,8 )
Draw graphics to screen
Wait for screen to flicker on (WAIT &H3DA,8,8 )
So before the program proceeds, it waits for the graphics to be displayed.

Hope that cleared things up for you, mech1031.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#4
Zack has almost explained everything correctly Smile Just some points:

1. &H3DA is VGA Vertical retrace port. Its bit 3 equals 0 when no retrace is being done, 1 when the retrace is being done. Retrace is a screen update.

2. This is done to draw things on screen when the image is fixed so when the next update occurs the screen gets updated with the new data and no flicker happens.

3. This doesn't work very well in Windows 'cause it make interrupts to have its fake multitasking. Page flipping will flicker in a DOS box, so you better use double buffering.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
thanx guys. it works good both ways. and thanks for explaining it, although next time i have a problem i guess i should try other sources before bothering you guys.
the mind is a beautiful thing, use it and make the world a more beautiful place.
Reply
#6
nah.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#7
Quote:thanx guys. it works good both ways. and thanks for explaining it, although next time i have a problem i guess i should try other sources before bothering you guys.
NO!!! If everbody did that, then this forum would get boring!
Keep asking :wink:
BTW na_th_an, thanks for the corrections. I think I heard that somewhere, I just forgot. Things that sound like trigonometry tend to slip my mind (I mean, "Vertical Retrace"? Sounds like some kind of trig function :wink: )
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)