ISSUE #03 - Unpacking the games

This is a forum section for ideas howto implement and running DOS games in ECC (using DOSBox), this forum wil be temporally here until the problem is solved.
User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

ISSUE #03 - Unpacking the games

Unread post by Phoenix » 17 Dec 2009, 18:55

Hi All,

The autounpack funtion in ECC will extract all files into a same directory, this will also overwrite any files that have often the same name in other DOS games, so the first step of the script will be to unpack the files properly into a CRC32 based folder in #_AUTO_UNPACKED.

note: copy/paste this section into the body of the script (between the script bars)

Code: Select all

; ------------------------------------------------------------------------------
; BEGIN OF SCRIPT
; ------------------------------------------------------------------------------
; Check if the file is really a packed file (zip)
If $eccFileRomFileIsPacked <> "1" Then
	MsgBox(64, "ECC DOSBox script", "The game you want to play is not imported as a ZIP file, aborting...")
	Exit
EndIf

$7zipOutput = " -o" & $eccSystemEccFolder & "ecc-user\#_AUTO_UNPACKED\dosbox\" & $eccFileRomCrc32
ShellExecuteWait($eccThirdParty7zip, " x " & chr(34) & $eccFileRomPath & $eccFileRomFile & chr(34) & " -y " & $7zipOutput, "", "", "")
; ------------------------------------------------------------------------------
; END OF SCRIPT
; ------------------------------------------------------------------------------
result:
Attachments
ecc_unpack_in_folder.png
ecc_unpack_in_folder.png (5.24 KiB) Viewed 1020 times
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: ISSUE #03 - Unpacking the games

Unread post by Vicman » 17 Dec 2009, 21:00

sorry, don't work for me , yet ?
script starts, but nothing happens on the #_AUTO_UNPACKED.
or is this only an example, how it should work in the near Future :oops:
imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: ISSUE #03 - Unpacking the games

Unread post by Phoenix » 17 Dec 2009, 23:25

Hi Vicman,

No, the script works fine over here....strange...can you re-check your settings one more time...it should work...
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
te_lanus
ECC Support
Posts: 265
Joined: 25 May 2009, 05:00
Location: Port Elizabeth, South Africa

Re: ISSUE #03 - Unpacking the games

Unread post by te_lanus » 18 Dec 2009, 05:31

quick question: How will the script handle save states? and how would one handle non-zipped games?
(e.g. *.conf)

Hope you understand :sweatdrop:
Busy with:
image packs:
- EPOCH Super Cassette Vision, Exelvision EXL100
Platforms:
- Cybiko Xtreme
- Matsushita (Panasonic) National JR-200
- PDP-8, PDP-11, TRS-80 Model 100
- Tangerine Microtan 65, Terminal Computer SOL-20, Wang VS

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: ISSUE #03 - Unpacking the games

Unread post by Phoenix » 18 Dec 2009, 06:44

te_lanus wrote:quick question: How will the script handle save states? and how would one handle non-zipped games?
(e.g. *.conf)

Hope you understand :sweatdrop:

All worked out!!, please be patient... :surrender:
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: ISSUE #03 - Unpacking the games

Unread post by Phoenix » 18 Dec 2009, 11:36

@Vicman,

The script stated above is just the middle (body) piece of the script, you have to create a new script in ECC, and then copy/paste the above section into it :)
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Vicman
PLATINUM member
Posts: 1233
Joined: 17 Jun 2007, 16:12
Location: Germany,Bochum

Re: ISSUE #03 - Unpacking the games

Unread post by Vicman » 18 Dec 2009, 11:48

Phoenix wrote:@Vicman,

The script stated above is just the middle (body) piece of the script, you have to create a new script in ECC, and then copy/paste the above section into it :)
yes, that was clear ;)

Allready get it working :yes_head:
The reason, why not before,....?
imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: ISSUE #03 - Unpacking the games

Unread post by Phoenix » 18 Dec 2009, 19:41

Updated this piece of the script :thumbsup: , changes

- Bugfix: Userfolder should work properly now, even is the user changed the userfolder to another location
- Added: notification when unpacking filedata.
- Simplyfied the shellcomandline by declaring variables first (better overview)

Code: Select all

; === UNZIP GAMEDATA ===
$7zipOutput = "-o" & $eccUserPath & "#_AUTO_UNPACKED\dosbox\" & $eccFileRomCrc32
$eccZipFile = chr(34) & $eccFileRomPath & $eccFileRomFile & chr(34)

$ClientRes = WinGetClientSize("")
ToolTip("Unpacking game data...", $ClientRes[0]/2, $ClientRes[1]/2, "ECC DOSBox", 1, 2)
ShellExecuteWait($eccThirdParty7zip, " x " & $eccZipFile & " -y " & $7zipOutput, "", "", "")
ToolTip("")
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9057
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: ISSUE #03 - Unpacking the games

Unread post by Phoenix » 18 Dec 2009, 20:15

Updated the script by having a '$OutputFolder' string wich can be used more often than the old '$7zipOutput' string.

Code: Select all

; === UNZIP GAMEDATA ===
$OutputFolder = $eccUserPath & "#_AUTO_UNPACKED\dosbox\" & $eccFileRomCrc32
$eccZipFile = chr(34) & $eccFileRomPath & $eccFileRomFile & chr(34)

$ClientRes = WinGetClientSize("")
ToolTip("Unpacking game data...", $ClientRes[0]/2, $ClientRes[1]/2, "ECC DOSBox", 1, 2)
ShellExecuteWait($eccThirdParty7zip, " x " & $eccZipFile & " -y -o" & $OutputFolder, "", "", "")
ToolTip("")
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest