PDA

View Full Version : Arbitrarily adjusting the resolution via registry editing?


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.

Sean
Oct 9, 2011, 09:37 PM
Hello there. Always nice to see a new forum member.

Couple of things:

JJR2

The official unofficial acronym is JJ2. Learn the slang :D

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).

(some coding stuff I don't get myself involved in)

So does JJ2 just not support any resolutions higher than 640x480, or did I just mess up with my hexadecimal?

Thanks in advance.

I was going to link you to another thread called Why does everyone use 640x480 at all times? (http://www.jazz2online.com/jcf/showthread.php?t=19218) but I've noticed you've already been there. However, you skipped over a section here:

There is a program called bigjazz, which enables higher resolutions.

The maximum allowed resolution in bigjazz is 1600x1200. It works sort of fine, but is pretty buggy, and as noted, does not work with JJ2+ (http://www.jazz2online.com/jj2+/) (which, if you do not know, is a patch for JJ2 that fixes plenty of bugs and adds features for online play. It is required on plenty of servers and if you plan to play online, is a must have). If you had read further through the thread you would have noted this:

<a href="http://www.jazzjackrabbit.net/index.php?league=1&season=1&op=com&id=168">I'm probably going to get yelled at for linking to this.</a>

I'm not sure how the program works, as I've never asked for the source code to the modifications or whatever you do to look at the coding, but you can probably ask Neobeo for the coding. He has a forum account which he almost never checks out.

Hope this has helped.

Jgke
Oct 10, 2011, 12:57 AM
Sean is correct, vanilla JJ2 doesn't allow higher than 640x480. You can use bigjazz with the newest plus, but instead of showing more of the level, jj2+ places black borders around the game view and only displays text (chat, scores, playerlist etc) on the black area.

Obi1mcd
Oct 10, 2011, 01:11 AM
Which is due to servers restricting the resolution, so as to avoid any players getting an unfair advantage.

E-102 Gamma
Oct 10, 2011, 10:18 AM
I had seen bigjazz, but I didn't like what I saw. Not only does it not actually allow you to see more, but is somewhat unstable, and one is supposed to turn down JJ2's settings before using it. I'm looking for a way to increase the resolution of the game itself (without lowering the quality of it). I also was not planning on playing multiplayer (outside of local co-op), so there shouldn't be any worry of unfair advantages.

Anywho, thanks for clearing that up. I think I'll keep playing with this, though I don't really expect to get anywhere.

Jgke
Oct 10, 2011, 10:55 AM
I also was not planning on playing multiplayer (outside of local co-op)

You are doing JJ2 wrong, very wrong. I and most other (active, atleast) community members consider multiplayer much more fun compared to singleplayer.

But, to that resolution question...
Two step (http://www.learncpp.com/) solution (http://www.codeproject.com/KB/threads/winspy.aspx) is near... Remember to share your code.

E-102 Gamma
Oct 10, 2011, 08:26 PM
So after some further messing around, I've found that I can change the in-game settings by editing the registry, but I cannot set to anything that isn't in the video options menu. I also cannot set the color depth to anything other than 8-bit and 16-bit (I tried 32 BPP, then 24, then 15, 14, and 9, just to be scientific.).

So, as something of a conclusion, you can adjust the options by editing the registry, but it doesn't seem you can so anything in the registry that you can't do in the options menu.

Well, wasn't this a useful thread. :roll:

Love & Thunder
Oct 11, 2011, 09:53 PM
Well, I've always wondered if there's a way of changing the JJ2 settings to be different from what they allow, and now I know that's not possible. :D So yeah, this has been sort of useful. :)