Switching from Landscape to Portrait
-
so normally you would make a seperate config file per vertical game but in the case of the vertical option i have a quick dirty cheat for it that make it a thousand times easier for retroarch emulators.(possibly 2000 times easier ;) )so say mame-libretro is a retroarch emulator you want to use. so now make a copy of the /opts/retropie/configs/mame-libretro/ folder 3 times. so you will have 4 folders named like this:
mame-libretro mame-libretro1 mame-libretro2 mame-libretro3
you need to give permissions to these folders and files as you add them. so now in the folders marked 1, 2, and 3 you put this one line in the retroarch.cfg file in each of them.
in /opt/retropie/configs/mame-libretro1/retroarch.cfg you add:video_rotation = 1
in /opt/retropie/configs/mame-libretro2/retroarch.cfg you add:
video_rotation = 2
in /opt/retropie/configs/mame-libretro3/retroarch.cfg you add:
video_rotation = 3
now in /opt/retropie/configs/mame-libretro/emulators.cfg you would make it look something like this:
lr-mame2003="/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg %ROM%" lr-mame2003-1="/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro1/retroarch.cfg %ROM%" lr-mame2003-2="/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro2/retroarch.cfg %ROM%" lr-mame2003-3="/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro3/retroarch.cfg %ROM%" default="lr-mame2003"
now all you have to do is when you boot a a game press button 0 on player 1's controller to go into the runcommand setup and you choose the emulator + rom based on the screen rotation. then make a backup of all of these folders you create in case an update removes it you can easily fix it. just do this for any retroarch mame or fba emulator. or for the atari lynx and wonderswan vertical games. (you will have to put controller configs in there as well because the vertical games controls are changed in those 2 handhelds.)
-
@morgsdaly said in Switching from Landscape to Portrait:
So, will it be possible to program a single button to rotate the screen on demand or is the idea that depending on the game you choose that's what triggers the screen rotation?
@edmaul69 has a very interesting mechanism for giving you the choice when you launch a ROM. This choice will be saved, so once you have it set, it will run the emulator with the corresponding rotation.
I do it a bit differently. By default, I have my emulator setup without any rotation at all. It launches titles in horizontal mode. Then, say you are launching
dkong.zip
which is a vertical game. For that game, you create a text file and save it right next to the ROM. Call itdkong.zip.cfg
and inside that file, you add yourvideo_rotation = 3
or whatever you decide. When it launches, that custom config overrides whatever settings are in it. In this example, only rotation applies, so it will use the default configuration and augment it with the rotation settings, but every other setting will be the same.The two methods amount to the same thing, but I think it may be easier to manage the per-rom configs as I have described above, especially if you want to try a different emulator (lr core), as the config file would still apply. Finally, because you are using a different set of controls, you may need to include more configuration lines than just rotation for that game--you might need to map different inputs. So, you might end up with a per-rom config anyway. You can also make copies of the config and just rename it for another vertical title (so
frogger.zip.cfg
would be the same asdkong.zip.cfg
anddigdig.zip.cfg
and so on. That's what I do for libretro emulators.AdvanceMAME is handled differently, as it won't respond to these configs at all because it is a stand-alone emulator. For this, you need to edit the AdvanceMAME config file, but you can specify the ROM name on the line you add for rotation, so it amounts to the same idea in a way.
-
@caver01 yeah my method is designed more for someone who is using an arcade with one set of controls per player.
-
Wow, thanks so much... that was way more info from everyone than I was expecting.
I have noticed that some table style designs have one set of controllers per player and other designs have the additional controllers on the side of the table for side by side play. Is it easier to just add the secondary controllers or make a single set pf controllers work?
-
@morgsdaly I'd say everyone has their own reasons for their design choices. For me, I wanted to play arcade games first, then console games. So, I started out building a list of the arcade games I wanted to support. That was a mix of vertical classics and horizontal fighters. My old schoolmates also loved Gauntlet, so the possibility of also playing 4 players was too tempting to pass up. A 4-position cocktail setup made the most sense, because the second set of controls don't actually duplicate function of the vertical panels. It's literally a 4 player system that you can adapt as needed when only two players are required.
- I can play classics (vertical) head to head in rotating cocktail mode and completely fill the screen--no letterbox or stretching.
- Horizontal games can be played from the long edge.
- Fighter games can be played side-by-side from the long edge.
- Two player SmashTV can be played using all four joysticks (each player sits at the corners)
- 4 player games like Gauntlet are possible, as are 4 player sports and fighters.
- A game like robotron which uses two joystick can be setup on the horizontal side using both controls.
- Console games can be played on the horizontal side.
So, I am a big fan of the 4 player cocktail design, but if I was willing to sacrifice a few games, or play them in letterbox format, I could have made a system with fewer controls to save weight. I would like to make a bartop system someday, but I will have to give up some favorites.
-
@caver01 Do you have any suggestions or know of any guides that would help me out. I have a cocktail table design 4 player. i'm running only a handful of games. But I can't figure out how to enable cocktail mode on mr pac man. I can flip the screen with the retoropie config (I think) but it looks funny it isn't holding its aspect ratio... .,. I am running the newest 4.x retropie... I will keep poking around but its difficult to find exactly a good method to set up each game... Independantly I have seeon a few of your posts I think you have exactly what I have been trying to do...
Thanks for any suggestions or guidance in advance. -
@enlikil There isn't a guide for what you want, but once you get the hang of it, it's pretty easy to replicate.
First, you need to consider your emulator. I am mostly using lr-mame2003 which I recommend for all of the features that have been developed. I assume you are using a libretro core, as you mentioned using the retroarch configs to get most of the way there.
Ok, here's the trick you might be missing--the cocktail flipping is actually a "mode" of the original hardware. For example, an original motherboard for PacMan could be installed in a typical stand-up cabinet, or it might be installed in a cocktail table cabinet. Back in the day a single motherboard could be used in either physical configuration, and the way you would tell the motherboard that you were installing it in a cocktail table cabinet was by setting a tiny switch on the board (DIP switch). These switches were used for other things too, like specifying how many points you had to earn to get an extra life, faster gameplay, difficulty, etc. --the settings themselves just depended on the game and what options the designers decided to build into them.
Since we are running emulators, there's no physical switches you can set. However, MAME developers created a workaround to accommodate these switches in a software menu. You need to launch the game, then bring up the MAME GUI, <TAB> and navigate to the menu to set DIP Switches. In the DIP Switch menu, you should find one that says something like Cabinet Type. The default us UPRIGHT. Changes this to Cocktail. Back out of the menu and reset the game. After a reset, it will detect your virtual "switch" and it will be in cocktail mode. You can test by "inserting" coins, then press Two-Player start. Player one will start in the regular fashion, and when it is time for Player 2, the screen will flip 180 degrees! Not all games have this if they were never sold as cocktail cabinets.
In lr-mame2003 the cocktail switch has to be set for each game, if the game supports it. Not all games do. If you use FBA, you might be able to set it in the retroarch menu, but I had bad luck. For example, I switched from lr-fba-next to lr-mame2003 for Galaga because FBA wasn't respecting my cocktail mode setting, and I couldn't get access to the development forum to tell them to fix it.
For AdvanceMAME, the cocktail setting gets stored in the .rc file. You can specify the dip switch in similar fashion using the GUI, exit, then inspect the .rc file to see the option added for that ROM. You can, of course, copy this line and re-use it for all vertical games for example using
vertical/
in front of the command (instead of the ROM) but you probably don't want to do that, as you will quickly run into exceptions.Anyway, hopefully that gets your flipping working. I love the effect. Another thing worth mentioning is that sometimes a game defaults to vertical orientation on the wrong side of my cabinet. I usually specify a rotation setting in my retroarch config files per ROM (
romname.zip.cfg
) such that player one on the side of my cabinet I want. Then, I go into the DIP Switch menu inside MAME GUI and enable Cocktail cabinet mode. -
OK, So... I'm using lr-mame2003 .... When I started Mrs pac man I hit (tab) I think and I got this 8 bit looking menu and one of the options was Cabinet type, I could pick vertical/cocktail etc. etc. however I only seen that once, Now when I hold in tab I only get the Retroarch or emulationstation options and its a completely different screen. I have not been able to get that original one up that had the DIP switches. AM I doing something wrong? do I just need to hit tab and release or hold it in to get that other screen?
Its like after I accessed it one time I wont show me that same menu again. any thoughts?PS: thank you for all the information. it will take me a while to process it. I am still getting my head around this whole process. but its really fun!
-
another issue I haven't figured out yet is how to get my screen to rotate 90.. and keep it looking right, it tries to squish it to the same size as the horizontal mode. I believe there is a way to set this for each rom as you mentioned above I just don't know the settings.
or what to set aspect ratios to, I had no problems getting it to work on my PC with mame, but when I switched to retropie I'm having some difficulties. -
@enlikil said in Switching from Landscape to Portrait:
OK, So... I'm using lr-mame2003 .... When I started Mrs pac man I hit (tab) I think and I got this 8 bit looking menu and one of the options was Cabinet type, I could pick vertical/cocktail etc. etc. however I only seen that once, Now when I hold in tab I only get the Retroarch or emulationstation options and its a completely different screen. I have not been able to get that original one up that had the DIP switches. AM I doing something wrong? do I just need to hit tab and release or hold it in to get that other screen?
Its like after I accessed it one time I wont show me that same menu again. any thoughts?So, you don't need to hold the tab key. Press it once to bring up the menu. If pressing TAB now brings you to the RetroArch menu, you might have mapped TAB in your retroarch.cfg file. You will run into conflicts if you have the same key setup to do two different things, and the confusion about RetroArch is understandable. (see next post)
-
Ok if I hit the tab key once.. when the game is starting I get the Menu that says
SYSTEM: mame:-libretro
EMULATIOR: lr-mame2003
VIDEO MODE:
ROM: Mspacman
THen I have options
1 select default emulator for mame-libretro
2 select emulator for rom
3
4
5 etc.etc.
This is not the original menu that I seen that had the cabinet options? where did that one go? any thoughts? -
Got it... while im' in GAME I hit tab and get the menu....
Ok.. So now I just need to figure out how Rotate it and hold the aspect ratio... and i'm golden... -
@enlikil said in Switching from Landscape to Portrait:
another issue I haven't figured out yet is how to get my screen to rotate 90.. and keep it looking right, it tries to squish it to the same size as the horizontal mode. I believe there is a way to set this for each rom as you mentioned above I just don't know the settings.
or what to set aspect ratios to, I had no problems getting it to work on my PC with mame, but when I switched to retropie I'm having some difficulties.We can definitely get the size/rotation sorted for you. It's easy to describe things ambiguously, so when you say it looks squished, or that it's the same size as horizontal, it's hard to know exactly what you mean. Pictures can help (even if you just take a photo with a phone).
One thing that can help you make the transition from running a native version of MAME on a PC versus running libretro cores in RetroArch is understanding that RetroArch is a framework and inside that you can run different emulators. The nice thing is that once you feel good about running different libretro cores (lr-mame2003, or lr-fba-next, many consoles) you get the benefit of using some of the same configs among them which allows consistent video and shaders.
It's also nice to know that if you follow the documentation with respect to the retroarch.cfg files, you have an opportunity to setup a the config for all cores in the configs/all folder and a "cascade effect" with individual emulator configs overriding settings if needed. Finally, per-ROM configs can further override these. Because this can get rather convoluted, it might help to simply run the games and see how they look before you start making changes anywhere.
If your cabinet is like mine (linked in my previous post above) you have vertical controls on each narrow end, and a horizontal panel on a long edge of the display. Typical horizontal games are a non-issue, as they display in landscape mode and are played from the horizontal panel. I like to consider this a "deafult" as it represents how games like Joust are played, but also how almost all of the home console emulators will work (Atari, NES, SNES etc.). Back to arcade games, I play a vertical game like PacMan, I want it to, fill the screen, but oriented sidways by comparison. This works nicely on my cabinet because I simply move around the cabinet to the left and play from that vertical end.
If we start there, and pick a game like, say, Frogger, if I just launch this game, to get it rotated the way I want, next to my ROM I have a text file called
frogger.zip.cfg
and inside that file I have two lines:video_allow_rotate = true video_rotation = 3
You can experiment with the number depending on which way is "up" for your cabinet playing this game. Once you have it right, then you probably need to remap these controls. I do it in the MAME GUI because it is easier. Then, and finally, you need to set the DIP switch as I described earlier. After a reset, MAME will rotate for player 2.
I do this for each game that I want to setup this way.
-
@caver01 Oh Thanks For All That. I got nost of it working, i am attaching a screen shot.
Or not... it saya ita to big. ..anyhow i habe it vertocle not but it ia,not going the length of the monitor its only in the middle! Ot is thr 11 inchc hoeght of thecmonitor instead of the length of the monitor -
@caver01 Ok update:.. I have a config for mspacman as that's what i'm working with IT definatly works.. .however my video area is not properly proportioned. Playing with the settings.
#video_force_aspect = true
#video_scale_integer = true
#video_aspect_ratio_auto = true
#video_aspect_ratio = true
But I haven't found the right ones to make it work right.
Not even sure this is where I should be doing this at but it feels like it. -
I got it.... so my aspect ratio is 1.33 on this monitor... Works like a champ... your post about mystery aspect ratio totally solved my issue.
Now to figure out how to map my controls :) -
here is what I ended up with
video_allow_rotate = true
video_rotation = 1
aspect_ratio_index = "19"
video_aspect_ratio_auto = false
video_aspect_ratio = 1.33Now I need to figure out how to flip my entire retropie upside down because my view angle upright is No good haha
-
@enlikil change your video rotation to 3 to flip it the other way
-
@enlikil excellent work. Your research found a lot of good answers and it looks like you are using the right settings.
Question: is everything upside down, including emulation station? If so, you need to rotate your video in
boot/config.txt
by addingdisplay_rotate=2
assuming you are using a raspberry pi. That will make everything you do upside down from the moment you boot.Otherwise, if it's jut this game, change your video_rotation = 3 in your rom cfg file.
You are very close! Way to go!
-
@caver01 Thanks,. I was able to achieve everything I was looking for. I can now start going through each game and writing the config files for them. I am ready now to start building the table and wiring up all the buttons, then a whole new level of fun comes..
Thanks for all the input and guidance. it completely helped me.
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.