104 comments

[ 4.6 ms ] story [ 153 ms ] thread
'Emperor: Battle for Dune', a 2001 RTS game by Westwood Studios, essentially a Dune-themed 'Command & Conquer'.

Play as one of the three main factions: House Atreides, Harkonnen, or the (non-canon) Ordos.

https://dune.fandom.com/wiki/Emperor:_Battle_for_Dune

The original C&C was in fact based on Dune II, the OG RTS game that came out in 1992. The cutscenes from Dune II are still burned into my memory, what a great game it was.
Dune II was so great for a 11yo !
"The planet Arrakis, known as Dune. Land of sand. Home of the spice melange. The spice controls the empire. Whoever controls Dune controls the spice. The emperor has proposed a challenge to each of the houses. The house that produces the most spice will control Dune. There are no set territories and no rules of engagement. Vast armies have arrived. Now three houses fight for control of Dune. The noble Atreides. The insidious Ordos. And the evil Harkonnen. Only one house will prevail. Your battle for Dune begins now..."

Just thinking about the soundtrack to that most excellent game gives me goosebumps. Fond memories there.

Very interesting and in depth article. I really appreciate the amount of detail and knowledge shared about how to go about reverse enginnering and patching abandonware like this. Thank you. Saw the game in a local thrift store, but left it be, since I only played Dune II rts. I will pick it up for sure now.
I wonder if it would run under Wine?
This is the most amazing things I’ve seen in ages, very exciting!! I’m very far from the technical work here, but I appreciate how approachable you made it. Can’t wait to try it when I get home!
I wonder if they can use manifests / registration-free COM to avoid the registry dependency of the online component.
I did come across some mentions of that, but it sounded like you would need to configure it at build time. If you know of a way to do it with a pre-existing binary that wasn't designed with that in mind I'd be very interested.
In theory the manifest could be external (app.exe -> app.exe.manifest; lib.dll -> lib.dll.manifest), but you already seem to be patching the binary so maybe embedding it directly as a resource wouldn't hurt. Ref: https://learn.microsoft.com/en-us/windows/win32/SbsCs/assemb... and https://learn.microsoft.com/en-us/windows/win32/SbsCs/applic...
> configure it at build time

There's a plain old API to create lookup scopes, IIRC.

Great article, wish I could go out for a night on the town with the author, I feel like they're pretty darn fun and intelligent.

The cute expandable explanations are just the bee's knees, and also useful. I felt like I was playing some sort of choose your own adventure RPG just reading TFA, which was a new kind of experience.

--

p.s. re: > CS:GO, which was only retired in 2023

I thought CS:GO was rebranded to CS2. Am I mistaken? (very probably, yes, pretty please enlighten me!)

CS2 is considered by some to be a downgrade compared to CS:GO (yours truly included). I have heard reports of tournament PCs being unable to hold a decent FPS in CS2, whereas they worked great with CS:GO. You can find many user reports sharing similar results, even with higher-end PCs.

Valve wants CS2 to be seen as the continuation of CS:GO, and instead of making a better game to replace it naturally, they forced the change on their playerbase. I, and others, will be bitter about this for some time, as CS:GO is an excellent game.

Their CS2 “server browser” is kinda disgraceful, especially considering that the game was carried for decades on custom maps and mods.
Remember GameSpy? Oh man.
Not to mention All-Seeing Eye!
I remember when it was QuakeSpy... The original Team Fortress mod for Quake was my absolute favorite back then.
Complaining about the new CS is tradition. When go came out, people said source was better. When source came out, people said 1.6 was better. They changed bunny hopping and AWP quick scoping somewhere around 1.3-1.5 and people said the previous version was better.

Although I guess in this case they _forced_ people to change, which sucks. Let the niche communities keep playing the version they like. I guess it's because it's a live service game and they need to keep selling their loot boxes.

And I do vividly recall someone saying that the later CS betas had lag-compensating things that were unfair, and invited others to play beta 1, “where you actually hit what you aim at”!
In ioquake3 and its forks it would be called "unlagged".

"Unlagged" is a specific implementation of lag compensation for the Quake III engine, which ioquake3 builds upon. It was developed to improve the gameplay experience for players with high ping, Unlagged aims to ensure that shots hit targets as seen by the shooter, even if there is a significant network delay.

There are mixed opinions on it, of course. It is much difficult to kill people without it enabled.

> When go came out, people said source was better.

Well, when GO was first released it was in fairness not the same CSGO that exists today. Valve took over from Hidden Path after release and it took a couple more years of development to make it competitively viable.

I think CS2 will eventually get there as well, it just feels too early to be forced to switch, as you say.

CS2 was uploaded under the same application ID as CS:GO, but they remade the entire thing in a new engine. It is not a rebrand.
CS2 uses Source 2 engine with DX11 or Vulkan renderer in contrast to old, Source 1 based CS:GO.
I am really stoked about this actually, I thought it could not happen
Hats off. Amazing effort. Great read. I haven’t used IDA on a game in a long while and this is next level effort. Bravo.
The soundtrack he links to reminds me of a game from the 90s called 7th Legion. It was average at best, but the music was killer
Totally agree. Back in those days, I played the game for a couple of hours at best, but the soundtrack has stayed in my music library for decades, what a masterpiece!
[flagged]
I'm not saying it's not a trojan, but the description sounds like something that a malware detector would flag even if it was perfectly innocuous.
Don’t know if it is or isn’t legit but the entire blog post is about building a communication server for the game with NAT punching, not surprising it might be flagged.
It's a !ml flag, so there's a high likelihood it's wrong, because there's no downside to false positives.

(The stuff I work on, which is all open source and doesn't even try anything silly, routinely but randomly gets flagged for some reason.)

Wacatac is usually a false positive.
[flagged]
Why link directly to the file? You already posted another comment mentioning it.
Any chance to port this to mac? :)
It's ~50 bucks for a second hand X86 laptop that can run this game (less than an Apple thunderbolt cable), if you actually want to play it now, instead of waiting for a Mac port to fall out of the sky.
Highly unlikely I'm afraid :(
Could potentially run on Wine?
On a related note, there is a modern Dune RTS on steam

https://store.steampowered.com/app/1605220/Dune_Spice_Wars/

It's pretty good, too!
Yeah this isn’t an RTS at all. As someone else said definitely more of a 4X with very minimal realtime troop movement.
Calling it an RTS is a stretch. It's more of a 4X game. It has a low pace and combat isn't particularly important.
Dune: Spice War's codename being "d4x" , this statement is absolutely fair :)
Aside what the others say about Spice Wars being 4X, the closest we got to an actual modern Dune RTS was Homeworld: Deserts of Kharak.
I loved this game very much. Best soundtrack of any Westwood Studios game. So glad it's still playable.
I totally missed this one! I went from Dune 2 straight to C&C.
Damn, what if we don't have any access to a physical copy of the game?
There's a certain organisation on the internet where certain things are archived.
I always forget there's software on there also. Tyty
That's a great writeup and a great effort! Perhaps we could integrate with your efforts at CnCNet somehow. Come hang out with us on CnCNet :)
This game actually holds a ton of significance for the RTS genre as a whole. A very typical view of the RTS genre is that you have peasants who harvest resources that you gave to protect, and the Dune RTS was a real progenitor in this.

But it was only like that because of the book. Were it not like that, maybe RTS as a genre would have gone down a different path. Maybe it's inevitable that it would have eventually gone down the path that it took eventually, but there's a good chance that it would have been unrecognisable. Maybe you'd have gotten resources by just harvesting your base's resources instead so opponents would have harassed you by harassing your buildings instead. Maybe there would have been different bonuses for map control other than better access to resources.

To be clear the article isn't about Dune 2; it is about Emperor: Battle for Dune.
I think that maybe it would've always been like that. History sort of leans on the peasant as resource base, ruler as strategist trope.

While Dune itself is like that, so is all of history.

For RTS it's a question of scope: How much of the resource base do you model? It could've been abstracted much further than this, and just grant resources passively based on territory held, or some other metric, and fully focus on battles. Instead we got a genre where resource collection is fairly involved, and a vulnerable spot for enemies to go after to cripple opponents early.

I don't think it was inevitable that the latter style of RTS would be dominant, and only a few outliers focus on simpler economic models, it very well could've been the other way around.

Dawn of War is a good example of an RTS that deviates from the genetic ore mining paradigm.
Blood and Magic works like this:

1. There's one resource, mana.

2. You can create a basal golem from your forge for 40 mana.

3. An idle basal golem will slowly generate mana. For this to occur, the golem cannot be moving. It can be located anywhere, as long as it's idle.

4. To create a building, you move 4 basal golems onto a site and select the building you want.

5. To create a unit, you move the appropriate number of basal golems next to the right kind of building, pay the mana cost, and select the unit you want.

Doesn't this just shift having to protect the gathering unit to having to protect the resource itself? How does this result in a different player experience? Honest question, have not played the game and I am curious, since I am a bit bored with traditional RTS games.
Never played Blood and Magic, but it sounds like map control would be a lot less important. Most RTS games are all about expanding and controlling resources as fast as possible, so you can out produce your opponent.

Turtling might be more viable in this game?

> Doesn't this just shift having to protect the gathering unit to having to protect the resource itself?

I'm not really sure what this means; you still need to protect the unit, but you can put it anywhere you want. Mana exists in your inventory and doesn't need to be protected. Golems will fight back while under attack and therefore don't generate mana during that time, but they become productive again immediately when the attack is over.

This strikes me as fairly different from, say, Starcraft, where workers can only function within particular small areas and having them outside those areas deals severe economic damage in the form of opportunity costs. The fact that everything you ever build is made of golems mirrors the Zerg mechanics, though.

But I am not a big RTS person and I find the overall conceit of the genre pretty annoying. There's no such thing as a battle where technology levels change mid-battle. In an actual battle, if you have infantry and you want artillery, what you want doesn't matter because you have infantry and that's not going to change. In an actual military campaign, if you have infantry and you want artillery, you do that by getting artillery shipped to you. You can't make your own.

Civilization focuses on technological development and includes military engagements that can't stand up to even the friendliest critical analysis. RTSes go the other way; they focus on battles and include a rump technology mechanic that can't stand up to analysis. The problem here is that technological development is measured in decades, or longer, and battles are measured in hours. You can't have a working game that does both things.

As someone else pointed out, this is a follow-up to Dune 2 which I believe you're thinking of.

Dune 1 laid the groundwork there though; initially it's a point-and-click adventure game of sorts, but later on in the game it changes and becomes a game of resource management / harvesting, army building and combat, as well as terraforming.

I could never wrap my head around the late game though; I believe the objective of the game is to make the world green again, but green areas don't produce spice. But the Emperor demands ever-increasing shipments of spice, if you don't meet the quota it's game over.

Mind you I was young when I played it so I probably didn't fully understand what was going on. I'll do a readup on it, it probably didn't age well / takes significant time to do a full playthrough.

edit: I didn't realise they released Dune 1 and 2 in the same year; this either means development on Dune 2 was already underway, or they built the engine and game within that one year. Unfathomable nowadays, even with the indie space and tooling being able to move fast.

It was two teams working in parallel the one from Virgin and the other from westwood. Both publishers had the "dune license".

The wiki page about dune 2 reveals more insight into the timeline: https://en.wikipedia.org/wiki/Dune_II#Development

Funnily enough the developers of Dune 2 thought Dune 1 was cancelled and were suprised when the Cryo team released early.

re Dune 1 and 2 in same year: At some point Dune 1, developed by Cyro interactive, was officially cancelled and Westwood (so a totally different studio) got a crack at developing it. But it turned out Dune 1 kept on getting secret funding as well, and wasn't cancelled when the higher ups found out. So we were kind of lucky to get both of them.
From memory - spice fields aren't infinite. So you convert spent fields into greens.

And I think the game ends when you take out the Harkonnens anyway.

I always thought of The Settlers (https://en.wikipedia.org/wiki/The_Settlers_(1993_video_game) ) as the first RTS game. It was published in June 1993, so a few months later than Dune, but both games were in development at the same time, so maybe it was a case of multiple "inventors" coming up with the same idea? The Settlers was apparently influenced by "God Games" such as Populous (https://en.wikipedia.org/wiki/Populous_(video_game)) where the players has god-like powers (e.g. reshaping the landscape), but doesn't manipulate his "units" directly.
You also didn't _really_ manipulate units directly in the 'Settlers' games, did you?
Very nice post! I did something related to this a decade back, except it was for Tiberian Sun and to patch its networking code. Jumping into other people's code like this is like having a shared connection in a sense. I noticed to my horror that there was a completely separate stack for modem play; it wasn't like they just sent TCP/IP over the modem or something. Some poor soul must have spent months of their life writing all this custom code for framing and syncing and error handling (what happens if the connection goes down and you have to re-dial, etc.?). Which was irrelevant almost already when the game originally came out.
I think that was for another reason. IMO sole purpose was calling t the another modem not connecting to the internet via dial up. I never use this but a lot ofbold games Has those option.
Yes, obviously. Direct dial-up plus local serial cable.
> UI design is my passion.

So great, I really miss writing like this. Reminds me of Steve Yegge blog posts, among others.

> It's got a 28.8 BPS modem

Active matrix, man. A million psychedelic colors.

RISC architecture is going to change everything.
Hey they weren't wrong, they were just 30 years early.

Yes, the movie was 30 years ago, we're all very old.

The idea that modern add-HD riddled and pay to win shovelware gets defeated by old classics is deeply entertaining to me. Just one hacker helping.. and the audience would drive the crapware out of town on a rail. Almost like good things of the past in an eternal medium will always outcompete mediocre things of the present.
I see this kind of note regularly in blog posts:

  This is probably a good time to mention that I am not a skilled reverse engineer. 
Nope. You've walked the walk, you've earned the right to talk the talk. We're all building experience as we go.

You're now at least a junior reverse engineer, and seeing the size of this project, you can even drop the junior as far as I'm concerned. Enjoy!

IMHO the difference between "skilled" or not is whether you know where to look for help without causing more problems, and even more importantly: when to look for help. Documentation might be all the help you need, and reading documentation definitely makes you skilled, but plenty of people don't know how to search for it!
Since it's now abandonware, you can download Emperor: Battle for Dune from archive.org directly or via torrent:

https://archive.org/details/EmperorBattleForDuneUSAEurope

(For others who, like me, want to try this game out with the wheybags patch :)

Just for fun, I also dug up the past pirate releases:

  releaseName                                              TYPE      releaseDate
  -------------------------------------------------------  --------  -------------------
  Emperor_Battle_for_Dune_v1_06_Update-RAZoRDOX            GAMES     2001-06-21 00:00:00
  Emperor.Battle.for.Dune.Update.v1.07.Cracked-MYTH        DOX       2001-06-30 16:16:43
  Emperor.Battle.for.Dune.All.Level.Saves-EyM              0DAY      2001-07-10 12:07:49
  Emperor.Battle.for.Dune.Update.v1.08.Cracked-MYTH        DOX       2001-08-17 08:17:39
  Emperor.Battle.For.Dune.Update.v1.09.Cracked-MYTH        DOX       2001-10-06 06:04:21
  Emperor.Battle.for.Dune.Update.v1.06.Cracked-MYTH        DOX       2003-07-11 22:33:37
  Emperor-Battle_For_Dune-NORDiC-DOX-RUSDOX                DOX       2003-07-11 22:33:45
  Emperor.Battle.For.Dune.Poradnik.POLiSH.PDF.eBook-KiOSK  BOOKWARE  2006-03-10 01:48:50
  Emperor.Battle.For.Dune.Money.Trainer-FLTDOX             DOX       2006-10-10 21:52:25
  Emperor.Battle.for.Dune.v1.06.Update-RAZoRDOX            0DAY      2006-10-10 21:52:30
  Emperor_Battle_For_Dune_Money_Trainer-FLTDOX             DOX       2006-10-10 21:52:30
  Emperor.Battle.for.Dune-DEVIANCE                         GAMES     2007-02-15 17:25:00
  OST-Emperor_-_Battle_For_Dune-CD-2001-DGN                MP3       2010-09-01 22:45:42
I was surprised to see there is even an OST soundtrack! Amusing.
The soundtrack for this game was badass, particularly the Harkonnen section. Easily one of Westwood's best. Here's a YouTube playlist: https://www.youtube.com/watch?v=x1SUUkhKkXo&list=PL4E8A87285...
When I think of Emperor: Battle for Dune, I hear "Ride the Worm" in my head. The music really sells the majesty of the armies battling in feudal war across a dangerous desert filled with behemoth creatures that could devour them all. https://youtu.be/czXaKxcQNkQ
The soundtrack to Dune 1 was remastered and rereleased earlier this year, it's very good indeed.

https://stphanepicq.bandcamp.com/album/dune-spice-opera-2024...

The soundtrack from dune 1 (and the game itself) was done by Cryo, completely different game studio. The game and soundtrack is amazing for sure though. In general all the soundtrack by Stephan Picq are worth listening to
(comment deleted)
Point of law: in the united states, there is no such thing as abandonware legally, copyright is automatic and not selling it or maintaining one's copyright enforcement doesn't mean it is legal to make copies. This is pretty widely ignored, and there are ill defined exceptions to copyright defined by the library of congress. Internet culture seems to condone it for reasons of convenience and preservation, regardless of copyright holders rights. Seems to be an unsettled moral question to me, as copyright duration is so oppressive. Where did you find a list of Scene releases to generate that info?
I spot checked the weird out-of-order date on the DEViANCE release, but it was roughly consistent with https://predb.net/. It seems thorough databases are not so exclusive these days, which is cool!

Also, if you want to let the technicalities of copyright get in the way of you enjoying some solid abandonware, for a product which is no longer sold and unlikely to ever be sold again, that's on you. Live life on your own terms. Cheers!

How do you mount cue+bin on Windows 10? There is quite a number of apps advertised for this but I'm curious which one is the most trustworthy nowadays, also if there is a legitimate (no adware/spyware/etc) free one to use when I need only one virtual drive, no burning nor network features.
I think VirtualCloneDrive still works well for this!
Apparently it is 32bit-only and doesn't support mds+mdf while I still have some and some games on Archive.org come in this format. As long as I install a virtual CD driver I would like it to support this format as well. But I am hesitating to install Alcohol 120% (which I used in the past) because it appears 32bit-only and comes with a cryptominer (openly) and a DRM of its own nowadays. I also used DaemonTools during the Windows 2000 days but stopped as I read they were first to integrate some shady bullshit in the free version too (now its free version apparently is adware). Another alternative seems to be WinCDEmu but it somehow seems to be 32bit-only too. Installing a 32bit driver on a 64bit system doesn't sound great.
Hey this is nice! This comment stuck out to me:

> Westwood Online (WOL) doesn't work anymore, so you can't play multiplayer except through LAN

I loved Command & Conquer in my younger years and I know a small bit about Westwood Online from the client side.

If I recall XWIS.net did a lot of support after WOL went offline! It might be worth the author reaching out to the niche developer community there, although I think it's truly dying out. If I recall, the work that XWIS guys did ended up getting recognition from EA and they did a lot of help to continue WOL support for C&C Renegade.

There's also FreeRA project that is the direct ancestor of several of the recent re-releases of C&C on eg Steam. They might also be able to help get WOL working.

I say this because WOL was pushed as its own library, and so a replacement of the library will probably be fairly easy compared to (re-)reverse-engineering the WOL stack.

Edit:

Oh, as I continue reading the post, it goes on to discuss how the WOL component is also fixed. Extra nice!