Demozoo hacking job(s) #1

Hacking?

When I say ‘hacking’, it’s used purely as an overall description of what I’ve been doing to help out with DemoZoo’s Atari ST side of things.

Some of the releases were only available on certain compact disk (note disk, not disc as in CD-ROMs) groups’ releases. These were one or two floppy disks and contained as much as possible due to the usage of file packers for both executable and data files.

Demozoo prefers to have each release as part of a single download per demo/intro. With links to YouTube videos if they’re available.

This is where I come in and (try to) help. Not every attempt is a successful one, mainly due to me being able to remember everything that I can about similar tricks from 25-30 years ago.

On the Syndicate Delicious Disk 67 was the “Syndicate FettisDag Slideshow”. Lotek, from Demozoo, asked if it was possible to separate out the demo (Option 4 on the disk menu) and accompanying files into a separate .ZIP file.

So I took on the challenge. This blog post is an example of this kind of task that I did last week where it had a successful outcome.

The target’s files

After working out what files belonged to the demo and copying to a working folder, the examination started.

There was a LOADER.PRG, several PI1 (Degas art package) files and a separate FLURP.PRG (the main demo). At first glance none of the PI1 files had the usual file lengths of either 32034 or 32066 bytes. So I assumed that there was some kind of file packing involved.

Running the demo directly, not via the loader, proved this as correct. All the graphics in the slideshow were corrupted. So this pointed to the loader being a Trap #1 depacked type.

A what kind of loader?

These loaders would hook into the TOS file loading routine. When the target program issued a FOPEN ($3F) command, the loader would:

  1. Open the file
  2. See if the files was packed with the packer(s) the loader recognises
  3. Depack the file if it is
  4. Hand control back to the original program

As this was a slideshow, this would happen with each PI1 file used by the demo.

Initial Steps

So my first step was to open the LOADER.PRG using Easyrider 4. Lots of gobbledygook but the tell tale strings showed bits of “AntiBitOS by Illegal”. Damn, it’s been protected by an anti-cracking tool, written by one of the scene’s most well known Atari ST crackers, Illegal of The Replicants.

However, after posting about this setback in the FB group, I remembered that Orion (also of The Replicants) had released a tool called ‘Dec0de’ a few years ago. It comes in ST and command line PC versions and it removes all kinds of cracker-proof envelopes devised by other crackers as well as commercial protection systems too, especially Rob Northern’s. There’s a full list on Orion’s GitHub area.

I ran the loader through the PC version of Dec0de and out popped a deprotected version of it. Loading that new file into Easyrider confirmed my suspicions that it was a Trap #1 loader and that it depacked data files on the fly. We’re getting somewhere now!

Oh, wait a minute, it’s not a known depacker header that the loader is looking for. The norm for most file packers on the Atari ST was to have the first four bytes as a mini header to say “this file was packed with this range of packers”. But in this case, the demo creators have changed the first 4 bytes of each packed file to mask which packer was used. Grumble, grumble …. more blocks in the way.

The loader was disassembled (via Easyrider than through Stew’s excellent Convert tool), into a source code file. I now have to compare this routine against my collection of depack routines I’d collected whilst writing my Multi Depacker tool that I’d coded over 25 years ago.

With luck, the second depacker routine that I looked at was Ice Packer v2.20. It was a near perfect match. So let’s try fixing the file headers of the PI1 files using a hex editor back to “Ice!” and see what happens when I try to unpack them.

This worked well for all but two of the files on the STAX disk 62 release that I was working with. They wouldn’t unpack correctly. So close, but so far.

Luckily Lotek had mentioned that this demo was originally released on Syndicate’s Delicious Disk 67. I found that disk on STonish.net, copied the two problematic files to my working folder, hex edited the header to be “Ice!” and they depacked first time. Another step towards a win!

The final step involved more hex editing, this time removal of all the A:\ from the front of the filenames. This would (in theory) allow the demo to run from a hard disk.

Once this was done, I cleared all the temporary files and tools out of my working folder and launched the demo. It all worked and none of the images were corrupted at all!

Here are a couple of the screenshots from the demo:

A .ZIP archive was created with this HD version and posted in the private FB group where these requests appear. (I’m not giving the group name out, so don’t ask).

The end result

The demo is now available from Demozoo in its deprotected, HD compatible and unpacked version.

Get your copy from here, or grab yourself the original release from STonish.net.

4 thoughts on “Demozoo hacking job(s) #1”

      • 6/9/2020.

        Good Day,

        Found your web site by accident – I am trying to find out whether I can read a SCSI hard drive that was used with an Atari STE – with a [reasonably] modern PC. [ Windows 7 / 10 or whatever. ]
        I am probably as old as you ? [ 70+ ] and am finding it hard to get my brain to understand whether this is possible or not. I have a similar beard.
        I have a working STE 1040 and several SCSI items for the Atari, but don’t want to use floppy discs so have recently purchased an ADSCSI PCI card for the pc in the hopes of seeing if there is any useful data on several SCSI drives that I have, by connecting them directly to the pc.
        . No success so far.
        If you would be interested in discussing this problem further and are willing to help me solve my dilemma, please email me. I live in Brisbane Australia. Thanks in advance.

        Reply
        • There are tools by Ppera which will go through a connected Atari ST formatted drive (which uses FAT-12 and not FAT-16) and let you browse through files on them, but it’s not something I’ve ever tried.

          http://atari.8bitchip.info/drimus.php – run it from under Windows and make sure you *only* select the Atari ST hard-drive as messing about with the wrong partition could wipe your PC’s hard-drive all too easily.

          (I’m way behind you age wise though, as I’ve only just hit my half-century).

          Reply

Leave a comment