View Single Post
Old 25 April 2020, 14:38   #7
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 573
Quote:
Originally Posted by kamelito View Post
However, changing UNIT_MICROHZ into UNIT_VBLANK during initialization didn't accomplish anything. In fact, nothing changed and the timeval struct (which the docs say is still to be used for UNIT_VBLANK) still returns elapsed time in seconds.
That is the purpose of the call, the time unit is, ehem, device unit independent.




Quote:
Originally Posted by kamelito View Post
As per the documentation, UNIT_VBLANK (register d0 prior to jsr _LVOOpenDevice (a6) ) doesn't need my own IRQ but relies on power supply strobe mechanism. Might not be implemented on WinUAE, perhaps ?
No, it means that it is very properly implemented. UNIT_VBLANK can be driven by two sources, the power supply strobe (prefered, as very stable and not monitor dependent) or the vertical blank (to be avoided, as less stable and monitor dependent).


Quote:
Originally Posted by kamelito View Post
Potential workarounds, sorted by level of WTF-ness:
1. Utterly Ridiculous: Screw timer.device and implement IRQ (FrameCounter++)
If you need a frame counter, and not a time, then implement a frame counter. The timer device gives you a time basis, not a frame basis. The latter is monitor dependent, the time is not.


Quote:
Originally Posted by kamelito View Post
2. Stupidly Ridiculous: Convert timeval.seconds/microseconds into vblank count
If you need a vblank count, then this is not a robust alternative as the time basis is not necessarily related to the monitor.




Quote:
Originally Posted by kamelito View Post
3. Plain Ridiculous: Start sending builds for external testing to see if it maybe works on real HW already
That is hardware dependent, as already said by others. The time source of the VBLANK unit differs upon models. It is a (coarse) time source, not a frame synchronization mechanism.
Thomas Richter is offline  
 
Page generated in 0.04319 seconds with 11 queries