Page 1 of 1

Hacking Custom Resolutions into the D3 Linux Binary Fun

Posted: Mon Feb 25, 2008 10:42 pm
by Jeff250
I've hacked in custom resolutions into the D3 Linux binary, since it doesn't seem to support custom resolutions via command line options like the windows binary does. (It does seem to support weird stuff like the Rock'n'Ride chair? WTF? Has anyone ever looked at this?)

The general strategy was to assume that the screen resolution values were stored close to each other in the binary. So I wrote a quicky C program to output offsets of binary values given a file to search and a binary value given as hexadecimal input. I searched for values like 960, 1200, and so on. I outputted these results to files. Then I wrote another quicky C program to take in two files with lists of numbers, take the differences of the numbers between the two lists, sort them, and then print the results. In any case, the results aren't anything that a bit of insight wouldn't have discovered either:

(The following is for the fully-patched dynamically linked executable.)

Resolutions start at byte 2564288 up until byte 2564320. The resolution dimensions are stored as 16-bit little-endian ints:
offset 0x0: 512
offset 0x2: 384
offset 0x4: 640
offset 0x6: 480
. . .
offset 0x1c: 1600
offset 0x1e: 1200

I modified 1280x960 to be 1280x800:
Image

Additional hack value for modifying the resolution's menu text: these strings start at byte 2491748 and are null-separated.
Image

Of course, open-sourcing D3 would have been so much easier. ^_^

Posted: Tue Feb 26, 2008 7:33 am
by JMEaT
Good job!

I've never messed with Linux, plan to one day when I have time.

Posted: Tue Feb 26, 2008 8:13 am
by Testiculese
Windows doesn't really seem to support them either. I set 1920x1080, and it doesn't look very good.

Posted: Tue Feb 26, 2008 10:36 am
by fliptw
did you also pass the aspect command as well testi

Re:

Posted: Tue Feb 26, 2008 7:05 pm
by BUBBALOU
dang double post - how?

Re:

Posted: Tue Feb 26, 2008 7:06 pm
by BUBBALOU
fliptw wrote:did you also pass the aspect command as well testi

Like this -aspect 1.77 -height 1080 -width 1920

Posted: Wed Feb 27, 2008 10:13 pm
by Wishmaster
Nice, thanks for the tips here. I'll be doing my own D3 on Linux installation soon.
(It does seem to support weird stuff like the Rock'n'Ride chair? WTF? Has anyone ever looked at this?)
Serious? Good thing I don't have one of those, or I don't think I'd ever stop playing.

Posted: Thu Feb 28, 2008 8:18 am
by Testiculese
Ahh I had 1.33...dunno how I came up with that.