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

Backdrops in mame2003-plus



  • @UDb23 said in mame2003-plus: hundreds of new games, improved input, features, new bugs - now with runahead support:

    @Clyde if you are going to resize the backdrop to fit your display it's better you use a higher res image source for the backdrop (as you have more pixels on vertical than 1080).
    High Res Taito moon image here.

    I used that image, cut the black bar off its bottom, rotated the image 90° clockwise, and resized it to 1200x1600.

    alt text

    Then I entered these values in your spreadsheet

    backdrop: 1200x1600
    game area: 1200x1120

    which resulted in 0,-0.214286,1,1.214286 for the position. The result was this 1284x1200 picture, which still doesn't fill the whole 1600x1200 screen horizontally. But it's much better then my first result. Any ideas for optimisation?

    alt text

    I would suggest we create a separate thread to discuss about backdrops to avoid "cluttering" this thread. ;-)

    Done. :)



  • I think you nailed it it seems but something still isn't right. Can you unload the backdrop and any custom configs, start the game, enter RGUI and verify the resolution is 1120 x 1200. Settings -> Video (I think). If you have a backdrop loaded or using custom core (video) overrides, etc. the numbers will not be correct.

    You're image is rotated, the resolution is 1200 x 1600, the calculations are entered correctly and look correct. The only thing I can think of at the moment is to verify the resolution the core is providing.



  • I can't find any display of the actual resolution, and alas, the Settings > Onscreen Notifications > Display Statistics option which displays the resolution doesn't work on my Pi, in contrast to Retropie on my desktop pc. See my Video Settings:

    alt text



  • I am pretty sure on the Pi it would be Settings -> Video once you're in RGUI. You'll see something very similar to your screenshot but more green/black. The numbers below would be more inline with what I thought it would have shown for a 1600 x 1200 display.

    Aspect Ratio = Core Provided
    Custom Aspect Ratio X Pos. = 350
    Custom Aspect Ratio Y Pos. = 0
    Custom Aspect Ratio Width = 900
    Custom Aspect Ratio Height = 1200
    

    Since it's showing 1600 x 1200 it seems something isn't correct but I haven't used the PC version. To experiment you could try 0,-0.388889,1,1.388889



  • @Riverstorm Those numbers did it! How did you come up with them?

    alt text

    Again, the resolution is off by one pixel (1599x1200), but so what? 😋



  • @Clyde Off 1 pixel is ok ;-)
    Compliments to @Riverstorm that guessed your real game area on 1600x1200 monitor.

    From the screenshots it seems you are using a scanlines shader. Are you ?



  • @Clyde said in Backdrops in mame2003-plus:

    the resolution is off by one pixel (1599x1200)

    This evening I started playing around with formulas to "reverse engineer" mame2003plus calc behaviour to get the actual integers we want as final res.
    If I find out what mame needs/wants to calc the correct res it should be possible to modify the formulas in the sheet accordingly.



  • Great! So for 3:4 games use 900 x 1200 (1200 x 900 for rotated) for your game area. For 4:3 games use 1600 x 1200.

    I saw you used 5x integer scaling but it didn't register at that moment. Which isn't what a Core Provided aspect ratio will produce.

    This about the extent of my understanding so take it with a grain of salt. You would think that a game that is 224 x 240 would have 14:15 display aspect ratio, this is with the assumption that the pixels are square. That's definitely not the 3:4 or 4:3 display aspect ratio which most of these games used as a target display. I basically sum this up to the pixel dimensions.

    If you physically measure the dimensions of a modern monitor and perform a few calculations you can calculate the ratio of width to height. Then perform those same calculations with the resolution you'll find the numbers will match. What that tells you is the pixel aspect ratio is 1:1 or another way of putting it is the pixels are square on modern displays.

    This makes the math for a 3:4 display aspect ratio really simple. For example I want to fill the display in one axis. In this case the y axis (1200) this is my ratio height and then I just need to calculate my ratio width which would be 75% of the height (900) so my final ratio width and height is 900 x 1200 or 3:4. The remaining x axis pixels are divided equally on either side of the game area.

    If you try and maximize the ratio on the x axis there isn't enough pixels on the y axis. You can do some quick and dirty numbers in your head to know you can't use the maximum x axis resolution and produce a 3:4 display aspect ratio.

    Now if you perform these same pixel aspect ratio calculations on an arcade monitor it will not be a 1:1. What that basically tells you is the pixels were not square. Maybe a 6:9, 7:9 or whatever ratio. This just adds more complexity.

    So using raw game resolution dimensions to calculate the display aspect ratio just doesn't tell the whole story (Space Invaders = 224 x 240 = 14:15). Scale it up and you have 1120 x 1200. That's a bit wider than the 900 x 1200 we calculated earlier for our 3:4 display aspect ratio for our modern day monitor.

    If you want to see what the "true" display aspect ratio would look like on a modern display it's easy to do. Just go to your video options and set the aspect ratio to 1:1. Now the game will have a true 14:15 display aspect ratio. You can decide if it looks to wide or if you like it. Then you can adjust the position of the art to accommodate to new resolution with the spreadsheet calculator.

    What we do know to be true for arcade monitors was the final display aspect ratio was meant to be 3:4 or 4:3. So to take that 14:15 ratio of Space Invaders and make it 3:4 they used the monitors vsync and/or hsync to make adjustments so the final game output filled a 3:4 or 4:3 display or whatever for the occasional oddball game.

    So here's where it gets fuzzy for me but once those sync adjustments were made I have no idea what the final pixel aspect ratio was on an arcade monitor. Maybe it doesn't matter. I would assume it changed ever so slightly. I think the pixel aspect ratio affects how games look. Maybe characters look stretched slightly on one axis or or the other. Tall and skinny or short and fat, etc. but it seems that would had to have been taken into account while creating the graphics knowing they would be adjusted with v/h sync.

    I think that's why they calculate for the display aspect ratios and not the game aspect ratios using the original dimensions. Even with all that I still don't think modern monitors display it perfectly due to the pixel aspect ratio (pixel dimensions) never being perfectly matched but close enough to make it look right.

    Anyway something like that I think but way more complex under the hood on these cores.



  • @UDb23 said in Backdrops in mame2003-plus:

    This evening I started playing around with formulas to "reverse engineer" mame2003plus calc behaviour to get the actual integers we want as final res.
    If I find out what mame needs/wants to calc the correct res it should be possible to modify the formulas in the sheet accordingly.

    That would be neat to find. I tried rounding up the division calculations but none of them really recovered those 1 and 2 'lost boy' pixels. On your spreadsheet you carry them out to 6 decimals vs. 5 rounded (1.214286 vs. 1.21429) which is more accurate than the instructions tutorial but still no luck.



  • @UDb23 said in Backdrops in mame2003-plus:

    @Clyde Off 1 pixel is ok ;-)
    Compliments to @Riverstorm that guessed your real game area on 1600x1200 monitor.

    From the screenshots it seems you are using a scanlines shader. Are you ?

    Yes, I use @ghogan42's zfast curved crt shader. I wanted to at least switched it to non-curved, but I forgot that completely. 😇 Then I hoped that it wouldn't have any or little impact to the backdrop/gameplay ratio. Does it?

    I can make non-shaded (shadered?) pictures if that would be useful to you.

    edit: By the way, how do I remove active shaders via XMB? I can load new presets, but I didn't find any option to remove them completely. (I could do it in the config files, but XMB would be much more convenient for testing.)

    @Riverstorm Wow, what an elaborate explanation. I'll read it completely after work.



  • @Clyde said in Backdrops in mame2003-plus:

    it wouldn't have any or little impact to the backdrop/gameplay ratio. Does it?

    Seems not. Good to know that shaders & mame .ART system work fine together.



  • I prefer shaders in almost all cores but for some reason backdrops seem to make them less than desirable. I prefer crt-pi but I am not liking how it looks with backdrops. It almost seems to create a moire type effect or something.



  • @Riverstorm I read your explanations and I think I understood them. :) One thing: Are your sure about SA having 224x256 pixels? Because mame2003-plus' XML file says for the game,

    <video screen="raster" orientation="vertical" width="224" height="240" aspectx="3" aspecty="4" refresh="60.000000"/>
    

    That's where I got the 5x from (1200:5=240).



  • @Clyde said in Backdrops in mame2003-plus:

    Are your sure about SA having 224x256 pixels?

    Ooops, sorry, I think you have it correct! I'll update the post. The concepts being illustrated should still be the same though.



  • @Clyde - Thanks for pointing that out. I corrected the post above with the correct numbers.



  • @Riverstorm My pleasure. :)



  • @grant2258 Opened an Issue on the distortion in SI. Includes link to sound recording.



  • @Riverstorm @clide Found a workaround for the sound issue.

    Requires (me) to create new dedicated RA overlay ;-)



  • @UDb23 - That's great news! I suppose refreshing the whole screen, since RA Video displays it as 1918 x 1080, is taxing the Pi.

    I thought I read somewhere you need to alter existing overlays. Can you explain why backdrops with overlays is a challenge? If you create an overlay that has a transparent section for the game. Shouldn't the backdrop just need to fit that transparent section only?



  • @Riverstorm said in Backdrops in mame2003-plus:

    Can you explain why backdrops with overlays is a challenge? If you create an overlay that has a transparent section for the game. Shouldn't the backdrop just need to fit that transparent section only?

    No challenge actually. Yes transparent game area as usual with overlays.
    Sometimes the "window" that shows backdrop(was the actual bezel in the original arcade game) is wider than the gaming area. This happens for SI where backdrop is bigger.
    That "exceeding backdrop " area must be included in the RA overlay.



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.