C3C Resolution Hack

ancestral

Warlord
Joined
Nov 9, 2001
Messages
182
Location
Motion City
If you wanted to make a custom resolution for C3C like you could for the original Civ III, you're in luck. You can. (I tried this back in February and never thought of posting it until now.)

To change a resolution listed in that startup window, it's in the "Civilization 3 Complete" data file inside the application. You'll find the hexes for the width and height of the resolutions as the third and fourth columns starting at row 0x0035D590 and ending (for me anyway) with row 0x0035D600.

I hated having the menu bar overlapping the buttons on top in the game when I had it in window mode at full res. So what I did was changed one of the resolutions to '1280 x 980', which is taking off 22 pixels from the top and bottom, so I can access the menu bar and switch between applications and not have the menu bar overlap anything in the game. It works like a charm for me. (You might find the Programmer view of the Calculator application extremely handy for converting hex.)

I've only tested this on my machine. Don't try this unless you know what you're doing. Always make a backup before doing anything potentially harmful. And always read your license agreement.
 
I suspect you'll need to be more explicit about which file you are talking about, and what program you are editing it with (HexEdit?) I think I know my way around the bits and bytes on my Mac, but I couldn't track down a file containing the info you referred to.
 
Firstly, I'd recommend making a backup of the entire application.

  1. Download HexEdit.
  2. Open the HexEdit program. I choose the one without FAT in the title (which I believe is the PPC/68k, pre-OS X version).
  3. If it doesn't already prompt for a file, choose "Open" from the File menu.
  4. Navigate to your C3C folder and from there find the C3C application, which will display like a folder.
  5. Find /Contents/MacOS/Civilization 3 Complete and click "Open". Yay lots of Hex. Be careful — for this reason you may elect to backup the file before you touch anything.
  6. You may also want to open Calculator (in the Applications folder, of course) and select "Programmer" from the View menu (Cmd-3), which will let you convert between Hex and Decimal.
  7. For this exercise I'm choosing to change the resolution listed from '640 x 480' to '1280 x 980'. Because the Mac OS menu bar is 22 pixels high and Civ IV will center any windowed resolution, we'll take 44 pixels off (1024 – 44 = 980). In window mode, this will allow me to have a menu bar and I can command-tab between programs more easily. Rock on!
  8. Choose "Go To Address…" from the Find menu.
  9. Type 0035D590 and click "GO".
  10. The resolutions will start at the third and fourth columns. For me I see 00 00 02 80 | 00 00 01 E0. You should see numbers in this format in the third and fourth columns — for me, until line 0035D600. (If you see 00 00 00 7B you've gone too far.)
  11. The third and fourth hex in those columns represent the width and height of the resolution, respectively. This is where the Calculator comes in handy (unless you really know your Hex math). In Calculator, if you click "Hex" and type in 02 80 and then click "Dec", you'll see 0x280 = 640.
  12. Convert the custom resolution in Calculator. For me I want 1280 x 980. 1280 is "500" in Hex, and 980 is "3D4". Since they're only 3 digits, prepend a zero (0500 and 03D4).
  13. Now that you have your numbers, we're going to make some changes. Choose one of these lines to replace with your custom resolution. Maybe the first line is easiest. In HexEdit, click and select the third and fourth hex of the third column (02 80). Then I type exactly 0500. Repeat similarly for the height, the fourth column, except 01 E0 would become 03D4. (Find/Replace would also work, just be careful.)
  14. Make sure those numbers line up as they should vertically.
  15. Save your work. Close the window.
  16. Open C3C. If all works, you'll see your new resolution.
 
Thanks ancestral. Much more explanatory. :thumbsup:

I think my confusion was what you consider to be "columns". The screen resolution values are actually 32 bit numbers, and so occupy 4 bytes each. For me, each column is one byte wide and you have to tell me how many bytes the numbers are. For you, each column is four bytes wide. It's a lucky coincidence that the screen resolution values are aligned on the four byte boundaries in the HexEdit display.
 
AlanH said:
Thanks ancestral. Much more explanatory. :thumbsup:

I think my confusion was what you consider to be "columns". The screen resolution values are actually 32 bit numbers, and so occupy 4 bytes each. For me, each column is one byte wide and you have to tell me how many bytes the numbers are. For you, each column is four bytes wide. It's a lucky coincidence that the screen resolution values are aligned on the four byte boundaries in the HexEdit display.
Balancing the technical while easy enough for the non-tech savvy is always a fine line. Thanks for the observation. I should have been more specific!
 
Top Bottom