English Amiga Board


Go Back   English Amiga Board > Other Projects > project.WHDLoad

 
 
Thread Tools
Old 28 January 2005, 15:09   #1
MethodGit
Junior Member
 
MethodGit's Avatar
 
Join Date: Dec 2002
Location: The Streets
Age: 39
Posts: 2,731
What makes you decide between ripped files and diskimages?

Does it depend on the layout of the particular game? Always wondered....
MethodGit is offline  
Old 28 January 2005, 20:59   #2
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Lightbulb Files vs disk images

If basically depends on how the games are written. For example, YoJoe has code similar to this:

Code:
move.l #5,d0
lea	 $10000,a0
bsr	 _Load
The game is basically saying "load the 5th file to address $10000". When you look at the game loader itself it becomes obvious why a file based approach is best:

1. The loader is simple - it is asks for a file number and address. So we can bolt together a filename like "YoJoe_5.bin" very easily.

2. The game stores a flat directory on disk one that never changes. The directory knows where each file begins and ends. Therefore we can easily rip the files from the disks as we know where they all begin.

3. The game comes on 2 disks. The loader knows it wants the 5th file and under certain conditions it will ask you to swap disks. If you rip the entire game to files, you can skip all the disk number checking as we have all the files in one directory. This greatly simplifies the install, and means the game can load quicker. Just load the 5th file and ignore checking if the right disk is in!

4. The big one - the game depacks data as it loads each track. This can be a real headache in the loader because you would have to temporarily load part of the file somewhere, then depack that into position, then load a bit more. So you would need an extra buffer somewhere and the depacking code is intermingled in with the disk loading code. Whenever I see this, I immediately use files. The Hi-Tec games like Jetsons, Blazing Thunder are the same.

5. Games ripped back to files can be compressed, so if the original used a fairly useless packer, we can save lots of space/memory by depacking and repacking the files. It will also preload the game into Amiga's with smaller amounts of memory more easily.

Lots of games do not have a directory listing where the files begin and end, so unless you play through the entire game or can easily detect where the files reside, you would use disk images. Super Cars 2 does not have a directory of the files, so I have used disk images for that game.

Kickstart 1.3 games are a different kettle of fish.

If the game doesn't save any data, you can use either type. Some files cannot be compressed as they are loaded in pieces using LoadSeg (an O/S call).

If a kickstart 1.3 game saves files, you'd really be stupid to use disk images as eventually the game disk will become full and start prompting you with "out of disk space" errors! You also run into problems such as the disk images being set as read only and prompt "Volume XXX is write protected" (I've seen several installs do this - very sloppy! To be fair, the patchers probably didn't realise you could save games in some cases).

Battle Chess, F1GP, Sim City etc are good examples as you can store as many save games as you want on the disks. Only a complete amateur/moron would install those games as disk images!

Last edited by Codetapper; 29 January 2005 at 00:22.
Codetapper is offline  
Old 28 January 2005, 21:30   #3
Joe Maroni
Moderator
 
Joe Maroni's Avatar
 
Join Date: Feb 2003
Location: Germany
Age: 44
Posts: 1,303
Send a message via MSN to Joe Maroni
where did you got all this knowledge....
Joe Maroni is offline  
Old 29 January 2005, 02:48   #4
MethodGit
Junior Member
 
MethodGit's Avatar
 
Join Date: Dec 2002
Location: The Streets
Age: 39
Posts: 2,731
Through years of dissecting games inside out perhaps?

Very intriguing and learnful new info, Tapper! I asked kinda because a few random questions and facts in the world of HD-patching came to my mind lately....

1) JOTD started out the WHDLoad edition of Agony using the same ripped files that his JST loader used. At some point however, he changed it so that it used disk images instead. I'm sure he found some complicated bug or some sorts that was caused by incorrectly ripped files or something? (I could be totally wrong of course.)

2) In a sort of similar case, the Lemmings JST install uses ripped files, but the WHDLoad install uses diskimages.

3) There have been a few cases where someone's install for a particular game is replaced by somebody elses - Bored Seal did Bubba N' Stix first but then was replaced with JOTD's version; and in almost the reverse manner, JOTD did Wonderdog first but Bored Seal's version then overwrote it. Not to mention JOTD working on Superfrog and releasing his version on his site only for Tapper to do an improved take and get that released instead!

4) It seemed Galahad knew more about the layout of Switchblade II than JOTD originally did. Going from a grem2filed disk image to ripping all new 'REAL' files (not sure why he calls them that! ) was a neat tricko back then.

5) The disk layout for Shufflepuck Cafe seems to be popularized by ALL existing installers for it - WHDLoad, Zarkov's release and Energy's install all use the same files!

Not sure all that was worth divulging but there you go.
MethodGit is offline  
Old 29 January 2005, 11:55   #5
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Question Guesses

It all boils down to individual tastes I guess - just like if you asked 10 crackers to crack a game you would probably end up with 10 slightly different cracks. There are definite advantages and disadvantages for each method, and it's up to the patcher to work out the best one.

1. No idea about that sorry.

2. For caching purposes, if a game uses more than about 30 files, the WHDLoad docs recommend you use disk images. For Lemmings, this might be the reason it was done as a disk image - with hundreds of little files takes longer to preload than a single disk image. If it's not for that purpose, I have no idea why!

3. Several installs that have been spread are just quick hacks, not really fixing everything they should be. Some CD32 games for example just use OSEmu to load then let them run. They work on some machines, but a real patch fixing all the bugs will be much better and these are often rewritten by somebody else. BTW Jeff only did Superfrog for JST didn't he? I wasn't aware of any WHDLoad version he did - although he find/fix the Project F bug!

4. Grem2File probably took a lot of work to adapt to ripping files out, so Jeff probably left it as a disk image. With the advent of RawDIC, ripping files is easy.

5. Some games have the data structure in such a particular format that most crackers would likely rip the data the same way. This is probably one of those cases (but I haven't disassembled the game to look so it's just a guess).
Codetapper is offline  
Old 29 January 2005, 14:03   #6
Eny-
R3tr0 G4m3r
 
Eny-'s Avatar
 
Join Date: May 2004
Location: Lisbon - Portugal
Age: 44
Posts: 327
Codetapper, i'm officially impressed
Eny- is offline  
Old 29 January 2005, 16:03   #7
MarlboroMan
Space for rent
 
MarlboroMan's Avatar
 
Join Date: Feb 2004
Location: Germany
Age: 43
Posts: 102
Boah all that information! I also wondered about that files/diskimages question, but thanks to Codetapper its now crystal clear.
MarlboroMan is offline  
Old 05 February 2005, 13:16   #8
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
Hi,

I'll try to reply/complete Ian's answer.

Yes, my Superfrog install was only for JST. And I think the one Ian did is much better, lots of features, etc...

Bored re-did wonderdog, that's a pity because I think it could have been converted in 5 minutes to whdload. But what's done is done...

About Agony, I first used a ripper which created files, but I did not find the filetable, so the files lengths & offsets were intercepted (intro, level1, etc...) by me each time the game loaded something. Everything was ok until NTSC version support: the offsets were different and we were goind through the whole process again. Replacing by disk images simplifies the install and the loader has not been affected much.

Ian you're right about the wrongness of using diskimages for kick1.3 games, but since HD support of kick1.3 emulation is not perfect, there are games which only work with diskimages: examples: Faery Tale Adventure, Turbo, Dungeon Master.
I also experienced crashes with all the sierra games when running the games under kickemu with real files, so at first the installs such as Colonel's Bequest, King's Quest IV used disk images. But in that particular Sierra/Adventure game context, it was finally easier to try to bypass the kickemu HD bug (which I eventually did) than to handle the tedious disk-switching, not to mention the savegame disk-space/flexibility problem.

And finally about Lemmings: too bad Mr Larmer used disk images instead of files. We could have merged the install. My install (JST) supported about 9 versions of the game, most of them different because of one or two files (MAIN & CODE). In that case, file solution is better because when you come across a new version, you just have to check diffs in some limited locations.
The format is shared by other Psygnosis games such as Leander, Red Zone, SOTB 3.

Another 2 funny things about Leander: NTSC & PAL versions differ only by 2 small files. Replacing the files allows to switch between versions.
Also, when I came across the disk protection of Leander, I removed it without even knowing it was a disk protection, and I was sure it was not data loading because the patching was done at file level.
jotd is offline  
Old 02 April 2005, 11:56   #9
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
Some games are incredibly wasteful when it comes to diskspace. I rip games to files for one reason only, and thats to save memory consumption. Several of my installs have been a fraction of their original size.
Galahad/FLT 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
Few questions.. Trying to decide if I want to buy WHDLoad or not... BryceOne support.Apps 18 11 June 2011 22:35
support for atari diskimages Ratte request.UAE Wishlist 20 17 November 2008 08:36
Decide on Pauls Message BippyM News 30 17 March 2007 04:07
Decide on Paul's Wreath DamienD News 4 16 March 2007 16:16
Bored.... want to buy another Amiga, help decide... Paul_s Retrogaming General Discussion 31 25 December 2006 08:58

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 17:52.

Top

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