English Amiga Board


Go Back   English Amiga Board > Main > Amiga scene

 
 
Thread Tools
Old 01 November 2009, 01:41   #1
rare_j
Zone Friend
 
rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 1,176
Floppy disk hdf creator for whdload packs

hdf creator for WHDLoad packs (for WinuaeX)

WHAT IS IT?
Here's an Amigados batch script to repackage Killergorilla's WHDLoad packs as separate hdf's.
Also included is a boot disk (adf) with WHDLoad on it and a little menu system for starting each game, reading docs and setting extra options (e.g. custom1=1)

WHY?
I wanted to have a separate hdf for each WHDLoad game for WinuaeX. This means each WHDLoad game can have a separate WinuaeX configuration, and each can have a set of ten save-states. Save-states work well because the hdf files are never written to.

HOW DOES IT WORK?
The Amigados batch script unzips each game pack in turn, examines the contents looking for slaves and docs, then copies everything to a hdf file just big enough for it all to fit. Two extra tiny text files are written to the root of each hdf; one is a readout of the contents of the pack (slaves and docs), the other is a short script to display the menu; both are activated by the boot disk.

WHAT DO YOU NEED?
If you want to try the batch script you'll need to know how to configure WinUAE and use the Amiga shell. You also must use Bloodwych's ClassicWB.
On the xbox side, I'm using the latest (last?) version of WinuaeX which is v17.
For the boot disk, adding your WHDLoad key and the correct kickstart 1.3 and 3.1 files is optional but pretty handy!
If you're ok with that then here are the instructions for running the batch script.

INSTRUCTIONS FOR BATCH SCRIPT
The way it works is to unzip each game pack inside WinUAE, examine it, then repackage it into a custom hdf file just the right size.
So we need one 'in' drive where some game packs are, one 'out' drive to write the hdf's to, and one drive for temporary usage.

1. Download and unpack the attached archive.
2. Load up WinUAE on your PC with ClassicWB. (I use ClassicWB Lite, any ClassicWB should be ok though (not OS3x or GAAE)). Configure 64 Mb Fast Ram and use JIT.
3. Configure an Amiga drive from an empty directory, call the Amiga volume 'KG-ZIP'.
4. Configure another Amiga drive from another empty directory, call the Amiga volume 'KG-HDF'.
5. Configure another Amiga drive, use the directory 'scripts' from the attached archive, call the Amiga volume 'scripts'.
6. Configure another Amiga drive, this time use the hardfile called 'workspace40MB.hdf' which is in the attached archive.
7. Put a couple of WHDLoad zipped game packs into the windows folder that you assigned to 'KG-ZIP'. (you can get them straight from whdownload.com)
8. Start ClassicWB. Open a shell window and cd to scripts:
9. Type 'execute repackage', press return, and cross your fingers.

IF you got some error message, go back and check you did all the steps correctly!

When it is finished you should see some new zip files in the windows folder you assigned to KG-HDF. The game packs have been repackaged into separate hdf's, and zipped up for safe keeping.
The name of the new zip file is the same as the pack it was unzipped from. This is so you can easily keep track of what pack version the hdf's are from.
The name of the hdf inside is the pack's Amiga game name. This name is FFS-friendly and also FAT-X friendly.
How long it takes to batch through your packs depends on how fast your PC is.
3Ghz Quad core Xeon workstation: about 12 packs per minute
1.6Ghz Celeron laptop: about 4 packs per minute

You can now unzip the hdf files and transfer them to the xbox to use with WinuaeX. You must use hdf files with WinuaeX, if you try to use zipped hdf files you may find that configuration files go missing, games don't load... WinuaeX is a bit buggy that way. Plain hdf files work well though.

INSTRUCTIONS FOR BOOT DISK (ADF)
With WinuaeX you control the mouse with the thumbstick and the keyboard is on-screen. So the aim of the boot disk is to store WHDLoad, your key, and the kickstart roms in one place and be able to browse docs on the game hdf and start the game with as little mouse/keyboard interaction as possible, using as little ram as possible.
You'll need to put your own WHDLoad key and kickstart file(s) on the boot disk in the appropriate places. In WinUAE and ClassicWB again, insert the boot.adf from the attached archive and copy your WHDLoad key to 'S'. The boot.adf is labelled Disk1 in workbench.
Getting the kickstarts on there is a bit more complicated.
If you only want to play OCS games, just copy your kick34005.A500 kickstart image to Disk1:devs/Kickstarts. You're done!
If you want to play OCS and AGA/CD32 games you'll want both kick34005.A500 and kick40068.A1200 (or kick40068.A4000 or kick40063.A600) kickstart images on the boot adf, but for both files to fit they'll need to be crunched with xpk. Here's how to do it.

1. Copy kick34005.A500 and kick40068.A1200 to RAM:
2. Open a shell.
3. Type 'xpack RAM:kick34005.A500 method=nuke' and hit return.
4. Type 'xpack RAM:kick40068.A1200 method=nuke' and hit return.
5. They should have crunched down to around 150K and 330K respectively.
6. Now copy these two crunched files to Disk1:devs/Kickstarts/
7. Finally type 'xscan Disk1:devs/Kickstarts/#?' and hit return.

Either way, the boot adf is now ready to be copied over to the xbox as well.

USAGE WITH WINUAEX
If you've got this far then you know what to do in WinuaeX. Select your hdf file from the WinuaeX menu, configure boot.adf as DF0, set floppy mode to turbo, choose kickstart 3.1 in the configuration (this is important) and enough fastram to preload your game, and you should be ok!

The boot disk brings up a menu of the contents of the game pack so you can easily select the game or read manuals without rummaging through drawers. Use the thumbstick to move the mouse, yellow button is the left mouse button.
If you select a game it starts.
If you select a doc it is loaded up in TextView. Scrolling with the mouse in TextView is nice, press the yellow button while the cursor is over the text and move the thumbstick up or down, the further you push the stick the faster it will scroll. Press the yellow button again to stop scrolling. You can also use the thin scrollbar on the right. If some text goes off the right edge of the screen, select 'wordwrap' from the commands menu. (black button is right mouse button). Close TextView to go back to the boot menu.

That's pretty much it. But what if you want to use a WHDLoad option like custom1=1 or something to enable a cheat?
If you hold down a mouse button (black or yellow) while the boot disk is loading it will start with a different menu. This is where you can disable preloading and/or enter extra WHDLoad options.
- 'Start without Preload' is useful perhaps if you want to try to load Beneath A Steel Sky (original version) or Monkey Island 2, which are probably too big to PRELOAD on WinuaeX.
- 'Customise WHDLoad Options' brings up a text box where you can use the on-screen keyboard (click the thumbstick) to enter an option like custom1=1 to tell the WHDLoad slave to enable a cheat mode or something. Anything entered here will be added to the WHDLoad command line so multiple options separated by a space are ok (e.g. custom1=1 custom2=1 or whatever).
Anything you do in this menu is not saved anywhere, it's just set temporarily (like selecting 'use' in workbench prefs). So to avoid entering your option every time, you could just start the game once you've set your options and do a save-state.

There is no extra space on the hdf's for game saves. WHDLoad on the boot disk (v16.9) is configured to redirect game saves/highscores/etc. to RAM. So just use save-states in WinuaeX to save your game.

Q & A
-Why a boot disk?
Because I didn't want a copy of WHDLoad, the key, and the kickstarts on every hardfile.

-Do Save-States work ok with this?
I've save-stated my way through half a dozen games using this, the hdf files are never written to so it is safe. Once you saved a state, don't change the WinuaeX configuration for that hdf.

THANX
killergorilla, legend!
Bloodwych... is the daddy!
thomas - invaluable hardfile help.

Have Fun!

UPDATE: v.1.2.3

New feature - processes packs in zip and lha format.
New feature - the script will check to see if the pack it is processing already exists in the output folder - if it does it will skip processing it. If there is the same pack in zip and lha format, it will process the lha first and skip the zip version.
New feature - this may work with Retroplay's JST packs. Not thoroughly tested. A version of JST is on the boot disk.
Attached Files
File Type: zip repackage_v1.2.1.zip (733.5 KB, 1171 views)
File Type: zip repackage_v1.2.3.zip (592.1 KB, 710 views)

Last edited by rare_j; 10 November 2016 at 01:29. Reason: new improved version! (v1.2.3)
rare_j is offline  
Old 01 November 2009, 01:47   #2
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,518
KG is working on the same thing (just paused to update KGLoad) Nice one nonetheless rare_j
TCD is offline  
Old 07 November 2009, 19:55   #3
rare_j
Zone Friend
 
rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 1,176
I've updated the first post with a new version of the scripts (v1.1!) and changed the instructions a bit.
The scripts have been tidied up and the process is now 50% faster (50%!!).
The scripts should now be unpacked to and run from a drive in WinUAE that is a mapped windows folder; I've found this is much more reliable! The instructions in the first post have been updated to reflect this.
The hdf files generated by this new version are exactly the same as the previous version.
There's also another adf included in the archive to use on the winuaex side, 'kicks.adf', to stick in DF1 if whdload asks for a kickstart other than v1.3. (no kickstarts included, of course)

A word about the boot disk - if you hold down a mouse button as the boot disk is loading up the menu (yellow or black on the xbox controller), a different menu comes up.
From here you can do a few useful things, the most useful is the 'No PRELOAD' option. If you select this, the menu returns to the original menu of slaves and documents, except now if you select a slave it will start without the PRELOAD argument.
Useful perhaps if you want to try to load Beneath A Steel Sky (original version) or Monkey Island 2, which are probably too big to PRELOAD on winuaex.

I should have mentioned before that this utility will not repackage the game pack BeneathASteelSky_v2.0_CD32.zip.
It is too big (and it wouldn't work in winuaex anyway). Any (or all!) of the other 2647 game packs can be repackaged.
To do all of them in one go now takes about 3h 20min on my machine. You'll need to start with at least 64mb fast ram in winUAE if you're going to do the lot.
Also I should have mentioned before that I did this for myself, and I'm not responsible if you use this and it screws up your computer/kicks your dog/swears at your mum/etc!

Have Fun!
rare_j is offline  
Old 22 December 2009, 00:33   #4
mully
Registered User
 
mully's Avatar
 
Join Date: Jun 2009
Location: Australia
Posts: 40
I tried this out - nice work! Very satisfying seeing the script chugging away in winuae / classicwb lite, then the neatly output hdf files ready to ftp across to the xbox. Clever boot floppy concept. Thanks.
mully is offline  
Old 22 December 2009, 01:08   #5
waal
Registered User
 
Join Date: Dec 2008
Location: Paris / France
Age: 48
Posts: 137
This is excellent ! Just the tool I was waiting for. I'm eager to try it. Thanks a lot.

Two questions, though.

Why are you booting from an ADF ?

And can we use save states with WHD games in Winuaex ?

Last edited by waal; 22 December 2009 at 01:24.
waal is offline  
Old 22 December 2009, 06:51   #6
greenchili
Zone Friend
 
Join Date: Mar 2006
Location: United States
Age: 55
Posts: 28
Most likely he is booting from an ADF because it would be easier to "update" one ADF, rather than several WHD files if WHDload needs updating.

At least that is what KillerGorilla told me he was planning on doing with his whdload packs eventually.
greenchili is offline  
Old 31 December 2009, 04:47   #7
waal
Registered User
 
Join Date: Dec 2008
Location: Paris / France
Age: 48
Posts: 137
Works great.

But there must be something I don't know about the Workbench because I had to type "execute" before "repackage" and I also had to add this command in the scripts. Otherwise I have this shell error message "file is not an executable".

Can someone tell me what's happening ?

(ohh I'm so noob)

It works really well. I love it.

Thank you very much rare_j.

Last edited by waal; 31 December 2009 at 05:07.
waal is offline  
Old 04 January 2010, 02:29   #8
rare_j
Zone Friend
 
rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 1,176
Hi thanks for giving it a try and for your comments.
I've updated the first post with a new version (v1.2) and (hopefully) more thorough instructions.
If you used the batch script before, please check the instructions again. Setting it up is slightly different now.

Changes:
batch script:
- output a bit more information about the size of the pack and the specifics of the hardfile as it is being processed, just for fun.
- no longer doing a reorg on the generated hdf files. Reorg didn't make anything quicker on such small hardfiles and is just a waste of time during the batch process.
- tweaked scripts so that it all works without them needing the Script protection bit set. means you now have to 'execute' repackage. waal you probably unzipped the scripts under windows before so the Script protection bit was lost, sorry! this wouldn't be a problem now.
- tweaked the way 'unpacked size' is determined, before it counted the size of the files on disk once they'd been unzipped (including wasted blocks), now it gets the unpacked size from zipinfo before it is unpacked. should be slightly more accurate (by a few kb).
- added a bit of code to automatically skip a pack if it's unpacked size over 40mb as this has no chance of ever loading on WinuaeX. currently this means it skips only one pack, beneath a steel sky cd32.
- these changes are all just tweaks, the hardfiles generated by this version are the same as before. There is no need at all to re-batch your favourite game packs if you used a previous version.

boot disk:
- new feature to set extra WHDLoad options (e.g. custom1=1) before you start the game. see instructions for how.
- now makes use of xpk, xloadseg, and xfh so WHDLoad and kickstart 1.3 and 3.1 files can all fit on one adf. see instructions for how.
- tweaked TextView prefs.

You can overwrite the previous boot.adf on the xbox, it wont break any save-states you've made already.

Last edited by rare_j; 04 January 2010 at 11:13. Reason: correction
rare_j is offline  
Old 04 January 2010, 22:30   #9
Bigby
Registered User
 
Join Date: Feb 2009
Location: UK
Posts: 40
When I load a game in winuaeX, it loads up the menu (so I can choose the game or any docs). When I click on the game I get an error saying "C:WHDLoad failed returncode 10".

what have I done wrong?

Also is it possible for the boot.adf to be a hdf?
Bigby is offline  
Old 04 January 2010, 23:13   #10
Bigby
Registered User
 
Join Date: Feb 2009
Location: UK
Posts: 40
I tried the same thing on the windows version of winuae and now get:

"C:IPREFS failed returncode 20"
Bigby is offline  
Old 05 January 2010, 02:01   #11
rare_j
Zone Friend
 
rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 1,176
IPREFS fail 20 could be because you have kickstart 2 configured in winuae.
The boot disk needs winuae to start with kickstart 3.1.

WHDLoad fail 10 could be a few things, perhaps it didn't find a needed kickstart file on the boot disk, or you didn't start winuaex with enough fastram to preload the game. Didn't WHDload also pop up a box with an error message? "can't allocate expmem" and "object not found" usually mean it wants more fastram. If I knew what game pack it was I could try it myself.

The boot disk is an adf because winuaex has a bug where if there's no adf in df0 it takes longer to boot from hdf. Also it seems to always boot from the first configured hard drive no matter what boot priority you set, so you'd have to either boot from the game hdf, or fiddle with the configuration to swap the game hdf to drive 2 and configure your boot hdf in drive 1.
I just decided it was easiest to get round it all by making the boot disk an adf and setting floppy speed to turbo.
rare_j is offline  
Old 05 January 2010, 02:35   #12
Bigby
Registered User
 
Join Date: Feb 2009
Location: UK
Posts: 40
The error appears in the same AmigaDOS window that first comes up.

I forgot to mention that it says "wrong number of arguments" then the next line is "C:WHDLoad failed returncode 10".

I have so far tried 1000Miglia, 1943, 3DPool and 7Colors. (I only repackaged the #- games so far

In winuaex I choose: - select machine defaults - Amiga 1200 - 4M Fast RAM expanded - Best compatibility/Slowest.
Bigby is offline  
Old 05 January 2010, 18:39   #13
rare_j
Zone Friend
 
rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 1,176
The batch script didn't run properly on your machine. It needs Newicons installed and running.
Is Newicons working on youer setup?
rare_j is offline  
Old 05 January 2010, 19:16   #14
Bigby
Registered User
 
Join Date: Feb 2009
Location: UK
Posts: 40
I used Classic WB UAE to repackage the whdload packs to hdf. Is this why I am getting the error?

How can I check if newicons is installed and running?
Bigby is offline  
Old 06 January 2010, 03:35   #15
rare_j
Zone Friend
 
rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 1,176
It's a newicons issue Bigby. I need to modify the batch script slightly so it will work with ClassicWBUAE as well. Expect a new version shortly.
rare_j is offline  
Old 06 January 2010, 15:15   #16
Bigby
Registered User
 
Join Date: Feb 2009
Location: UK
Posts: 40
Thanks rare_j
Bigby is offline  
Old 06 January 2010, 17:13   #17
waal
Registered User
 
Join Date: Dec 2008
Location: Paris / France
Age: 48
Posts: 137
I had the same issue as you, Bigby. I switched to Classic WBlite and it worked.
Converting the ADF to HDF was very easy, too. I used ADFopus to create a blank HDF and I copied the files with adpro. On xbox, Ihave DH0 for the system and DH1 for the game and it running fine. Except the eventual bugs regarding the emulator core, WHDload and performances issues. But this is another subject.
waal is offline  
Old 06 January 2010, 20:51   #18
Bigby
Registered User
 
Join Date: Feb 2009
Location: UK
Posts: 40
Your right waal, used ClassicWB Lite and it now all works!!!

I'll try making the ADF into a HDF next, thanks for the instructions.
Bigby is offline  
Old 06 January 2010, 21:10   #19
rare_j
Zone Friend
 
rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 1,176
The first post has been updated with a new version (v1.2.1).
Changes:
Batch script:
- It seems the previous versions only worked properly with ClassicWB Lite. Modification was needed to the tooltype reading routine. Batch script will now work properly with ClassicWB Lite and Scalos based ClassicWB. Tested with ClassicWB UAE package (ADVSP and P96).

Boot disk:
- no change
rare_j is offline  
Old 06 January 2010, 21:28   #20
Bigby
Registered User
 
Join Date: Feb 2009
Location: UK
Posts: 40
Waal, I made the boot.adf to a boot.hdf and it works. There doesn't seem to be any loading speed difference compared to using the adf. You can put all the kickstarts onto the hdf though.

Thanks again for this excellent script and method of booting up WHDLoad games in winuaex, rare_j
Bigby is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADF & HDF Creator - support for sparse files? nexusle support.FS-UAE 26 27 February 2013 21:27
Custom HDF Creator freddix Amiga scene 14 09 May 2009 22:59
WHDLoad or KG packs.... Claw22000 project.WHDLoad 11 20 March 2009 08:02
Help with verifying WHDLoad packs liveevil project.MAGE 5 06 January 2008 00:19

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:58.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.13241 seconds with 16 queries