Talk:Downloading FAH Core files manually

I added instructions for using "tail" to extract the BZ file from the FAH file. It's a lot simpler than downloading a hex editor. But I wonder, is that too confusing to non-Linux users, or to Mac OSX users that are unfamiliar with the terminal? --Peenie 21:39, 5 Jul 2006 (UTC)

I suspect most windows users will have no idea what the tail utility is. I think it needs a little clarification, something a little like this (which I have integrated into the article):

Note: If you have the "tail" utility, as is common on Linux and MacOSX installations, you may simply type - a hex editor is not required in that case. Windows by default does not include such a utility.
 * Open up the .fah file you just downloaded in your hex editor. Navigate to position 0x200 [hex], or 512 [decimal] (all hex editors will be able show the position in both hex and decimal) and delete everything before it. In hex, the value at 0x200 (512) is 42, in decimal the value is B.

Uncle_Fungus 23:07, 5 Jul 2006 (UTC)

There are Windows ports of bunzip, tail and many others: http://unxutils.sourceforge.net/

Kakao

True, there are also the official "Microsoft Windows Services for UNIX", which include these tools. But I have to agree with Peenie, most Windows users don't even know how to use the CLI, and I suspect that is true of many Mac users too. They like having a GUI interface to things and having to delve into something which most of them will associate with MSDOS is probably something they will not be willing to do.

Uncle_Fungus 10:37, 6 Jul 2006 (UTC)

Oh that reads much better. Thanks! :) --Peenie 14:54, 6 Jul 2006 (UTC)

For Windows users:

I thought TextPad could be used as a hex editor, but I was wrong. I tried to download WinHex, but the trial only lets you edit files <200Kb. So in order to convert the FAH file to a BZip file, I wrote a quick Perl script:

sub ModifyFahFile($) {	my $filename = shift; my $newname = $filename; my ($infile, $outfile);
 * 1)  'Converts' a Folding at Home core file to a bzip file.
 * 1)  'Converts' a Folding at Home core file to a bzip file.

die("Specified input file: $filename: Does not exist") if !-f $filename; die("Must have .FAH extension.") if $filename !~ /\.fah$/i;

$newname =~ s/\.fah/\.bz/i;

open($infile, $filename) or die("Could not open $filename for reading: $!"); open($outfile, ">$newname") or die("Could not open $newname for writing: $!");

binmode $infile; binmode $outfile;

seek($infile, 0x200, 0); my $buffer = undef;

while (read ($infile, $buffer, 65536)) { print $outfile $buffer; }

close($infile); close($outfile); }

die("Usage: $0 ") unless @ARGV; ModifyFahFile($ARGV[0]);

Usage: perl 

Also, I found that I had to put the FahCore_XX.exe file in "%userprofile%\Application Data\Folding@home-x86" and not in the Program Files directory in order for the client to recognize it.

-Kris
 * Heh, another Perl script like this has existed for some time in fah-tools: fah-core-convert.pl
 * Smoking2000, Tue Oct 28 09:22:18 UTC 2008
 * Smoking2000, Tue Oct 28 09:22:18 UTC 2008