Descent / Descent II – hack to remove ship bobbing

Descent and Descent II have a bobbing effect, where your ship moves up and down slightly at all times. For some folks it can contribute to motion sickness, or just be plain annoying, especially as the effect speeds up on faster computers.

A simple hack that replaces a single function call with “no-op” instructions can be applied to the game executable to eliminate the bob effect. I learned about this hack from the Ecstatic Lyrics page, and merely adapted it to different versions of the game. For each version I tested, the hex offsets that should be modified are shown in the tables below.

Descent

VersionSize (bytes)OffsetModification
Shareware 1.41,053,6050x95C70E8 A9 58 02 0090 90 90 90 90
Registered 1.4a1,101,7850x9D570E8 A1 D6 02 0090 90 90 90 90
Registered 1.51,132,6330x9FC40E8 E1 DC 02 0090 90 90 90 90

Descent II

VersionSize (bytes)OffsetModification
1.0 Demo1,297,2370xB0133E8 56 66 03 9090 90 90 90 90
1.11,484,2970xC724EE8 37 E5 03 0090 90 90 90 90
1.21,507,8210xC9BBEE8 F7 04 04 0090 90 90 90 90
1.2 Vertigo1,507,7930xC9C0EE8 47 06 04 0090 90 90 90 90
1.2 Vérité1,452,1530xA2EDAE8 37 3B 04 0090 90 90 90 90
1.2 3dfx 1.06b1,374,7370x9B4EEE8 F3 1C 04 0090 90 90 90 90

General Technique

The “call” instruction (E8) supplies a 4-byte function address, which is different in every version of the program, therefore you cannot count on the sequence replaced being the same. Fortunately, the context surrounding the call is sufficiently large and unique, and can be located by a simple hex search, without disassembly or stepping through with a debugger.

In all of the above program versions, it is enough to locate the following sequence: 5E F7 EA 0F AC D0 10 89 C1 E8, which appears exactly once in the file. The E8 at the end of the sequence marks the call that needs to be skipped, so this byte and the four bytes following it should be replaced with no-op instructions (90) to remove ship bobbing.

I trust that the same will hold for most other versions of Descent and Descent II, but I do not have them to test. One exception is D2VOODOO.EXE, where the above sequence could not be located.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s