Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

"Arcade friendly" Sega Model 3 Lightgun ID Changer


thurmansevolution

Recommended Posts

Hello GameEx family! :-)

I figured out and built a little something in AHK that might be of some help.

The problem - Sega Model 3 change Lightgun IDs after reboot, which causes the lightguns to not function or function incorrectly when trying to play The Lost World. This poses a problem if you are using dual lightguns.

The solution - If you are tired of having to open the supermodel.ini file and have to plug in numbers...or (like me), if you have an arcade setup and want to change the IDs without opening the INI file, this is for you. :-).

Due to the Labor Day holiday, I'm away from my cab and scripts at the moment. Tomorrow evening, I will edit this post and will go in depth on a tutorial to solve this issue. For now, here is a short video with the script in action...and I apologize before ya watch it - I tend to get a little nervous in front of cameras lol.

http://youtu.be/61350i0Typ4

Oh, and this script is just the first step...hopefully I will have it automatically change to the correct IDs without having a UI :-).

--------

Now for the goodies! :)

Prerequisites:

- AutoHotKey: http://ahkscript.org/

- A little "know how" on writing scripts

- A working Sega Model 3 emulator with all settings configured

Recommended:

ControllerRemap, which can be found here: http://forum.arcadecontrols.com/index.php?topic=108767.0

The basic idea for this is writing a small UI to easily change Lightgun IDs with Sega Model 3 really easily. I'm taking the script's code directly from what I've written, so please use this only as an example and a guide. Everything about this is completely customizable - you can add or take away anything you would feel comfortable with. (e.g. If you would like to add in drop down boxes that you can select different controllers, etc).

I'm going to break this down in sections :)

AND PLEASE NOTE THAT IT IS IMPORTANT THAT YOU CHANGE THE PATHS IN THIS SCRIPT TO WHERE EVER YOUR SUPERMODEL EMU FOLDER IS LOCATED, AND CREATE A NEW FOLDER INSIDE THE ROOT OF THE SUPERMODEL FOLDER FOR BACKING UP YOUR PREVIOUS INI FILE (THIS WILL BE EXPLAINED LATER).

First and foremost, here is the entire script:

;;;;;;;;;THE USER INTERFACE;;;;;;;;;;Gui, Show, w400 h200, Sega Supermodel Lightgun Switch IDsGui, Add, Text, x100 y50 cred, Player #1 IDGUI, Add, DropDownList, x75 y75 voneplayer, ID 1||ID 2|ID 3|ID 4Gui, Add, Text, x250 y50 cblue, Player #2 IDGui, Add, DropDownList, x225 y75 vtwoplayer, ID 1||ID 2||ID 3||ID 4Gui, Add, Button, x300 y150 w50 h25 gok, OK!;;;;;;;;;CUSTOMIZE THE CONTROLS TO YOUR LIKING FOR ARCADE JOYSTICK AND PUSHBUTTON USE;;;;;;;;;;;;;;;;9::Send {ENTER}0::Send {TAB}returnok:Gui, Submit, NoHide;;;;;;;;CHANGES VARIABLE INTO USEFUL IDs FOR SUPERMODEL.INI USE;;;;;;;{If oneplayer = ID 1     oneplayer := 1}{If oneplayer = ID 2     oneplayer := 2}{If oneplayer = ID 3     oneplayer := 3}{If oneplayer = ID 4     oneplayer := 4}{If twoplayer = ID 1     twoplayer := 1}{If twoplayer = ID 2     twoplayer := 2}{If twoplayer = ID 3     twoplayer := 3}{If twoplayer = ID 4     twoplayer := 4};;;;;;;;;BACKS UP OLD SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileMove, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.ini, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Old Config Backup, 1;;;;;;;;;CREATES NEW SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileAppend, (;;`n;; Supermodel Configuration File`n;; Default settings for Version 0.2a.`n;;`n `n`n;`n; Quick Overview`n; --------------`n;`n; All settings are case sensitive. Numbers must be unsigned, base 10 integers.`n; Check your spelling carefully because invalid settings are silently ignored.`n; To verify that your settings are being parsed correctly, check the contents`n; of error.log.`n;`n; Global options apply to all games. To create configuration profiles for`n; individual games, place settings under sections with the same name as the `n; corresponding MAME ROM set, like so:`n;`n;       ; Scud Race`n;       [ scud ]`n;`n;       SoundVolume = 50`n;       MusicVolume = 200`n;       ; ... etc. ...`n;`n; Input mappings are an exceptional case: they are only allowed in the global`n; section. Per-game input mappings are not supported.`n;`n; For a list of all valid settings, please consult README.txt. Only default`n; inputs are assigned here.`n;`n`n`n[ Global ]  ; Input settings can only be read from the global section!`n`n; Common `nInputStart1 = "KEY_1"`nInputStart2 = "KEY_2"`nInputCoin1 = "KEY_5"`nInputCoin2 = "KEY_6"`nInputServiceA = "KEY_HOME"`nInputServiceB = "KEY_END"`nInputTestA = "KEY_F2"`nInputTestB = "KEY_8"`n`n; 4-way digital joysticks`nInputJoyUp = "KEY_UP"`nInputJoyDown = "KEY_DOWN"`nInputJoyLeft = "KEY_LEFT"`nInputJoyRight = "KEY_RIGHT"`nInputJoyUp2 = "KEY_r"`nInputJoyDown2 = "Key_y"`nInputJoyLeft2 = "KEY_t"`nInputJoyRight2 = "KEY_u"`n`n; Fighting game buttons`nInputPunch = "KEY_9"`nInputKick = "KEY_0"`nInputGuard = "KEY_MINUS"`nInputEscape = "KEY_EQUALS"`nInputPunch2 = "KEY_i"`nInputKick2 = "KEY_o"`nInputGuard2 = "KEY_p"`nInputEscape2 = "KEY_["`n`n; Spikeout buttons`nInputShift = "KEY_9"`nInputBeat = "KEY_0"`nInputCharge = "KEY_MINUS"`nInputJump = "KEY_EQUALS"`n`n; Virtua Striker buttons`nInputShortPass = "KEY_9"`nInputLongPass = "KEY_0"`nInputShoot = "KEY_MINUS"`nInputShortPass2 = "KEY_i"`nInputLongPass2 = "KEY_o"`nInputShoot2 = "KEY_p"`n`n; Steering wheel`nInputSteeringLeft = "KEY_LEFT"      ; digital, turn wheel left`nInputSteeringRight = "KEY_RIGHT"    ; digital, turn wheel right`nInputSteering = "JOY1_XAXIS"        ; analog, full steering range`n`n; Pedals`nInputAccelerator = "KEY_UP,JOY1_YAxis_NEG"`nInputBrake = "KEY_DOWN,JOY1_RZAxis_NEG"`n`n; Manual transmission`nInputGearShift1 = "JOY1_BUTTON9"`nInputGearShift2 = "JOY1_BUTTON10"`nInputGearShift3 = "JOY1_BUTTON11"`nInputGearShift4 = "JOY1_BUTTON12"`nInputGearShiftN = "KEY_T"`nInputGearShiftUp = "JOY1_BUTTON13"           ; sequential shift up`nInputGearShiftDown = "JOY1_BUTTON14"         ; sequential shift down`n`n; View buttons`nInputVR1 = "KEY_o"`nInputVR2 = "KEY_c"`nInputVR3 = "KEY_k"`nInputVR4 = "KEY_j"`n`n; Miscellaneous driving game buttons: Sega Rally 2, Dirt Devils, Emergency Car`n; Ambulance`nInputViewChange = "KEY_A,JOY1_BUTTON1"`nInputHandBrake = "KEY_S,JOY1_BUTTON2"   ; Sega Rally 2 only`n`n; Virtual On macros`nInputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"`nInputTwinJoyTurnRight = "KEY_W,JOY1_RXAXIS_POS"`nInputTwinJoyForward = "KEY_UP,JOY1_YAXIS_NEG"`nInputTwinJoyReverse = "KEY_DOWN,JOY1_YAXIS_POS"`nInputTwinJoyStrafeLeft = "KEY_LEFT,JOY1_XAXIS_NEG"`nInputTwinJoyStrafeRight = "KEY_RIGHT,JOY1_XAXIS_POS"`nInputTwinJoyJump = "KEY_E,JOY1_BUTTON1"`nInputTwinJoyCrouch = "KEY_R,JOY1_BUTTON2"`n`n; Virtual On individual joystick mapping`nInputTwinJoyLeft1 = "NONE"`nInputTwinJoyLeft2 = "NONE"`nInputTwinJoyRight1 = "NONE"`nInputTwinJoyRight2 = "NONE"`nInputTwinJoyUp1 = "NONE"`nInputTwinJoyUp2 = "NONE"`nInputTwinJoyDown1 = "NONE"`nInputTwinJoyDown2 = "NONE"`n`n; Virtual On buttons`nInputTwinJoyShot1 = "KEY_A,JOY1_BUTTON5"`nInputTwinJoyShot2 = "KEY_S,JOY1_BUTTON6"`nInputTwinJoyTurbo1 = "KEY_Z,JOY1_BUTTON7"`nInputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"`n`n; Analog joystick (e.g. Star Wars Trilogy)`nInputAnalogJoyLeft = "KEY_LEFT"             ; digital, move left`nInputAnalogJoyRight = "KEY_RIGHT"           ; digital, move right`nInputAnalogJoyUp = "KEY_UP"                 ; digital, move up`nInputAnalogJoyDown = "KEY_DOWN"             ; digital, move down`nInputAnalogJoyX = "JOY_XAXIS,MOUSE_XAXIS"   ; analog, full X axis`nInputAnalogJoyY = "JOY_YAXIS,MOUSE_YAXIS"   ; analog, full Y axis`nInputAnalogJoyTrigger = "KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON"`nInputAnalogJoyEvent = "KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON"`n`n; Light guns`nInputGunLeft = "KEY_LEFT"               ; digital, move gun left`nInputGunRight = "KEY_RIGHT"             ; digital, move gun right`nInputGunUp = "KEY_UP"                   ; digital, move gun up`nInputGunDown = "KEY_DOWN"               ; digital, move gun down`nInputGunX = "MOUSE%oneplayer%_XAXIS"    ; analog, full X axis`nInputGunY = "MOUSE%oneplayer%_YAXIS"    ; analog, full Y axis`nInputTrigger = "MOUSE%oneplayer%_LEFT_BUTTON"`nInputOffscreen = "MOUSE%oneplayer%_RIGHT_BUTTON"    ; point off-screen`nInputAutoTrigger = 1                    ; automatic reload when off-screen`nInputGunLeft2 = "NONE"`nInputGunRight2 = "NONE"`nInputGunUp2 = "NONE"`nInputGunDown2 = "NONE"`nInputGunX2 = "MOUSE%twoplayer%_XAXIS"`nInputGunY2 = "MOUSE%twoplayer%_YAXIS"`nInputTrigger2 = "MOUSE%twoplayer%_LEFT_BUTTON"`nInputOffscreen2 = "MOUSE%twoplayer%_RIGHT_BUTTON"`nInputAutoTrigger2 = 1`n`nForceFeedback = 0`nDirectInputConstForceMax = 40`nDirectInputSelfCenterMax = 100`nDirectInputFrictionMax = 100`nDirectInputVibrateMax = 100`nXInputConstForceThreshold=100`nXInputConstForceMax=70`nXInputVibrateMax100), H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.iniGuiClose:ExitAppreturn

Part I:

;;;;;;;;;THE USER INTERFACE;;;;;;;;;;Gui, Show, w400 h200, Sega Supermodel Lightgun Switch IDsGui, Add, Text, x100 y50 cred, Player #1 IDGUI, Add, DropDownList, x75 y75 voneplayer, ID 1||ID 2|ID 3|ID 4Gui, Add, Text, x250 y50 cblue, Player #2 IDGui, Add, DropDownList, x225 y75 vtwoplayer, ID 1||ID 2||ID 3||ID 4Gui, Add, Button, x300 y150 w50 h25 gok, OK!

This one is pretty much self-explaintory. This adds a basic User Interface with two drop down boxes (containing IDs 1-4), sets their variables as %voneplayer% and %vtwoplayer%, and adds an "OK" button (as a launch).

Part II:

;;;;;;;;;CUSTOMIZE THE CONTROLS TO YOUR LIKING FOR ARCADE JOYSTICK AND PUSHBUTTON USE;;;;;;;;;;;;;;;;9::Send {ENTER}0::Send {TAB}return

In this part, you can remap your keys, while the script is running, to your joysticks and pushbuttons - so that you won't have to drag your keyboard out and you can use your control panel to navigate through the UI.

Part III:

ok:Gui, Submit, NoHide;;;;;;;;CHANGES VARIABLE INTO USEFUL IDs FOR SUPERMODEL.INI USE;;;;;;;{If oneplayer = ID 1     oneplayer := 1}{If oneplayer = ID 2     oneplayer := 2}{If oneplayer = ID 3     oneplayer := 3}{If oneplayer = ID 4     oneplayer := 4}{If twoplayer = ID 1     twoplayer := 1}{If twoplayer = ID 2     twoplayer := 2}{If twoplayer = ID 3     twoplayer := 3}{If twoplayer = ID 4     twoplayer := 4}

In this part, the variables "brought" into the "action" (I guess you would call it that lol) and are changed from "ID#" to just a "#"

Part IV:

;;;;;;;;;BACKS UP OLD SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileMove, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.ini, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Old Config Backup, 1

In this part, the old supermodel.ini file is backed up to a backup folder (and overwrites the previous supermodel.ini file). This is useful just in case something goes array.

Part V: (The Rest)

;;;;;;;;;CREATES NEW SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileAppend, (;;`n;; Supermodel Configuration File`n;; Default settings for Version 0.2a.`n;;`n `n`n;`n; Quick Overview`n; --------------`n;`n; All settings are case sensitive. Numbers must be unsigned, base 10 integers.`n; Check your spelling carefully because invalid settings are silently ignored.`n; To verify that your settings are being parsed correctly, check the contents`n; of error.log.`n;`n; Global options apply to all games. To create configuration profiles for`n; individual games, place settings under sections with the same name as the `n; corresponding MAME ROM set, like so:`n;`n;       ; Scud Race`n;       [ scud ]`n;`n;       SoundVolume = 50`n;       MusicVolume = 200`n;       ; ... etc. ...`n;`n; Input mappings are an exceptional case: they are only allowed in the global`n; section. Per-game input mappings are not supported.`n;`n; For a list of all valid settings, please consult README.txt. Only default`n; inputs are assigned here.`n;`n`n`n[ Global ]  ; Input settings can only be read from the global section!`n`n; Common `nInputStart1 = "KEY_1"`nInputStart2 = "KEY_2"`nInputCoin1 = "KEY_5"`nInputCoin2 = "KEY_6"`nInputServiceA = "KEY_HOME"`nInputServiceB = "KEY_END"`nInputTestA = "KEY_F2"`nInputTestB = "KEY_8"`n`n; 4-way digital joysticks`nInputJoyUp = "KEY_UP"`nInputJoyDown = "KEY_DOWN"`nInputJoyLeft = "KEY_LEFT"`nInputJoyRight = "KEY_RIGHT"`nInputJoyUp2 = "KEY_r"`nInputJoyDown2 = "Key_y"`nInputJoyLeft2 = "KEY_t"`nInputJoyRight2 = "KEY_u"`n`n; Fighting game buttons`nInputPunch = "KEY_9"`nInputKick = "KEY_0"`nInputGuard = "KEY_MINUS"`nInputEscape = "KEY_EQUALS"`nInputPunch2 = "KEY_i"`nInputKick2 = "KEY_o"`nInputGuard2 = "KEY_p"`nInputEscape2 = "KEY_["`n`n; Spikeout buttons`nInputShift = "KEY_9"`nInputBeat = "KEY_0"`nInputCharge = "KEY_MINUS"`nInputJump = "KEY_EQUALS"`n`n; Virtua Striker buttons`nInputShortPass = "KEY_9"`nInputLongPass = "KEY_0"`nInputShoot = "KEY_MINUS"`nInputShortPass2 = "KEY_i"`nInputLongPass2 = "KEY_o"`nInputShoot2 = "KEY_p"`n`n; Steering wheel`nInputSteeringLeft = "KEY_LEFT"      ; digital, turn wheel left`nInputSteeringRight = "KEY_RIGHT"    ; digital, turn wheel right`nInputSteering = "JOY1_XAXIS"        ; analog, full steering range`n`n; Pedals`nInputAccelerator = "KEY_UP,JOY1_YAxis_NEG"`nInputBrake = "KEY_DOWN,JOY1_RZAxis_NEG"`n`n; Manual transmission`nInputGearShift1 = "JOY1_BUTTON9"`nInputGearShift2 = "JOY1_BUTTON10"`nInputGearShift3 = "JOY1_BUTTON11"`nInputGearShift4 = "JOY1_BUTTON12"`nInputGearShiftN = "KEY_T"`nInputGearShiftUp = "JOY1_BUTTON13"           ; sequential shift up`nInputGearShiftDown = "JOY1_BUTTON14"         ; sequential shift down`n`n; View buttons`nInputVR1 = "KEY_o"`nInputVR2 = "KEY_c"`nInputVR3 = "KEY_k"`nInputVR4 = "KEY_j"`n`n; Miscellaneous driving game buttons: Sega Rally 2, Dirt Devils, Emergency Car`n; Ambulance`nInputViewChange = "KEY_A,JOY1_BUTTON1"`nInputHandBrake = "KEY_S,JOY1_BUTTON2"   ; Sega Rally 2 only`n`n; Virtual On macros`nInputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"`nInputTwinJoyTurnRight = "KEY_W,JOY1_RXAXIS_POS"`nInputTwinJoyForward = "KEY_UP,JOY1_YAXIS_NEG"`nInputTwinJoyReverse = "KEY_DOWN,JOY1_YAXIS_POS"`nInputTwinJoyStrafeLeft = "KEY_LEFT,JOY1_XAXIS_NEG"`nInputTwinJoyStrafeRight = "KEY_RIGHT,JOY1_XAXIS_POS"`nInputTwinJoyJump = "KEY_E,JOY1_BUTTON1"`nInputTwinJoyCrouch = "KEY_R,JOY1_BUTTON2"`n`n; Virtual On individual joystick mapping`nInputTwinJoyLeft1 = "NONE"`nInputTwinJoyLeft2 = "NONE"`nInputTwinJoyRight1 = "NONE"`nInputTwinJoyRight2 = "NONE"`nInputTwinJoyUp1 = "NONE"`nInputTwinJoyUp2 = "NONE"`nInputTwinJoyDown1 = "NONE"`nInputTwinJoyDown2 = "NONE"`n`n; Virtual On buttons`nInputTwinJoyShot1 = "KEY_A,JOY1_BUTTON5"`nInputTwinJoyShot2 = "KEY_S,JOY1_BUTTON6"`nInputTwinJoyTurbo1 = "KEY_Z,JOY1_BUTTON7"`nInputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"`n`n; Analog joystick (e.g. Star Wars Trilogy)`nInputAnalogJoyLeft = "KEY_LEFT"             ; digital, move left`nInputAnalogJoyRight = "KEY_RIGHT"           ; digital, move right`nInputAnalogJoyUp = "KEY_UP"                 ; digital, move up`nInputAnalogJoyDown = "KEY_DOWN"             ; digital, move down`nInputAnalogJoyX = "JOY_XAXIS,MOUSE_XAXIS"   ; analog, full X axis`nInputAnalogJoyY = "JOY_YAXIS,MOUSE_YAXIS"   ; analog, full Y axis`nInputAnalogJoyTrigger = "KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON"`nInputAnalogJoyEvent = "KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON"`n`n; Light guns`nInputGunLeft = "KEY_LEFT"               ; digital, move gun left`nInputGunRight = "KEY_RIGHT"             ; digital, move gun right`nInputGunUp = "KEY_UP"                   ; digital, move gun up`nInputGunDown = "KEY_DOWN"               ; digital, move gun down`nInputGunX = "MOUSE%oneplayer%_XAXIS"    ; analog, full X axis`nInputGunY = "MOUSE%oneplayer%_YAXIS"    ; analog, full Y axis`nInputTrigger = "MOUSE%oneplayer%_LEFT_BUTTON"`nInputOffscreen = "MOUSE%oneplayer%_RIGHT_BUTTON"    ; point off-screen`nInputAutoTrigger = 1                    ; automatic reload when off-screen`nInputGunLeft2 = "NONE"`nInputGunRight2 = "NONE"`nInputGunUp2 = "NONE"`nInputGunDown2 = "NONE"`nInputGunX2 = "MOUSE%twoplayer%_XAXIS"`nInputGunY2 = "MOUSE%twoplayer%_YAXIS"`nInputTrigger2 = "MOUSE%twoplayer%_LEFT_BUTTON"`nInputOffscreen2 = "MOUSE%twoplayer%_RIGHT_BUTTON"`nInputAutoTrigger2 = 1`n`nForceFeedback = 0`nDirectInputConstForceMax = 40`nDirectInputSelfCenterMax = 100`nDirectInputFrictionMax = 100`nDirectInputVibrateMax = 100`nXInputConstForceThreshold=100`nXInputConstForceMax=70`nXInputVibrateMax100), H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.iniGuiClose:ExitAppreturn

In this part, the supermodel.ini file is created and saved into the Segal Model 3 Emulator's Config folder....with the new variables "plugged in". This part is going to be the most "work" in creating this. What I did was copy and paste my entire supermodel.ini file inside the script; added a semicolon at the beginning of every line; then replaced each semicolon with a " `n " and made one big "line". For any of you who are new to AHK, doing this tells the script that when it creates the file, the " `n " is where a new line starts. All in all, you would want the script to create a mirror image of your file, except for where you plug in your variables.

Where does ControllerRemap come at in all of this? - you may ask...

...for me, it takes the "guess work" out of finding out what IDs your lightguns were assigned to. If you have ControllerRemap to run when your cab, or other setup, boots up, you can look in any lightgun mame game to figure out what the new lightgun IDs are and then apply them to Sega Model 3 using this method.

What I would like for it to do...lol, and feel free to help me out on this if you want...is I would like for it to copy and convert the "MyArcade.cfg" file (from ControllerRemap) to an XML file (after ControllerRemap runs)...then it will "read" the newly mapped ID's and then create the supermodel.ini file with the new ID's..pretty much everything done automatically without the use of a UI. I have just about everything ready on this, I just cannot get the AHK script to read the XML file for some reason.

I hope this helps, and if anytime you need my assistance, please feel free to send me a pm anytime! :)

LC

  • Like 3
Link to comment
Share on other sites

Oh! Get in! Yer a star thurman...

LG setups on Mame and SM2+3 were one of those I shelved after grappling with the mame remap thingy and getting nowhere fast. Did post on byoac, but sadly problems didn't get solved.

This looks awesome and will revisit once I have a LG setup sesh. Thanks thurman and awesome AHK coding.

  • Like 1
Link to comment
Share on other sites

Thanks Stigzler! :D

Lol, yeah, when I first used the ControllerRemap utility, it took me a little while to get it going. It doesn't have the best instructions but after it dawned on me about how it worked, it has really been a total "life saver" - especially since the amount of lightgun games in my cab makes me feel like Charlton Heston in the NRA lol.

I haven't figured a workaround with the SegaModel 2 yet...but that will be the next thing I will be working on after this :)

Link to comment
Share on other sites

  • 2 weeks later...

Hey Thurman,

Just about to get stuck into this....

On an aside, I'm revisiting the MAME light gun setup problems using controller-remap. Looks like you got it working, but I'm dead stuck... great bit of coding, but shame no GUI or clearer instructions...

I got this far, then got stuck. Sadly, no-one on the byoac seemed able or willing to help:

http://forum.arcadecontrols.com/index.php/topic,108767.msg1432966.html#msg1432966

Can you assist a fellow light-gun enthusiast? It is a great goal to chase, but so much about lightgun setups if a total PITA!!!

cheers

EDIT: Also looking to get the Model2 dual gun setup running. Found yer showpiece here:

Although, as ever.... TS2 looks very good, but the setup guide and readme is a bit baffling - particularly knowing what order to do things in. Furthest I get is this, with an error!

model2_TS2.png

Oh for Lightgun setup guides in plain english created by a Lightgun master!!! (hint hint ;) )

Failing that - any steers you could give would be fab :)

Link to comment
Share on other sites

Good evening! :-) ...I apologize for the delay - work has had me running pretty hectic all week, and I'm now just revisiting this topic.

I would absolutely love to help ya out :-). Lol, I understand that ControllerRemap can be a little...well, challenging at first. (Especially with no GUI, and having no clear tutorial) I had several issues getting it setup at first, but after getting everything going, it's a life saver lol :-). (And even TS2 ...the only drag about it though, is that it doesn't automatically remap for you - if you restart your computer, chances are ya would have to reconfigure IDs).

Sometime tomorrow morning, (US Central Time) I'll send ya a pm and help ya out when I'm sitting in front of the arcade :-).

LC

Link to comment
Share on other sites

Wicked thurman - cheers :)

UPDATE: Sorry I missed you thurman. Just incase others are on the same page - I finally cracked ControllerRemap - took me an eternity. In order to save others time - I made a simple ABC guide on how to get it set up:

http://www.gameex.info/forums/topic/15154-getting-usb-controllers-to-work-with-mame-new-controllerremap-guide/?p=131309

EDIT: Alternatively you can use a GUI I knocked together here:

http://www.gameex.info/forums/topic/16298-app-controllerremapgui/?p=142778

Now... onto all the other systems for lightguns!

:)

Link to comment
Share on other sites

  • 5 years later...
On 9/2/2014 at 9:27 AM, thurmansevolution said:

Hello GameEx family! :-)

I figured out and built a little something in AHK that might be of some help.

The problem - Sega Model 3 change Lightgun IDs after reboot, which causes the lightguns to not function or function incorrectly when trying to play The Lost World. This poses a problem if you are using dual lightguns.

The solution - If you are tired of having to open the supermodel.ini file and have to plug in numbers...or (like me), if you have an arcade setup and want to change the IDs without opening the INI file, this is for you. :-).

Due to the Labor Day holiday, I'm away from my cab and scripts at the moment. Tomorrow evening, I will edit this post and will go in depth on a tutorial to solve this issue. For now, here is a short video with the script in action...and I apologize before ya watch it - I tend to get a little nervous in front of cameras lol.

http://youtu.be/61350i0Typ4

Oh, and this script is just the first step...hopefully I will have it automatically change to the correct IDs without having a UI :-).

--------

Now for the goodies! :)

Prerequisites:

- AutoHotKey: http://ahkscript.org/

- A little "know how" on writing scripts

- A working Sega Model 3 emulator with all settings configured

Recommended:

ControllerRemap, which can be found here: http://forum.arcadecontrols.com/index.php?topic=108767.0

The basic idea for this is writing a small UI to easily change Lightgun IDs with Sega Model 3 really easily. I'm taking the script's code directly from what I've written, so please use this only as an example and a guide. Everything about this is completely customizable - you can add or take away anything you would feel comfortable with. (e.g. If you would like to add in drop down boxes that you can select different controllers, etc).

I'm going to break this down in sections :)

AND PLEASE NOTE THAT IT IS IMPORTANT THAT YOU CHANGE THE PATHS IN THIS SCRIPT TO WHERE EVER YOUR SUPERMODEL EMU FOLDER IS LOCATED, AND CREATE A NEW FOLDER INSIDE THE ROOT OF THE SUPERMODEL FOLDER FOR BACKING UP YOUR PREVIOUS INI FILE (THIS WILL BE EXPLAINED LATER).

First and foremost, here is the entire script:


;;;;;;;;;THE USER INTERFACE;;;;;;;;;;Gui, Show, w400 h200, Sega Supermodel Lightgun Switch IDsGui, Add, Text, x100 y50 cred, Player #1 IDGUI, Add, DropDownList, x75 y75 voneplayer, ID 1||ID 2|ID 3|ID 4Gui, Add, Text, x250 y50 cblue, Player #2 IDGui, Add, DropDownList, x225 y75 vtwoplayer, ID 1||ID 2||ID 3||ID 4Gui, Add, Button, x300 y150 w50 h25 gok, OK!;;;;;;;;;CUSTOMIZE THE CONTROLS TO YOUR LIKING FOR ARCADE JOYSTICK AND PUSHBUTTON USE;;;;;;;;;;;;;;;;9::Send {ENTER}0::Send {TAB}returnok:Gui, Submit, NoHide;;;;;;;;CHANGES VARIABLE INTO USEFUL IDs FOR SUPERMODEL.INI USE;;;;;;;{If oneplayer = ID 1     oneplayer := 1}{If oneplayer = ID 2     oneplayer := 2}{If oneplayer = ID 3     oneplayer := 3}{If oneplayer = ID 4     oneplayer := 4}{If twoplayer = ID 1     twoplayer := 1}{If twoplayer = ID 2     twoplayer := 2}{If twoplayer = ID 3     twoplayer := 3}{If twoplayer = ID 4     twoplayer := 4};;;;;;;;;BACKS UP OLD SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileMove, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.ini, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Old Config Backup, 1;;;;;;;;;CREATES NEW SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileAppend, (;;`n;; Supermodel Configuration File`n;; Default settings for Version 0.2a.`n;;`n `n`n;`n; Quick Overview`n; --------------`n;`n; All settings are case sensitive. Numbers must be unsigned, base 10 integers.`n; Check your spelling carefully because invalid settings are silently ignored.`n; To verify that your settings are being parsed correctly, check the contents`n; of error.log.`n;`n; Global options apply to all games. To create configuration profiles for`n; individual games, place settings under sections with the same name as the `n; corresponding MAME ROM set, like so:`n;`n;       ; Scud Race`n;       [ scud ]`n;`n;       SoundVolume = 50`n;       MusicVolume = 200`n;       ; ... etc. ...`n;`n; Input mappings are an exceptional case: they are only allowed in the global`n; section. Per-game input mappings are not supported.`n;`n; For a list of all valid settings, please consult README.txt. Only default`n; inputs are assigned here.`n;`n`n`n[ Global ]  ; Input settings can only be read from the global section!`n`n; Common `nInputStart1 = "KEY_1"`nInputStart2 = "KEY_2"`nInputCoin1 = "KEY_5"`nInputCoin2 = "KEY_6"`nInputServiceA = "KEY_HOME"`nInputServiceB = "KEY_END"`nInputTestA = "KEY_F2"`nInputTestB = "KEY_8"`n`n; 4-way digital joysticks`nInputJoyUp = "KEY_UP"`nInputJoyDown = "KEY_DOWN"`nInputJoyLeft = "KEY_LEFT"`nInputJoyRight = "KEY_RIGHT"`nInputJoyUp2 = "KEY_r"`nInputJoyDown2 = "Key_y"`nInputJoyLeft2 = "KEY_t"`nInputJoyRight2 = "KEY_u"`n`n; Fighting game buttons`nInputPunch = "KEY_9"`nInputKick = "KEY_0"`nInputGuard = "KEY_MINUS"`nInputEscape = "KEY_EQUALS"`nInputPunch2 = "KEY_i"`nInputKick2 = "KEY_o"`nInputGuard2 = "KEY_p"`nInputEscape2 = "KEY_["`n`n; Spikeout buttons`nInputShift = "KEY_9"`nInputBeat = "KEY_0"`nInputCharge = "KEY_MINUS"`nInputJump = "KEY_EQUALS"`n`n; Virtua Striker buttons`nInputShortPass = "KEY_9"`nInputLongPass = "KEY_0"`nInputShoot = "KEY_MINUS"`nInputShortPass2 = "KEY_i"`nInputLongPass2 = "KEY_o"`nInputShoot2 = "KEY_p"`n`n; Steering wheel`nInputSteeringLeft = "KEY_LEFT"      ; digital, turn wheel left`nInputSteeringRight = "KEY_RIGHT"    ; digital, turn wheel right`nInputSteering = "JOY1_XAXIS"        ; analog, full steering range`n`n; Pedals`nInputAccelerator = "KEY_UP,JOY1_YAxis_NEG"`nInputBrake = "KEY_DOWN,JOY1_RZAxis_NEG"`n`n; Manual transmission`nInputGearShift1 = "JOY1_BUTTON9"`nInputGearShift2 = "JOY1_BUTTON10"`nInputGearShift3 = "JOY1_BUTTON11"`nInputGearShift4 = "JOY1_BUTTON12"`nInputGearShiftN = "KEY_T"`nInputGearShiftUp = "JOY1_BUTTON13"           ; sequential shift up`nInputGearShiftDown = "JOY1_BUTTON14"         ; sequential shift down`n`n; View buttons`nInputVR1 = "KEY_o"`nInputVR2 = "KEY_c"`nInputVR3 = "KEY_k"`nInputVR4 = "KEY_j"`n`n; Miscellaneous driving game buttons: Sega Rally 2, Dirt Devils, Emergency Car`n; Ambulance`nInputViewChange = "KEY_A,JOY1_BUTTON1"`nInputHandBrake = "KEY_S,JOY1_BUTTON2"   ; Sega Rally 2 only`n`n; Virtual On macros`nInputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"`nInputTwinJoyTurnRight = "KEY_W,JOY1_RXAXIS_POS"`nInputTwinJoyForward = "KEY_UP,JOY1_YAXIS_NEG"`nInputTwinJoyReverse = "KEY_DOWN,JOY1_YAXIS_POS"`nInputTwinJoyStrafeLeft = "KEY_LEFT,JOY1_XAXIS_NEG"`nInputTwinJoyStrafeRight = "KEY_RIGHT,JOY1_XAXIS_POS"`nInputTwinJoyJump = "KEY_E,JOY1_BUTTON1"`nInputTwinJoyCrouch = "KEY_R,JOY1_BUTTON2"`n`n; Virtual On individual joystick mapping`nInputTwinJoyLeft1 = "NONE"`nInputTwinJoyLeft2 = "NONE"`nInputTwinJoyRight1 = "NONE"`nInputTwinJoyRight2 = "NONE"`nInputTwinJoyUp1 = "NONE"`nInputTwinJoyUp2 = "NONE"`nInputTwinJoyDown1 = "NONE"`nInputTwinJoyDown2 = "NONE"`n`n; Virtual On buttons`nInputTwinJoyShot1 = "KEY_A,JOY1_BUTTON5"`nInputTwinJoyShot2 = "KEY_S,JOY1_BUTTON6"`nInputTwinJoyTurbo1 = "KEY_Z,JOY1_BUTTON7"`nInputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"`n`n; Analog joystick (e.g. Star Wars Trilogy)`nInputAnalogJoyLeft = "KEY_LEFT"             ; digital, move left`nInputAnalogJoyRight = "KEY_RIGHT"           ; digital, move right`nInputAnalogJoyUp = "KEY_UP"                 ; digital, move up`nInputAnalogJoyDown = "KEY_DOWN"             ; digital, move down`nInputAnalogJoyX = "JOY_XAXIS,MOUSE_XAXIS"   ; analog, full X axis`nInputAnalogJoyY = "JOY_YAXIS,MOUSE_YAXIS"   ; analog, full Y axis`nInputAnalogJoyTrigger = "KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON"`nInputAnalogJoyEvent = "KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON"`n`n; Light guns`nInputGunLeft = "KEY_LEFT"               ; digital, move gun left`nInputGunRight = "KEY_RIGHT"             ; digital, move gun right`nInputGunUp = "KEY_UP"                   ; digital, move gun up`nInputGunDown = "KEY_DOWN"               ; digital, move gun down`nInputGunX = "MOUSE%oneplayer%_XAXIS"    ; analog, full X axis`nInputGunY = "MOUSE%oneplayer%_YAXIS"    ; analog, full Y axis`nInputTrigger = "MOUSE%oneplayer%_LEFT_BUTTON"`nInputOffscreen = "MOUSE%oneplayer%_RIGHT_BUTTON"    ; point off-screen`nInputAutoTrigger = 1                    ; automatic reload when off-screen`nInputGunLeft2 = "NONE"`nInputGunRight2 = "NONE"`nInputGunUp2 = "NONE"`nInputGunDown2 = "NONE"`nInputGunX2 = "MOUSE%twoplayer%_XAXIS"`nInputGunY2 = "MOUSE%twoplayer%_YAXIS"`nInputTrigger2 = "MOUSE%twoplayer%_LEFT_BUTTON"`nInputOffscreen2 = "MOUSE%twoplayer%_RIGHT_BUTTON"`nInputAutoTrigger2 = 1`n`nForceFeedback = 0`nDirectInputConstForceMax = 40`nDirectInputSelfCenterMax = 100`nDirectInputFrictionMax = 100`nDirectInputVibrateMax = 100`nXInputConstForceThreshold=100`nXInputConstForceMax=70`nXInputVibrateMax100), H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.iniGuiClose:ExitAppreturn

Part I:


;;;;;;;;;THE USER INTERFACE;;;;;;;;;;Gui, Show, w400 h200, Sega Supermodel Lightgun Switch IDsGui, Add, Text, x100 y50 cred, Player #1 IDGUI, Add, DropDownList, x75 y75 voneplayer, ID 1||ID 2|ID 3|ID 4Gui, Add, Text, x250 y50 cblue, Player #2 IDGui, Add, DropDownList, x225 y75 vtwoplayer, ID 1||ID 2||ID 3||ID 4Gui, Add, Button, x300 y150 w50 h25 gok, OK!

This one is pretty much self-explaintory. This adds a basic User Interface with two drop down boxes (containing IDs 1-4), sets their variables as %voneplayer% and %vtwoplayer%, and adds an "OK" button (as a launch).

Part II:


;;;;;;;;;CUSTOMIZE THE CONTROLS TO YOUR LIKING FOR ARCADE JOYSTICK AND PUSHBUTTON USE;;;;;;;;;;;;;;;;9::Send {ENTER}0::Send {TAB}return

In this part, you can remap your keys, while the script is running, to your joysticks and pushbuttons - so that you won't have to drag your keyboard out and you can use your control panel to navigate through the UI.

Part III:


ok:Gui, Submit, NoHide;;;;;;;;CHANGES VARIABLE INTO USEFUL IDs FOR SUPERMODEL.INI USE;;;;;;;{If oneplayer = ID 1     oneplayer := 1}{If oneplayer = ID 2     oneplayer := 2}{If oneplayer = ID 3     oneplayer := 3}{If oneplayer = ID 4     oneplayer := 4}{If twoplayer = ID 1     twoplayer := 1}{If twoplayer = ID 2     twoplayer := 2}{If twoplayer = ID 3     twoplayer := 3}{If twoplayer = ID 4     twoplayer := 4}

In this part, the variables "brought" into the "action" (I guess you would call it that lol) and are changed from "ID#" to just a "#"

Part IV:


;;;;;;;;;BACKS UP OLD SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileMove, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.ini, H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Old Config Backup, 1

In this part, the old supermodel.ini file is backed up to a backup folder (and overwrites the previous supermodel.ini file). This is useful just in case something goes array.

Part V: (The Rest)


;;;;;;;;;CREATES NEW SUPERMODEL.INI FILE;;;;;;;;;;;;;;;FileAppend, (;;`n;; Supermodel Configuration File`n;; Default settings for Version 0.2a.`n;;`n `n`n;`n; Quick Overview`n; --------------`n;`n; All settings are case sensitive. Numbers must be unsigned, base 10 integers.`n; Check your spelling carefully because invalid settings are silently ignored.`n; To verify that your settings are being parsed correctly, check the contents`n; of error.log.`n;`n; Global options apply to all games. To create configuration profiles for`n; individual games, place settings under sections with the same name as the `n; corresponding MAME ROM set, like so:`n;`n;       ; Scud Race`n;       [ scud ]`n;`n;       SoundVolume = 50`n;       MusicVolume = 200`n;       ; ... etc. ...`n;`n; Input mappings are an exceptional case: they are only allowed in the global`n; section. Per-game input mappings are not supported.`n;`n; For a list of all valid settings, please consult README.txt. Only default`n; inputs are assigned here.`n;`n`n`n[ Global ]  ; Input settings can only be read from the global section!`n`n; Common `nInputStart1 = "KEY_1"`nInputStart2 = "KEY_2"`nInputCoin1 = "KEY_5"`nInputCoin2 = "KEY_6"`nInputServiceA = "KEY_HOME"`nInputServiceB = "KEY_END"`nInputTestA = "KEY_F2"`nInputTestB = "KEY_8"`n`n; 4-way digital joysticks`nInputJoyUp = "KEY_UP"`nInputJoyDown = "KEY_DOWN"`nInputJoyLeft = "KEY_LEFT"`nInputJoyRight = "KEY_RIGHT"`nInputJoyUp2 = "KEY_r"`nInputJoyDown2 = "Key_y"`nInputJoyLeft2 = "KEY_t"`nInputJoyRight2 = "KEY_u"`n`n; Fighting game buttons`nInputPunch = "KEY_9"`nInputKick = "KEY_0"`nInputGuard = "KEY_MINUS"`nInputEscape = "KEY_EQUALS"`nInputPunch2 = "KEY_i"`nInputKick2 = "KEY_o"`nInputGuard2 = "KEY_p"`nInputEscape2 = "KEY_["`n`n; Spikeout buttons`nInputShift = "KEY_9"`nInputBeat = "KEY_0"`nInputCharge = "KEY_MINUS"`nInputJump = "KEY_EQUALS"`n`n; Virtua Striker buttons`nInputShortPass = "KEY_9"`nInputLongPass = "KEY_0"`nInputShoot = "KEY_MINUS"`nInputShortPass2 = "KEY_i"`nInputLongPass2 = "KEY_o"`nInputShoot2 = "KEY_p"`n`n; Steering wheel`nInputSteeringLeft = "KEY_LEFT"      ; digital, turn wheel left`nInputSteeringRight = "KEY_RIGHT"    ; digital, turn wheel right`nInputSteering = "JOY1_XAXIS"        ; analog, full steering range`n`n; Pedals`nInputAccelerator = "KEY_UP,JOY1_YAxis_NEG"`nInputBrake = "KEY_DOWN,JOY1_RZAxis_NEG"`n`n; Manual transmission`nInputGearShift1 = "JOY1_BUTTON9"`nInputGearShift2 = "JOY1_BUTTON10"`nInputGearShift3 = "JOY1_BUTTON11"`nInputGearShift4 = "JOY1_BUTTON12"`nInputGearShiftN = "KEY_T"`nInputGearShiftUp = "JOY1_BUTTON13"           ; sequential shift up`nInputGearShiftDown = "JOY1_BUTTON14"         ; sequential shift down`n`n; View buttons`nInputVR1 = "KEY_o"`nInputVR2 = "KEY_c"`nInputVR3 = "KEY_k"`nInputVR4 = "KEY_j"`n`n; Miscellaneous driving game buttons: Sega Rally 2, Dirt Devils, Emergency Car`n; Ambulance`nInputViewChange = "KEY_A,JOY1_BUTTON1"`nInputHandBrake = "KEY_S,JOY1_BUTTON2"   ; Sega Rally 2 only`n`n; Virtual On macros`nInputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"`nInputTwinJoyTurnRight = "KEY_W,JOY1_RXAXIS_POS"`nInputTwinJoyForward = "KEY_UP,JOY1_YAXIS_NEG"`nInputTwinJoyReverse = "KEY_DOWN,JOY1_YAXIS_POS"`nInputTwinJoyStrafeLeft = "KEY_LEFT,JOY1_XAXIS_NEG"`nInputTwinJoyStrafeRight = "KEY_RIGHT,JOY1_XAXIS_POS"`nInputTwinJoyJump = "KEY_E,JOY1_BUTTON1"`nInputTwinJoyCrouch = "KEY_R,JOY1_BUTTON2"`n`n; Virtual On individual joystick mapping`nInputTwinJoyLeft1 = "NONE"`nInputTwinJoyLeft2 = "NONE"`nInputTwinJoyRight1 = "NONE"`nInputTwinJoyRight2 = "NONE"`nInputTwinJoyUp1 = "NONE"`nInputTwinJoyUp2 = "NONE"`nInputTwinJoyDown1 = "NONE"`nInputTwinJoyDown2 = "NONE"`n`n; Virtual On buttons`nInputTwinJoyShot1 = "KEY_A,JOY1_BUTTON5"`nInputTwinJoyShot2 = "KEY_S,JOY1_BUTTON6"`nInputTwinJoyTurbo1 = "KEY_Z,JOY1_BUTTON7"`nInputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"`n`n; Analog joystick (e.g. Star Wars Trilogy)`nInputAnalogJoyLeft = "KEY_LEFT"             ; digital, move left`nInputAnalogJoyRight = "KEY_RIGHT"           ; digital, move right`nInputAnalogJoyUp = "KEY_UP"                 ; digital, move up`nInputAnalogJoyDown = "KEY_DOWN"             ; digital, move down`nInputAnalogJoyX = "JOY_XAXIS,MOUSE_XAXIS"   ; analog, full X axis`nInputAnalogJoyY = "JOY_YAXIS,MOUSE_YAXIS"   ; analog, full Y axis`nInputAnalogJoyTrigger = "KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON"`nInputAnalogJoyEvent = "KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON"`n`n; Light guns`nInputGunLeft = "KEY_LEFT"               ; digital, move gun left`nInputGunRight = "KEY_RIGHT"             ; digital, move gun right`nInputGunUp = "KEY_UP"                   ; digital, move gun up`nInputGunDown = "KEY_DOWN"               ; digital, move gun down`nInputGunX = "MOUSE%oneplayer%_XAXIS"    ; analog, full X axis`nInputGunY = "MOUSE%oneplayer%_YAXIS"    ; analog, full Y axis`nInputTrigger = "MOUSE%oneplayer%_LEFT_BUTTON"`nInputOffscreen = "MOUSE%oneplayer%_RIGHT_BUTTON"    ; point off-screen`nInputAutoTrigger = 1                    ; automatic reload when off-screen`nInputGunLeft2 = "NONE"`nInputGunRight2 = "NONE"`nInputGunUp2 = "NONE"`nInputGunDown2 = "NONE"`nInputGunX2 = "MOUSE%twoplayer%_XAXIS"`nInputGunY2 = "MOUSE%twoplayer%_YAXIS"`nInputTrigger2 = "MOUSE%twoplayer%_LEFT_BUTTON"`nInputOffscreen2 = "MOUSE%twoplayer%_RIGHT_BUTTON"`nInputAutoTrigger2 = 1`n`nForceFeedback = 0`nDirectInputConstForceMax = 40`nDirectInputSelfCenterMax = 100`nDirectInputFrictionMax = 100`nDirectInputVibrateMax = 100`nXInputConstForceThreshold=100`nXInputConstForceMax=70`nXInputVibrateMax100), H:\Users\BoxOAwesome\Documents\MAME FINALE MOVE\Supermodel\Config\Supermodel.iniGuiClose:ExitAppreturn

In this part, the supermodel.ini file is created and saved into the Segal Model 3 Emulator's Config folder....with the new variables "plugged in". This part is going to be the most "work" in creating this. What I did was copy and paste my entire supermodel.ini file inside the script; added a semicolon at the beginning of every line; then replaced each semicolon with a " `n " and made one big "line". For any of you who are new to AHK, doing this tells the script that when it creates the file, the " `n " is where a new line starts. All in all, you would want the script to create a mirror image of your file, except for where you plug in your variables.

Where does ControllerRemap come at in all of this? - you may ask...

...for me, it takes the "guess work" out of finding out what IDs your lightguns were assigned to. If you have ControllerRemap to run when your cab, or other setup, boots up, you can look in any lightgun mame game to figure out what the new lightgun IDs are and then apply them to Sega Model 3 using this method.

What I would like for it to do...lol, and feel free to help me out on this if you want...is I would like for it to copy and convert the "MyArcade.cfg" file (from ControllerRemap) to an XML file (after ControllerRemap runs)...then it will "read" the newly mapped ID's and then create the supermodel.ini file with the new ID's..pretty much everything done automatically without the use of a UI. I have just about everything ready on this, I just cannot get the AHK script to read the XML file for some reason.

I hope this helps, and if anytime you need my assistance, please feel free to send me a pm anytime! :)

LC

Hi thurmansevolution, I am pretty new to ahk. ive done a little bit but im not very good. ive tried to follow your instructions but with no luck. I really want to get model 3 working with my aimtraks. if I sent you a copy of my Supermodel.ini would you be able to send me an ahk file that I can make a ui out of. Im sorry I know its a lot to ask but I have been trying for days and I just cant seem to get it right.

Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...