stigzler Posted January 15, 2014 Share Posted January 15, 2014 Scenario - You're booting Atomiswave/Naomi/Dreamcast games from GameEx via Demul. However, you have to set up the controls each time.Solution: This approach saves the key configs for each game when you exit Demul.Use: Run game. Set up controls via Demul menu. Exit Game. Next time you load that game, the controls will be recalled.How to:Make a folder somewhere for your individual game controlsCopy this text and make a bat file::: Load Controls ini for demul:: By Stigzler 2013@echo offset romname=%1set romname=%romname:~1,-1%set emu=%2set emu=%emu:~1,-1%echo Recieved Rom Filename = %romname%echo Recieved Emulator = %emu%:: --------------------------------------------------------------------:: User Variables - SET HERE!:: --------------------------------------------------------------------:: Location of Controls Folder:set controlsfolder=C:\Emulators\Dreamcast\demul_controls:: Location of Emul Folder:set emulfolder=C:\Emulators\Dreamcast\demul0582:: Name of EmuExe:set emuexe=demul.exe:: Name of Emu Controller iniset emucontini=padDemul.ini:: -------------------------------------------------------------------:: Code:: -------------------------------------------------------------------:: Load Controlsset padfull=%emulfolder%\%emucontini%set controlsfull=%controlsfolder%\%romname%.iniif exist %controlsfull% ( Echo Controls for this game already exist. Goto CopyControls) else ( if exist %controlsfolder%\default.ini ( set controlsfull=%controlsfolder%\default.ini Echo Controls don't exist... loading defaults ) else ( Copy /Y "%padfull%" "%controlsfolder%\default.ini" set controlsfull=%controlsfolder%\default.ini Echo Default.ini didn't exist - using default in Emu )):CopyControlsCopy /Y "%controlsfull%" "%padfull%"Echo Loading Controls...::Pause:LaunchEmu:: Launch EmuEcho Launching Emulatorcd %emulfolder%start/wait %emuexe% -run=%emu% -rom=%romname%ping -n 3 localhost > nulEcho Backing up controls for this game...set padfull=%emulfolder%\%emucontini%set controlsfull=%controlsfolder%\%romname%.iniCopy /Y "%padfull%" "%controlsfull%"::PauseExit Change the User Variables Section to match your system. Save it as a batch file (use notepad - put .bat at end of filename)In your command line for GameEx, enter the following:{Path and bat} "[ROM]" "{system name}"For e.g.:C:\GameEx\AHKS_BATS\Demul_load_save_controls.bat "[ROM]" "naomi"Copy text below into notepad and save as "[Mapping Off] Exit (Process Close) - Demul.ini" in C:\GameEx\CONFIG\EMULATORS# This is an advanced emulator configuration file. It does things such as allow keyboard only emulators to be operated by a gamepad, wait for additional processes to exit and map keys. If this file is used it overrides the MAPKeys setting for the emulator.[GENERAL]# Enabled. Use this.Enabled=True#Make MCE Back button and X-ARCADE Escape and SlikStik Escape to close emulator processMapBack=True#Make Escape key close emulator processMapEscape=True#When exiting an emulator via the above mappings, you can specify keys in the send keys format to send instead of having GameEx close the process to cleanly exit the emulator. Such as the Q Key or ALT F4 which is %{F4}KeysToSendOnExit=#Wait for keys to be processed by the emulatorEmuWaitForKeys=True#Additional processes to wait to exit or close on exit. Dont include the .exe. Leave blank not to use.Process1=demulProcess2=Process3=Process4=[JOYMAPPING]# For mapping a GamePad to keys# Specify a virtual key code to send when the specific joystick control is pressed. Look at vkcodes.htm for codes.JoymappingEnabled=FalseLeft=up=Right=Down=Button1=Button2=Button3=Button4=Button5=Button6=Button7=Button8=Button9=Button10=Button11=Button12=Button13=Button14=Button15=Button16=[GAMEPADEXIT]#MAP Gamepad controls to exit and make controls exit processMapGamePadExit=True#Flag the controls that exit a game by placing True next to each control. To not use the control as part of the combination use a 0Left=TrueDown=Right=Up=TrueButton1=Button2=Button3=Button4=TrueButton5=TrueButton6=TrueButton7=Button8=Button9=Button10=Button11=Button12=Button13=Button14=Button15=Button16=[MOUSEMAPPING]# For registered users, the ability to control the mouse with a gamepad and/or directional keys.# For example for PC strategy games.# Apparantly this functionality is similar to the software Pinnacle profiler. Remember you can setup an emulator# as one PC game. Specify enabled, and mousespeed 0-20. 20 Being fastest. This setting overrides the directional# mapping for the above and buttons 1 and 2 Button 1/CTRL becomes left mouse. Button 2/ALT Right mouseMouseMappingEnabled=FalseMouseSpeed=0[bLOCKKEYS]# Use this section to disable and block key presses and mouse clicks.# To disable the mouse clicks use code 1 for left mouse button,# 2 for right button and 4 for middle buttonEnabled=FalseBlockKey_1=1BlockKey_2=2BlockKey_3=4BlockKey_4=BlockKey_5=[KEYBOARDREMAP]# Remap Keys for the emulator. Specify from the from key, which is the key you wish to replace the to key# This should be good enough for real time gaming. Registered version feature. Look at VKCodes.htm for codes.Enabled=TrueRemap_1_From_VK=Remap_1_To_VK=Remap_2_From_VK=Remap_2_To_VK=Remap_3_From_VK=Remap_3_To_VK=Remap_4_From_VK=Remap_4_To_VK=Remap_5_From_VK=Remap_5_To_VK=Remap_6_From_VK=Remap_6_To_VK=Remap_7_From_VK=Remap_7_To_VK=Remap_8_From_VK=Remap_8_To_VK=Remap_9_From_VK=Remap_9_To_VK=Remap_10_From_VK=Remap_10_To_VK=Remap_11_From_VK=Remap_11_To_VK=Remap_12_From_VK=Remap_12_To_VK=Remap_13_From_VK=Remap_13_To_VK=Remap_14_From_VK=Remap_14_To_VK=Remap_15_From_VK=Remap_15_To_VK=Remap_16_From_VK=Remap_16_To_VK=Remap_17_From_VK=Remap_17_To_VK=Remap_18_From_VK=Remap_18_To_VK=Remap_19_From_VK=Remap_19_To_VK=Remap_20_From_VK=Remap_20_To_VK=Remap_21_From_VK=Remap_21_To_VK=Remap_22_From_VK=Remap_22_To_VK=Remap_23_From_VK=Remap_23_To_VK=Remap_24_From_VK=Remap_24_To_VK=Remap_25_From_VK=Remap_25_To_VK=Remap_26_From_VK=Remap_26_To_VK=Remap_27_From_VK=Remap_27_To_VK=Remap_28_From_VK=Remap_28_To_VK=Remap_29_From_VK=Remap_29_To_VK=Remap_30_From_VK=Remap_30_To_VK=Remap_31_From_VK=Remap_31_To_VK=Remap_32_From_VK=Remap_32_To_VK=Finally, under Advanced config, select this file:Hope this helps and let me know if buggy! 1 Link to comment Share on other sites More sharing options...
Recommended Posts