Jump to content

TotSC - windowed mode troubles


The_cranky_hermit

Recommended Posts

Posted

I'm having some problems with getting windowed mode to work right. I did read the readme - there are two notes that seem like they might be relevant, but I don't really understand what they mean. They are:

BG and Ps:T cannot be forced to be windowed, but can work at all X by Y, with X >= 640 and Y >= 480.

and

Can do windowed mode in TotSC and PST. This, however, requires a reinstall if you switch fullscreen <-> windowed.

 

Anyway, I have a 1920x1200 monitor, but I want to run this game at 1440x900. Any bigger and everything is so small it's unplayable. First, I install the nvidia fix. Then, I install the widescreen fix at 1440x900, and it works just fine. But, the moment I hit Alt+Enter to switch to windowed mode, it crashes to the desktop with this error:

An Assertion failed in D:\Dev\Baldur\ChUIControls.cpp at line number 488

 

So I tried reinstalling it. This time, it launched in Windowed mode just fine, and didn't crash. But when I switch it to fullscreen mode, which is where I intend to spend most of the time playing the game, I can't scroll to the right or downwards.

 

Based on lots of careful observation, I found the setup behaves a bit differently if the game is configured to use windowed mode. The file bgmain2.exe gets modified differently depending on whether baldur.ini contains "Full Screen=0" or "Full Screen=1." So, the two differing behaviors can definitely be traced back to the way bgmain2.exe is modified. I've made two backups of this file - one called "bgmain2w.exe" that works fine in windowed but won't scroll in fullscreen, and one called "bgmain2f.exe" that works fine in fullscreen but crashes in windowed.

 

What I want is to be able to play this game in 1440x900 fullscreen normally, and be able to switch to windowed mode without it crashing. I don't care whether or not windowed mode retains 1440x900 resolution, or even whether or not windowed mode scrolls properly. Is this supposed to be possible with the widescreen fix?

Posted

Unfortunately, the guy who did the research for BG1 (and PST) told me that it's not possible to allow both fullscreen scrolling and windowed mode; as such, I'm afraid there's no solution available.

Posted

Well, I found a semi-solution, using some hex editing. I'm using the executable from the "BGTalesUK5512.exe" patch. I have the old 6-disc US version of the game, but for some reason the widescreen mod refuses to install unless I'm using the UK version of the patch.

 

Anyway, through a bit of trial and error, I found if I take my "bgmain2f.exe" file and hex edit these addresses:

x3A84AA 80->A0

x3A84AB 02->05

x3A84B1 E0->84

x3A84B2 01->03

 

(binary-wise, I'm turning a reference to 640x480 into 1440x900)

 

...then I can still play just fine in fullscreen mode, and windowed mode doesn't crash. Unfortunately, windowed mode is not very playable. It's a 640x480 window, and it contains the upper-left region of the 1440x900 screen. You can access the controls on the left side of the screen just fine, but you can't access the controls on the right or bottom. You also can't scroll right or down, and you'll never be able to see the rightmost or bottommost parts of the map.

 

Still, it's an improvement over crashing.

Posted

The file controlling offsets and whatnot is widescreen/lib/game_config.tpa (editable with any text editor). The offsets you posted are part of those that are installed only in windowed mode but not in fullscreen mode. I'm going to be away for a couple of days, when I get back I'll see if I can enable both windowed and fullscreen at the same time.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...