3 ms·
Hah, this was my jam in the day. I wrote mods and utilities, custom map generators, custom ship types, fixed a lot of bugs that cheaters would use. Stepped thro
by jmkb 5y ago
Hah, this was my jam in the day. I wrote mods and utilities, custom map generators, custom ship types, fixed a lot of bugs that cheaters would use. Stepped through the code in an assembly language debugger and reverse engineered all the data files.
One of my favorite memories was fixing a cheater's bug that was triggered by entering a negative number into a certain dialog. There were no legitimate features in the game that required negative numbers, so I figured if I could prevent the entry of all negative numbers, it would fix this bug plus any similar undiscovered ones. I was very much an assembly language novice, but I knew that somewhere in that executable had to be the routine that parsed ASCII strings to convert them to integers, and it most likely had the minus sign (ASCII value 45) encoded as a constant. I stubbornly changed each byte value 45 to 255 until I found the right one. Since it wasn't possible to enter ASCII 255 in the dialogs... bug fixed!
When Gary Martin finally released a new version (2112?), the executables and data files were all encrypted, so we couldn't make custom ships anymore. I wasn't able to crack the encryption but I wrote a "TSR" (=terminate and stay resident -- DOS's approximation of multi-tasking) that would wait for the Trade Wars program to unpack itself and then write patches directly into the RAM. Good times.
- deleted 5y ago[deleted]
- sneak 5y agoSometimes I miss the days before protected memory.