Jump to content

Dune II editor with 1.07 support


Nyerguds

Recommended Posts

Indeed they are... though as I said, in C&C it's easier to be sure the data bytes are divided correctly :

Also, the Structure Editor normally changes the resolution to a length of 50 lines, so you can get way longer lists. But apparently in Windows when I changed it to 25 lines the program adapted seamlessly.

Link to comment
Share on other sites

New version 1.7:

-Changed version label for 3-language version exe from "1.07-CD" to "1.07-EU"

-Added the ability to edit a value from the units/structures list (by pressing space/enter/F2/F3/F4) without having to switch to the options list itself.

-Pressing F2-F3-F4 in editing mode also cancels the edit now, so you can simply tap it twice to quickly see the value and close the edit frame again.

-Pressing F11 toggles Full Hexadecimal Mode, in which all data in the last column is displayed as hexadecimal values, and where the default editor (space/enter) is also the Hex editor.

-Supports the demo exe file from ftp.westwood.com/pub/dune2/previews/demos/

(it's hilarious to change all the "Attack" commands to "Die" and see the automated demo kill off each of its units with a single click ;D)

(oh, and this board needs support for FTP links :P)

image.gif.edbb4484431bb40c246b3259417cf779.gif

http://nyerguds.arsaneus-design.com/dune/dune2edit/d2editor_v1.07.0.zip

Edited by Nyerguds
Link to comment
Share on other sites

lol... the difference is that you were already making somewhat related tools, while I made this purely for him.

I always wanted to make something like this though, so it's been fun :)

btw, the Hexadecimal mode was designed to make it easier to identify the unknown bytes. This also allows you to group them together in their correct groups, since the bytes aren't merged together to one decimal value (another solution could be to display all unknown values as hex, like CCEDT does). If anyone identifies such byte groups that are either separate or grouped incorrectly right now, please let me know so I can adjust the editor.

I wanted a binary mode too, but that way the 4-byte values simply don't fit in the last column.

I might still do it though, but with an exception to display 4-bytes as hex. Though it's a bit of a pity then that it's lost on the Prerequisites, which is indeed a 4-byte bit list :P

Link to comment
Share on other sites

Very nice, thanks a lot once more, Nyerguds :) Once I got time, I'll try to uncover more unknown data via the new editor's version.

By the way, I wanted to ask you, how is the reference to external file names mentioned inside the EXE is done? I mean the references like those to WSA images of units and structures. If I knew, perhaps I'd be able to locate more house-specific info ::)

Link to comment
Share on other sites

Eh, well you'd  have to see that in a disassembler to let it make sense...

See, an exe file is separated in several sections. More specific, you got actual program code sections with instructions and you have pure data sections, where constants (like the data my editor edits) are stored.

(To compare... as I said, in C&C1 the unit data is actually in a program code section)

These references are a way for the program to refer to data located in a different section, and are basically the offset of that data in the file + a fixed value. Exactly how that value is calculated I don't know. I know it has something to do with the size of the exe file's header but I don't exactly know how it works in DOS files. Doesn't matter either, since all references used in one file use the same correcting value. So I'm just keeping the values hardcoded in my proggie, with one value for each game version.

Really thought... I wouldn't advise looking for references like these with a simple hex editor... that's what disassemblers are MADE for.

Oh, and if you want these ref values, just look at the .pas source that's uploaded... they're in there. I worked on it for a bit in school, and added comment on absolutely everything in there so it should be easy to find. The variable is called "refAddress" and contains 4 of them. The "dunever" array just above it tells you which one is for which version; they're in the same order.

Link to comment
Share on other sites

v1.7.1

-Fixed a bug which caused the program to write nothing but zeroes when saving a value of less than 4 bytes in the hex editor :P

-FINALLY found a way to effectively clear the keyboard input buffer, to prevent the bug where a "press any key to close the frame" situation would still execute the editor command of the key if it was an arrow key or F-key, even though the keypress was already used to close the frame.

(this was caused by the fact the arrow keys and F-keys apparently return a 2 character sequence, where the second is the actual value I intercept with the program. In this situation, the first character in the buffer was used to close the frame, and then the second was used by my program input procedure)

For example, this made you unable to close the Help frame by pressing F1 again, since it'd open it again right after closing it.

http://nyerguds.arsaneus-design.com/dune/dune2edit/d2editor_v1.07.1.zip

Link to comment
Share on other sites

Gah, you're right... I'll look into it.

[edit]

OK, apparently there was a bug in my hexadecimal text input reading method.

In my proggie, all data is saved in memory as 4-byte values, but the hex read method stored lower-than-4-byte values in the first (= highest values) of those 4 bytes instead of the last ones. I stupidly fixed this (in v1.7.1) by adapting my method to write bytes to the exe file so it wrote the (wrongly read) bytes correctly. This obviously screwed up other methods who DID store their lower-than-4-byte values in the correct way (like normal decimal editing), since the highest bytes were always zeroes there. The adapted write method only wrote these zeroes.

The origin of the hex input bug was, quite simply, that I originally designed it for 4-byte values only (the references), so I never wrote any code to adapt it to correctly handle 2-byte or 1-byte values.

Anyway... the byte writing method is restored like it was in 1.7.0, and the original hex editor bug is fixed in the correct way now, so everything should work again :)

http://nyerguds.arsaneus-design.com/dune/dune2edit/d2editor_v1.07.2.zip

(and yes, I kept copies of the source code from all previous versions since 1.4)

Link to comment
Share on other sites

Gotta love that editor you've come up with Nyerguds :)

I've long lost my original floppies (yes - I actually had the game on a couple of 3" floppies) but I've found my HitSquad classic release CD-ROM with the multilingual version 1.07 on. Only problem is that your great editor can't handle it. Something's different in that version of the game. If you feel like it I'd be happy to supply the dune2.exe file from my HitSquad version for you to mess with - but it's ok too if you don't feel like supporting it. I can live with modifying the version from Abandonia for trials :)

Link to comment
Share on other sites

Get me the exe and I'll fix it right away. I want this editor to be as compatible as possible, and it's only adding 3 values.

Not to mention, my source code is public anyway.

If you could get me the entire HitSquad release version, I'd be even more grateful, of course :P

Link to comment
Share on other sites

No problem :)

So what exactly is different in this release? I mean, do you see any different logos at startup or something like that?

I'd love to get the entire version so I can compare it and see if there are any big differences.

Link to comment
Share on other sites

Main difference is that the HitSquad version contains english, french and german language files aswell as VOC files in all three languages. The three region files in scenario.pak are also different because they too contain all three languages - all scenario files are error free: the version from abandonia.com has a bunch of extra garbled characters in one of the scenarios.

I'll pack an ISO of the CD for you and PM you a download link :)

Link to comment
Share on other sites

Thanks :D

The normal 3-language version already contains all stuff for all 3 languages though.

[edit]

Wow, this is really the ultimate 3-language Dune II version... there's even some mentat voice fixes :)

The 'Thopter Starport bug doesn't seem to be fixed though.

Link to comment
Share on other sites

Well, one thing I noticed was that the French mentat in the EU 1.07 version has the same sound file for "Unit Repaired" as for "Unit Deployed". It's just a copy of the "Unit Deployed" one. This seems to be fixed in the HS version.

Anyway... I uploaded the game itself (without all the other stuff that was on the CD) here:

http://nyerguds.arsaneus-design.com/dune/

I included an updated version of the icon, and the .DOC manual :)

btw, I really don't understand why they didn't make public patches for the European version, rather than releasing some better versions later -_-

Link to comment
Share on other sites

  • 2 weeks later...

Hmm... I've been comparing ArrakisResearchCo's icon.icn page to the internal data, and it seems that Unknown 036 corresponds with the tiles found at the index references at 16 to 26... I successfully changed the power plant to use the Construction Yard's graphics set this way.

However, it seems to use this for lower numbers too, which doesn't make sense unless you interpret these as references to indexes too... for example, the wall has the number "6", which according to the list points to tile #60, which is just some random tile.

However, if you interpret that as INDEX 60, it points right at the wall tiles, starting from the Destroyed Wall frame.

ArrakisResearchCo, I think you need to update your list for all entries below 27 to interpret the value at that index as a second index reference instead of a tile number. These first 26 indexes seem to be the 'index table' of the indexes.

You'll see that 8 are the concrete slabs, and 9 are the terrain tiles.

I'll see if I can dig up more.. like number of frames, usage of frames... stuff like that. But I don't think it'll be included in the stuff in this editor. It's probably somewhere else in the game.

---

Anyway... adjusted the variable name of Unknown 036 to "Structure gfxID", and grouped some bytes behind it together:

http://nyerguds.arsaneus-design.com/dune/dune2edit/d2editor_v1.08.1.zip

Link to comment
Share on other sites

Nyerguds, maybe you'd also add support for my Super Dune II SE executable (SD2SE.EXE). It's based off US DUNE2.EXE (v1.07), but even after I rename SD2SE.EXE to DUNE2.EXE, your editor doesn't seem to recognize it - probably it's been too heavily modified :)

Link to comment
Share on other sites

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...