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

[TOOL] Autoload/save individual game configurations with NullDC


stigzler

Recommended Posts


Scenario - You're booting Dreamcast games from GameEx via NullDC. However, you have to set up the game settings each time. Some games require change of graphics/sound settings and key mappings to your cab controls are very different across games.

Solution: This approach saves the configs for each game when you exit Demul.

Use: Run game. Set up controls via NullDC menu. Exit Game. Next time you load that game, the controls will be recalled.

How to:

1. Make a folder somewhere for your individual game controls

2. Copy this text and make a bat file:


:: Save/Load Game Configurations for NullDC
:: By Stigzler 2013
:: Cmd Line:
:: nulldc_game_settings.bat "{romname}" "{rompath}" "{romfile}"

@echo off
set romname=%1
set romname=%romname:~1,-1%
set rompath=%2
set rompath=%rompath:~1,-1%
set romfile=%3
set romfile=%romfile:~1,-1%

echo Recieved Rom Name = %romname%
echo Recieved Rom Path = %rompath%
Echo Recieved Rom Filename = %romfile%

:: --------------------------------------------------------------------
:: User Variables - SET HERE!
:: --------------------------------------------------------------------
:: Location of Controls Folder:
set controlsfolder=C:\Emulators\EmuCR_nullDC-optimized_r141\Game_configs

:: Location of Emul Folder:
set emulfolder=C:\Emulators\EmuCR_nullDC-optimized_r141

:: Name of EmuExe:
set emuexe=nullDC_Win32_Release-NoTrace.exe

:: Name of Emu Controller ini
set emucontini=nullDC.cfg


:: -------------------------------------------------------------------
:: Code
:: -------------------------------------------------------------------

:: Load Controls

set padfull=%emulfolder%\%emucontini%
set controlsfull=%controlsfolder%\%romname%.cfg

if exist "%controlsfull%" (
Echo Controls for this game already exist.
Goto CopyControls
) else (
if exist %controlsfolder%\default.cfg (
set controlsfull=%controlsfolder%\default.cfg
Echo Controls don't exist... loading defaults
) else (
Copy /Y "%padfull%" "%controlsfolder%\default.cfg"
set controlsfull=%controlsfolder%\default.cfg
Echo Default.cfg didn't exist - using default in Emu
)
)

:CopyControls
Copy /Y "%controlsfull%" "%padfull%"
Echo Loading Controls...
::Pause

:LaunchEmu
Echo Launching Emulator
cd %emulfolder%
start/wait %emuexe% -config ImageReader:DefaultImage="%rompath%\%romfile%"
::nullDC_Win32_Release-NoTrace.exe -config ImageReader:DefaultImage="[ROMPATH]\[ROMFILE]"

ping -n 3 localhost > nul

Echo Backing up controls for this game as %romname%
set padfull=%emulfolder%\%emucontini%
set controlsfull=%controlsfolder%\%romname%.cfg
Copy /Y "%padfull%" "%controlsfull%"

::Pause

Exit



3. Change the User Variables Section to match your system. Save it as a batch file (use notepad - put .bat at end of filename)

4. In your command line for GameEx, enter the following:
{Path and bat} "[ROM]" "[ROMPATH]" "[ROMFILE]"
For e.g.:
C:\GameEx\AHKS_BATS\nulldc_game_settings.bat "[ROM]" "[ROMPATH]" "[ROMFILE]"

5. Copy text below into notepad and save as "[Mapping Off] Exit (Process Close) - NullDC.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 process

MapBack=True

#Make Escape key close emulator process

MapEscape=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 emulator

EmuWaitForKeys=True

#Additional processes to wait to exit or close on exit. Dont include the .exe. Leave blank not to use.

Process1=demul
Process2=
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=False

Left=
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 process

MapGamePadExit=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 0

Left=True
Down=
Right=
Up=True
Button1=
Button2=
Button3=
Button4=True
Button5=True
Button6=True
Button7=
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 mouse

MouseMappingEnabled=False
MouseSpeed=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 button

Enabled=False

BlockKey_1=1
BlockKey_2=2
BlockKey_3=4
BlockKey_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=True

Remap_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=



6. Finally, under Advanced config section, select the above process.

Hope this helps and let me know if buggy!
(P.S. for the potentially observant this post is directly copied from previous one for Demul - cos much the same process - not a mistake.)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...