Main > Lightguns |
Lightgun calibration issues with USB2GUN board in MAME |
<< < (4/5) > >> |
purbeast:
Yeah based on the reply in the groovyMAME forum and just from messing around with it more, I don't think it is a resolution thing. I think it is more of a 4:3 screen thing whereas the analog control is really just in a 1:1 aspect ratio, so I think there is some sort of translation MAME is doing with that to translate the 1:1 of the controller to the 4:3 aspect ratio of the screen. Again, this is all theory and I can't prove any of this, but just the way the offsets grows more and more as I get closer to the edge of the screen, that is what I am thinking is going on. And it's definitely JUST a MAME issue at this point because VCop works flawlessly. HOTD seems to work too but it is at a slight offset everywhere I aim. I think it's an in game calibration issue though. I haven't messed with the in game calibration because I can't read the menus in 320x240 so I have to figure out where to go to calibrate first. I should try and get Friction running and see how that tracks. From what I remember, it tracked flawlessly as well when I did it on my old PC as a proof of concept. |
purbeast:
I have now gotten Friction working and can confirm that tracking is flawless in that game as well, to the edges, so that makes the m2 emulator and now Friction working flawlessly, so I think it's safe to say for sure that the problem is with MAME specifically. I haven't been messing with it the past few days as this Friction issue was bothering me but now that I got it figured out I am going to try to see if I can figure anything out with it. |
purbeast:
I also got Silent Hill working tonight and tracking works perfectly fine in that as well, so yeah, definitely a MAME issue. I was playing around with it a bit earlier and just not having any luck with anything. I did notice something I thought was a little strange. I started MAME with verbose mode on and spit it out to a log file, and I noticed 2 things. 1. I noticed next to the 320x240 resolution it finds in SwitchRes it shows an asterisk next to it like * and I don't really know why. I'm not sure if that is because I manually added it to the ini file manually when I ran vmmaker because I want my desktop running at the resolution, or some other reason. 2. This was the one I thought was more strange. When it shows Switchres setting MAME settings, it was setting the flag -nounevenstretch and -nokeepaspect. However, my MAME.ini definitely had keepaspect and unevenstretch set to 1, almost like it was completely ignoring my MAME.ini settings. Perhaps there are other settings it is ignoring? But where would it be getting those values from then? I then tried running it from the commandline passing in the -keepaspect and -unevenstretch flags, and this time in the log file I saw that it indeed did show those 2 flags. So from the commandline it used them, but when set in MAME.ini, switchres seemed to not pick it up for some reason. So yeah, that was the 2 strange things I noticed. I also came across this post googling and this explanation basically says that MAME is at fault for the way it's handling it: https://github.com/libretro/flycast/issues/1175#issuecomment-1823196491 That sounds a lot like what is going on with my instance as well, but I'm not using gun4ir or anything. I tried turning off the mouse completely and only have joystick set to 1 in mame.ini, then every control style is set to keyboard except i have lightgun and positional_device set to joystick. I still just saw absolutely no changes at all unfortunately. |
PL1:
--- Quote from: purbeast on March 16, 2025, 10:00:42 pm ---When it shows Switchres setting MAME settings, it was setting the flag -nounevenstretch and -nokeepaspect. However, my MAME.ini definitely had keepaspect and unevenstretch set to 1, almost like it was completely ignoring my MAME.ini settings. Perhaps there are other settings it is ignoring? But where would it be getting those values from then? I then tried running it from the commandline passing in the -keepaspect and -unevenstretch flags, and this time in the log file I saw that it indeed did show those 2 flags. So from the commandline it used them, but when set in MAME.ini, switchres seemed to not pick it up for some reason. --- End quote --- Either one of the later-loading .ini files is overriding mame.ini (#3-9) or you might have a second mame.ini that MAME is using. (#2) When you run a game from command line, the command line settings override all of the .ini files, including the possible second mame.ini. (# 1) MAME manual Chapter 7, page 149. https://docs.mamedev.org/_files/MAME.pdf --- Quote ---Order of Config Loading 1. The command line is parsed first, and any settings passed that way will take precedence over anything in an INI file. 2. mame.ini (or other platform INI; e.g. mess.ini) is parsed twice. The first pass may change various path settings, so the second pass is done to see if there is a valid configuration file at that new location (and if so, change settings using that file). 3. debug.ini if the debugger is enabled. This is an advanced config file, most people won't need to use it or be concerned by it. 4. Screen orientation INI file (either horizont.ini or vertical.ini). For example Pac-Man has a vertical screen, so it loads vertical.ini, while Street Fighter Alpha uses a horizontal screen, so it loads horizont.ini. Systems with no monitors, multiple monitors with different orientations, or monitors connected to slot devices will usually load horizont.ini. 5. Monitor type INI file (vector.ini for vector monitors, raster.ini for CRT raster monitors, or lcd.ini for LCD/EL/plasma matrix monitors). Pac-Man and Street Fighter Alpha use raster CRTs, so raster.ini is loaded here, while Tempest uses a vector monitor, so vector.ini is loaded here. For systems that have multiple monitor types, such as House Mannequin with its CRT raster monitor and dual LCD matrix monitors, the INI file relevant to the first monitor is used (raster.ini in this case). Systems without monitors or with other kinds of monitors will not load an INI file for this step. 6. Driver source file INI file. MAME will attempt to load source/<sourcefile>.ini where <sourcefile> is the base name of the source code file where the system driver is defined. A system's source file can be found using mame -listsource <pattern> at the command line. For instance, Banpresto's Sailor Moon, Atlus's Dodonpachi, and Nihon System's Dangun Feveron all run on similar hardware and are defined in the cave.cpp source file, so they will all load source/cave.ini at this step. 7. BIOS set INI file (if applicable). For example The Last Soldier uses the Neo-Geo MVS BIOS, so it will load neogeo.ini. Systems that don't use a BIOS set won't load an INI file for this step. 8. Parent system INI file. For example The Last Soldier is a clone of The Last Blade / Bakumatsu Roman - Gekka no Kenshi, so it will load lastblad.ini. Parent systems will not load an INI file for this step. 9. System INI file. Using the previous example, The Last Soldier will load lastsold.ini --- End quote --- Scott |
purbeast:
I just had a chance to go through and look for other ini files, and there are none in the MAME directory, so I have no clue why it is setting those flags even though in my MAME.ini I have it set to 1. I do notice that it ONLY shows those settings being set to -nokeepaspect and -nounevenstretch when switchres actually changes resolutions. Could that maybe have something to do with it? Like if I run MAME from command line with -v on my HD monitor and switchres never changes anything, it doesn't show that. But when I run it the same way on my 320x240 CGA monitor and see switchres changing to a super res, that is when I see it show up (with a handful of other options). |
Navigation |
Message Index |
Next page |
Previous page |