hn.today

Hacking SimCity 2000 saved games

log.schemescape.com33 points14 comments
Screenshot of Hacking SimCity 2000 saved games

Growing up with a Packard Bell 386 SX running MS-DOS, a childhood fascination with games like SimCity 2000 turned into a hands-on lesson in bytes and hexadecimal. Saved cities were ordinary files, and using a hex editor (the author recalls Norton DiskEdit) made it possible to locate the in-game money value in the file, overwrite its hex digits with F’s to inflate funds, save, and reload. Because the save format used a compact representation, the author iteratively expanded the stored byte width - two bytes to four to six - until reaching very large balances. A later reverse-engineering note clarifies that the format actually uses run-length encoding and stores money as a signed 32-bit big-endian value (with RLE markers like 0x8100), but the simple overwrite technique worked in practice. DiskEdit required DosBox-X and IMGMOUNT because it manipulates the drive directly, and a small decimal-to-hex converter (originally written for the author) made conversions trivial, though DiskEdit included a converter too.

That episode opened a broader curiosity about binary editing and memory manipulation: the author experimented with memory-search tools (recalling Game Wizard and analogies to the GAME GENIE) to modify in-game values in RAM. The concrete takeaways were that hexadecimal is a practical view of raw bytes, DOS-era files are directly accessible, and both disk and memory values can be altered - foundations that fed a later interest in programming and making games.

Read on log.schemescape.com14 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.