I don't know if I'm weird or if it's just normal to get random reverse engineering urges.
-
anyway, the game starts up by showing you TITLE.HUF.
let's just swap out all the other HUF files one by one and see what they are!
-
@growf that'd make sense!
-
it seems to only render the first half and then the rest is gibberish. I bet it's something to do with these files being multi-format, since they have to encode the image for VGA/CGA/Monochrome
-
okay so P0-5 are the artifact pictures, DASH is the dashboard, COVE is some castle (end of game?) and title is... the title
-
for the ones with 0/1 versions (COVE and DASH), 0 seems be the CGA/Monochrome version, while 1 is the VGA version
-
here's P0.HUF to show what I mean about corruption:
-
CMP files seem to contain object info, since I see text in them.
the game supposedly has 240 objects on the map, which can be transported onto your ship when found. Some are useless, some are clues to The Main Puzzle, and some are instant death bombs
-
I suspect the maps are compressed too.
time to find the decompress routine in the exe!
-
interesting. this code that opens A2.ARE reads 1536 bytes and then closes it.
the file is 2432 bytes, though
-
I think this game was programmed in assembly. passing one pointer in SI is not a calling convention I have seen compilers use
-
@foone
You keep getting ideas for more DOS games to hack to the point that it keeps you from doing anything. I believe this is a DOS attack -
ahh, I think I was looking at a custom loader that just handles TITLE.HUF
(which is 7687 but presumably the files is re-opened later?)
-
yeah the version that works for maps loads 8194 bytes.
which is an annoying number.
-
but I bet it's because it can read non-huffman'd files, and 8192 + 2 byte header?
-
ahh. so it's got a string in the EXE that's A0.ARE.
Then it has another string that's 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.
So when it wants to load area N, it indexes into the Nth item of the second string, then shoves it in over the 0 in A0.ARE and opens that file -
@phi1997 it sure is!
-
Programming used to be fun
. -
Ghidra: I support disassembly of 16-bit DOS programs!
also Ghidra: WHAT THE FUCK IS "DS"? all segment-relative poitners are aimed at segment 0000, right? -
either ghidra's set-register doesn't work or I don't understand what it's doing
-
uh-oh.
after loading the file, it calls two functions. One seems to just be shoving it into memory, but the other shows up as blank, and instant ret.
That smells like dynamic code loading and I don't like that