Computer Graphics

Moderators: Sephiroth
Number of threads: 1241
Number of posts: 2641

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
VSYNC with VGA 640x350,16 color ??? Posted by johnxx on 31 Mar 2007 at 3:22 PM
Hi there.
Could somebody tell me, how to make vsync in the 640x350, 16 colors mode ? Known at Turbo Pascal VGAmed ???

Thank's a lot!!!
Report
Re: VSYNC with VGA 640x350,16 color ??? Posted by Sephiroth on 2 Apr 2007 at 7:50 PM
: Hi there.
: Could somebody tell me, how to make vsync in the 640x350, 16 colors mode ? Known at Turbo Pascal VGAmed ???
:
: Thank's a lot!!!
:
I would think you need only render the entire buffer prior to sending it to the display, and only send X number of renders where X is the refresh rate of the monitor. I haven't touched DOS since around 1994 though, so I honestly don't remember specifics.

-Sephiroth

Report
Re: VSYNC with VGA 640x350,16 color ??? Posted by Phat Nat on 3 Apr 2007 at 8:02 PM
: : Hi there.
: : Could somebody tell me, how to make vsync in the 640x350, 16 colors mode ? Known at Turbo Pascal VGAmed ???
: :
: : Thank's a lot!!!
: :
: I would think you need only render the entire buffer prior to sending it to the display, and only send X number of renders where X is the refresh rate of the monitor. I haven't touched DOS since around 1994 though, so I honestly don't remember specifics.
:
: -Sephiroth
:

I think it would be the same as with all other DOS resolutions (which I still play with here and there, love DOS ;)

Read Port 3DAh until bit 3 becomes , then immediately read it until bit 3 becomes 1. This will give you the beam at the top of the refresh.

I program in TP, but I use inline assembly for the speed. Hopefully this makes sense to you:
 Mov dx,3DAh
@l1:
 In al,dx
 And al,08h
 Jnz @l1
@l2:
 In al,dx
 And al,08h
 Jz  @l2


I think the first loop waits until the beam hits the end, then the second is where it starts at the top. (not sure on this though)

Phat Nat

Report
Re: VSYNC with VGA 640x350,16 color ??? Posted by johnxx on 11 Apr 2007 at 3:58 AM
: : : Hi there.
: : : Could somebody tell me, how to make vsync in the 640x350, 16 colors mode ? Known at Turbo Pascal VGAmed ???
: : :
: : : Thank's a lot!!!
: : :
: : I would think you need only render the entire buffer prior to sending it to the display, and only send X number of renders where X is the refresh rate of the monitor. I haven't touched DOS since around 1994 though, so I honestly don't remember specifics.
: :
: : -Sephiroth
: :
:
: I think it would be the same as with all other DOS resolutions (which I still play with here and there, love DOS ;)
:
: Read Port 3DAh until bit 3 becomes , then immediately read it until bit 3 becomes 1. This will give you the beam at the top of the refresh.
:
: I program in TP, but I use inline assembly for the speed. Hopefully this makes sense to you:
:
:  Mov dx,3DAh
: @l1:
:  In al,dx
:  And al,08h
:  Jnz @l1
: @l2:
:  In al,dx
:  And al,08h
:  Jz  @l2
: 

:
: I think the first loop waits until the beam hits the end, then the second is where it starts at the top. (not sure on this though)
:
: Phat Nat
:
:
Thanks a lot!!! it works funnily enough, 'cause i tried it before with this routine, but it didn't want work. Thanks a lot for the hint!!!



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.