Page 1 of 1
project64 - load controller config with rom
Posted: Sun Jul 12, 2015 12:40 am
by Spyke
Hello,
maybe a stupid question, but is it possible to do something like discribed in post 7 with mGALAXY?
http://www.gameex.info/forums/topic/113 ... d-configs/
Marc
Re: project64 - load controller config with rom
Posted: Sun Jul 12, 2015 9:40 am
by Aeliss
Yep. But I hope you can understand autoit script because I will not make support for it.
Use this autoit script instead of normal one.
Code: Select all
#include <File.au3>
;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0
HotKeySet("{ESC}", "Terminate")
;Special part for pad config
local $folder = @ScriptDir & '\Pad_config\'
local $fichier = $command
$file = StringTrimRight( $fichier, 1 )
$file = StringTrimleft( $fichier, 1 )
Local $szDrive, $szDir, $szFName, $szExt
_PathSplit($file, $szDrive, $szDir, $szFName, $szExt)
Local $patch = IniRead($folder & "config.ini", "PATCH", $szFName, "")
if $patch <> "" Then
if $patch = 'FPS' then
RunWait(@ComSpec & " /c " & 'Regedit /s ' & $folder & 'fps.reg', "", @SW_HIDE)
Elseif $patch = 'PLATEFORM' then
RunWait(@ComSpec & " /c " & 'Regedit /s ' & $folder & 'plateform.reg', "", @SW_HIDE)
Else
RunWait(@ComSpec & " /c " & 'Regedit /s ' & $folder & 'defaut.reg', "", @SW_HIDE)
Endif
Else
RunWait(@ComSpec & " /c " & 'Regedit /s ' & $folder & 'defaut.reg', "", @SW_HIDE)
Endif
$PID = Run ('"' & $app & '" ' & $command)
While ProcessExists ( $PID )
sleep(500)
WEnd
WinActivate("mGalaxy")
Exit 0
;functions
Func Terminate()
While ProcessExists ( $PID )
ProcessClose ( $PID )
WEnd
WinActivate("mGalaxy")
Exit 0
EndFunc
Make a folder called "Pad_config"
inside put a ini file called "config.ini"
and all your reg file
Re: project64 - load controller config with rom
Posted: Sun Jul 12, 2015 4:55 pm
by Spyke
Ok, thank's I will give a try. What do you mean with "I hope you understand autoit script?
I know how to make .exe with autoit, but that's it....
If I understand right it is possible to use config defaut, plateform and fps. If I need more, I can add them in autoit script with elseif....... and can create the for example racer config?
Marc
Re: project64 - load controller config with rom
Posted: Mon Jul 13, 2015 4:24 pm
by Aeliss
Yep, exactly ^^, it 's for that I asking if you know autoit. The code isn't complete, and I haven't test all the script. My RetroBox is under repair, I have installed a 1T DDR with bad partition alignement, and after a bad test, I need to reinstall all the system, fortunately data are ok)
You need to configure your pad for plate form game, and save the registry key you need in a file called "plateform.reg"
ect ...
But the script isn't complicated, I think you can finsh it easily.
Code: Select all
IF .... Then
.....
Elseif ....
.....
Elseif ....
......
Elseif ....
......
......
......
Else
.....
Endif
All the game that are not in the ini file will use the defaut config. With that you don't need to enter all your game in the ini file, only theses one where you need special config.
Re: project64 - load controller config with rom
Posted: Wed Jul 15, 2015 8:23 pm
by Spyke
Good luck with your RetroBox to bring it back to live.
I have tested, the script and files, but without success... P64 use with all games the settings made least in P64
Some questions:
Do I have to extract the Nrage key or the plugin key ?
Do I have to use the rom name in.ini file or the DB name shown in mgalaxy?
I use joy2key, is it a problem? I think not, because it didn't take effect to to the plugin.
Re: project64 - load controller config with rom
Posted: Thu Jul 16, 2015 4:32 pm
by Aeliss
New working script, this one works tested
Code: Select all
#include <File.au3>
;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0
HotKeySet("{ESC}", "Terminate")
;Special part for pads
local $folder = @ScriptDir & '\Pad_config\'
local $fichier = $command
$file = StringTrimRight( $fichier, 1 )
$file = StringTrimleft( $fichier, 1 )
Local $szDrive, $szDir, $szFName, $szExt
_PathSplit($file, $szDrive, $szDir, $szFName, $szExt)
Local $patch = IniRead($folder & "config.ini", "PATCH", $szFName, "")
if $patch <> "" Then
if $patch = 'FPS' then
RunWait(@ComSpec & " /c " & 'Regedit /s "' & $folder & 'fps.reg"', "", @SW_HIDE)
Elseif $patch = 'PLATEFORM' then
RunWait(@ComSpec & " /c " & 'Regedit /s "' & $folder & 'plateform.reg"', "", @SW_HIDE)
Else
RunWait(@ComSpec & " /c " & 'Regedit /s "' & $folder & 'defaut.reg"', "", @SW_HIDE)
Endif
Else
RunWait(@ComSpec & " /c " & 'Regedit /s "' & $folder & 'defaut.reg"', "", @SW_HIDE)
Endif
$PID = Run ('"' & $app & '" ' & $command)
While ProcessExists ( $PID )
sleep(500)
WEnd
WinActivate("mGalaxy")
Exit 0
;functions
Func Terminate()
While ProcessExists ( $PID )
ProcessClose ( $PID )
WEnd
WinActivate("mGalaxy")
Exit 0
EndFunc
Do I have to extract the Nrage key or the plugin key ?
Depend of the plugin you use, for me
I extract [HKEY_CURRENT_USER\Software\JaboSoft\Project64 DLL\DirectInput7 1.5\Keys 0] Not Nragekey
my reg file is like this one
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\JaboSoft\Project64 DLL\DirectInput7 1.5\Keys 0]
"DigitalUp Key"=dword:00000048
"DigitalUp Device"=dword:00000000
"DigitalDown Key"=dword:00000050
"DigitalDown Device"=dword:00000000
"DigitalLeft Key"=dword:0000004b
"DigitalLeft Device"=dword:00000000
"DigitalRight Key"=dword:0000004d
"DigitalRight Device"=dword:00000000
"AnalogUp Key"=dword:000000c8
"AnalogUp Device"=dword:00000000
"AnalogDown Key"=dword:000000d0
"AnalogDown Device"=dword:00000000
"AnalogLeft Key"=dword:000000cb
"AnalogLeft Device"=dword:00000000
"AnalogRight Key"=dword:000000cd
"AnalogRight Device"=dword:00000000
"A Key"=dword:0000002d
"A Device"=dword:00000000
"B Key"=dword:0000002e
"B Device"=dword:00000000
"Start Key"=dword:0000001c
"Start Device"=dword:00000000
"Z Key"=dword:0000002c
"Z Device"=dword:00000000
"L Key"=dword:0000001e
"L Device"=dword:00000000
"R Key"=dword:0000001f
"R Device"=dword:00000000
"C_Up Key"=dword:000000c7
"C_Up Device"=dword:00000000
"C_Down Key"=dword:000000cf
"C_Down Device"=dword:00000000
"C_Left Key"=dword:000000d3
"C_Left Device"=dword:00000000
"C_Right Key"=dword:000000d1
"C_Right Device"=dword:00000000
and I call this file fps.reg for exemple.
Do I have to use the rom name in.ini file or the DB name shown in mgalaxy?
This script is only for P64 so you need to use this file instead of this one in your p64 folder and call it "mGalaxy_Script.au3"
Perhaps a admin right problem ?
Re: project64 - load controller config with rom
Posted: Thu Jul 16, 2015 6:25 pm
by Spyke
Will try with this one.
The name of the script was clear, what I meant was the name of the game inside config.ini
I think I must use name of the rom, I will test and give a reply.
Re: project64 - load controller config with rom
Posted: Thu Jul 16, 2015 9:10 pm
by Spyke
It works!!!!
Was a plugin problem, with NRage it didn´t work, with Jabo-DInput it works.
Thank you very much for helping me out.