Switch video width/height when video is rotated?

I’ve been playing some vertical scrolling shmups lately and noticed this.

When the video rotation option is enabled, it switches the width/height. This presents some problems with integer scaling (ie, excessive letterboxing or overscan)

For example, if a game is normally 320x224, it will become 224x320 when video rotation is enabled, so when you upscale you’re limited to either 960 (excessive letterboxing) or 1280 (excessive overscan) on a 1080p monitor.

Shouldn’t the width/height remain the same regardless of if video rotation is enabled? This is somewhat confusing.

Wouldn’t leaving it be even worse? with stretching and irregular pixels no matter what you do?

I’m not sure, but I think that these vertically oriented games are supposed to output a 320x240 (or whatever) image that is displayed sideways.

These images are all at 3x scale (vertical and horizontal). First two are screenshots, third was made in GIMP.

Video rotation disabled:

Video rotation enabled:

Video rotation enabled, height and width switched:

Again, I’m not positive, but I think the third image is correct for vertically oriented games, and it also solves the issue of excessive letterboxing/overscan.

yeah, they’re definitely supposed to be 320x240 with the display turned 90 degrees, but nobody wants to turn their TV physically to make it look right, so we rotate it in software.

Different cores handle the rotation differently. FBA rotates things the right way, rotating the shader at the same time. MAME does the rotation before it gets to the shader, so the effects run the wrong direction. I don’t recall how it shakes out as far as integer scaling is concerned.

Hmm. Would it be possible to add either a core option or a video option to RA to switch width/height when video is rotated, so that you can get the third image?

The current rotation-by-software method results in excessive letterboxing/overscan with many games when using integer scaling, but with the third image you can upscale it to 5x vertical and the area that gets cropped is outside of the safe zone for CRTs. The image should be rotated, but height/width should remain at 320x240, as in the third example.

Several gaming displays, such as the ASUS VG248QE, have a stand with a swivel mechanism that allows the display to be easily rotated.

Also, don’t you still have to rotate the display anyway using the current method?

You can already disable rotation in settings > core > allow rotation OFF. Does that get you fixed up? It might only work in the FBA case, though the MAME cores may have a way to do it in a core option or the MAME OSD.

I’ll give that a shot and get back to you!

hmm, that’s still not doing it. It’s still saying the resolution is 240x320, instead of 320x240. It’s the same as the second image, but rotated 180 degreees.

For the following example, I disabled integer scaling and set the custom aspect ratio to 1600x1200, rotation set to normal, which produces the following, perfectly-scaled image. This indicates that the game’s resolution should indeed be 320x240, not 240x320 as the emulator/RA keeps saying.

Edit: well, this issue may be moot. I just realized that arcade games don’t care about overscan because the monitor was supposed to be manually calibrated by the operator, so arcade game developers just completely disregard the CRT safe zone and put important stuff right up to the edges of the image. Looks like I’ll just have to learn to live with some underscan/letterboxing with my vertically-oriented games on a 1080p display.

Either way, it’d be nice if the correct width/height were used (320x240; see third example above), since this is correct and because it would help eliminate some of the confusion when attempting to tate vertically-oriented games.

1 Like

The question still remains: why does RA/the emulator say that the resolution is 240x320 when it should be 320x240?

Does this have to do with something RA is doing, or is this probably a core issue?

It’s as if either the core or RA is detecting that the game is vertical, and swapping the width/height based on that.

Seems fine to me with FBA and core option “vertical mode” off:

Is that with integer scale on? What does it say for custom resolution width/height when you set both to 1x?

I’m still having trouble getting it to look like that. It seems like there are a lot of knobs/dials related to this. What changes to the default settings did you make? That way I can just start with a fresh config.

AFAIK, nothing unusual as far as options go. Just the ones I mentioned before.

I started with a fresh config and made the following changes:

quick menu -> options -> vertical mode -> disabled

settings -> core -> allow rotation -> off

Still getting the same result; width says 240 and height is 320 with integer scale on, with the exact same game (Donpachi) loaded in FBA. :confused:

Any other settings I could be missing?

Am I missing something? I’m still not getting anywhere with this :frowning:

What are the exact files I need to delete if I want to start over with a completely fresh config? I deleted \retroarch\retroarch.cfg and all the files in \retroarch\config\

anything else I should delete? I may try deleting and reinstalling the cores, next. It seems really odd that the emulator/RA keeps saying that the width is 240 and height is 320. This is only the case for vertically-oriented games; normal games say the correct resolution of 320 wide and 240 high.

you shouldn’t need to delete/reinstall cores, just delete config files. Did you set the core option to not allow rotation? I’m pretty sure that’s the one that matters. Yeah, I guess so, since it’s not rotated… What about the option in settings > core?

I went ahead and completely deleted RA and reinstalled the latest version, still no dice. Very strange!

Is there a “vertical orientation” flag that’s causing the emulator or RA to switch the width/height? Did the FBA core get a recent update? AFAIK I’m using the latest versions of everything. Windows 10.

hmm, that all looks right to me. I’ll update my core when I get home and see if that matters. My testing last night was using 1.7.6 stable in linux with GL driver.

1 Like

Seems like it’s either something related to a core update, or something specific to the Windows 64 bit version of RA, then. I’m also using the GL driver. Thanks for looking into this!

Just wanted to add that I’m getting the same results in MAME, it says width 240 and height 320. Based on these results, I’m guessing the problem isn’t core related but is something specific to the Windows 64 bit version of RA.

Maybe I’m jumping the gun on this, but I went ahead and submitted a bug report to github.

Edit: Well, it looks like standalone FBA does its own weird stuff to the resolution/video output, so it’s hard to tell what’s going on. Now I’m thinking that it could very well be something unique to your (hunterk’s) setup that I’m failing to do on my end, but it might also be something related to the Windows 64 bit version of RA.

Any way I can take a look at your current config file and whatever overrides you’re using? @hunterk