English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 26 June 2021, 20:41   #1
BeamCoder
Registered User
 
Join Date: Dec 2020
Location: Philippines
Posts: 45
How does WinUAE detect joystick inputs on pause?

How does WinUAE detect joystick inputs on pause?

I was testing the input lag of my Pong game and I was only using a single buffer yet the inputs always come out at the maximum delay for a single buffer; 2 frames.

Here is the process of how I test input lag:

1. Pause emulation
2. Hold a joystick direction to move paddle
3. While holding, do a single step.
4. Do single steps up until paddle moves. Always results to 2 frames before paddle moves.

My only guess is WinUAE or maybe all UAE(I also tested PUAE on retroarch) detects joystick inputs at the frame after doing a single step and not at the pause frame.

To add information about my Pong game, it reads inputs just after the end visible line on an NTSC(line $f4).
BeamCoder is offline  
Old 29 June 2021, 20:32   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Pause resume behavior is "undefined" (and it won't change), sorry. It is not good for latency measurements.

2 frames probably is normal if not in lagless vsync mode but using pause as a starting point can cause side-effects or extra delays, at least in some situations.

Input is read multiple times/frame.

MPO (multiplane overlay) might reduce latency by 1 frame but I still haven't really found any useful documentation how it actually works.. I only know NVidia recently introduced MPO driver support.
Toni Wilen is online now  
Old 05 July 2021, 18:22   #3
BeamCoder
Registered User
 
Join Date: Dec 2020
Location: Philippines
Posts: 45
Quote:
Originally Posted by Toni Wilen View Post
Pause resume behavior is "undefined" (and it won't change), sorry. It is not good for latency measurements.

2 frames probably is normal if not in lagless vsync mode but using pause as a starting point can cause side-effects or extra delays, at least in some situations.

Input is read multiple times/frame.

MPO (multiplane overlay) might reduce latency by 1 frame but I still haven't really found any useful documentation how it actually works.. I only know NVidia recently introduced MPO driver support.
Thanks for the reply.

Regarding doing pause-frame advance step in testing input lag, I have learned about this method by Retroarch users doing it for using the Runahead feature of Retroarch. I thought that this is a good way to test input lag on just the game decoupling it from the hardware its being run on(vsync on or lagless vsync, what GPU is used, etc.).

I tried moving the reading of input on raster line 1 and now movement of the paddle appears after the step. My guess now is maybe when doing pause, it stops at vblank. Also, since after pausing a frame is already fully drawn, then it probably did pause at vblank.

I also tested other games:
Solid Gold - consistent 3f of delay on any actions(jumping, moving left and right, moving left right on air). I read somewhere it uses double-buffering

Gianna Sisters - consistent 2f delay, read somewhere it uses only a single buffer.

LionHeart - different moves have different lag however most moves have consistent delay(2f-jumping, 3f when crouching, readying attack, and attacking. Moving left and right is finnicky though; 3f-5f).

All of these where tested on 50Hz lagless vsync 1 slice and standard vsync. Solid gold was one timed tested on 29 slices. All where consistent regardless of vsync setting.

Since delay are consistent on all the games I've tested, maybe pause-resume is not that undefined(stops randomly somewhere at vblank)?
BeamCoder is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WinUAE Enforcer : pause at error ? thellier support.WinUAE 1 11 March 2015 21:22
WinUAE doesn't pause when user clicks Show Desktop button mark_k support.WinUAE 6 24 December 2012 16:26
How to detect WinUAE demolition support.Apps 13 13 November 2012 11:21
WinUAE doesn't detect joystick button (via ppjoy) oldpx support.WinUAE 16 15 July 2004 22:42
WinUAE won't detect written CD³² CDs MethodGit support.WinUAE 34 04 April 2003 22:41

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:20.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06669 seconds with 15 queries