Curse of Enchantia

All the inane chatter goes in here. If you're curious about whether we will support a game, post HERE not in General Discussion :)

Moderator: ScummVM Team

cappuchok
Posts: 134
Joined: Mon Oct 31, 2005 7:54 am

Post by cappuchok »

Del wrote:
cappuchok wrote:A quick look through MobyGames seems to suggest that one or both of the original programmers are now working at Mass Media (website).
Where did you see that? I tried looking for Ian Sabine & Rob Toone, but didn't find anything?
It takes some cross-referencing and some guesswork... Clicking on "Robert Toone" in the credits list for Curse of Enchantia on MobyGames gives a list of the titles on which he has been credited, in reverse chronological order. The company name listed beside each is the publisher, so to see the developer requires you have to click on the game title. Out of the four titles on which he's been credited since Enchantia, three were definitely developed by Mass Media Inc. With Ian Sabine things are a little more sketchy as only the latest game he was credited on was developed by Mass Media.
Del
Posts: 38
Joined: Wed Apr 26, 2006 4:48 pm

Post by Del »

Ah, right. I only made a cursory glance over the mobygames stats. I'll try contacting Mass Media tomorrow and see if there's any interest :)
cappuchok
Posts: 134
Joined: Mon Oct 31, 2005 7:54 am

Post by cappuchok »

Del wrote:Ah, right. I only made a cursory glance over the mobygames stats. I'll try contacting Mass Media tomorrow and see if there's any interest :)
I think Core might still hold the copyrights, or possibly Eidos, so there's probably nothing Mass Media as a company can do about it, but maybe if one of the original programmers work there they might have appropriate contacts inside Core that can help you out. On the other hand they might have cut ties alltogether with Core in which case you will probably need to contact Core directly somehow - they have a mailing form on their website, for example.
Del
Posts: 38
Joined: Wed Apr 26, 2006 4:48 pm

Post by Del »

Image

Image

Some tests. They are quite dark for some reason, so there's also some other palette modifications going on, which I am working on. I used to following quick & dirty perl script to create the images:

Code: Select all

#!/usr/bin/perl

use GD;

use warnings;
use diagnostics;

my $pal = shift || &usage;
my $dat = shift || &usage;
my $out = shift || &usage;

my $image = new GD::Image(320, 200);

#Open the PALette and create the color-table
open (PAL, $pal) or die $pal;

$offset = 0;

until ( eof(PAL) ) {
	read(PAL, $record, 3) == 3 or die "short read\n";
	$col = unpack("H6", $record);
	$color = $image->colorResolve(
								  hex(substr($col,0,2)),
								  hex(substr($col,2,2)),
								  hex(substr($col,4,2))
								 );
	$colors{substr("00".(sprintf "%x", $offset++), -2)} = $color;
}

#Open the DATa and set pixels to correct color from table
open (DAT, $dat) or die $dat;

$a = 0;

while ( not eof(DAT) ) {
    read(DAT, $record, 1) == 1 or die "short read\n";
	
	$index = substr("00".unpack("H2", $record),-2);
	
	$y = int($a / 320);
	$x = $a++ % 320;
	$color = $colors{$index};
	$image->setPixel($x,$y,$color);
}

#Create png-file
open (OUT, ">", $out) or die "$out: $!";
binmode OUT;
print OUT $image->png;
close(OUT);

sub usage {
	warn "Usage: $0 .PAL-file .DAT-file out.png\n";
	warn "The .DAT-file must be de-RNC'd\n";
	exit(0);
}
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

I'm not that great a programmer, but probaby you need to bitshift the rgb pal values to make it lighter? Just a guess though.

clem
User avatar
john_doe
ScummVM Developer
Posts: 117
Joined: Fri Nov 04, 2005 8:25 pm
Location: Stuttgart, Germany

Post by john_doe »

clem wrote:I'm not that great a programmer, but probaby you need to bitshift the rgb pal values to make it lighter? Just a guess though.

clem
That would be my guess, too.
Shift the rgb components 2 bits left each.
(VGA uses only 6 bits for each component while PNG uses full 8 bits.)
Del
Posts: 38
Joined: Wed Apr 26, 2006 4:48 pm

Post by Del »

Of course :)

Image

Image

I know very little about VGA & DOS internals, so these parts are still new to me... The change is this:

Code: Select all

	$color = $image->colorResolve(
								  hex&#40;substr&#40;$col,0,2&#41;&#41; << 2,
								  hex&#40;substr&#40;$col,2,2&#41;&#41; << 2,
								  hex&#40;substr&#40;$col,4,2&#41;&#41; << 2
								 &#41;;
Ian Sabine
Posts: 6
Joined: Tue May 23, 2006 8:45 pm

Post by Ian Sabine »

Greeting gents, nice work so far.
This brings back very old memories as it was my first game!
Someone mentioned that they thought it was written in Borland C, in fact it was written in 100% assembler, 80186 I believe.
Del
Posts: 38
Joined: Wed Apr 26, 2006 4:48 pm

Post by Del »

Hi, nice to meet you!

Thanks for the headsup on the 100% assembly. It helps to know that it's coded by hand.

I'm currently working on identifying file-opens and renaming labels in the disassembly, to get a better overall view of the structure of the program. There's quite a bit of work ahead, but I am beginning to get an idea of how to go about it. I've identified the parts that contain the introduction and the RNC-unpacking.
timofonic
Posts: 254
Joined: Thu Jun 01, 2006 2:18 am

Post by timofonic »

Nice stuff, what about opening a blog or WIKI for your RE experiment? ;)
User avatar
dreammaster
ScummVM Developer
Posts: 559
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Post by dreammaster »

There's always the new Reverse Engineering Wiki at http://rewiki.regengedanken.de/wiki/Main_Page

I confess that I'd already put in an entry for the .SPR file format based on your forum posting. It could certainly use some fleshing out if you're interested.
Del
Posts: 38
Joined: Wed Apr 26, 2006 4:48 pm

Post by Del »

Thanks dreammaster, I've been really busy with work these last few weeks, I have a lot of notes in text files that will be put into the wiki as soon as I have 10 minutes of spare time. Seems like you're doing quite well also! We have to compare notes at some point.

I have some notes as well that are not on the wiki, that you'd most likely be intersted in.
User avatar
dreammaster
ScummVM Developer
Posts: 559
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Post by dreammaster »

Del wrote:I have some notes as well that are not on the wiki, that you'd most likely be intersted in.
Cool. I'll look forward to seeing your additions. As I see it, the more games we can put into the Wiki, the better it'll be, because it may encourage others in the future to develop tools for the games, or to go ahead and decompile / make modules for other games into ScummVM :D
User avatar
df
ScummVM Developer
Posts: 38
Joined: Thu May 25, 2006 2:05 pm

Post by df »

john_doe wrote:
clem wrote:BASS also has some RNC algorithm afaik, I wonder if that is coincidence...
Yes, probably. RNC is a third-party compression algorithm/library that was used by some games around that time (mid 90es). Think of it as the zlib of that time :)

@Del:
You can find decompression code for RNC method 2 in the BASS sources, I can send you C++ code to decompress method 1 if you want.
aaah rnc! rob northern computing. this guy/company wrote a packer called 'pro-pack' which was pretty cool, you could pack exes or as data files. I remember using this a lot on stuff I wrote.. it was great.

check..

Code: Select all

Short&#58; RNC ProPack - multi-format file packer
Version&#58; 2.08
Uploader&#58; iancourt@hotmail.com &#40;Ian Court&#41;
Author&#58; Rob Northen Computing
Type&#58; util/pack

This is the final release of PRO-PACK from Rob Northen Computing. Since Rob Northen Computing are nolonger trading, this utility has become freely distributable.

This may be particularly useful for Amiga users as this is the packer that Sensible Software used for the data files in SWOS. Now you can edit those teams and actually save them back to disk in crunched format - no need to delete other team files to fit edited teams on the disk, and no crashes due to internal buffers being filled!

This is the complete RNC PRO-PACK distribution, directly from Rob  Northen Computing, which also contains useful assembler code.



The archive contains&#58;

PPIBM.EXE                  - File packer &#40;PC 286 version&#41;
PPAMI.EXE                  - file packer &#40;Amiga version&#41;
PP.DOC                     - PRO-PACK manual
SOURCE &#40;dir&#41;               - Assembler unpack source files
    IBMPC &#40;dir&#41;
        RNC_1.ASM          - 8086 Method 1
        RNC_2.ASM          - 8086 Method 2
    MC68000 &#40;dir&#41;
        RNC_1C.S           - MC68000 Method 1 Compact Version &#40;consoles&#41;
        RNC_2C.S           - MC68000 Method 2 Compact Version &#40;consoles&#41;
        RNC_1.S            - MC68000 Method 1
        RNC_2.S            - MC68000 Method 2
    GAMEBOY &#40;dir&#41;
        RNC_2.S            - Z80 GameBoy Method 2
    SUPERNES &#40;dir&#41;
        RNC_1.S            - 65816 Method 1
        RNC_2.S            - 65816 Method 2
    LYNX &#40;dir&#41;
        RNC.MAC            - RNC macros
        RNC_1.SRC          - 65C02 Atari Lynx Method 1
        RNC_2.SRC          - 65C02 Atari Lynx Method 2
    MIPS R4300
        RNC_1.ASM          - Mips R4300 Method 1
timofonic
Posts: 254
Joined: Thu Jun 01, 2006 2:18 am

Post by timofonic »

Any news about this RE effort?

I only found this on the RE wiki: http://rewiki.regengedanken.de/wiki/.SPR
Post Reply