VSYNC with VGA 640x350,16 color ???

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!!!

Comments

  • SephirothSephiroth Fayetteville, NC, USA
    : 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.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • : : 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.
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
    :

    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:
    [code]
    Mov dx,3DAh
    @l1:
    In al,dx
    And al,08h
    Jnz @l1
    @l2:
    In al,dx
    And al,08h
    Jz @l2
    [/code]

    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

  • : : : 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.
    : :
    : : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
    : :
    :
    : 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:
    : [code]
    : Mov dx,3DAh
    : @l1:
    : In al,dx
    : And al,08h
    : Jnz @l1
    : @l2:
    : In al,dx
    : And al,08h
    : Jz @l2
    : [/code]
    :
    : 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!!!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories