Changes required to the AC4BFSP.exe
file to enable borderless fullscreen gaming
For details on these instructions see https://defuse.ca/online-x86-assembler.htm
As long as github allow it, here is a zip file which includes the patch for quick use https://github.com/user-attachments/files/17745242/aciv_borderless_patch.zip
These instructions set the width/height to 0
which forces the game to re-calculate the screen size at the start.
Aswell as settin the global IsFullscreen
byte (0x2ac07d3
) to 0
file offset: 0x0000593D (address 0x0040653d)
old: E8 BE 41 42 00 8B 78 18 E8 B6 41 42 00 8B 58 1C
new: 31 ff 31 db c6 05 d3 07 ac 02 00 90 90 90 90 90
0: 31 ff xor edi,edi
2: 31 db xor ebx,ebx
4: c6 05 d3 07 ac 02 00 mov BYTE PTR ds:0x2ac07d3,0x0
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
These instructions replace the window style with WS_POPUP | WS_VISIBLE
and clear the required registers for further operation.
file offset: 0x0000598C (address 0x0040658c)
old: 0f b6 35 d3 07 ac 02 f7 de 1b f6 33 c0 81 e6 00 00 36 7f 50 81 c6 00 00 ca 00
new: 33 c0 50 31 f6 81 c6 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
0: 33 c0 xor eax,eax
2: 50 push eax
3: 31 f6 xor esi,esi
5: 81 c6 00 00 00 90 add esi,0x90000000
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop