LR-MAME2003 - flipping the screen in SOME games
-
Pi Model : Pi 3 B
Power Supply used: > 2 A
RetroPie Version Used: 4.3
Built From: Pre made SD Image on RetroPie website (retropie-4.3-rpi2_rpi3.img.gz)
USB Devices connected: PICADE controller
Controller used: PICADE (converts joystick& buttons to key presses), mouse
Error messages received: none
Log found in /dev/shm/runcommand.log : no special message or error
Guide used: installed according on the instruction on retropie.org.uk
File: several games, most originally with light gun. For example Operation Thunderbolt (othunder.zip)
Emulator: LR-MAME2003
Attachment of config files: no special configuation (everything off-the-box except the controller binding)
How to replicate the problem: 100% replicatableHello
Under LR-MAME2003 (Retroarch / Retropie), a few games are flipped horizontally (usually games with a light gun, no idea why). Unfortunately, I'm a beginner in Retropie and I have used UNIX the last time 25 years ago. I don't find how to correct that:
- i find no such option in the DIP switches of the games (using the TAB key in the game)
- I think there is a "flipx" parameter in some versions of MAME, but I don't understand how to use it in Retropie
- I don't find a suitable parameter in Retropie/Retroarch/runcommand etc.
Any help would be appreciated!
Thanks
Patrick -
You need to create a custom game cfg for the games in question and set the rotation which is a setting in increments of 90 degrees.
You create a .cfg file with the same name as the game .zip file including the .zip in it like
[game].zip.cfg
which is just a text file and goes right next to that game.zip file in its roms folder. This will override any default settings from retroarch.cfg for that particular game.Here is my example of Rip Off which had the same issue for me.
video_rotation = 1 is the key element that is rotating the screen. I also have it setup to use an overlay and adjust the positioning of the display to fit within that overlay.ripoff.zip.cfg
aspect_ratio_index = "22" custom_viewport_width = "1130" custom_viewport_height = "820" custom_viewport_x = "395" custom_viewport_y = "130" video_rotation = 1 input_overlay = /opt/retropie/emulators/retroarch/overlays/arcade-bezels/ripoff.cfg input_overlay_enable = true input_overlay_opacity = 0.850000 input_overlay_scale = 1.000000
-
@alturis said in LR-MAME2003 - flipping the screen in SOME games:
You need to create a custom game cfg for the games in question and set the rotation which is a setting in increments of 90 degrees.
Thanks, but the problem is that I need to flip the screen horizontally (like in a mirror), not to rotate it! And I didn't find a parameter for that.
Is there one? Or maybe with a shader?
-
Hmm... well there is a whole series of video options. I would have thought there woudl be a video_flip, but there is a video_scale which I would think might accept a -1 value?
#### Video # Video driver to use. "gl", "xvideo", "sdl" # video_driver = "gl" # Which OpenGL context implementation to use. # Possible ones for desktop are: glx, x-egl, kms-egl, sdl-gl, wgl. # By default, tries to use first suitable driver. # video_context_driver = # Windowed x resolution scale and y resolution scale # (Real x res: base_size * xscale * aspect_ratio, real y res: base_size * yscale) # video_scale = 3.0 # Fullscreen resolution. Resolution of 0 uses the resolution of the desktop. # video_fullscreen_x = 0 # video_fullscreen_y = 0 # Start in fullscreen. Can be changed at runtime. # video_fullscreen = false # If fullscreen, prefer using a windowed fullscreen mode. # video_windowed_fullscreen = true # Which monitor to prefer. 0 (default) means no particular monitor is preferred, 1 and up (1 being first monitor), # suggests RetroArch to use that particular monitor. # video_monitor_index = 0 # Forcibly disable composition. Only works in Windows Vista/7 for now. # video_disable_composition = false # Video vsync. # video_vsync = true # Forcibly disable sRGB FBO support. Some Intel OpenGL drivers on Windows # have video problems with sRGB FBO support enabled. # video_force_srgb_disable = false # Attempts to hard-synchronize CPU and GPU. Can reduce latency at cost of performance. # video_hard_sync = false # Sets how many frames CPU can run ahead of GPU when using video_hard_sync. # Maximum is 3. # video_hard_sync_frames = 0 # Sets how many milliseconds to delay after VSync before running the core. # Can reduce latency at cost of higher risk of stuttering. # Maximum is 15. # video_frame_delay = 0 # Inserts a black frame inbetween frames. # Useful for 120 Hz monitors who want to play 60 Hz material with eliminated ghosting. # video_refresh_rate should still be configured as if it is a 60 Hz monitor (divide refresh rate by 2). # video_black_frame_insertion = false # Use threaded video driver. Using this might improve performance at possible cost of latency and more video stuttering. video_threaded = true # Use a shared context for HW rendered libretro cores. # Avoids having to assume HW state changes inbetween frames. # video_shared_context = false # Smoothens picture with bilinear filtering. Should be disabled if using pixel shaders. video_smooth = true # Forces rendering area to stay equal to content aspect ratio or as defined in video_aspect_ratio. # video_force_aspect = true # Only scales video in integer steps. # The base size depends on system-reported geometry and aspect ratio. # If video_force_aspect is not set, X/Y will be integer scaled independently. # video_scale_integer = false # A floating point value for video aspect ratio (width / height). # If this is not set, aspect ratio is assumed to be automatic. # Behavior then is defined by video_aspect_ratio_auto. # video_aspect_ratio = # If this is true and video_aspect_ratio is not set, # aspect ratio is decided by libretro implementation. # If this is false, 1:1 PAR will always be assumed if video_aspect_ratio is not set. video_aspect_ratio_auto = true # Forces cropping of overscanned frames. # Exact behavior of this option is implementation specific. # video_crop_overscan = true # Path to shader. Shader can be either Cg, CGP (Cg preset) or GLSL, GLSLP (GLSL preset) # video_shader = "/path/to/shader.{cg,cgp,glsl,glslp}" # Load video_shader on startup. # Other shaders can still be loaded later in runtime. # video_shader_enable = false # Defines a directory where shaders (Cg, CGP, GLSL) are kept for easy access. video_shader_dir = /opt/retropie/emulators/retroarch/shader/ # CPU-based video filter. Path to a dynamic library. # video_filter = # Defines a directory where CPU-based video filters are kept. # video_filter_dir = # Path to a font used for rendering messages. This path must be defined to enable fonts. # Do note that the _full_ path of the font is necessary! # video_font_path = # Size of the font rendered. video_font_size = 12 # Enable usage of OSD messages. # video_font_enable = true # Offset for where messages will be placed on screen. Values are in range 0.0 to 1.0 for both x and y values. # [0.0, 0.0] maps to the lower left corner of the screen. # video_message_pos_x = 0.05 # video_message_pos_y = 0.05 # Color for message. The value is treated as a hexadecimal value. # It is a regular RGB hex number, i.e. red is "ff0000". # video_message_color = ffffff # Video refresh rate of your monitor. # Used to calculate a suitable audio input rate. # video_refresh_rate = 59.95 # 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 # Forces a certain rotation of the screen. # The rotation is added to rotations which the libretro core sets (see video_allow_rotate). # The angle is <value> * 90 degrees counter-clockwise. # video_rotation = 0
Are you running a cocktail supported rom?
-
@alturis said in LR-MAME2003 - flipping the screen in SOME games:
Are you running a cocktail supported rom?
To be very honest, I don't understand exactly what "cocktail mode" means. A screen split in two? If that's it, then no, I don't think. In the game settings in MAME, there is no such DIP switch.
The screen is simply inverted left-right.
I have tried video_scale=-1 but if it does nothing. Anyways, how should it mirror in X or Y direction or both?
-
@paf said in LR-MAME2003 - flipping the screen in SOME games:
othunder
this is interesting - this game has a flag i haven't seen before in the code:
ORIENTATION_FLIP_X
you can see the other games that use it here: https://github.com/libretro/mame2003-libretro/search?p=1&q=ORIENTATION_FLIP_X&type=&utf8=✓
i would guess that standard mame 0.78 plays these games right, but the libretro version (lr-mame2003) is not. @markwkidd are you able to confirm?
if standard mame 0.78 plays them right, then this is a mame2003 bug that should be logged :)
-
@dankcushions said in LR-MAME2003 - flipping the screen in SOME games:
@paf said in LR-MAME2003 - flipping the screen in SOME games:
othunder
this is interesting - this game has a flag i haven't seen before in the code:
ORIENTATION_FLIP_X
you can see the other games that use it here: https://github.com/libretro/mame2003-libretro/search?p=1&q=ORIENTATION_FLIP_X&type=&utf8=✓
i would guess that standard mame 0.78 plays these games right, but the libretro version (lr-mame2003) is not. @markwkidd are you able to confirm?
if standard mame 0.78 plays them right, then this is a mame2003 bug that should be logged :)
Confirmed -- it works in original MAME 0.78 but not in mame2003.
-
@markwkidd bah! :)
i think the problem is here: https://github.com/libretro/mame2003-libretro/blob/78720e819c1fe0ad516e0a478f43f52d1fa092cf/src/usrintrf.c#L273
it looks like this is never called in mame2003. i guess the rotation stuff is replaced here: https://github.com/libretro/mame2003-libretro/blob/master/src/libretro/libretro.c#L633
...but not the X/Y flipping... i don't know how you do that via the libretro API.
-
@paf said in LR-MAME2003 - flipping the screen in SOME games:
Under LR-MAME2003 (Retroarch / Retropie), a few games are flipped horizontally (usually games with a light gun, no idea why).
I believe the explanation is that those light gun games often worked with mirrors, in order to have a certain "distance" feeling from the display.
See here :
http://forum.arcadecontrols.com/index.php?topic=93369.0 -
-
@dankcushions said in LR-MAME2003 - flipping the screen in SOME games:
@markwkidd bah! :)
i think the problem is here: https://github.com/libretro/mame2003-libretro/blob/78720e819c1fe0ad516e0a478f43f52d1fa092cf/src/usrintrf.c#L273
it looks like this is never called in mame2003. i guess the rotation stuff is replaced here: https://github.com/libretro/mame2003-libretro/blob/master/src/libretro/libretro.c#L633
...but not the X/Y flipping... i don't know how you do that via the libretro API.
Someone like radius or hunterk from the libretro team is probably the best on to ask once this is on github.
As opposed to fixing the problem it may also be possible to work around it by way of a shader although I don't think there's anything like that in the libretro shaders repository at the moment.
-
I just tried with a 0.139 ROM and LR-MAME2010, but it crashes with the following info "/opt/retropie/supplementary/runcommand/runcommand.sh: line 1006: 4692 Segmentation fault"...
Any alternative?
-
@paf It would do no harm. Also try AdvanceMame, as I suggested. I was playing it earlier with a mouse, got to level 3.
-
I have the same issue.
I'm trying to run Disc Of Tron in flipped mode.
I tried a couple of things in the dotron.zip.cfg file, such
ORIENTATION_FLIP_Y = "ON"
or
ORIENTATION_FLIP_Y = "true"
or
ORIENTATION_FLIP_Y = "yes"
But it doesn't affect the display :-(
I'm note sure what is the correct syntax to use in the .cfg file ? And/or if an other parameter is require too?I'm using mame-libretro 2003 (mame version 0.78 build), on a fresh image downloaded here (retropie-buster-4.7.1-rpi2_3.img.gz)
Can someone point me the exact syntax to use for doing this in the .cfg file ?
-
@dnuno the screen should be displayed properly without changing any settings. Or are you trying to make the screen mirrored for use with a mirror?
-
@mahoneyt944 said in LR-MAME2003 - flipping the screen in SOME games:
@dnuno are you trying to make the screen mirrored for use with a mirror?
Yes, that's the idea.
-
@dnuno said in LR-MAME2003 - flipping the screen in SOME games:
Can someone point me the exact syntax to use for doing this in the .cfg file ?
i think you’re misreading my post. those are internal variables within the code, not configuration settings. there is no way to flip things via the libretro API but you could try a shader. a quick google led me here: https://www.reddit.com/r/miniSNESmods/comments/99eevo/quick_guide_for_flippingmirroring_the_screen_in/?utm_source=share&utm_medium=ios_app&utm_name=iossmf
-
@dankcushions said in LR-MAME2003 - flipping the screen in SOME games:
i think you’re misreading my post. those are internal variables within the code, not configuration settings. there is no way to flip things via the libretro API but you could try a shader. a
Well, it shouldn't be an issue for me as I do not plan to 'Y flip' for certain games. I want to dedicated the 'YFlip' for only one game(and I do not plan to run any other game on this setup. So instead using a shader, could this be such a option in the general config of LR Mame 2003. I've found this option in Advance Mame .94, but I would prefer to go with Mame2003 ?
-
@dnuno why not run a shader for one game? it probably could become an option in the core but you’d have to find someone to implement it: https://github.com/libretro/mame2003-libretro/issues
-
@dankcushions Thanks, I'll look in that way. I wasn't aware of the use of shaders so far :-)
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.