Rotating vertical games on a CRT with vga scaler - lag?

thorr
Top Contributor
Posts: 1136
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 562 times
Been thanked: 259 times

Rotating vertical games on a CRT with vga scaler - lag?

Unread post by thorr »

Hello, I have a 21" VGA monitor that works great and syncs to most arcade cores without issue (rotated sideways on vertical games). My monitor is quite heavy and I am always afraid I will drop it on something when rotating it. I was able to enable the scaler and set up per core rotation in the INI file so I wouldn't have to rotate my monitor. My question is how much lag does this introduce? I would think it would have to be at least one frame because it would need the whole frame to see how to draw the screen rotated. Are arcade games typically running at 60 FPS, or are they at 30 FPS and one frame of lag won't really matter? Also, with the various scan rates of the various games, won't locking to 60FPS introduce artifacts like tearing trying to lock onto the frame rate of the game? Would it make sense to set up custom video modes for each core depending on the core's refresh rate?

In summary, I would think a CRT would be better than or equal to the best HDMI monitors in terms of lag when using the scaler, and if a normal person wouldn't notice the difference, I would prefer to use the scaler to rotate it than having to rotate my monitor. I just want to make sure it is not going to affect gameplay.

Thanks!
thorr
Top Contributor
Posts: 1136
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 562 times
Been thanked: 259 times

Re: Rotating vertical games on a CRT with vga scaler - lag?

Unread post by thorr »

Answering my own question, from what I have been able to find using extensive searching, the vga_scaler=1 inherently adds 2 frames of lag which is equal to about 33ms. Also, I noticed that using vsync_adjust=2 works fine for normal 4:3 arcade games, but causes horizontal jitter when rotating vertical arcade games like Donkey Kong. Using vsync_adjust=1 fixes the horizontal jitter on Vertical games. This setting also creates 2 frames of lag from what I gather. What I don't know is if using the vga_scaler=1 and the vsync_adjust=1 causes a total of 2 or 4 frames of lag. Please correct me if I am wrong on any of this. If the total lag is 2 frames, then it might be worth it to play vertical arcade games through the scaler rather than rotating the monitor. The rest of the games can be lag free with native timings. Thanks!
Vic20-Ian
Posts: 73
Joined: Wed May 27, 2020 9:59 am
Been thanked: 1 time

Re: Rotating vertical games on a CRT with vga scaler - lag?

Unread post by Vic20-Ian »

Please post how you are rotating with the scaler.

Ini file settings.

Thanks.
thorr
Top Contributor
Posts: 1136
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 562 times
Been thanked: 259 times

Re: Rotating vertical games on a CRT with vga scaler - lag?

Unread post by thorr »

Thank you for your help. Here are my regular ini file settings:

direct_video=1 ; 1 - enable core video timing over HDMI, use only with VGA converters.
fb_size=0 ; 0 - automatic, 1 - full size, 2 - 1/2 of resolution, 4 - 1/4 of resolution.
fb_terminal=0 ; 1 - enabled (default), 0 - disabled
forced_scandoubler=1 ; set to 1 to run scandoubler on VGA output always (depends on core).
vga_scaler=0 ; set to 1 to connect VGA to scaler output.
video_mode=1600,112,168,280,1200,3,4,38,161000 ;1600x1200 @60
video_mode_ntsc=1600,112,168,280,1200,3,4,38,161000 ;1600x1200 @60
video_mode_pal=1600,96,168,264,1200,3,4,31,131500 ;1600x1200 @50 ; untested as of now
vscale_mode=0 ; 0 - scale to fit the screen height. I sometimes use the other values below.
; 1 - use integer scale only.
; 2 - use 0.5 steps of scale.
; 3 - use 0.25 steps of scale.
vsync_adjust=2 ; set to 1 to remove horizontal shaking that occurs when set to 2
; Set to 1 for automatic HDMI VSync rate adjust to match original VSync.
; Set to 2 for low latency mode (single buffer). This option makes video butter smooth like on original emulated system.
ypbpr=0 ; set to 1 for YPbPr on VGA output.
composite_sync=1 ; set to 1 for composite sync on HSync signal of VGA output.


[1942]
direct_video=0 ; 1 - enable core video timing over HDMI, use only with VGA converters.
vga_scaler=1 ; set to 1 to connect VGA to scaler output.
vsync_adjust=2 ; set to 1 to remove horizontal shaking that occurs when set to 2

To rotate the screen for 1942 in this case, I select the rotate option in the F12 menu, and select the DIP settings to flip the screen if it is upside down. When setting vsync_adjust to 2, the image shakes horizontally. Setting it to 1 fixes that. I am curious about the lag introduced by the vga_scaler and vsync_adjust settings on a CRT monitor. Thanks!
Geords
Posts: 25
Joined: Sun Jul 26, 2020 1:20 am

Re: Rotating vertical games on a CRT with vga scaler - lag?

Unread post by Geords »

I'm looking to achieve something similar with my 17 inch vga multiscan monitor: use direct video for most cores, only relying on the scaler when I need to rotate it. I also get the jitters with vsync adjust=2. Additionally, I haven't found a way to apply custom filter scanlines, so I'm relying on the scan doubler for those.

I'm not sure if I'm wasting my time but I have been setting up custom video modes for these rotated cores so that I can have integer scaling with the largest possible picture. I calculate a custom 4:3 mode with the same - or slightly larger - number of lines as the vertical output from the scaler. The scaler res shows on the screen when I start the core and I use that height.

This does appear to improve scrolling on things like 1942, but would love to know if there is a simpler way. I found a great page for calculating custom video modes if that is the best option. :-)

https://tomverbeure.github.io/video_timings_calculator
Post Reply