Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2  (Read 3663 times)

0 Members and 1 Guest are viewing this topic.

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« on: October 02, 2016, 11:17:58 pm »
I downloaded this version a few days ago and I'm having issues when launching w/ -rol or -rol to play games in the vertical orientation.  This is my first time using GM on Windows so I can't be sure if this is a regression, or even if I'm doing something wrong.

I launch from the command-line w/ -rol or -rol and mame seems to launch (I see it in the taskbar) but all I see is the cmd.exe window and a few printouts from SwitchRes.  Not using the -rol or -rol flag things work like a champ.

I've attached a log generated w/ -v as recommended to this post, if I can provide any other info, just let me know.

Also just want to say THANKS for the hard work on this.  I purchased a x600 XT and ditched my ArcadeVGA 5000 (which didn't work on Windows 8 at ALL) and am happy with this setup.  Worked right out of the box so to speak as far as VMMaker, etc.
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:April 22, 2024, 03:17:30 am
  • retro maniac
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #1 on: October 03, 2016, 01:42:08 am »
You have to use orientation rotate_r or rotate_l

Code: [Select]
modeline_generation       1
monitor                   arcade_15
orientation               rotate_r
connector                 auto
interlace                 1
« Last Edit: October 03, 2016, 05:06:26 am by haynor666 »

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #2 on: October 03, 2016, 08:40:56 am »
Thanks for the info!

Unfortunately, this does not seem to work on the command line (which is what I need).  I have a rotating monitor so I switch between horiz/vert via my front end.  The -rol and -ror worked fine w/ groovymame on Linux for some reason.  I tried the -rotate_l on the command line as well and it is seen as an invalid option.  Hopefully, I'm not missing something.
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:April 22, 2024, 03:17:30 am
  • retro maniac
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #3 on: October 03, 2016, 09:12:22 am »
Judging from code:

Code: [Select]
+ // Switchres options
{ nullptr,                                              nullptr,        OPTION_HEADER,     "CORE SWITCHRES OPTIONS" },
{ OPTION_MODELINE_GENERATION ";ml",                  "1",         OPTION_BOOLEAN,    "Automatic generation of modelines based on the specified monitor type" },
{ OPTION_MONITOR ";m",                               "generic_15",OPTION_STRING,     "Monitor type, e.g.: generic_15, arcade_15, lcd, custom, etc." },
{ OPTION_ORIENTATION ";or",                          "horizontal",OPTION_STRING,     "Monitor orientation (horizontal|vertical|rotate|rotate_r|rotate_l)" },
{ OPTION_CONNECTOR ";cn",                            "auto",      OPTION_STRING,     "[Linux] video card output (VGA-0|VGA-1|DVI-0|DVI-1)" },
{ OPTION_INTERLACE ";in",                            "1",         OPTION_BOOLEAN,    "Enable interlaced scanning when necessary" },
{ OPTION_DOUBLESCAN ";ds",                           "1",         OPTION_BOOLEAN,    "Enable double scanning when necessary (unsupported under Windows)" },
option 'or' should be for orientation and its parameters are: horizontal vertical rotate rotate_r rotate_l.

rotate_l or rotate should work.

I've just tried 'mame64 1943 -or rotate_l' and it works.
« Last Edit: October 03, 2016, 09:15:57 am by haynor666 »

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #4 on: October 04, 2016, 02:29:52 am »
Unfortunately, this does not seem to work on the command line (which is what I need).  I have a rotating monitor so I switch between horiz/vert via my front end.  The -rol and -ror worked fine w/ groovymame on Linux for some reason.  I tried the -rotate_l on the command line as well and it is seen as an invalid option.  Hopefully, I'm not missing something.

Command line aside, you might be misunderstanding the orientation options, or maybe I am. Here's how I see it:

If your front end pre-rotates your monitor to reflect the selected game orientation, then your Switchres orientation is either rotate_l (when your monitor rotates H to V clockwise, putting the left side of the screen at the top) or rotate_r (rotates counter-clockwise, putting the right side on top). Whichever it is, it's always that, even when playing horizontal games horizontally, so it doesn't need to be a command line parameter.

On the other hand, if the front end itself can run with a horizontal theme or a vertical theme, and you want groovymame to play any selected game in the current orientation, then you would need to pass in the orientation. However, in that case, the setting would either be horizontal or vertical, reflecting the state of the monitor. (This seems a little pointless in an automatically rotating setup, but maybe not in a manually rotating one.)

Of course, if you wanted to, you could rotate the monitor with the front end based on the selected game and then pass -or horizontal or -or vertical, but that gives you the same result as the first option, except with more work involved.

Whichever Swtichres orientation setting you use, don't try to mix it with -rol and -ror. Switchres needs to handle the rotation so you get the right video mode.

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:April 22, 2024, 03:17:30 am
  • retro maniac
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #5 on: October 04, 2016, 03:32:15 am »
Yah, I was thinking about this. Option rotate_r or rotate_l automatically select proper orientation for chosen game so setting it once solves problem.

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #6 on: October 04, 2016, 09:31:45 am »
Thanks for the info everyone, although I think I'm now more confused as ever.   :)

So, my monitor rotates as I mentioned, and it is manual rotation.  My frontend (AdvanceMenu) can also be rotated (so I match the rotation up with the monitor's current orientation).  When the front end launches it can pass flags on the command line based on the current rotation of the frontend itself.  Putting in -rol and -ror has always worked (and -rol is all I use since the monitor can be in 2 positions, horiz and 90CCW).  Using -orientation rotate_l works fine when run from a prompt, but AdvanceMenu doesn't seem to like the flag w/ argument, it ends up not expanding the meta sequence in the config file at all, so I end up with:

mame.exe %o[,-or rotate_l,-flipy,-or rotate_r]

or something similar to that, rather than having just -or rotate_l passed to the GroovyMame.  If I put in just a flag w/ a dash like -rol, it launches fine, but GM doesn't use -rol or -ror, etc.

I've put in a bug report to AdvanceMenu.

Am I misunderstanding all of this and there is an easier way?
« Last Edit: October 04, 2016, 09:33:47 am by telengard »
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:April 22, 2024, 03:17:30 am
  • retro maniac
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #7 on: October 05, 2016, 01:52:49 am »
rotate_r or rotate_l are automatic options that set correct rotation based on game so if You have frontend horizontal and run horizontal game like Rastan then output will be horizontal. When You decide to rotate screen and put frontend in vertical mode then run pacman groovymame will rotate automatically picture for You. I don't see any sense to pass those commands manually.

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #8 on: October 05, 2016, 04:37:16 am »
So, my monitor rotates as I mentioned, and it is manual rotation.  My frontend (AdvanceMenu) can also be rotated (so I match the rotation up with the monitor's current orientation).  When the front end launches it can pass flags on the command line based on the current rotation of the frontend itself.

I don't use AdvanceMenu, so I can't advise you there. As for the orientation setting, you'll have to tell us one more detail before we can tell you what GM setting to use.

When you select a vertical game while the front end and monitor are horizontal, do you want the game to play upright on the horizontal monitor with black bars on the sides, or do you want it to be rotated, so it's full screen, but you have to reach over and turn the monitor to make the game screen upright?

In other words, how do you run your cabinet? Do you start AdvanceMenu and flip the front end to whatever orientation the monitor is in, then leave it that way until you select a game that comes up sideways - thus causing you to rotate the monitor, or do you set the monitor and front end to a specific orientation and play all of your games in that orientation? With GM on an arcade monitor, I'd think you'd do the former, but on an LCD, you might do either.

EDIT: A quick look at the AdvanceMenu documentation confirms the 'no space' limitation:
Code: [Select]
%o[R0,R90,R180,R270] Expanded as one of the R* string, depending on the current menu orientation. Note that you cannot use space in the R* string.
« Last Edit: October 05, 2016, 05:48:32 am by nexusmtz »

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #9 on: October 05, 2016, 10:25:08 am »
Wow, awesome info, thanks!

So, I kinda do both.  Sometimes I keep the monitor orientated as it is and play both horiz/vertical.  So, let's say I have it horizontal and I want to play Pac-Man.  The front end is horizontal, but I launch Pac-Man and it is not rotated, but there are bars.  I do that when I want a quick game and don't feel like taking off the glass and bezel to rotate, etc.  Most of the time though, I will have the front end already rotated in the orientation I would like the game.  So the frontend would be vertical, and I would launch pac-man and need it rotated 90CCW.

Hopefully that makes sense.
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:April 22, 2024, 03:17:30 am
  • retro maniac
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #10 on: October 05, 2016, 11:27:12 am »
Ok, now I understand how Your setup works :)

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #11 on: October 05, 2016, 12:00:15 pm »
Hehe, sorry for the confusion, I am currently working on automatic rotation, but what is turning out to be difficult is the bezel of all things.    :dunno

So, I'm OK with doing the latter of what I wrote (always rotate 90CCW if a vertical game) until there's either a fix for AdvMenu or I fix it myself. 

How do I accomplish that?  It sounds like this can be done without passing arguments, but I removed the command line arguments and with my monitor oriented horizontally and selecting a vertical game, the game is not rotated.  I also tried tweaking the values in CORE ORIENTATION and none seemed to have any effect.

Maybe it's time to find a new front end.   :)

thanks again guys
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

m.andrade1

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 124
  • Last login:April 06, 2023, 09:56:51 am
  • I want to build my own arcade controls!
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #12 on: October 05, 2016, 12:39:30 pm »
Hello Telengard
I´m using a front end exact like yours, ADVmenu+ and Groovymame 32bit win 0.169b, i hade a few issues too on the begining of the configuration after a few tries, i found the perfect setup.

On the Advmenu:
display_orientation flip_xy mirror_y
preview expand 1.15 
You can also use "zero" from you Numeric Pad keyboard to rotate the orientation

Press "TAB" to change the style of the menu, until you found a good one for you


On the Mame.ini

#
# CORE ROTATION OPTIONS
#
rotate                    0         

#
# CORE SWITCHRES OPTIONS
#
orientation               vertical

#
# CORE ROTATION OPTIONS
#
flipx                     1         
flipy                     1         

Hope you enjoy it !
Thanks
Marcos

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #13 on: October 06, 2016, 01:54:07 am »
So, I'm OK with doing the latter of what I wrote (always rotate 90CCW if a vertical game) until there's either a fix for AdvMenu or I fix it myself. 
That's:
rotate 1
orientation rotate_l

Make sure that you remove any config files in which you might have set the rotation from the video on-screen menu.

EDIT: Instead of reading the rest of this reply, see a few posts down for a native method of dealing with the 'no space' limitation.



A workaround for your 'no space' issue would be create a batch file in your mame directory containing the following commands and tell AdvanceMenu to run that instead of the exe

Code: [Select]
@echo off
pushd "%~f0\.."
if not "%2"=="" set parm2=%2
if not "%2"=="" set parm2=%parm2:_= %
mame64.exe %1 %parm2% %3 %4 %5 %6 %7 %8 %9
Use mame.exe in place of mame64.exe in the batch file if that's what you're using.

That code takes the second parameter passed to mame (the first parameter is the game name) and replaces any underscores with spaces. Then you could specify your parameter as %o[-or_horizontal,-or_vertical,-or_horizontal_-flipx_-flipy,-or_vertical_-flipx_-flipy]

What you're not going to be able to do easily is 'sometimes this, and sometimes that.' If you can't define the rule that you want the computer to follow, it will probably do a poor job of guessing what you want :)
« Last Edit: October 08, 2016, 02:31:57 am by nexusmtz »

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #14 on: October 06, 2016, 09:41:47 am »
Wow, thanks so much!

@m.andrade1, glad to see someone else is running this config.  I have most of what you mentioned setup, for instance rotating advmenu with a button.  Been using advmenu for so long, I don't want to switch.   :)

@nexusmtz, GREAT idea about the batch file doing a substitution on the underscore to space, been so long since I've done that it didn't even occur to me.  I think this can get me where I want because it is just advmenu's parsing that's the issue.

Will do this tonight and report back!
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

m.andrade1

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 124
  • Last login:April 06, 2023, 09:56:51 am
  • I want to build my own arcade controls!
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #15 on: October 06, 2016, 01:11:58 pm »
Hello telengard
Me too, i have using advmenu for almost 10years oh the horizontal machine, dont want to get rid of it, i tested almost every single front end that exist but for an arcade gab there´s no other simple and pratical as advmenu, now i´m testing the advmenu+, it works good with more than one system on the gab (ex: genesis, snes,  ps1, etc).
Another hint, i always had 1 cab for both horizontal and vertical games, let me tell you, if you want to have the true arcade experience you got to have 2 cabs. One dedicaded to horizontal and another for vertical.
I discovered 3 important things on this hobby for true arcade experience.
a) Have a CRT tube on the Cab
b) CRT Emudriver from our budy Calamity
c) Groovymame

Those 3 itens will lead you to the holly grow of smooth, crisp, and pcb like experience.
Let me share with you guys, my 2 babes, and again thanks Calamity for the extraordinari peace of software ! Withou him the hobby will be just a sit down in front of computer experience.













« Last Edit: October 06, 2016, 01:32:28 pm by m.andrade1 »

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #16 on: October 07, 2016, 04:57:00 pm »
@nexusmtz  thank you, thank you, THANK YOU.  That worked the first time, no need to tweak or anything.  Things are now working exactly as they were before, so I'm happy!  Was not looking forward to compiling advmenu, I did it in the past and it's a real pain setting up the cross compilation stuff, compiling SDL, etc.

@m.andrade1 those are some nice cabs!  I feel the exact same way and probably take it a little too far on the authenticity.  Mine has a rotating monitor, swappable modules, all kinds of stuff.  I like playing with the original controls and layout for each game.   I'm adding new things all the time.  As of late a q-bert knocker and a paperboy yoke (which is ALMOST done).  My cab web site is in my signature.
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #17 on: October 07, 2016, 10:03:06 pm »
Glad you're back in business. I agree that compiling can be a pain.

I took a look at the code anyway and determined that the likely reason it wasn't fixed is that in addition to splitting the arguments by space and tab, the argument processing assumes that whatever you're adding to the command line in place of the %o placeholder is a single argument. So even though a one-character hex edit to the exe let it parse the option with spaces in it, the command it built added quotes to keep the result together. In other words, I ended up with mame64.exe dkong "-or vertical".

That's not wrong, but it's not what we needed either. Sometimes a little smarts in a program is worse than none at all. At least with no smarts, it wouldn't have quoted the string.

Eh, back to playing!

« Last Edit: October 08, 2016, 12:15:18 am by nexusmtz »

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #18 on: October 08, 2016, 02:17:04 am »
Well, I did some more reading through the AdvanceMenu code and docs, and now I understand why none of what we tried was working.

The program wants all of the arguments that you're passing to MAME to be specified as one parameter on the emulator line in the config file. If you specify more than one parameter after the executable on the config line, you get an Invalid Argument error.

If you want to pass more than one switch or option to MAME, you have to put the config line parameter in quotes, because you'll have a space between the options, and without the quotes, AdvanceMenu sees it as two parameters. (The examples have quotes even if they only pass one option, but they don't appear to be necessary in that case.)

Since the program splits out the single parameter by spaces (or tabs) into "tokens" (arguments to be passed to MAME), and then does substitution on the %o[] tokens, no %o token could have a space in it without confusing either of the previous steps.

Fortunately, any number of tokens within the config line parameter can be %o tokens. That means that although you can't tell a single %o to create "-or vertical", you could either put the -or before the %o, or specify the -or as one %o and the desired orientation as another, e.g. %o[-or,-or,,] %o[horizontal,vertical,,]

This still has the limitation of not allowing quoted parameters like -view "Cocktail Artwork", but it's mostly workable.

So, with all that in mind, I wanted to see if I could find a solution for sometimes wanting to rotate the monitor and sometimes not. This is what I came up with:

You create two emulator entries pointing to the same executable in advmenu.rc. The first follows whatever orientation AdvanceMenu is in, and the second lets the game determine the orientation. You can flip between the two emulators/lists using F6, or whatever key you assign that function to.

Here are the entries on my test setup:
Code: [Select]
emulator "GMAME Follow Me" mame H:\games\gmame_0178_x64_a2\mame64.exe "-or %o[horizontal,vertical,horizontal,vertical] %o[,,-flipx,-flipx] %o[,,-flipy,-flipy]"
emulator "GMAME The Game is Boss" mame H:\games\gmame_0178_x64_a2\mame64.exe "-or rotate_l"
(rotate_l might need to be rotate_r on your setup)

I hope that gives you the flexibility you were looking for. One downside I noticed is that the program has to scan the game list twice, so it takes longer for the menu to appear when you start up. Also, you might see each game in the list twice until the first time you press F6 (because both emulator entries would be enabled by default.)

telengard

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 773
  • Last login:April 11, 2024, 10:49:33 am
  • Yeah, it's a classic! 21+ on BYOAC and still goin
    • S T U R C A D E
Re: Issue when using -rol or -ror w/ SwitchRes v0.016_alpha2
« Reply #19 on: October 10, 2016, 12:12:06 pm »
Nice investigative work there!  I do think I'm going to stick with your solution since it is working perfectly.  I also have a few emulators already and given how many types I use (for orientation and controls used), having 2 sets would put me over 100 different screens to go through to find what I'm looking for!

thanks again for your help!
S T U R C A D E     M.A.M.E. Cabinet
http://www.briansturk.com/mame.html