Using documentation provided by w4kfu and haggar, I decided to give a shot at making my own open source SafeDisc v3 unpacker in C, so that I could begin studying The Sims Complete Collection in OllyDbg. I finally completed this, and I think I did a decent job commenting it. (I admit that my use of memcpy is probably “ugly”, but the calls formally do what they are supposed to.)
To compile it, you need to also obtain, compile, and link against libudis86, as that’s what I chose to use for disassembling data in the .text section of the game process. Using it is straightforward: put the game disc in your disc drive, and when it has loaded up and it appears in Computer, run: unpack.exe “C:\Program Files (x86)\Maxis\Sims.exe” Sims_unpacked.exe. The original game disc is needed for obtaining the decryption key. I have only tested the unpacker on the US version of The Sims Complete Collection. The unpacked version of the exe, produced by this tool, is 2.90MB, and interestingly, even at this small size, it provides RTTI, which can be read with rtti-reader.
Of course, I could have downloaded a cracked version of The Sims 1, but I knew this was a fun opportunity that would mark my first time removing a real commercial game’s copy protection myself.
Additionally, since Sims.exe showed Edith dialogs in its .rsrc section, I thought that the complete Edith developer tool might exist in The Sims 1. After unpacking, there are a number of strings, functions, and classes that are clearly used only for Edith, but there are no Windows API calls to CreateDialogParam, GetDlgItem, or SendMessage, the only call to CreateWindowEx occurs for the game window, and (unlike EA-Land) the game is not linked to MFC. So currently, there is not enough evidence (from I have obtained in the last 2 days) to say whether or not the backend for Edith completely exists in The Sims 1, but if it exists, it will require a fair bit of reconstruction of code to interface with the Windows API, which is not something that I had to do to start Edith in EA-Land.
Here are some interesting things. SIM::Simulate (so named according to the debugging string referenced at 0x004D1918) is located at 0x0046D9D6. If you patch it to just “ret”, then the SimAntics simulator remains paused and, even in play mode, the time remains at “AM 7:00″. If you do it at a random time, the sims will stop moving but the sounds and music will continue functioning as normal. The HIT analogue of SIM::Simulate (with no obvious name attached to it) is located at 0x0057D7CD; if you patch it to just “ret”, then the HIT simulator remains paused, causing only looped sounds to continue playing, for instance, birds chirping in the background. Music in Buy and Build Mode continue to work with the HIT simulator disabled, and when you resume Live Mode, the looped sounds resume. Even with these functions patched, you can leave the lot, enter the neighborhood, enter another lot, and so on. The neighborhood screen works without the SimAntics simulator running. If you disable the HIT simulator as well, then the neighborhood screen does not play background music, instead acting like Live Mode by playing the sounds that were previously looping.
A present: “Pre-Alpha” internal tester version
Somebody who wishes to stay anonymous sent me this in the mail:
The complete gallery: http://niotso.org/files/pictures/pre-alpha/
I am currently undecided if I want to share the files with the public. Consider this demo CD, which goes for about $1000 on Ebay. Since it was never going to be released to the public, and the record label was never going to make any money off of it anyway, the people who obtained it ripped it and shared all the files with the public for free. But music is different from games: since the disc in our case actually contains some of the exact same assets used for The Sims 1, it is more questionable whether or not that argument applies for this. It is not unreasonable to believe I will share these files one way or another, by snail mail, meet-and-greet, or whatever we think is “equivalent”.
Officially, this batch was a test of their manufacturing process and was distributed to paid testers at Electronic Arts in May 2002. I speculate, though, that just because it says “Pre-Alpha” does not mean that this is the buggiest thing ever produced. They could have equally likely named it “tester version”, “[Month]-[Day] version”, or “Build xxxx”—the choice of name didn’t really matter.
There are two game discs totalling to about 1GB. Currently, you need to actually run the installer for this: the installer uses InstallShield format .cab files, as this is before they switched over to the Microsoft .cab format, so 7-zip and cabextract can’t extract the files, and yet unshield also reports an error when trying to extract them.
The “version” file in the installation reads “major: 1, minor: 3, patch: 1, build: 56″, or “184.108.40.206”, and the files date between 2002-03-08 and 2002-03-09. The protocol changed between this version and the Play Test version of the game, which means I have a few more reverse engineering steps before we get past the log-in screen in this. As you would anticipate, the game comes with a fully functional copy of Edith, in TSOEdithEditorD.dll (the same as in EA-Land), as well as two never-before-seen developer tools: GZ Performance Analyzer and Production Database Editor. (The dialogs for these were quickly found with Anolis Resourcer; I am currently assuming that the code that runs them exists as well, as we saw with Edith, but I will let you know in an update.)
What it does not come with, however, is the source code to the game, or the complete Hitlab developer tool.
Additionally, I separately obtained the September 2001 issue of PCGamer magazine from eBay, which contains the oldest known preview content of The Sims Online, over a year before the game came out. Pictures of the pages are in the link, and they are moderately readable; I will have to get around to scanning the pages, if I ever buy a quality CCD scanner. I have the CD that came with the magazine as well, but sadly it does not contain anything related to The Sims Online. Regardless, you should enjoy reading this.