Page 1 of 1
Batman Vengeance Widescreen
Posted: Thu Mar 07, 2024 1:52 pm
by AlphaYellow
So this game uses the CPA engine (OpenSpace), and only has 3 supported resolutions: 640x480, 800x600 and 1024x768. For the 3D rendering API, it uses Direct3D 8.
It's possible to change the resolution through the file
osr_dx8_vf.dll, then searching for the following values with a hex editor:
80020000e001 (640x480), 200300005802 (800x600) or 000400000003 (1024x768). The value is located in the offset address
00098AE0.
The game is stretched in widescreen, so all it's needed is to find the right FOV value to extend the horizontal FOV. And also finding the values to fix the HUD stretching as well, but that's a lot more work I suppose.
1440x1080:
1920x1080:
Re: Batman Vengeance Widescreen
Posted: Thu Mar 07, 2024 2:44 pm
by deton24
You should be able to force resolution with dgVoodoo as well.
Re: Batman Vengeance Widescreen
Posted: Thu Mar 07, 2024 2:58 pm
by AlphaYellow
deton24 wrote: Thu Mar 07, 2024 2:44 pm
You should be able to force resolution with dgVoodoo as well.
dgVoodoo2 does not alter the internal aspect ratio, it just keeps the current one or stretches it, hence why a dedicated hex edit for the FOV is needed.
Re: Batman Vengeance Widescreen
Posted: Thu Mar 07, 2024 11:47 pm
by AlphaYellow
Managed to find the instruction that accesses horizontal FOV and redirected it to another offset address using OllyDbg, HxD and Cheat Engine. However, widening it to accomodate for 16:9 introduces a little clipping issues at the sides. Will try to resolve it soon.
Re: Batman Vengeance Widescreen
Posted: Sun Jun 30, 2024 1:03 am
by Garo
AlphaYellow wrote: Thu Mar 07, 2024 11:47 pm
Managed to find the instruction that accesses horizontal FOV and redirected it to another offset address using OllyDbg, HxD and Cheat Engine. However, widening it to accomodate for 16:9 introduces a little clipping issues at the sides. Will try to resolve it soon.
Batman Vengeance Screenshot 2024.03.07 - 22.41.23.31.png
To fix clipping issues you need to find the horizontal FOV value inside fix.sna. If you can share the fix.sna file I think I could probably find it.
Re: Batman Vengeance Widescreen
Posted: Sun Jun 30, 2024 4:18 pm
by lk19
Garo wrote: Sun Jun 30, 2024 1:03 am
To fix clipping issues you need to find the horizontal FOV value inside fix.sna. If you can share the fix.sna file I think I could probably find it.
I've given up on messing around with fix.sna, since there can be so many scripts in the game that change the FOV in so many different SNA-files... it just doesn't seem to be worth the trouble sometimes. Instead I started injecting some code into the EXE to patch the FOV directly after it was read from the SNA file. This way every possible FOV-value gets scaled atomatically

I can share my assembler code with you if you like - but I don't know if the engine in this game is similar enough so that it can be done in the same way.
If this game is only using one single FOV value for everything, then, of course, you might as well just change the value in fix.sna

Re: Batman Vengeance Widescreen
Posted: Sun Jun 30, 2024 4:50 pm
by AlphaYellow
Garo wrote: Sun Jun 30, 2024 1:03 am
AlphaYellow wrote: Thu Mar 07, 2024 11:47 pm
Managed to find the instruction that accesses horizontal FOV and redirected it to another offset address using OllyDbg, HxD and Cheat Engine. However, widening it to accomodate for 16:9 introduces a little clipping issues at the sides. Will try to resolve it soon.
Batman Vengeance Screenshot 2024.03.07 - 22.41.23.31.png
To fix clipping issues you need to find the horizontal FOV value inside fix.sna. If you can share the fix.sna file I think I could probably find it.
lk19 wrote: Sun Jun 30, 2024 4:18 pm
Garo wrote: Sun Jun 30, 2024 1:03 am
To fix clipping issues you need to find the horizontal FOV value inside fix.sna. If you can share the fix.sna file I think I could probably find it.
I've given up on messing around with fix.sna, since there can be so many scripts in the game that change the FOV in so many different SNA-files... it just doesn't seem to be worth the trouble sometimes. Instead I started injecting some code into the EXE to patch the FOV directly after it was read from the SNA file. This way every possible FOV-value gets scaled atomatically

I can share my assembler code with you if you like - but I don't know if the engine in this game is similar enough so that it can be done in the same way.
If this game is only using one single FOV value for everything, then, of course, you might as well just change the value in fix.sna
Nope, this game doesn't use any SNA files, it seems to be a slightly more recent version of the CPA engine, as it all seems to be centered more around DLL files. But I wasn't able to find the right FOV value yet, that's just a multiplier which obviously gives a glitched result in the sides, maybe with some more digging it can be found.
Re: Batman Vengeance Widescreen
Posted: Sun Jun 30, 2024 5:13 pm
by lk19
AlphaYellow wrote: Sun Jun 30, 2024 4:50 pm
Nope, this game doesn't use any SNA files, it seems to be a slightly more recent version of the CPA engine, as it all seems to be centered more around DLL files. But I wasn't able to find the right FOV value yet, that's just a multiplier which obviously gives a glitched result in the sides, maybe with some more digging it can be found.
Have you tried loading either the EXE or the DLL-file you were talking about into a disassembler/decompiler (e.g. Ghidra) and looked if there exists a function "GLI_xAdjustCameraToViewport"? If so, it should be very easy to find the relevant FOV value and maybe even patch it directly in the EXE/DLL.
If such a function doesn't exist you might have some luck looking for tangent/arctangent functions, as these are usually used to convert between horizontal and vertical FOV (
https://en.wikipedia.org/wiki/Field_of_ ... ideo_games).
Re: Batman Vengeance Widescreen
Posted: Sun Apr 13, 2025 11:52 pm
by AlphaYellow
lk19 wrote: Sun Jun 30, 2024 5:13 pm
Have you tried loading either the EXE or the DLL-file you were talking about into a disassembler/decompiler (e.g. Ghidra) and looked if there exists a function "GLI_xAdjustCameraToViewport"? If so, it should be very easy to find the relevant FOV value and maybe even patch it directly in the EXE/DLL.
If such a function doesn't exist you might have some luck looking for tangent/arctangent functions, as these are usually used to convert between horizontal and vertical FOV (
https://en.wikipedia.org/wiki/Field_of_ ... ideo_games).
Yeah, already found the function (it was in enginecore_vf.dll) and updated the fix. No more missing geometry on the sides

Here's the link:
https://community.pcgamingwiki.com/file ... n-fov-fix/