Re: TV Guide Channel Emulation Working!
Posted: Sat May 22, 2010 10:17 pm
Ok, I'm preparing to install IDA (the Interactive DisAssembler) to see if I can figure out how to depack these files. I'm not much for programming x86, and I haven't really programmed the Amiga specifically, but I do have 68k experience, so I should be able to fumble my way through such a small amount of code. If nothing else, it can be disassembled and clumsily translated to another language. It doesn't have to be efficient, it just has to do the job of spitting out an uncompressed file.
Before I do this, though, I'm going to take a little break and watch the new Doctor Who. Yay for the Internet, allowing us Americans to get the new episodes two weeks before they air here
Edit: Before watching Who, I decided to look up the Amiga executable format, and have determined the following about esq:
Two hunks, one code, one data
Code hunk goes from 0x24 to 0x29c, so 0x278 bytes (seems like fairly decent length for a depacker)
Data hunk goes from 0x2a8 to 0x20c48, so 0x209a0 bytes
Data hunk is given a size of 0x3dd48 bytes in the main header - I'm going to assume this is to allocate enough space to write the depacked executable without stomping on any other task's memory.
I'm going to go ahead and assume that the data hunk is the compressed executable itself, seeing as that's the only thing it could be.
Looking at sel, the code hunk is identical. The data hunk goes from 0x2a8 to 0x2290, so 0x1fe8 bytes. The executable reserves 0x2f5c bytes for this hunk.
For the record, the info I'm using to determine this comes from this textfile, which is (amusingly) a "guide to infecting Amiga executables". Not that we'll necessarily need it, but there is a full list of Amiga hunk types on the Wikipedia article about the Amiga hunk format.
Edit 2: Ok, I have a basic, uncommented, straight-out-of-IDA disassembly of the code hunk. I will shortly also be extracting esq's data hunk's data into a binary file, and will also do the same with sel.
Before I do this, though, I'm going to take a little break and watch the new Doctor Who. Yay for the Internet, allowing us Americans to get the new episodes two weeks before they air here
Edit: Before watching Who, I decided to look up the Amiga executable format, and have determined the following about esq:
Two hunks, one code, one data
Code hunk goes from 0x24 to 0x29c, so 0x278 bytes (seems like fairly decent length for a depacker)
Data hunk goes from 0x2a8 to 0x20c48, so 0x209a0 bytes
Data hunk is given a size of 0x3dd48 bytes in the main header - I'm going to assume this is to allocate enough space to write the depacked executable without stomping on any other task's memory.
I'm going to go ahead and assume that the data hunk is the compressed executable itself, seeing as that's the only thing it could be.
Looking at sel, the code hunk is identical. The data hunk goes from 0x2a8 to 0x2290, so 0x1fe8 bytes. The executable reserves 0x2f5c bytes for this hunk.
For the record, the info I'm using to determine this comes from this textfile, which is (amusingly) a "guide to infecting Amiga executables". Not that we'll necessarily need it, but there is a full list of Amiga hunk types on the Wikipedia article about the Amiga hunk format.
Edit 2: Ok, I have a basic, uncommented, straight-out-of-IDA disassembly of the code hunk. I will shortly also be extracting esq's data hunk's data into a binary file, and will also do the same with sel.