I've been extremely busy over the summer so I haven't worked much on REing aside from what is documented here in the thread and on the wiki.
I'm looking at various RLE algorithms as it is likely that is what is used in the .BRD (Brad) and .SPR files. If I remember correctly I've named about 30-35% of the labels in the disassembly.
I also have notes on the overall structure of the executable, but in terms of completeness, I'm only about 10% into completely reverse engineering.
I never used any specific RLE algorithms, but they are RLE. The first 2 halfwords should be an offset from the home position (usually bottom center), followed by the bounding width and height (which could be different for each frame of animation). They might even be bytes, can't remember.
OTOH here's what I think I used.
num = width * height
while (num > 0)
{
read byte -> count
if (count < 0)
{
read byte -> value
copy value into next -count pixels
num += count
}
else
{
copy count+1 pixels
num -= count+1
}
}
Also bear in mind that mode X was used, so there might be a factor of 4 used in places.
When you say halfword, do you then mean byte? Or am I misremembering wordlength on the Intel processor, because they seem to start with two 16b values that denote width & height, then followed by two more 16b values that appear to be the offsets.
At the moment I'm writing some small tools for quickly extracting a specific sprite/etc's values so I can look them over without the clutter of having everything in a hex editor. I'll try to swap in the pseudocode and see what happens
no news I'm afraid. I'm stuck at the moment so I've taken some time off. I had some hard drive troubles, so I'm unable to run IDA at the moment. I'll let you know when I'm back to working on CoE.
As far as I know, it's not an engine per se, as Ian Sabine said the whole thing is coded by hand in machine code. While the interfaces of Curse and Universe are similar, I doubt there are code similarities (perhaps some file formats are the same, but that is probably all.)
Ian Sabine wrote:You are correct, the entire game (Universe) was written from scratch. Probably the only code shared would be the RNC unpacker
Del, how's it going?
Well I have a partially working sprite decoder going. It chokes a bit but the output sometimes looks right. Nothing to show yet, though. One thing I'm wondering about is whether the stuff that comes between the end of the RLE and the beginning of the next sprite is garbage or if it's used for anything.
Still making slight progress on commenting the disassembly, but I was just at Roskilde Festival so my brain is a bit mushy at the moment
It's all very baby steps as it's the first reverse engineering project I've worked on outside of a classroom environment.
I've been contacted by another guy who's also working on reverse engineering Enchantia. He's made a lot more progress than me, but we're comparing notes at the moment.
Just a quick FYI for the persons still interested in what goes on here
Del wrote:I've been contacted by another guy who's also working on reverse engineering Enchantia. He's made a lot more progress than me, but we're comparing notes at the moment.
Just a quick FYI for the persons still interested in what goes on here
You could drag him in here, so he might get the same warm shower of acception you get .. err, well you know
Well I was bored so I've written a skeleton engine.
Doesn't do anything yet, I'm just trying to get a feel for how ScummVM does things, what the important classes are, etc. Also getting reacquainted with C++, as it's been years since I've done any work in that language.
By the way, the quux examples on the HOWTO-Engines page on the wiki are pretty outdated. It was quicker to just have another engine open in an editor window and go from there.
Did Core only ever make 2 point-and-click adventure games? I know that by 1995 they had pretty much moved on to the 3d realm with Tomb Raider. There was a detective game that Core published called "The Big Red Adventure," but it was developed by Dynabyte. I'm just wondering because maybe one of those had some code in common with Curse or Universe.
Those two (Enchantia & Universe) are the only Core-developed adventure games that I know of. And Ian Sabine said they don't share any code except perhaps RNC-compressed files, so I doubt there's anything to gather.