sptest patch: custom resolution and console without green overlay

Started by Viathan, December 19, 2022, 12:56:35 PM

Previous topic - Next topic
December 19, 2022, 12:56:35 PM Last Edit: December 20, 2022, 05:35:12 AM by Viathan Reason: updated title
I made a little patch for SPTest.exe that removes the green overlay without hiding console commands.

You cannot view this attachment.

Change the following bytes in SPTest.exe and make a backup first.
Original: SPTEST.exe+17B401 - A1 A47F6600           - mov eax,[SPTEST.exe+267FA4]
Patched:  SPTEST.exe+17B401 - B8 00000000           - mov eax,00000000


Original: SPTEST.exe+17B429 - C6 87 0F450000 80     - mov byte ptr [edi+0000450F],-80
Patched:  SPTEST.exe+17B429 - C6 87 0F450000 00     - mov byte ptr [edi+0000450F],00

Alternatively, you can use the attached cheatengine table, so you can toggle in game (1 and 0 for on and off).

I've also attached a patched SPTest.exe.
Just drop it into your GameData folder (again, backup first). 

It does not work for the Steam version (even the unpatched SPTest won't work for me).

December 20, 2022, 05:34:32 AM #1 Last Edit: December 20, 2022, 05:44:45 AM by Viathan
To extend on this, I tried to set a custom resolution for SPTest.exe.

SPtest in 2560 x 1440
You cannot view this attachment.

Here's the script you can paste into a cheatengine table. (Cheattable is attached)
Changes are applied when entering or leaving a match. If you turn off the script before, the game window will reset to its original size.

[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:
// 1024 x 768 (set values in hex below)
mov ecx,300 // height
mov eax,400 // width

// 1920 x 1080 (set values in hex below)
//mov ecx,438 // height
//mov eax,780 // width

// 2560 x 1440 (set values in hex below)
//mov ecx,5A0 // height
//mov eax,A00 // width


originalcode:
//mov ecx,[esp+08] // height
//mov eax,[esp+04] // width

exit:
jmp returnhere

"SPTEST.exe"+16CB80:
jmp newmem
nop 3
returnhere:


 
 
[DISABLE]
dealloc(newmem)
"SPTEST.exe"+16CB80:
mov ecx,[esp+08]
mov eax,[esp+04]
//Alt: db 8B 4C 24 08 8B 44 24 04

I've added three presets: 768p, 1080p and 1440p. By default, 768p is activated.
You can add any combination you want under "newmem". It does not have to be listed in the "vidmode.ini" file.

SPTest with weird res
You cannot view this attachment.


It's recommended to set a toggle hotkey for the script because as you know the SPTest window is always on top. You can't use ALT+Tab etc. I haven't found a solution for this yet.
Of course, you can always just close the game.

Good work!

The reason that the Steam version is incompatible with SPTest is because they added LUA commands that the old game doesn't recognise. This was both to get their own servers running and natively add controller support.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1
--Endor: Imperial Base