OpenXcom Forum

OpenXcom => Offtopic => Topic started by: Hythlodaeus on March 27, 2013, 05:53:44 pm

Title: Cannon Fodder remake - WE NEED HELP!
Post by: Hythlodaeus on March 27, 2013, 05:53:44 pm
Hello folks.

Many of the retrogamers around here may be familiar with Sensible Software's wonderful wargame Cannon Fodder (https://en.wikipedia.org/wiki/Cannon_Fodder_%28video_game%29). We've recently secured the source code of an unofficial SDL fan-port made for the nintendo wii by Foxysofts (https://www.foxysofts.com/?l=content/wii/cfodder.inc&PHPSESSID=42efdc27cf6382de02ea431c11d315ca), and while the gameplay code seems to be all neat and tight, this port unfortunately uses sprite and music rips and includes them directly within the package, which is borderline illegal, considering the game is still being actively sold (https://www.gog.com/gamecard/cannon_fodder) on Good Old Games.

I've been collaborating with some of the folks of the GCW Zero crew (https://www.gcw-zero.com/), who have shown interest in using this code to create a universal open source port that would work with the original and legally acquired gamedata the same way OpenXcom does, in order to have it run both on their handheld and practically every other device imaginable. The problem is, we're having trouble reverse engineering the original PC data which all appears to be stored in some sort of compressed .dat file.

Given the general enthusiasm for retrogaming in this board, we were wondering if anyone would like to give us a hand with this task. We need to know how we can incorporate the original Cannon Fodder data with this engine so we're able to deliver a universal port. Would anyone around here be interested in helping us?
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: SupSuper on March 27, 2013, 11:05:30 pm
I would check Amiga communities, as it's likely the format hasn't changed much from its original source, and they're familiar with sprite ripping.

I had a cursory look at the DOS files and they just look like standard uncompressed images, so I imagine anyone more experienced with this stuff could easily crack them open:
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: luke83 on March 27, 2013, 11:08:08 pm
WOW i really wish i could code... I wish you all the best for this project , please keep me informed on your progress and let me know when your at a point i can make some custom artwork and/or cstom levels , hopefully by then i will have free time again to play around.   I was looking for a open source program of this a few months back which lead me to making some artwork for myself :)
https://openxcom.org/forum/index.php/topic,743.msg7095.html#msg7095
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: Hythlodaeus on March 28, 2013, 01:44:24 am
I would check Amiga communities, as it's likely the format hasn't changed much from its original source, and they're familiar with sprite ripping.

I had a cursory look at the DOS files and they just look like standard uncompressed images, so I imagine anyone more experienced with this stuff could easily crack them open:

I already checked the amiga version and the files are uncompressed into plain easily editable spritesheets and sounds, which would be perfect, except that there's no legal way to acquire the amiga rom other than the Software Preservation Society, which requires you to have a floppy disk copy of the game, hence why we're going for PC data first. We really need to reverse engineer the pc data archive before anything else, but for the moment, the source is ours, and we managed to convince the author to license it under GPLv3, which is even better.

I already asked the amiga community for help, but so far, no dice.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: luke83 on March 28, 2013, 04:35:29 am
I already checked the amiga version and the files are uncompressed into plain easily editable spritesheets and sounds, which would be perfect, except that there's no legal way to acquire the amiga rom other than the Software Preservation Society, which requires you to have a floppy disk copy of the game, hence why we're going for PC data first. We really need to reverse engineer the pc data archive before anything else, but for the moment, the source is ours, and we managed to convince the author to license it under GPLv3, which is even better.

I already asked the amiga community for help, but so far, no dice.


how do they check IF you do own the original disk? That same rule applies to all ROMS as far as i know and the risk of downloading it illegal is on the person downloading it.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: pmprog on March 28, 2013, 12:02:58 pm
I would love to have a play around, but I won't guarentee anything. I don't even know what's happened in OpenXCOM world for the past 3+ months
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: Hythlodaeus on March 28, 2013, 01:08:19 pm
how do they check IF you do own the original disk? That same rule applies to all ROMS as far as i know and the risk of downloading it illegal is on the person downloading it.

In case of the SPS, you have to send 'em a picture of the box or the disk themselves.

I would love to have a play around, but I won't guarentee anything. I don't even know what's happened in OpenXCOM world for the past 3+ months

If you'd like to help, get a a PC/DOS copy of Cannon Fodder and get crackin' on the cf_eng.dat. That's really all we need at this point.

Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: pmprog on March 28, 2013, 08:15:52 pm
If you'd like to help, get a a PC/DOS copy of Cannon Fodder and get crackin' on the cf_eng.dat. That's really all we need at this point.

My copy of the game doesn't have a file called cf_eng.dat !?!
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: Hythlodaeus on March 28, 2013, 08:24:00 pm
Are you using the GoG version? That's the one being officially sold. I've linked the store link before, but you can also acquire it in some other ways...
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: pmprog on March 28, 2013, 08:36:09 pm
No, I've got a really old edition, I guess they must have released another version at some point.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: Hythlodaeus on March 28, 2013, 08:45:40 pm
I'd advise you to get the GoG edition, since it's the only one that can be acquired legally nowadays.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: SupSuper on March 28, 2013, 08:48:58 pm
There seem to be many versions around.

The floppy version has all the files out "in the open", all the sound effects are standard VOC (https://wiki.multimedia.cx/index.php?title=VOC) files loadable in any audio program, the music is in some weird BIN files and the graphics are all in uncompressed 320x200 DATs using some Amiga-ish format. There's a bunch of other files I can't guess their purpose.

The CD version has mostly the same files but compressed into a "cf_cd.dat" archive. I assume the GoG version is similar to this.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: Hythlodaeus on March 28, 2013, 08:51:48 pm
The GoG version has it all in a cf_eng.dat. It's best we go with that version instead of any shady pirated copies lying around the web.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: luke83 on March 29, 2013, 12:16:25 am
really you need to support several formats , people should not need to re-buy a game just to play a opensource version.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: Hythlodaeus on March 29, 2013, 12:42:37 am
really you need to support several formats , people should not need to re-buy a game just to play a opensource version.

First thing's first. We gotta abide by the most widespread version before even considering supporting all the other ones. Besides it's probable that they all use the same file formats, only the newer versions have them stored in a .dat.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: darkestaxe on May 08, 2013, 12:20:34 am
A lot of old games just had entirely too many untar'd files, so sometimes developers will lump em all in a archive of some type and change the extension to .dat so that noobs leave em alone instead of unzipping them. I tried 7zip ... no luck.

Looks like the header to an archive to me. If I made an archive I would want a list of the files contained at the beginning with index values to where each files data starts.

Whatever archive format was used probably wasn't an old DOS/Amiga era format since the archive change is more recent, possibly GOGs work, so you probably wanna go talk to some people who specialize in stuff like archive formats etc.

At any rate from what it sounds like all versions are probably using the exact same format and you can probably load them all with the port code you already have, once you can open the archive.
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: eljohnno on June 02, 2013, 05:16:52 pm
the file format of the cf_eng.dat actually isn't very difficult.

The first long is the total header chunk size, in this case 0x156F
The file entries are parsed as:
1 byte: string length
x bytes: string (filename)
1 long: offset in the file
1 long: length of the data part (filesize)
and so on

so first record is:
Filename: INT26.VOC
Offset: 0x156F
Filesize: 0xCF7

second file:
Filename: MOR28.VOC
Offset: 0x2266
Filesize: 0xB79

and so on
Title: Re: Cannon Fodder remake - WE NEED HELP!
Post by: GhostlyDeath on June 12, 2013, 11:07:15 pm
My apologies if a 10 day bump is against forum rules.

Hello folks.

Many of the retrogamers around here may be familiar with Sensible Software's wonderful wargame Cannon Fodder (https://en.wikipedia.org/wiki/Cannon_Fodder_%28video_game%29). We've recently secured the source code of an unofficial SDL fan-port made for the nintendo wii by Foxysofts (https://www.foxysofts.com/?l=content/wii/cfodder.inc&PHPSESSID=42efdc27cf6382de02ea431c11d315ca), and while the gameplay code seems to be all neat and tight, this port unfortunately uses sprite and music rips and includes them directly within the package, which is borderline illegal, considering the game is still being actively sold (https://www.gog.com/gamecard/cannon_fodder) on Good Old Games.

I've been collaborating with some of the folks of the GCW Zero crew (https://www.gcw-zero.com/), who have shown interest in using this code to create a universal open source port that would work with the original and legally acquired gamedata the same way OpenXcom does, in order to have it run both on their handheld and practically every other device imaginable. The problem is, we're having trouble reverse engineering the original PC data which all appears to be stored in some sort of compressed .dat file.

Given the general enthusiasm for retrogaming in this board, we were wondering if anyone would like to give us a hand with this task. We need to know how we can incorporate the original Cannon Fodder data with this engine so we're able to deliver a universal port. Would anyone around here be interested in helping us?

I accidently stumbled across this post in a Google search of similar topic. I decided to follow said link and saw your name. I remember your name because I saw that you joined GCW channel and I thought that was a strange name. In either case, would be able to assist in programming efforts in certain aspects. You can contact me on IRC by the same name rather than on a forum i've never been on and will most likely never post again to. If you are interested that is.

If you need a resume:https://remood.org/ (https://remood.org/).