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:
Batman Vengeance Widescreen
Moderator: Modding and utilities team
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
-
AlphaYellow

- Posts: 36
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 180
Batman Vengeance Widescreen
Last edited by AlphaYellow on Fri Mar 08, 2024 12:42 pm, edited 1 time in total.
Re: Batman Vengeance Widescreen
You should be able to force resolution with dgVoodoo as well.
-
AlphaYellow

- Posts: 36
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 180
Re: Batman Vengeance Widescreen
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.deton24 wrote: Thu Mar 07, 2024 2:44 pm You should be able to force resolution with dgVoodoo as well.
-
AlphaYellow

- Posts: 36
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 180
Re: Batman Vengeance Widescreen
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
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.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
Re: Batman Vengeance Widescreen
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 atomaticallyGaro 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.
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
-
AlphaYellow

- Posts: 36
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 180
Re: Batman Vengeance Widescreen
Garo wrote: Sun Jun 30, 2024 1:03 amTo 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.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
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.lk19 wrote: Sun Jun 30, 2024 4:18 pmI'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 atomaticallyGaro 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 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
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.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.
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).
-
AlphaYellow

- Posts: 36
- Joined: Tue Aug 17, 2021 12:42 am
- Contact:
- Tings: 180
Re: Batman Vengeance Widescreen
Yeah, already found the function (it was in enginecore_vf.dll) and updated the fix. No more missing geometry on the sideslk19 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).


