English Amiga Board


Go Back   English Amiga Board > Main > Retrogaming General Discussion

 
 
Thread Tools
Old 11 May 2009, 01:40   #101
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Hi all,

I'm actually finishing a chaos engine viewer i begun some years ago (based on the CD32 version). Maybe you know my website about game decompilation (mainly on Atari): http://bringerp.free.fr/RE/

I've reverse engineered some parts of the chaos engine binary to better understand the engine, sprites/palette creation and files structures. I never saw a game with so many strange things about files... probably a consequence of the CD32 conversion.

The utility allows you to view (of course) and execute some actions like activating triggers, getting items, running scripts and killing monsters while the map reflects the changes. All data are extracted on the fly from original ones (with or without RNC compression). By the way, i discovered what i call "RNC archive" which is several RNC files stored in one file...

Even if i code all my tools to fulfill my curiosity, i hope you'll be interested in it.

To complete it, i'll need some feedbacks concerning the puzzles:

- Do you remember if you came across some puzzles you've never been able to solve and/or were never explained by walkthroughs?

- Do you remember some puzzles behaving incorrectly?

Edit: I just saw the amiga longplay "Amiga Longplay [169] The Chaos Engine" on YouTube ( [ Show youtube player ]). I'm a little surprise the player resolves so few secrets. Maybe he does this with a speedrun in mind?

Edit2: The replay "Amiga Longplay [328] The Chaos Engine (a)" [ Show youtube player ] is a lot better.

Thank you,
Kroah


Last edited by Kroah; 11 May 2009 at 18:53. Reason: Spelling
Kroah is offline  
AdSense AdSense  
Old 11 May 2009, 15:39   #102
Exl
Registered User
Exl's Avatar
 
Join Date: Jun 2008
Location: Netherlands
Posts: 118
That is amazing! I would love to take a look at the code, or how in the hell all the data is laid out in the files. The questions and riddles have not left my mind, they want to be answered!
Exl is offline  
Old 12 May 2009, 19:45   #103
Qube
Registered User
Qube's Avatar
 
Join Date: Aug 2006
Location: England
Posts: 200
Kroah - looks very good indeed! Regards puzzles n the like, I recall in one of the walkthroughs of the Rings level (W1L3) that there was a key which could not be collected or something, I'll have to re-check that though. The other thing which was always weird was how on the very last level, if you open the map view, you will see a strange exit shown to the very bottom or something like that..

Was a superb game though. Needs a remix perhaps one day, 4 player internet, but using the same 2D gfx n the like perhaps, maybe a CE3 : Return To Chaos or somin, years later going back to see what happened to the ruins etc... To think they could have done some neat things with Chaos, like introduce a female character even, daughter of the Navvie or somin eh lol.

Q;
Qube is offline  
Old 16 May 2009, 10:54   #104
jotd
Cat freak
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 46
Posts: 1,973
Kroah please make your viewer available, and with source code if possible!

The CD32 version is strange because there are mixed ECS pictures and "AGA" (actually 4 bit per pixel) graphics for characters and some monsters.
But that's not new: Cadaver (PC) has 3 types of 16 color graphics: what I call EGA for the most of gfx, amiga bitplanes for the main character (with a 5th bitplane for mask), and ST bitplanes for fonts and dashboard !

I think it depended on the tools the designers used for each sprite/animation.
jotd is offline  
Old 18 May 2009, 02:04   #105
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Hello jotd,

Quote:
Originally Posted by jotd View Post
Kroah please make your viewer available, and with source code if possible!
Yes, i'm finishing some stuffs and i'll release it. I always provide source code on demand, so be it.

Quote:
Originally Posted by jotd View Post
The CD32 version is strange because there are mixed ECS pictures and "AGA" (actually 4 bit per pixel) graphics for characters and some monsters.
But that's not new: Cadaver (PC) has 3 types of 16 color graphics: what I call EGA for the most of gfx, amiga bitplanes for the main character (with a 5th bitplane for mask), and ST bitplanes for fonts and dashboard !
You are right.

There are at least 5 encodings for sprites (all are 4 bitplanes (16 colors) but the last one):
- 1 chunky (like on PC)
- 3 planars (ST format) with different interleaves (1 byte for 8 pixels width, 1 word for 16 pixels width and 1 dword for 32 pixels width). I say ST format because the AM planar format is not interleaved (or sometimes by scanline).
- 1 planar AM (variable bp)

That's why the sprites are 16 colors among the 256 colors palette (There is 1 palette for each world and a special one for the last level).

But what i really don't understand is the directory:
- All .SIN files are the exact copy of their corresponding .BIN file. They are useless.

- The STATIC.BIN file contains 7 files (getready.bin, expl1616.bin, nodes.bin, expl3232.bin, tranmask.bin, panel.bin and sp8x8.bin). Those 7 files are in the directory too but never used (the ones in static.bin overwrites them). Among those 7 files, only getready.bin and expl1616.bin are different.

- SNGARC.BIN is a RNC archive containing 29 RNC files:
000-003 world RJP sng (1 for each world)
004 title RJP sng
005 end level table gfx
006 all hire gfx (AM)
007-022 the level entities datas (monsters, nodes) (1 for each level)
023-026 world items gfx (1 for each world)
027 hire table gfx
028 "the chaos engine cd32 version" gfx

- SNGARC2.BIN is a RNC archive containing 11 RNC files:
000-008 the renegade gfx (all the same but pointing to the same data in the RNC archive)
009 "a bitmap brothers game" gfx
010 "the chaos engine cd32 version" (same as 028 from sgnarc.bin)

I know porting a game may need to change some files format, renaming them, etc... But here there are really strange things. Seems they have left they WIP files in the directory?

Last edited by Kroah; 18 May 2009 at 14:53. Reason: spelling
Kroah is offline  
Old 18 May 2009, 23:12   #106
jotd
Cat freak
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 46
Posts: 1,973
thanks for the info!! Exl was looking for node & enemy info everywhere. I would not have thought that it was in SNGARC.BIN!
The rest I pretty had it figured out. I started a RJP player, pretty much figured out the data format too (using Cannon Fodder song) but did not complete it. I can decode most of the data (using the asm source this time), but the format is awful.

BTW I've got a trick when I create dump programs: I dump the hex data but I replace the data by _ chrs where I know what it means:

05 67 __ __ 43 23 __ 01 00 __
and print them decoded below.

So when I get all __ I know all is decoded. Worked well for cadaver, even if there are still undecoded parts (I don't resource the code, so it's a little trickier )

about leaving the files in the directory, what do they care, as there is a lot of space on the CD. This info is very valuable for the WHDLoad slave, though: the data could be left off the HD so PRELOAD eats less memory.
jotd is offline  
Old 21 May 2009, 04:04   #107
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Quote:
Originally Posted by jotd View Post
thanks for the info!! Exl was looking for node & enemy info everywhere. I would not have thought that it was in SNGARC.BIN!
Yes i was puzzled about that too. What a strange design choice.

Quote:
Originally Posted by jotd View Post
BTW I've got a trick when I create dump programs: I dump the hex data but I replace the data by _ chrs where I know what it means:

05 67 __ __ 43 23 __ 01 00 __
and print them decoded below.

So when I get all __ I know all is decoded. Worked well for cadaver, even if there are still undecoded parts (I don't resource the code, so it's a little trickier )
I used to work in a similar way (and still sometimes do). But since i discovered 010 Editor some years ago, i rely heavily on it.

Concerning .ANI files, they -seems- to be regular IFF animation (standard header and chunks).

I've tried several IFF ANI players on PC and Amiga (DP V, Personal Painter), but none of them handle the IFF. Whether i'm wrong and they'are not so regular that i thought, or i've made a mistake.

Any ideas?

Last edited by Kroah; 21 May 2009 at 04:05. Reason: spelling
Kroah is offline  
Old 25 June 2009, 23:56   #108
Exl
Registered User
Exl's Avatar
 
Join Date: Jun 2008
Location: Netherlands
Posts: 118
Quote:
Originally Posted by Kroah View Post
I've tried several IFF ANI players on PC and Amiga (DP V, Personal Painter), but none of them handle the IFF. Whether i'm wrong and they'are not so regular that i thought, or i've made a mistake.

Any ideas?
The IFF Anim players I fed them to (those that I could find right now) did not want to play them. Maybe they use some custom adaptations...?

Any progress on other parts of it?
Exl is offline  
Old 19 July 2009, 23:59   #109
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Hi all,

Quote:
Originally Posted by Exl View Post
Any progress on other parts of it?
I need some testing.

Anyone here has some spare time and knows sufficiently the game to give usefull feedbacks? I'll send the program via PM.

Thanks
Kroah is offline  
Old 21 July 2009, 00:06   #110
Exl
Registered User
Exl's Avatar
 
Join Date: Jun 2008
Location: Netherlands
Posts: 118
I have spare time, though I don't know the game by heart if that is what you mean.
Exl is offline  
Old 21 July 2009, 01:14   #111
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Quote:
Originally Posted by Exl View Post
I have spare time, though I don't know the game by heart if that is what you mean.
Thank you, i've sent you a PM.

Anyone else interested?

Last edited by Kroah; 21 July 2009 at 02:07. Reason: typo
Kroah is offline  
Old 21 July 2009, 05:14   #112
lilalurl
T32
lilalurl's Avatar
 
Join Date: Aug 2001
Location: France
Age: 38
Posts: 2,833
Send a message via ICQ to lilalurl
Quote:
Originally Posted by Kroah View Post
Anyone else interested?
If you need that on short-term, sorry.
Otherwise, next week I should have some free time. Finished CE a few times but don't know it by heart.
lilalurl is offline  
Old 21 July 2009, 14:21   #113
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Quote:
Originally Posted by lilalurl View Post
If you need that on short-term, sorry.
Otherwise, next week I should have some free time. Finished CE a few times but don't know it by heart.
You're right, i hope putting the viewer online this week if i have enough feedbacks to fix potential bugs.

But your feedback is welcomed after that anyway .
Kroah is offline  
Old 21 July 2009, 17:11   #114
Exl
Registered User
Exl's Avatar
 
Join Date: Jun 2008
Location: Netherlands
Posts: 118
I've had a quick look at it so far, and it is a very impressive piece of work! Regarding entities, I figured out some more of the fields a while ago;
Code:
short    X
short    Y
byte    Health
byte    Speed

byte    Unknown3
byte    Unknown4

byte    linkDeath
byte    Angle?

byte    Unknown7

byte    Class
byte    Attack
byte    attackDelay
byte    attackSpeed
byte    attackDuration

byte    Unknown13

byte    Link

short    Unknown15
This is by modifying the values in memory while the game is running (but before you start playing), and seeing what effect they have. Tedious work...

Anyway, I'm not 100% sure about the Angle (1-8 clockwise, 0 for facing player maybe). The Attack seems to describe what type of attack the entity has (see http://www.dvdflick.net/storage/ce_attacks.txt ), with the attack delay, speed (of the projectile) and duration (lifespan of projectile i.e. max. distance it travels) serving as parameters. The linkDeath field describes a link that when activated, kills\removes the entity from the level. "Unknown15" seems to be 0 in all levels.

As far as a cover's 28b_unkEffect field, here's what I found out;
Code:
Effects
=========
Values repeat in effect every multiple of 32. Despite being a flag, the
crossfade effect doesn't seem to combine with any of the pop effects. All other
values cause no effect to be used. I'm probably reading them wrong from the
file...

1   Top left pop
2   Top center pop
3   Top right pop
4   Center left pop
5   Center pop
6   Center right pop
7   Bottom left pop
8   Bottom center pop
9   Bottom right pop

17  Top left large pop
18  Top center large pop
19  Top right large pop
20  Center left large pop
21  Center large pop
22  Center right large pop
23  Bottom left large pop
24  Bottom center large pop
25  Bottom right large pop

255 Crossfade
A "pop" being one of those small white explosion things you also get when a coin vanishes. I realize the values are probably flags or something, and I'm interpreting the value wrong, but it's something at least.

I'll continue to peer through the viewer, and see if I can find some more things to comment on.

Last edited by Exl; 21 July 2009 at 17:20.
Exl is offline  
Old 21 July 2009, 17:42   #115
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Quote:
Originally Posted by Exl View Post
I've had a quick look at it so far, and it is a very impressive piece of work!
Thank you.

Quote:
Originally Posted by Exl View Post
Regarding entities, I figured out some more of the fields a while ago
I take note of these useful information!

Quote:
Originally Posted by Boo Boo
Thanks Kroah i'm very intrested in this kind of thing, I just wanted to ask - do you intend to turn the viewer into an editor?
Well, i will love writing an editor for Chaos Engine, but there are many things hardcoded in the binary and many unknown fields in the data. I'll have to spend more time than i have to find out them.

But the main sensible point imho is the way level data are stored. Some are in the famous ".CAS" files, some in the RNC archive (like the nodes and monster classes of the level). Updating them is a lot of work (rebuilding the RNC archive...). And some files have their length hardcoded in the binary.

Maybe the floppy disk version (ST) has an easier way to store/retrieve data (even if the disk has no file system and data are raw stored). For example Time Bandit does not have any file system on ST, but once mapped, it's easy to expand the levels in size.

Last edited by Kroah; 22 July 2009 at 13:24. Reason: spelling
Kroah is offline  
Old 24 July 2009, 03:40   #116
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Floppy disk

I've updated my reverse engineering page.

You'll find a new section about Chaos Engine. Not much for now besides my Chaos Engine Viewer.

You can download it there:
Kroah's Game Reverse Engineering Page

I'll add a little doc soon. Until then, try left click (simulate hero moves and script steps) and right click (simulate hero missiles) on colored squares.

Any comments are welcomed .

Have fun!
Kroah is offline  
Old 24 July 2009, 12:04   #117
Crashdisk
Moderator

Crashdisk's Avatar
 
Join Date: Jun 2009
Location: France
Age: 40
Posts: 1,231
Thanks ^^
Crashdisk is offline  
Old 29 July 2009, 00:55   #118
Qube
Registered User
Qube's Avatar
 
Join Date: Aug 2006
Location: England
Posts: 200
Kroah - wicked viewer, very professional look to it also. You sure have worked out a lot of stuff eh. Chaos really is one of the best games made, always a fun blast! Reverse engineering can be such a blast also.

Q;
Qube is offline  
Old 29 July 2009, 15:16   #119
jotd
Cat freak
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 46
Posts: 1,973
Just checked the viewer. Excellent stuff. Now you HAVE to code a remake or an editor, whatever the difficulty is
I'm taking care of Magic Pockets & Cadaver.
jotd is offline  
Old 07 August 2009, 17:49   #120
Kroah
Registered User

Kroah's Avatar
 
Join Date: Apr 2009
Location: France
Age: 40
Posts: 112
Could anyone post in the zone a filed version of Chaos Engine ECS/OCS?

Edit: i have tried to extract the files from some versions i have ([cr FLT]), but even if there's "DOS" in the header with the filenames readable, i can't extract anything. I haven't tried the SPS version.

Thanks in advance!

Last edited by Kroah; 07 August 2009 at 17:59.
Kroah is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turrican 2 level viewer Exl Amiga scene 28 22 December 2013 06:32
Chaos Engine level codes Kenan support.Games 3 20 June 2013 18:49
The Chaos Engine Djay request.Modules 7 25 February 2010 00:14
The Chaos Engine, level 3/2: Fortesque Mansion/Confusion fmcpma support.Games 6 12 September 2005 01:30
Chaos Engine vs Chaos Engine 2 NytroX86 Nostalgia & memories 20 31 August 2005 12:25

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:27.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.24645 seconds with 12 queries