The 'SetVideoMode' HexThis hex patch as those of you following the '
480p Games Hex List' thread will know allows many interlaced games to run in 480p that were previously unpatched.
Replace:
8B 57 28 50 8B 47 30 50 8B 47 2C 51 8B 4F 04 52
with:
50 8B 47 30 50 8B 47 2C 51 8B 4F 04 90 6A 00 90*
Please always backup your original xbe*
BackgroundThe majority of games call CreateDevice(x,x,x,x,x,
x,x). A struct _D3DPRESENT_PARAMETERS_ is passed to the 6th x.
This describes the presentation parameters for the game. _D3DPRESENT_PARAMETERS_ contains among other things a Dword - 'Flags'. Flags is what all previous 480i -> 480p patches have been patching (20h (interlaced) to 00 (autoselect) or 40 (progressive). Within the CreateDevice call the _D3DPRESENT_PARAMETERS_ struct is broken down, 'Flags' being the 11th value is stored at +28h.
Below you can see that the original XBE moves +28h to edx (mov edx, [edi+28h]), this however isn't 'pushed' (push edx)
until just before the SetVideoMode call, this means the the 1st arg of the SetVideoMode call is the Dword value for 'Flags'.
So changing the code to 'push' a value of 0 instead of the original edx / +28h value it will cause 480i / p autoselect.
To do this I had to first 'nop' (do nothing) out 8B 57 28 with 90 90 90 and then move everything around. From the original XBE you can see that push edx (52 as hex) is one hex32 value. However Push 0 is (6A 00) so requires 2 hex32 values. I was not possible to simple do a push 0 at the location of 90 90 90 since it needed to be in the same place as the original push edx.
CODE
Original XBE
8B 57 28 mov edx, [edi+28h]
50 push eax
8B 47 30 mov eax, [edi+30h]
50 push eax
8B 47 2C mov eax, [edi+2Ch]
51 push ecx
8B 4F 04 mov ecx, [edi+4]
52 push edx
8B 57 28 50 8B 47 30-50 8B 47 2C 51 8B 4F 04 52
Patched XBE
50 push eax
8B 47 30 mov eax, [edi+30h]
50 push eax
8B 47 2C mov eax, [edi+2Ch]
51 push ecx
8B 4F 04 mov ecx, [edi+4]
90 nop
6A 00 push 0
90 nop
50 8B 47 30 50 8B 47 2C 51 8B 4F 04 90 6A 00
CompatabiltySome titles already have a fix I recommend this fix only if there isn't an already working fix.
The 480p Games Hex ListThanks to everyone who has helped test the fix.
*Working*
Broken Sword: The Sleeping Dragon (PAL)
Headhunter: Redemption
I-Ninja
Mashed Fully Loaded
Outlaw Golf 2 (PAL)
Puyo Pop Fever (NTSC?)
Shell Shock: NAM'67
SpongeBob SquarePants: Battle for Bikini Bottom
Stacey Jones Rugby League *
Street Racing Syndicate
Teenage Mutant Ninja Turtles
Teenage Mutant Ninja Turtles 2: Battle Nexus (PAL)
Vietcong: Purple Haze
XGRA: Extreme Racing (NTSC)
*Not working*
Some games don't have the search hex, or simply switch back to 480i.
Chessmaster (NTSC)
Haunted House
Kung-Fu Chaos (MIX)
Scooby Doo Night of 100 Frights
Star Wars: Republic Commando
V8 supercars (PAL)