Page 1 of 1

Playing 7zip PSX titles?

Posted: Mon Aug 17, 2015 3:58 am
by Aasum
I am trying to un-7zip my PS1 to a temp folder and have pcsxr load it from there and delete the temp folder when pcsxr is closed Something like the script below. The part am having issues with is the loading of the cue/iso/bin. Don't see a find file type thing in AutoIT. Thanks for any help you can give and sorry if it is a bother.

Code: Select all

RunWait(@ComSpec & " /c " & "7zip.exe e -y "\%file%ext"" -otemp") ;
RunWait(@ComSpec & " /c " & "pcsxr.exe -nogui -cdfile "temp\%file%ext"") ;
RunWait(@ComSpec & " /c " & "rmdir /S temp") ; 
::EDIT::

Hopefully the below helps someone else who wants this support :) sure it can be easily modded to support other disc based systems

Adding to Systems.xml

Code: Select all

      <Cmd id="2" name="7z-Loader_PCSX-Reloaded" value=""%path\%file%ext"" />
    </Emu>
    <Extensions>.bin,.cue,.img,.iso,.7z</Extensions>

then setting emulator to
pcscrl.bat

Code: Select all

rmdir /Q /S %temp%\psx
7za.exe e -y %* -o%temp%\psx
set psxcmd=%cd%\pcsxr.exe -nogui -cdfile
FORFILES /m *.cue /p %temp%\psx -c "cmd /c %cd%\pcsxrl2.bat start /D %cd% %psxcmd% @path"
pcsxrl2.bat is

Code: Select all

%*

Re: Playing 7zip PSX titles?

Posted: Mon Aug 24, 2015 4:27 pm
by Aeliss
Hi.
You can use unzip function in autoit, I  using a script like this one for amiga WHD.

Code: Select all

;==========================================================================
;
; Function Name:    _Zip_DllChk()
; Description:      Internal error handler.
; Parameter(s):     none.
; Requirement(s):   none.
; Return Value(s):  Failure - @extended = 1
; Author(s):        smashley
;
;===============================================================================
Func _Zip_DllChk()
	If Not FileExists(@SystemDir & "\zipfldr.dll") Then Return 2
	If Not RegRead("HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}", "") Then Return 3
	Return 0
 EndFunc   ;==>_Zip_DllChk
 
 ;===============================================================================
;
; Function Name:    _Zip_UnzipAll()
; Description:      Extract all files contained in a ZIP Archieve.
; Parameter(s):     $hZipFile - Complete path to zip file that will be created (or handle if existant)
;					$hDestPath - Complete path to where the files will be extracted
;					$flag = 1
;					- 1 no progress box
;					- 0 progress box
; Requirement(s):   none.
; Return Value(s):  On Success - 0
;                   On Failure - sets @error 1~3
;					@error = 1 no Zip file
;					@error = 2 no dll
;					@error = 3 dll isn't registered
; Author(s):        torels_
; Notes:			The return values will be given once the extracting process is ultimated... it takes some time with big files
;
;===============================================================================
Func _Zip_UnzipAll($hZipFile, $hDestPath, $flag = 1)   
	Local $DLLChk = _Zip_DllChk()
	If $DLLChk <> 0 Then Return SetError($DLLChk, 0, 0);no dll
	If not _IsFullPath($hZipFile) then Return SetError(4,0) ;zip file isn't a full path
	If Not FileExists($hZipFile) Then Return SetError(2, 0, 0) ;no zip file
	If Not FileExists($hDestPath) Then DirCreate($hDestPath)
	Local $aArray[1]
	$oApp = ObjCreate("Shell.Application")
	$oApp.Namespace($hDestPath).CopyHere($oApp.Namespace($hZipFile).Items)
	For $item In $oApp.Namespace($hZipFile).Items
		_ArrayAdd($aArray, $item)
	Next
	While 1
		If $flag = 1 then _Hide()
		If FileExists($hDestPath & "\" & $aArray[UBound($aArray) - 1]) Then
			Return SetError(0, 0, 1)
			ExitLoop
		EndIf
		Sleep(500)
	WEnd
 EndFunc   ;==>_Zip_UnzipAll

;===============================================================================
;
; Function Name:    _Hide()
; Description:      Internal Function.
; Parameter(s):     none
; Requirement(s):   none.
; Return Value(s):  none.
; Author(s):        torels_
;
;===============================================================================
Func _Hide()
	If ControlGetHandle("[CLASS:#32770]", "", "[CLASS:SysAnimate32; INSTANCE:1]") <> "" And WinGetState("[CLASS:#32770]") <> @SW_HIDE	Then ;The Window Exists
		$hWnd = WinGetHandle("[CLASS:#32770]")
		WinSetState($hWnd, "", @SW_HIDE)
	EndIf
 EndFunc
 
 ;===============================================================================
;
; Function Name:    _IsFullPath()
; Description:      Internal Function.
; Parameter(s):     $path - a zip path
; Requirement(s):   none.
; Return Value(s):  success - True.
;                                       failure - False.
; Author(s):        torels_
;
;===============================================================================
Func _IsFullPath($path)
    if StringInStr($path,":\") then
        Return True
    Else
        Return False
    EndIf
Endfunc