Important information: this site is currently scheduled to go offline indefinitely by end of the year.

The Last Express HPF files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Re: The Last Express HPF files

Post by stevenx »

Rewrite the whole game engine is a good news.
Can you add a unicode subtitle display option in your new engine?
I remember this game did not display the subtitle .
ltronic
ultra-n00b
Posts: 4
Joined: Fri Feb 20, 2009 11:19 am

Re: The Last Express HPF files

Post by ltronic »

Thanks to tools posted here, yes, handling subtitles is definitely possible.
However I need (help) to reverse engineer NIS, SEQ and LNK files.
Once done, the game engine should not be *that* complicated to write.

Anyone willing to help ?
stevenx
veteran
Posts: 130
Joined: Sat Nov 01, 2008 12:02 pm
Has thanked: 3 times
Been thanked: 1 time

Re: The Last Express HPF files

Post by stevenx »

ltronic
ultra-n00b
Posts: 4
Joined: Fri Feb 20, 2009 11:19 am

Re: The Last Express HPF files

Post by ltronic »

Hmmmm,

Thanks for the link stevenx, however I don't think it is the same SEQ file format since the link you provided is about a music file format (MIDI related).
Most Sounds (except cutscenes ones) is The Last Express are stored into SND files.
From the various discussions, we can guess the cutscenes sounds are "somewhere" stored in NIS files.
Deniz Oezmen
VIP member
VIP member
Posts: 185
Joined: Mon Aug 28, 2006 2:07 pm
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: The Last Express HPF files

Post by Deniz Oezmen »

Ah yes, you reminded me that I abandoned work on the missing formats when I found quite a zoo of decompression algorithms within the disassembly.

I'm not sure how far you've gotten already, so I've taken a look at the code again. The code handling some (or maybe even all?) of the decompression for SEQ frames can be found at 0x0042614b in expressw.exe. If I follow it to the minute for a sample frame, this is what I get:

Image

A bit strange, isn't it? I wonder whether I have found a sample that describes an image switch ...
Anyway, filling up the colors by doubling them gives the following more reasonable, though a bit "guessed" picture:

Image

Let's see if we can find out a bit more ... I'd be glad to hear of your progress.

Best wishes,
Deniz
Deniz Oezmen
VIP member
VIP member
Posts: 185
Joined: Mon Aug 28, 2006 2:07 pm
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: The Last Express HPF files

Post by Deniz Oezmen »

Okay, I'm now pretty sure that this method works by the aforementioned pixel-doubling. The game developers probably stored the "switch frame" and the full frame combined into this single format to save space.

However, there are at least two or three other compression methods used on SEQ files. I'll have to analyze those first before there is a chance of extracting all frames.

Until then, here's another sample. This time the colors and transparency should be roughly correct:

Image

Best wishes,
Deniz
Deniz Oezmen
VIP member
VIP member
Posts: 185
Joined: Mon Aug 28, 2006 2:07 pm
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: The Last Express HPF files

Post by Deniz Oezmen »

Even if I risk talking to myself here:
  1. NIS and SEQ files can now be decompressed and converted. The file formats are quite messy and inefficient, so I didn't bother to track down each byte, but the bulk of the data can be extracted. Since there are different proprietary decompression methods involved, I won't have time to document the formats soon. If you have technical questions, don't hesitate to ask.
  2. LNK files are actually audio streams that "link" to NI sequences: When the NIS has finished (and the player regains control), the audio continues with the stream stored in the matching LNK file.
Updated tools can (as always) be found either on my site or as a direct download from XeNTaX. Be careful when converting many files at once -- all sequence frames are extracted as full-color 640x480 TGAs, which might fill up your hard drive sooner than you think.

An interesting observation just as a side note: As all major file formats are now known and none of them contains anything like script data, the game logic is probably built completely into the executable. If anybody wants to re-implement the engine, they probably will have to disassemble and analyze the whole deal -- or try to find one of the original developers and ask for the source code, which might be your better bet.
[Edit: I'll have to revise that statement a bit: The files TRAIN.DAT and CD?TRAIN.DAT in HD.HPF might contain script data. But nevertheless, there is much data hardcoded into the .exe.]

Additionally, I have one request: Could somebody who owns the full game (preferrably the english version) extract CD2.HPF and tell me the file sizes of 1917.SEQ and 1917.LNK? (The reason: These files store the concert sequence, but they seem to be truncated in my german-language copy.)
[Edit #2: Thanks to Marcus, this question has been answered: The german version indeed has a corrupt copy of 1917.LNK, cutting the concert scene shorter by about 9 minutes, while the english version is intact.]

Best wishes,
Deniz
ltronic
ultra-n00b
Posts: 4
Joined: Fri Feb 20, 2009 11:19 am

Re: The Last Express HPF files

Post by ltronic »

Great work !!

I'm back on track on this project, will try to keep you updated...
Deniz Oezmen
VIP member
VIP member
Posts: 185
Joined: Mon Aug 28, 2006 2:07 pm
Has thanked: 1 time
Been thanked: 14 times
Contact:

Re: The Last Express HPF files

Post by Deniz Oezmen »

Are you aware of this endeavour? These guys already seem to be on a pretty good track. Your help might be needed ...
Post Reply