E-102 Gamma
Oct 9, 2011, 09:21 PM
Earlier today, I installed JJ2 on a newer system of mine, messed with the settings a bit, and then went looking around for ways to set the resolution arbitrarily, since a lot of oldish games will often let the user set the resolution arbitrarily by editing configs and INIs and whatnot (for example, Zoo Tycoon and C&C Red Alert 2).
First, I looked around in its directory, but didn't find anything useful. I then looked around for launch options that might be used to set the resolution, even opening JJ2's executable to look for some, but I still didn't find anything of use. So I looked in the registry, and I found a couple registry keys that seemed to control the resolution (under HKEY_CURRENT_USER\Software\Epic MegaGames\Jazz Jackrabbit 2\1.23\VideoSize).
So I started experimenting with them, writing out the various resolutions, hexadecimal registry values, and the corresponding decimal values in Notepad, and after quite a bit of calculation, I thought I had it all figured out.
The registry keys are REG_BINARY. They're divided up into four hexadecimal pairs each. The first two are really the only ones that are important (the last two always being 00). The way I understand it, the first one goes from 0 to 255 in decimal, subtracting 256 from itself and adding one to the second hex pair until it is less than 256. For example, 128 02 00 00 is 640 (128 + 256*2). I used this site (http://home2.paulschou.net/tools/xlate/) to translate from hex to dec and back.
Here's my chart:
Resolution - Registry values
640x480 - 80 02 00 00 x e0 01 00 00
512x384 - 00 02 00 00 x 80 01 00 00
320x240 - 40 01 00 00 x f0 00 00 00
640x400 - 80 02 00 00 x 90 01 00 00
400x300 - 90 01 00 00 x 2c 01 00 00
320x200 - c8 00 00 00 x 40 00 00 00
Registry value - DEC / CHAR - Dimension
80 02 00 00 - 128 2 0 0 - 640
e0 01 00 00 - 224 1 0 0 - 480
00 02 00 00 - 0 2 0 0 - 512
80 01 00 00 - 128 1 0 0 - 384
40 01 00 00 - 64 1 0 0 - 320
f0 00 00 00 - 240 0 0 0 - 240
80 02 00 00 - 128 2 0 0 - 640
90 01 00 00 - 144 1 0 0 - 400
90 01 00 00 - 144 1 0 0 - 400
2c 01 00 00 - 44 1 0 0 - 300
40 01 00 00 - 64 1 0 0 - 320
40 00 00 00 - 64 0 0 0 - 200
Theoretical settings.
800x600 - 32 3 0 0 x 88 2 0 0 - 20 03 00 00 x 58 02 00 00
1680x1050 - 144 6 0 0 x 26 4 0 0 - 90 06 00 00 x 1a 04 00 00
This all sounds great in theory, but it doesn't seem to work in practice. Whenever I tried to set the registry values to anything that wasn't on this chart (namely 800x600 and 1680x1050), JJ2 would launch in fullscreen in 640x480 @ 8BPP (with and without the -Windowed launch option).
So does JJ2 just not support any resolutions higher than 640x480, or did I just mess up with my hexadecimal?
Thanks in advance.
First, I looked around in its directory, but didn't find anything useful. I then looked around for launch options that might be used to set the resolution, even opening JJ2's executable to look for some, but I still didn't find anything of use. So I looked in the registry, and I found a couple registry keys that seemed to control the resolution (under HKEY_CURRENT_USER\Software\Epic MegaGames\Jazz Jackrabbit 2\1.23\VideoSize).
So I started experimenting with them, writing out the various resolutions, hexadecimal registry values, and the corresponding decimal values in Notepad, and after quite a bit of calculation, I thought I had it all figured out.
The registry keys are REG_BINARY. They're divided up into four hexadecimal pairs each. The first two are really the only ones that are important (the last two always being 00). The way I understand it, the first one goes from 0 to 255 in decimal, subtracting 256 from itself and adding one to the second hex pair until it is less than 256. For example, 128 02 00 00 is 640 (128 + 256*2). I used this site (http://home2.paulschou.net/tools/xlate/) to translate from hex to dec and back.
Here's my chart:
Resolution - Registry values
640x480 - 80 02 00 00 x e0 01 00 00
512x384 - 00 02 00 00 x 80 01 00 00
320x240 - 40 01 00 00 x f0 00 00 00
640x400 - 80 02 00 00 x 90 01 00 00
400x300 - 90 01 00 00 x 2c 01 00 00
320x200 - c8 00 00 00 x 40 00 00 00
Registry value - DEC / CHAR - Dimension
80 02 00 00 - 128 2 0 0 - 640
e0 01 00 00 - 224 1 0 0 - 480
00 02 00 00 - 0 2 0 0 - 512
80 01 00 00 - 128 1 0 0 - 384
40 01 00 00 - 64 1 0 0 - 320
f0 00 00 00 - 240 0 0 0 - 240
80 02 00 00 - 128 2 0 0 - 640
90 01 00 00 - 144 1 0 0 - 400
90 01 00 00 - 144 1 0 0 - 400
2c 01 00 00 - 44 1 0 0 - 300
40 01 00 00 - 64 1 0 0 - 320
40 00 00 00 - 64 0 0 0 - 200
Theoretical settings.
800x600 - 32 3 0 0 x 88 2 0 0 - 20 03 00 00 x 58 02 00 00
1680x1050 - 144 6 0 0 x 26 4 0 0 - 90 06 00 00 x 1a 04 00 00
This all sounds great in theory, but it doesn't seem to work in practice. Whenever I tried to set the registry values to anything that wasn't on this chart (namely 800x600 and 1680x1050), JJ2 would launch in fullscreen in 640x480 @ 8BPP (with and without the -Windowed launch option).
So does JJ2 just not support any resolutions higher than 640x480, or did I just mess up with my hexadecimal?
Thanks in advance.