Some questions; DOS Window, Btn mapping, and game scaling

Hello, I have a few questions, I didn’t want to create a thread for each one, so I focus in one single place.

  1. Is it possible to disable RetroArch dos window from the command line options? I didn’t see anything. Or maybe hide it from outside by other means. (reason is I’m using a frontend for retroarch)

  2. I had an issue remapping joystick buttons. For example in any program I use, the right stick push button is Joy10, but in RetroArch Joy10 seems to be the Xbox guide button. How do I know what buttons are what in RetroArch.

  3. Another question does resolution of games in full screen change the screen resolution, or are only scaled to screen resolution? I need to know this to avoid multiple re-scaling which can damage scanlines, pixels and other effects. My TV is HD Ready, meaning 1366x768, the screen resolution doesn’t comply and must be set to 720p and then re-scaled (by TV) to fix the overscan. In that instance the game would be scaling 2 times right? on GPU to screen resolution, and on TV to fix overscan?

1.) currently no. This is going to be corrected soon, though, as Windows is going to get some platform-specific love instead of just being a path-of-least-resistance-from-linux port.

2.) Your best bet is to map from within RGUI, rather than playing a guessing game with the cfg file(s).

3.) Scales to screen resolution, AFAIK.

Thanks for the help.

  1. RGUI key mapping is a bit hard to follow. Do I need to map all keys? For example for Game Boy I only need to remap 2 buttons… Also is it really a key mapping or a remapping (remap from cfg file)?

  2. I would like to know also what of the cores are cycle-accurate, I know bsnes and gambatte are, any else? Just trying to figure out what cores to use.

If your frontend has a “hidden” launch option it might hide that window. HyperSpin can do this with the WinState option HIDDEN.

OK, I barely use HyperLaunchHQ because it requires NET 4.0, but if it can be modified on file (.ini, .xml) I can look for it.

edit2: You mean the ini per system inside HyperSpin/Settings righ? for example “Super Nintendo Entertainment System.ini”? Sorry if this got a bit OT.

WinState is already hidden there and I still see it.

[exe info]
path=..\HyperSpin\Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack\
rompath=..\ROMS\Super Nintendo Entertainment System\
winstate=HIDDEN

It should be wise to know what they do (hide Dos Window through AHK maybe?)

2.) RetroArch works on the idea of an abstracted “RetroPad” that looks/acts essentially like a dual shock 2 (that is, dpad, 2 analogs with a click button on each, 4 face buttons, 4 shoulder buttons and start/select), though the face-button naming is based on SNES layout (B, A, Y, X). Each core gets its input mapped onto this retropad in a physically similar manner so there’s a sane universal mapping. So, you map all of the buttons once and if a system only needs, say, B and A (NES and Gameboy come to mind), those will be the buttons that have function and the others (X and Y and the shoulder buttons) will have no function.

Make sense?

4.) Nestopia is the only other cycle-accurate core I know of (maybe bNES, as well?), but it’s worth noting that cycle accuracy is sort of a buzzword that doesn’t mean much, since there’s a lot that goes into emulation accuracy other than timing of components. Higan’s GBA core is a good example insofar as it has the most accurate timing (cycle accurate? I’m not sure either way) of any current GBA emus, but many games have problems and/or can’t even boot with it.

  1. I realised that RetroArch tries to do the good thing, mapping each system button physically to where it should go in your pad. The problem is sometimes like with Game Boy, it’s only Y and B, which for me is too far to reach, and would like to move to X and A (360 PAD).

  2. Having a powerful system I think it’s wise to move to more accurate emulators. I have read many posts, with flaming, etc about this matter. As I understand it, it’s basically doing the emulation the “dumb way”, by brute force, because current powerful systems allow it. I don’t think that, the concept of it is bad at all, of course there are issues with incompatibilities that can make you decide whether to use them or not. I didn’t see Higan as a core, at least for version 1.0.0.0. I tested CEN64 (stand alone) and didn’t like it, so it’s not a no-brainer decision, just something useful to know.

edit: 3) I found a useful post for my third question here. Using the undocumented setting “video_windowed_fullscreen = false” and the full screen resolution sizes will force the video card to change screen resolution, and hopefully preventing re-scales and non pixel perfect ratios.

Higan is the name for byuu’s suite of emulators. The SNES emulator itself is still called bsnes, and that’s what we have.

As for accuracy, in general, yeah, you may as well go as accurate as your system will allow. For that reason, a lot of systems emulated by RetroArch will come in a more accurate flavor (bsnes, nestopia, genplusgx) and a faster flavor (snes9x, fceumm, picodrive) so you can choose what’s most appropriate for your use-case.

Yes, you can just have that in the ini and it should hide the command window, but you probably have to have HyperLaunch disabled there too. With RetroArch you don’t need to use HyperLaunch since RA supports simple command-line launching that HyperSpin can handle by itself. It’s easy to add parameters to your ini files as well if you want to load a specific RA cfg file for custom controls per system. Or even per game if you add an tag in your HS xml to load a specific settings ini (which in turn you point to a specific RA cfg file).

Here’s an example of what part of the ini I did for Nintendo DS to launch into the Desmume core looks like:

[exe info]
path=..\Emulators\RetroArch\
rompath=..\..\Roms\Nintendo DS\
userompath=true
exe=retroarch.exe
romextension=zip
parameters=-c Config\NDS.cfg
searchsubfolders=true
pcgame=false
winstate=HIDDEN
hyperlaunch=false

The NDS.cfg file I load tells RA what core to load, the controls for that system, the specific Nintendo DS folders to save states and battery saves to to keep every system organized, ect.

And for a game specific situation, say swapping the jump and attack buttons in the two Kirby platformers on the system (because they are opposite what you would expect and you can’t remap them in game), I create a HS ini called Nintendo DS-Kirby.ini that looks like this:

[exe info]
path=..\Emulators\RetroArch\
rompath=..\..\Roms\Nintendo DS\
userompath=true
exe=retroarch.exe
romextension=zip
parameters=-c Config\NDS.cfg --appendconfig Config\NDS-Kirby.cfg
searchsubfolders=true
pcgame=false
winstate=HIDDEN
hyperlaunch=false

Then add <exe>Nintendo DS-Kirby</exe> in one of the lines between <game></game> in your Nintendo DS.xml file for each game you want to use that settings ini. That ini loads the NDS.cfg as the base with an extra NDS-Kirby.cfg that has just the button changes in it as an appended config. Anything you add to the appended config overrides stuff in the base config. It makes things easier if you want to change things in your base configs later.

Superb help there, let me digest it all!

I still would like to know either a tutorial for key remapping in retroarch (the RGUI way) or how the 360 Pad buttons are interpreted on RA, so I know how to edit my cfg files. I know, I can do it the hard way, remap all my joystick buttons in order, read the created cfg file, and take that as reference, but this thing needs more documentation.

edit: @Awakaned, it’s impossible to me to set relative paths without using HyperLaunch. I don’t know how you do it.

For an xinput controller in the default positional layout it should look like:

input_autodetect_enable = "false"
input_player1_joypad_index = "0"
input_player1_a_axis = "nul"
input_player1_a_btn = "1"
input_player1_a = "c"
input_player1_b_axis = "nul"
input_player1_b_btn = "0"
input_player1_b = "z"
input_player1_y_axis = "nul"
input_player1_y_btn = "2"
input_player1_y = "x"
input_player1_x_axis = "nul"
input_player1_x_btn = "3"
input_player1_x = "v"
input_player1_select_axis = "nul"
input_player1_select_btn = "7"
input_player1_select = "b"
input_player1_start_axis = "nul"
input_player1_start_btn = "6"
input_player1_start = "enter"
input_player1_l_axis = "nul"
input_player1_l_btn = "4"
input_player1_l = "a"
input_player1_r_axis = "nul"
input_player1_r_btn = "5"
input_player1_r = "s"
input_player1_l2_axis = "+4"
input_player1_l2_btn = "nul"
input_player1_l2 = "q"
input_player1_r2_axis = "+5"
input_player1_r2_btn = "nul"
input_player1_r2 = "w"
input_player1_left_axis = "nul"
input_player1_left_btn = "h0left"
input_player1_left = "left"
input_player1_right_axis = "nul"
input_player1_right_btn = "h0right"
input_player1_right = "right"
input_player1_up_axis = "nul"
input_player1_up_btn = "h0up"
input_player1_up = "up"
input_player1_down_axis = "nul"
input_player1_down_btn = "h0down"
input_player1_down = "down"
input_player1_l3_axis = "nul"
input_player1_l3_btn = "8"
input_player1_l3 = "nul"
input_player1_r3_axis = "nul"
input_player1_r3_btn = "9"
input_player1_r3 = "nul"
input_player1_l_x_plus = "nul"
input_player1_l_x_plus_btn = "nul"
input_player1_l_x_plus_axis = "+0"
input_player1_l_x_minus = "nul"
input_player1_l_x_minus_btn = "nul"
input_player1_l_x_minus_axis = "-0"
input_player1_l_y_plus = "nul"
input_player1_l_y_plus_btn = "nul"
input_player1_l_y_plus_axis = "-1"
input_player1_l_y_minus = "nul"
input_player1_l_y_minus_btn = "nul"
input_player1_l_y_minus_axis = "+1"
input_player1_r_x_plus = "nul"
input_player1_r_x_plus_btn = "nul"
input_player1_r_x_plus_axis = "+2"
input_player1_r_x_minus = "nul"
input_player1_r_x_minus_btn = "nul"
input_player1_r_x_minus_axis = "-2"
input_player1_r_y_plus = "nul"
input_player1_r_y_plus_btn = "nul"
input_player1_r_y_plus_axis = "-3"
input_player1_r_y_minus = "nul"
input_player1_r_y_minus_btn = "nul"
input_player1_r_y_minus_axis = "+3"
input_exit_emulator_btn = "10"

That maps everything on a 360 style pad to a PSX dualshock, plus using the home button to exit back to HyperSpin. And the first line turns off controller autodetect so you can make changes. You can remove inputs from the config if they don’t exist on the system you’re emulating to simplify the config file. It’s pretty easy to figure out how Nintendo systems are mapped since the letters match up. PSX is pretty easy too if you look at pictures of each and match them up positionally. Sega systems are a bit weird though:

input_player1_a_btn is Sega pad C input_player1_b_btn is B input_player1_y_btn is A input_player1_l is X input_player1_x is Y input_player1_r is Z

It’s a bit weird, but when not using HyperLaunch you have to add an extra …\ to your rompath. My Emulators, HyperSpin and Roms folders are all in a folder called Emulation, so it’s not like the Roms folder is any higher than Emulators, but adding that extra …\ was needed.

I didn’t understand well. …\ is going one level up from supposedly the HS folder, you would want “.\Emulators”. In any case any of the combinations I tried (mostly any combination possible) didn’t have any effect on my case, only full paths. I even tried with %CD% (HS folder is on root E: on my system).

Anyway I don’t want to hijack more this thread with that, I will try key mapping tomorrow with more time. I’m also surprised about the xbox guide button, normally is not a button that can be worked with so I was greatly surprised and mapped it also to exit the emu. The problem as I stated is that button name is not consistent. On a 360 pad using for example AHK, start is button 8, LB is 5, RB is 6, Y is 4. That has no relation with the default retroarch cfg file. I need to know what is what in order to remap it.

I remembered how the relative pathing makes sense. Your emulator path needs to be relative to HyperSpin.exe, while the rompath is relative to where your emulator .exe is (at least when hyperlaunch is disabled). So I think your paths should be:

path=.\Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack
rompath=…\ROMS\Super Nintendo Entertainment System\

This assumes your Emulators folder is in your HyperSpin folder and that your ROMS folder is one folder higher than HyperSpin (and thus three higher than where retroarch.exe is).

Yeah, I’ve yet to find a stand alone emulator that can use it. The only other things I’ve seen it work on are Steam Big Picture mode and the Games for Windows Live overlay.

Ok, I think you want something like this:

Xbox button = Number Representation in RetroArch A = 0 X = 2 B = 1 Y = 3 Back = 7 Start = 6 Home = 10 LB = 4 RB = 5 LT = +4 RT = +5 Left Stick Click = 8 Right Stick Click = 9 Dpad Up, Down, Left, Right = H0up, H0down, H0left, H0right Left Stick Up, Down, Left, Right = -1, +1, -0, +0 Right Stick Up, Down, Left, Right = -3, +3, -2, +2

Anything with a + or - is an axis instead of a button.

I finished mapping the main emulators. It’s tricky when you also don’t know what input_player1_y_btn means, for example as you stated above on Mega Drive it means physical button A. I would have expected to find the default mappings on the cfg file, so I could just write down correlations and fix, but no, they were blank. Which is something suspicious because what I originally want is to remove any trace of possible lag trigger, key mapping is fine, remapping is not. There are more things to take into account (display, etc) but that doesn’t detract from doing things right to start with.

I also made the screen change resolution tag work. I hope that overriding resolution it also overrides the overscan resizing.

You mean database Nintendo DS.xml file? What does <exe>Nintendo DS-Kirby</exe> points at? Wouldn’t it be <exe>NDS-Kirby</exe>? The good thing is that mapping to what the physical buttons were is mostly where you would want them to be. There are exception, like me with street fighter where I want the mid button on the shoulders but that’s being nitpicky, only rarely needed.

About the relative path, no luck for me. I dont understand why you put a backslash just after the equal rompath=…\ is that correct? In any case no combination worked for me. I know I’m not being of much help but, my paths are: E:\HyperSpin\ROMS E:\HyperSpin\Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack E:\HyperSpin\HyperLaunch

Ah, I see what you were asking now. You can find out which retropad buttons correspond to which physical buttons in the core’s source code, in libretro.c/pp. I know that’s not very helpful for most people, though, and we should probably try to include it in the core info files, now that they’re more usable.

It points at “Nintendo DS-Kirby.ini” in HyperSpin’s setting folder (of course you can name the ini whatever you want). Usually you’d just copy your normal “Nintendo DS.ini” and name it something specific for the game. Then you can change the config parameter inside that new ini to point to a specific RetroArch .cfg file with special settings for that game.

No, that slash at the beginning was a mistake, sorry. If both Emulators and ROMS are inside your HyperSpin folder I think it should look like: path=.\Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack
rompath=…\ROMS\Super Nintendo Entertainment System\

The first path should definitely be right and if the rompath is wrong you should get an error about it not finding the ROM file. Try adding or removing …'s until it works.

Of course you can always just use absolute paths :P. I think relative paths are really nice and make things so much easier if you move things between drives though.

@hunterk: yes I know, I don’t do any programming but I’m used to scripting and not afraid of having a look, etc. RetroArch needs a manual, guide or something similar but since you already said the Windows port will have more love from now on I’m not worried about it, also, that’s what forums are about.

@Awakened: Sorry I was a bit slow there, yes the key mapping configuration file makes all sense. No problem. I’m going to try your path suggestions, when I finish the HS project, ghalf year ahead probably, I plan to burn it all on a 50Gb bluray as backup (after so much effort that’s the least).

edit: I didn’t get any error in log, it simply doesn’t load, and then no input works on main menu (probably a conflict with a loaded AHK), alt+tab to another window, come back, and then I can exit HS. Checked the log and this is, not much help:

09:53:47 PM |  HyperSpin Started 
09:53:47 PM |  Going FullScreen 
09:53:47 PM |  Checking for updates 
09:53:47 PM |  Update Check Complete 
09:53:47 PM |  Startup program unavailable 
09:53:47 PM |  Error intializing joysticks 
09:53:47 PM |  Menu Mode is multi 
09:53:47 PM |  Loading Main Menu.xml 
09:53:47 PM |  Main Menu.xml successfully loaded 
09:53:47 PM |  Main Menu wheel loaded successfully 
09:53:56 PM |  Loading Super Nintendo Entertainment System.xml 
09:53:56 PM |  Main Menu.xml successfully loaded 
09:53:57 PM |  Super Nintendo Entertainment System wheel loaded successfully 
09:53:58 PM |  Launching Game 
09:53:58 PM |  Not using HyperLaunch
09:53:58 PM |  Running in normal rom mode 
09:53:58 PM |  Excecutable is retroarch.exe
09:53:58 PM |  Command Line is: ".\Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack\retroarch.exe" "..\..\..\ROMS\Super Nintendo Entertainment System\ActRaiser (USA).zip" -c "E:\HyperSpin\Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack\configs\Super Nintendo Entertainment System.cfg"
09:54:03 PM |  Loading Main Menu.xml 
09:54:03 PM |  Main Menu.xml successfully loaded 
09:54:04 PM |  Main Menu wheel loaded successfully 
09:54:04 PM |  Exit program unavailable 
09:54:04 PM |  Quiting Hyperspin 
09:54:04 PM |  Bye! 

If you change winstate back to normal and try launching you should get the RetroArch command window to pop up for a split second. If you hit print screen fast enough when that pops up you might have captured it and be able to paste it into an image editor to see if any clues to the problem are in that window. It’s a really dumb way to do it, but I’ve done that several times to figure out problems. There’s probably a way to get the window to stay open or to have RA dump an error log, but I’m not sure how. Adding the extra parameter --verbose makes the command window say more stuff, but still closes super fast and doesn’t produce a log file.

Made it work with this, RA gets the relative prefixes but not HyperSpin. I can’t get RetroArch log if to begin with HyperSpin can’t find it. (.\Emulators didn’t work) [exe info] path=E:\HyperSpin\Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack
rompath=…\ROMS\Super Nintendo Entertainment System\

I tried before the --verbose command to check the fullscreen mechanism, but couldn’t get it either to output anything to a file even with > log.txt

Change it to: path=Emulators\Super Nintendo Entertainment System\RetroArch-20140105-Win64-MegaPack\

I tested this myself this time (this is what I get for being lazy before :cool: ) by doing a similar directory structure to yours and removing both the beginning slash and period was key. I guess HyperSpin handles current directory different than most things.