Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

  • lr-mame2003 rom specific rotation + aspect issues

    Hello all,

    I'm having issues with my completely virgin RetroPie 4.1 setup on a Raspberry Pi 2.
    So far on this build I have only imaged my microSD with retropie 4.1, configured a keyboard as input method, and copied over about 500 mame2003 roms (0.78 romset).
    All the roms work, everything is fine in general.
    I happen to be using a monitor via HDMI that allows me to rotate it physically on its stand 90 degrees which I want to utilize for roms like ms. pacman, 19xx, and many other shooters and such.

    I have setup a rom specific cfg file thru retropie for ms. pacman as my test.
    At first i only added the entries:
    video_allow_rotate = true
    video_rotation = 1
    The results were that it rotated as I asked but kept the "usable area" of the screen the same as if I was playing ms. pacman in landscape 16:9 (all of the monitor's landscape height was used but only about 1/4 of its landscape with was used and centered). This makes the game's height squished very bad and its with stretched to around 4x the proper ratio to its height. (hope this makes sense).

    Taking further guesses I have also tried one, some and all of the following commands in the rom specific config as well - all with absolutely NO effect:
    video_aspect_ratio = 0.75
    video_force_aspect = true
    aspect_ratio_index = "20"

    Does anyone know what I'm doing wrong? Again, this is completely stock retropie 4.1 microSD image with no other config changes made.

    Thanks in advance for any help and thanks to all who make retropie great!!!

  • Global Moderator

    i think you only want:

    video_allow_rotate = false
    

    (note that it is FALSE)

    as per the .cfg comments:

    # Allows libretro cores to set rotation modes.
    # Setting this to false will honor, but ignore this request.
    # This is useful for vertically oriented content where one manually rotates the monitor.
    # video_allow_rotate = true
    

  • @dankcushions
    Thanks for the reply. I was obviously interpreting the command backwards and/or not realizing that mame would want these games to rotate to landscape and setting to false would keep them portrait as displayed in an arcade cabinet.

    Removing all custom rom specific commands except the corrected video_allow_rotate = false does indeed still rotate the screen as I wanted but the game is still displaying using a viewable area as if I'm using my monitor in Landscape and it's full height is used but only 1/4 of it's width.

    I also added this single line rom-specific config to 19xx and 1942 as well just in case ms.pacman was a problem for some reason.

    Any other additional commands to resize/scale the game I should try?


  • So, after googl-ing a bit, it seems the following fixes my issues in general, but the aspect may be off on a game-to-game basis. (most of these games with monitors in the vertical orientation were not exactly 3:4 ratio)

    video_allow_rotate = "true"
    video_rotation = "1"
    aspect_ratio_index = "19"
    video_aspect_ratio_auto = "false"
    video_aspect_ratio = "1.33"

    I guess now I just need to figure out how to find the proper ratio for each individual game? Is there a database for this info somewhere?


  • @esmith13 The config lines at which you arrived is similar to how I have a lot of my vertical titles setup with per-rom .cfg files. As for the AR, you are also dealing with PAR (Pixel-Aspect Ratio). In other words, a given resolution may have been used to create the game, but in practice, it was expect that the image would be stretched to fill an arcade monitor. In such cases, the image would not have been displayed with square pixels. This is what you are emulating with the AR like you have above: aspect_ratio_index = "19" , video_aspect_ratio_auto = "false", video_aspect_ratio = "1.33"

    I suppose different arcade game manufactures could include details in each system's respective manuals about how to tune the monitor, but most of the time the image was expanded using the monitor adjustments to fill the screen. That made most games fill a 4:3 or 3:4 aspect ratio, depending on the rotation. If there's a rule of thumb, 4:3 / 3:4 is probably it. It may not apply to every game, but looking up the AR online might merely give you the ratio of the resolution assuming square pixels.

  • Global Moderator

    you shouldn't have to tweak aspect ratios - mame2003 already outputs the correct ratio. let me have a play with the settings...


  • @caver01
    Thanks very much for the info! I remember reading a very detailed system-specific post about PAR and DAR. It was geared mainly to consoles and then also grouped arcade systems like NeoGeo and CPS1-2-3. Was that you?

  • Global Moderator

    @dankcushions said in lr-mame2003 rom specific rotation + aspect issues:

    you shouldn't have to tweak aspect ratios - mame2003 already outputs the correct ratio. let me have a play with the settings...

    i looked into this. mame2003 is supplying the right aspect ratio, but when you use allow_video_rotate = false it displays the image in the original rotated format (correct), but uses the aspect ratio from the non-rotated format (wrong).

    ie, it displays a ~3:4 image as 4:3. this to me is a retroarch problem, and i will log an issue with them, and maybe try to fix it myself. IMO there should be no reason to manually tweak aspect ratios for mame games since it has all that information within the software.


  • @dankcushions
    Yes! You understand the issue. I was in the process of taking pics to show you. I'll post them here anyway in case others who read need a visual reference to understand the issue.

    The pictures are taken of a 16:9 display with pink post-it notes used to mark the original (no CFG file changes) rendered screen area.

    This is with no CFG changes at all:
    2_1481111446643_NoCFG.jpg

    This is with the single CFG line: allow_video_rotate = false
    0_1481111446642_BasicCFG.jpg

    This is with the CFG changes I found via Google that @caver01 and I have discussed:
    1_1481111446643_ComplexCFG.jpg


  • SPECIAL BONUS!!! :-)

    Attached is a zip file containing ROM specific configs for every ROM originally meant to be vertically orientated in mame2003 / v0.78 (excluding mahjong and quiz ROMS - list compliments of ROMLister).
    Anyone, who like me, uses a screen that you can rotate 90 degrees clockwise to maximize the size of vertical orientated ROM, can drop these CFG files in to their roms\mame-libretro folder and you're all set. (I LOVE batch file magic)

    DropBox: RetroPie Vert Orient Configs (mame2003 v0.78).zip

    For those who want to find a monitor specifically for retro gaming use, I highly recommend the Dell 1907FP which is a 4:3 LCD Monitor that can rotate 90 degrees and optionally have a monitor-powered sound bar added with headphone plug connection. Dell 1907FP image link


  • @esmith13 said in lr-mame2003 rom specific rotation + aspect issues:

    Dell 1907FP image link

    I have that very monitor and it's nice. It has a sharp screen and you can attach a DVI-HDMI adapter. It also has a built-in USB hub which is very handy.

    One thing worth mentioning about that monitor is that the native resolution is 1280x1024. This is the same resolution I run on my arcade cabinet and I like it a lot, but it's not 4:3. It's 5:4 which is SO CLOSE to 4:3 you can still get a way with filling the screen and you don't really notice the slight distortion. This resolution is great for getting a nice, clean CRT shader effect, but the AR is one of the reasons I get very specific in my per-rom .cfg files. It's also a great display for vector games at native resolution (AdvanceMAME).

  • Global Moderator

    @esmith13 you might have already solved this through .cfgs, but i've coded a 'TATE Mode' for lr-mame2003.

    1. update from source (this takes about 30 mins)
    2. follow the instructions here: https://github.com/RetroPie/RetroPie-Setup/wiki/lr-mame2003#tate-mode

    it will mean no custom cfgs required - just change the per-emulator settings as i describe.


  • @dankcushions
    I appreciate you doing this and i love that it prevents the scaling from being off slightly but unfortunately after testing it I still can't make use of it.
    While I admit in this day and age it's rare to find a monitor that can rotate at all in the first place it is even more rare to find one that rotates 90 degrees in BOTH directions (90 clockwise and 90 counter-clockwise from landscape/default) for a full 180 degrees of rotation. Using the mode you added of course makes the games show as they were originally designed but apparently their was never a standard as to which short edge of the display is "up".
    For example, 1942 would require a 90 degree counter-clockwise rotation whereas ms. pacman requires a 90 degree clockwise rotation. I also assume since you must set allow_video_rotate to false, I can't manually rotate some of them 180 degrees so they all require a 90 degree clockwise rotation from landscape. I know this would require some cfg files again but at least the aspect ratio would be as intended unlike my original "fix".

    If you have any other suggestions please let me know and thanks much for looking in to this whole thing in the first place.

  • Global Moderator

    @esmith13 said in lr-mame2003 rom specific rotation + aspect issues:

    For example, 1942 would require a 90 degree counter-clockwise rotation whereas ms. pacman requires a 90 degree clockwise rotation. I also assume since you must set allow_video_rotate to false, I can't manually rotate some of them 180 degrees so they all require a 90 degree clockwise rotation from landscape. I know this would require some cfg files again but at least the aspect ratio would be as intended unlike my original "fix".

    hmm, damn! i think the best thing you could do is use allow_video_rotate = false and the tate mode setting as your default, and then per-game cfgs for all the ones that rotate 180 degrees like

    allow_video_rotate = "true"
    video_rotation = "3"
    

    (or maybe it's easier to do it for the ones that rotate 90 degrees, but you get the idea)

    at least it's a slightly shorter cfg :)

    EDIT: i'm not entirely sure if this works or not, but i think it should with the tate mode on at all times. hmm, not sure!!


  • I will add to what @esmith13 is saying by confirming that my rom-specific rotation settings are mostly consistent, but do vary depending on the ROM to rotate CW or CCW.

    Also, this is useful for more than just those folks with displays that can rotate. My display is fixed/mounted and doesn't rotate, but because my cabinet is a 3-sided cocktail, I play all vertical games from control panels on the vertical ends. So, in this situation, I still want to have the game fill the screen like folks who can rotate their display. In other words, we are effectively the same. I say it because the audience for this effect isn't just limited to people with rotating displays.


  • No worries dankcushions. I really do appreciate it! Even tho I still need cfg files (for a portion of them, although I now have to hand create a list of which ones need configs!!) the aspect ratio/scaling is more accurate your way so I still consider your solution superior even if technically more work.

    Thank you again!!

  • Global Moderator

    @caver01 said in lr-mame2003 rom specific rotation + aspect issues:

    I will add to what @esmith13 is saying by confirming that my rom-specific rotation settings are mostly consistent, but do vary depending on the ROM to rotate CW or CCW.

    Also, this is useful for more than just those folks with displays that can rotate. My display is fixed/mounted and doesn't rotate, but because my cabinet is a 3-sided cocktail, I play all vertical games from control panels on the vertical ends. So, in this situation, I still want to have the game fill the screen like folks who can rotate their display. In other words, we are effectively the same. I say it because the audience for this effect isn't just limited to people with rotating displays.

    oh interesting! i did consider cocktail cabinets but i figured they would have controls only at one side. i didn't consider you could have cloned controls on 3. that's neat! hmm, maybe it needs renaming from TATE Mode but i can't think what to.


  • Perhaps something along the lines of one of the following?:
    mame2003-native_orientation
    mame2003-native_orient
    mame2003-orient_native
    mame2003-orientation_native
    mame2003-native_rotation
    mame2003-factory_rotation


  • @dankcushions said in lr-mame2003 rom specific rotation + aspect issues:

    maybe it needs renaming from TATE Mode but i can't think what to.

    No need to overthink it. It's actually a nice enhancement, and even if it serves as a default that covers most but not all titles, it can still reduce the need for custom configs for every vertical ROM.

    My situation is further complicated by the fact that my display is 5:4 (1280x1024). Normally, I might just let RetroArch figure out the AR for me, but I don't mind a little "stretch" within reason. I run the CRT shader, so I like that I can get it to fill the screen and eek out a few more pixels. I guess I am saying, I might end up with a custom configs anyway.

    As for the 3-sided controls, they aren't actually cloned--I can play 4-player games like Gauntlet, or X-men, or use all four joysticks for 2-player SmashTV etc.!


  • Where does one save "per rom" cfgs?

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.