News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

GDI Vertical blank and vertical retrace test

Started by Siekmanski, April 16, 2018, 11:04:05 AM

Previous topic - Next topic

avcaballero

Hi Marinus, that would be nice. I looked for information about the GDI vertical sync, but it seemed that there wasn't. If you have any way, please tell me :biggrin:.

I will check it out with masm code, will see.

@LordAdef
I will help you if I can, maybe it would be nice any example from you of what you need.

LordAdef

Quote from: caballero on April 21, 2018, 06:50:57 PM
Hi Marinus, that would be nice. I looked for information about the GDI vertical sync, but it seemed that there wasn't. If you have any way, please tell me :biggrin: .

I will check it out with masm code, will see.

@LordAdef
I will help you if I can, maybe it would be nice any example from you of what you need.


Hi Caballero, thank you! I will post what I have so far and will explain it too.

Lonewolff

Sounds like quite a challenging task.

Do you detect the systems refresh rate first and take that into account?

Even 60hz screens aren't always created equal.

I have one that is true 60hz and another that is 59.95hz. Which I would imagine would throw the timings out and introduce flicker if you were hard coding for 60hz.

avcaballero

Changing the blitting rate maybe is not a bad idea. Here is a masm program to do so on the fly:
- key 1. Each 20 milliseconds
- key 2. Each 33 milliseconds
- key +/- Increase/decreases it

By the way, I tried to avoid using Begin/end paint and it didn't work though in principle our hdc = GetDC(hWnd)

jj2007

Avoiding BeginPaint is generally not a good idea. If you must force a wm-paint, use a timer and InvalidateRect. Sorry for bad spelling, I am on a mobile.

Siekmanski

Hi Guys,

I did some tests by polling the Vertical Blank signal from the video monitor.
It seems to be working 100% correct on my machine.
Before implementing the Timer-Interrupt routine and the rest, I need some important feedback from you guys.  :t

Does it also run on XP?
Does it also run on Win10?
Also if it doesn't work, I like to know.

Please, let me know by posting it with these 3 values:

- average VerticalBlankPeriod ---> this one is really important for me.
- average MonitorFrequency
- PixelFormat ?? (Type)

- and the operating system it runs on.

I would really appreciate it, many thanks in advance.  :biggrin:
( don't mind the flickering, it will be gone if the timer interrupt is implemented )

Marinus
Creative coders use backward thinking techniques as a strategy.


LordAdef

win 10

Let me know if you need anything else!

HSE

Equations in Assembly: SmplMath

felipe

I have your same OS i think (windows 8.1) So i don't know if you want the same testing again...?  :idea:

avcaballero

Hi, Marinus, don't you take a rest? :biggrin:
W7 64 bits

Siekmanski

Quote from: felipe on April 23, 2018, 06:10:06 AM
I have your same OS i think (windows 8.1) So i don't know if you want the same testing again...?  :idea:

Yes please, you have another monitor than me I suppose.
Creative coders use backward thinking techniques as a strategy.

Siekmanski

Quote from: caballero on April 23, 2018, 06:17:16 AM
Hi, Marinus, don't you take a rest? :biggrin:
W7 64 bits

No, this is therapy for me.
I need to keep my brain in shape.  :biggrin:
Creative coders use backward thinking techniques as a strategy.

LordAdef

Quote from: Siekmanski on April 23, 2018, 06:53:36 AM
Quote from: caballero on April 23, 2018, 06:17:16 AM
Hi, Marinus, don't you take a rest? :biggrin:
W7 64 bits

No, this is therapy for me.
I need to keep my brain in shape.  :biggrin:

Please don't rest, there is a legion of noobs following every step!

felipe

average VerticalBlankPeriod: This has varied from execution to excution, incresing the numbers always (until now). First was something like 0.4xxxxxxxxx Miliseconds. Then was like 0.6xxxxxxx and now is 0.7xxxxxxxx. Wait! now was 0.5xxxxxxxxxxx.

average MonitorFrequency: This has also varied, now is 59.973xxxxxxxhz (was too something like 53.xxxxxxhz)

PixelFormat ?? (Type):22 Firts frame, vertical blank 0.4xxxxxx ms. Frame delta 16.6xxxx ms.

The lines of the average measures are overlapped between some of them.

This was tested in a netbook with a small resolution: 1366x768, using windows 8.1