Code: Select all
;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
;special parsing to get file
$count = StringInStr($command, '"', 0 , -2)
$file = StringTrimLeft( $command, $count )
$count = StringInStr($file,'"', 0 , 1) - 1
$file = Stringleft( $file, $count )
local $ext = StringRight($file, 3 )
;change system if needed
if StringInStr($ext,"32x") Then
$command = '"' & $file & '" -32x -auto -fullscreen'
elseif StringInStr($file,"cue") Then
$command = '"' & $file & '" -scd -auto -fullscreen'
else
$command = '"' & $file & '" -gen -auto -fullscreen'
endif
Runwait('"' & $app & '" ' & $command )
exit 0
To finish.
This script look for cue>sega cd .32x>32x and FOR ALL OTHER ran as genesis rom, if you want to use with sms rom too, you nned to unzip all your rom and modify the script. eg
Code: Select all
if StringInStr($ext,"32x") Then
$command = '"' & $file & '" -32x -auto -fullscreen'
elseif StringInStr($file,"cue") Then
$command = '"' & $file & '" -scd -auto -fullscreen'
elseif StringInStr($file,"gen") Then
$command = '"' & $file & '" -gen -auto -fullscreen'
else
$command = '"' & $file & '" -sms -auto -fullscreen'
endif
You can keep the command line you prefer in system.xml, the script remake its own command, but don't forget to chnage extensions.