Jump to content

Dune II editor with 1.07 support


Recommended Posts

Posted

There might be a bug in my ICN decompressor - I can't say for sure. I've CRC32 compared ICON.ICN and ICON.MAP from the 4 different versions of the game that I have - there are no differences between the 1.07-* versions but theres a difference in size of the ICON.ICN file in version 1.00 - have a look :

Version 1.00:

ICON.ICN: 54,231 bytes (CRC32=E120B498) - ICON.MAP: 1,486 bytes (CRC32=0F8F7909)

Version 1.07-US/EU/HS:

ICON.ICN: 52,893 bytes (CRC32=899F52EC) - ICON.MAP: 1,486 bytes (CRC32=B0667D96)

If there is a bug it might just be a question of realigning the reference pointers to the remap table in the ICN file to get the correct tile graphics. I'm not done figuring out how the ICN compression works - I'm hoping I'll be able to figure it out and realigning the decompression to get the correct graphics.

Hmm, that might explain the differences I encountered. The previous time I probably used the files from 1.00.

So that would mean the encoder/decoder was changed between 1.00 and 1.07.

Is your code available somewhere?

Posted

As for finding the frames... don't bother. Not like it's particularly useful to edit them anyway... after all, animations restart if you click on a building.

If you just use a hardcoded array for the frame counts of each building you can still make a perfectly working icon.map editor. All you really need is a directory with all the tiles from ICON.MAP (or, even better, reading straight from icon.map), and the foundations of each building (which I can easily read from the exe file)

One thing I can already easily do is write an icon.map generator that does nothing but read the exe file and the icon.map file and then generates a new icon.map file adapted to any new foundation sizes in the exe file. Of course, then you'd still need to edit the frames in that adapted building entry.

I could let my Dune II editor generate such a list... just an "icon.fnd" file with nothing but 16 bytes, each giving the foundation value (or actual number of frames, even) for one of the buildings. This file could then be used to easily generate & edit a new icon.map file with a second program.

Then of course I'd suggest that second program (the actual "building editor" which generates the new icon.map) should just have the default Dune II foundations as default values, with the possibility to either edit them manually or to import an icon.fnd file.

In fact, I got the basic data and structure for such a program written down already.

http://nyerguds.arsaneus-design.com/dune/dune2edit/iconmapeditor_rough.txt

Posted

I think my current ICN decompressor might be based on some of your work Olaf. It only handles the 1.00 tiles and crashes when tried on the 1.07 version - out of range - which is logical given the different sizes.

I've been comparing the contents of the two versions in a binary compare tool and it seems that up to about 35k into the file they are virtually identical except for the first ~192 bytes. Both files have those strange "FORM" headers I still havnt figured out how work and there seems to be some double-byte entries in difference: one at offset 6, one more at offset 30 (3rd byte after "SSET") and one more at offset 34. After that there's about 128 bytes that are different starting at offset 40.

I'm hoping to find some kind of pointer / reference / counter that will point to the rest of the compressed data: the bitmap table size / where it is - and where the actual tiles are located within the file. Most of it is still eluding me tho.

Posted

I think my current ICN decompressor might be based on some of your work Olaf. It only handles the 1.00 tiles and crashes when tried on the 1.07 version - out of range - which is logical given the different sizes.

I've been comparing the contents of the two versions in a binary compare tool and it seems that up to about 35k into the file they are virtually identical except for the first ~192 bytes. Both files have those strange "FORM" headers I still havnt figured out how work and there seems to be some double-byte entries in difference: one at offset 6, one more at offset 30 (3rd byte after "SSET") and one more at offset 34. After that there's about 128 bytes that are different starting at offset 40.

I'm hoping to find some kind of pointer / reference / counter that will point to the rest of the compressed data: the bitmap table size / where it is - and where the actual tiles are located within the file. Most of it is still eluding me tho.

Size shouldn't matter, as you're not assuming any sizes, right?

The format is very simple, did you have a look at my C++ code? It's just chunks and sub chunks.

Posted

I figured the "FORM" and other header references are some sort of block managers but how they are structured I'm not sure. Does your C++ code show how they work ?

Of course.

It's just a 4 byte ID followed by a 4 byte big endian size.

Posted

Thanks for the heads up on the FORM thingie. Olaf - do you know what the "SINF" entry is for ? In the .ICN file it's size is 4 contains 2,2,3 and 4 / 33,686,276 ...

There's a difference of 10 tiles between the two versions of ICON.ICN - the version 1.00 contains 399 tiles while the version 1.07 contains 389 tiles - according to the RTBL entry in the two ICN files.

Posted

Thanks for the heads up on the FORM thingie. Olaf - do you know what the "SINF" entry is for ? In the .ICN file it's size is 4 contains 2,2,3 and 4 / 33,686,276 ...

There's a difference of 10 tiles between the two versions of ICON.ICN - the version 1.00 contains 399 tiles while the version 1.07 contains 389 tiles - according to the RTBL entry in the two ICN files.

I've no idea.

Posted

There's a difference of 10 tiles between the two versions of ICON.ICN - the version 1.00 contains 399 tiles while the version 1.07 contains 389 tiles - according to the RTBL entry in the two ICN files.

Given the size difference, that makes sense. Your page is based on 1.00, right? It will be interesting to see what 10 tiles got removed and if there are other differences. I'm still not sure what's going on with my frames. I'm missing a repair animation as well.

Hmm, it looks like those 10 missing tiles are the hi-tech factory dome opening and the repair bay door half open. Can anyone verify those are missing in the game itself as well?

I'm wondering why 1.07 removed them.

Posted

Just tested it... this is crazy! The hi-tech factory doesn't have any animation left besides the flags, and the repair facility only has an open and a closed state, without any frames in between.

However... Olaf, if that image you made is made from the 1.07 ICON.MAP file that means the game still sees them all as different frames, and probably still plays them all. In which case you'd just need to add the 1.00 versions of ICON.MAP and ICON.ICN to fix the problem.

I can't test that right now though, since I'm at school, and the school virus scanner seems to be convinced there's a trojan in Dune 2 PAK.

Posted

Sorry about jacking your thread Nyerguds :P

My .MAP page is based on version 1.00 yes - there are a few tiles that are not referenced in the .MAP file so I'm guessing they have been removed in 1.07. I'll update my info to include both versions aswell as a comparison of the two.

Posted

I'm 100% sure these hi-tech and repair animations are in the original game though. So that won't be frames that are unreferenced.

Unless the executable has been updated as well to remove those references.

Posted

I doubt it... your picture proves that the frame references weren't deleted.

And if they did... well, they have a tendency to disable unused code without removing it, so I still might be able to reactivate it :P

Posted

I doubt it... your picture proves that the frame references weren't deleted.

I doubt it as well. ;)

What are the other differences between 1.00 and 1.07?

Posted

Well, it fixes the dreaded Time Minus 0 bug on the starport and some other stuff... and I think I saw MrFlibble and Ultraq discussing something about it accepting a newer SHP format that 1.00 can't read.

MrFlibble can probably tell you more about it as he's been converting Super Dune 2 from v1.00 to v1.07

Oh, it also has an odd bug where the ingame main menu items aren't centered on the buttons. This is fixed in the HitSquad version though.

---

Anyway, I just tested the repair facility and hi-tech factory... simply replacing the icon.map and icon.icn files by the 1.00 versions works fine :)

Another thing MrFlibble can add to his patch :P

Posted

1.07 uses new formats for both SHP and WSA files. Old WSA images crash the game for sure.

Oh, it also has an odd bug where the ingame main menu items aren't entered on the buttons. This is fixed in the HitSquad version though.

I don't remember encountering this - maybe it's only in the EU CD version? ???

Anyway, I just tested the repair facility and hi-tech factory... simply replacing the icon.map and icon.icn files by the 1.00 versions works fine :)

Another thing MrFlibble can add to his patch :P

As far as I can tell from your very lengthy conversation, 1.07 buildings miss some image frames, right? I wonder why...

Posted

That was Centered, sorry, my keyboard is acting up a bit. And I already found out that that wasn't a bug but a feature to accomodate the german and french version with the numbers before the main menu items.

As for why they took those frames out, I have no idea at all. Especially since the game still plays said frames, only they've been replaced by exact copies of the main frames with just the flag anim.

Posted

1.07 uses new formats for both SHP and WSA files. Old WSA images crash the game for sure.

Ah. The two vs four bytes for offsets issue?

Posted

Yes, it changes all WSAs in MENTAT.PAK, INTRO.PAK and FINALE.PAK. Besides, in the US version the updated FRIGATE.WSA is not included for some reason. Hence the Frigate description is also missing from the MENTAT#.ENG files.

You can check with XCC Mixer, it doesn't recognize the WSAs from v1.0.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.