xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
7 Pages V  1 2 3 > »   
Reply to this topicStart new topic
> The 'setvideomode' Hex (480p Patch), Compatability & Discussion
raydn
post Mar 29 2005, 11:02 PM
Post #1


X-S Senior Member
**

Group: Members
Posts: 233
Joined: 24-March 05
Member No.: 208615



The 'SetVideoMode' Hex


This 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*

Background

The 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



Compatabilty

Some titles already have a fix I recommend this fix only if there isn't an already working fix.
The 480p Games Hex List


Thanks 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)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
jo77
post Mar 29 2005, 11:54 PM
Post #2


X-S Senior Member
**

Group: Members
Posts: 164
Joined: 2-February 04
Member No.: 97297



I have V8 Supercars (Toca Race Driver 1 )Pal version since along time ago and it always worked in 480p mode blink.gif were there 2 different versions ?

If someone sends me there non-480p default.xbe I will do a compare and see what bytes are different.

jo_hardie@yahoo.co.nz

This post has been edited by jo77: Mar 29 2005, 11:59 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
raydn
post Mar 30 2005, 12:09 AM
Post #3


X-S Senior Member
**

Group: Members
Posts: 233
Joined: 24-March 05
Member No.: 208615



QUOTE(jo77 @ Mar 29 2005, 10:00 PM)
I have V8 Supercars (Toca Race Driver 1 )Pal version since along time ago and it always worked in 480p mode  blink.gif  were there 2 different versions ?



Dreamcazman tested it on his pal version and posted that the hex wasn't found.

Also for example my playboy mansion runs 480p no problem but another member with a retail copy posted that his ran 480i, a comparison of both xbes is in the 480p hex thread

This post has been edited by raydn: Mar 30 2005, 12:10 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dm71
post Mar 30 2005, 08:37 PM
Post #4


X-S Enthusiast


Group: Members
Posts: 28
Joined: 1-December 04
From: Canada
Member No.: 172183
Xbox Version: v1.6



Is there any way to use this or a variation to switch a 480P game down to 480I? I know this is an oddball request but I have an annoying issue that I've rounded down to this.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
twistedsymphony
post Mar 30 2005, 08:45 PM
Post #5


arrogant beyond belief
***************

Group: Head Moderator
Posts: 10465
Joined: 26-November 02
From: Almost Canada http://solid-orange.com
Member No.: 10499
Xbox Version: v1.0
360 version: v2 (zephyr)



QUOTE(dm71 @ Mar 30 2005, 02:43 PM)
Is there any way to use this or a variation to switch a 480P game down to 480I?  I know this is an oddball request but I have an annoying issue that I've rounded down to this.
*




blink.gif what's you're situation that you can't just disable 480p in the MS Dash?

I suppose it would be possible to permanently set games to 480i but I have enough trouble getting them to play in 480p tongue.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
raydn
post Mar 30 2005, 10:42 PM
Post #6


X-S Senior Member
**

Group: Members
Posts: 233
Joined: 24-March 05
Member No.: 208615



QUOTE(dm71 @ Mar 30 2005, 06:43 PM)
Is there any way to use this or a variation to switch a 480P game down to 480I?  I know this is an oddball request but I have an annoying issue that I've rounded down to this.
*



Don't think so, at least not by modifying this hex as far as i know wink.gif

you would need to push a vaule of 20 instead of 0
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dm71
post Mar 30 2005, 10:55 PM
Post #7


X-S Enthusiast


Group: Members
Posts: 28
Joined: 1-December 04
From: Canada
Member No.: 172183
Xbox Version: v1.6



QUOTE(twistedsymphony @ Mar 30 2005, 01:51 PM)
blink.gif what's you're situation that you can't just disable 480p in the MS Dash?

I suppose it would be possible to permanently set games to 480i but I have enough trouble getting them to play in 480p  tongue.gif
*



I don't want 480P disabled totally. Only for a few specific games. I should explain. An example would be the game 'Serious Sam' which is 480p. It works just fine when I play from the game disc with my chip disabled. Here's the weird part. If I play it with my chip on and launching from avalaunch or unleashx, the video becomes scrambled. If I disable 480p like you said twisted, then it indeed works BUT I still want 480P for all my other games.
I discovered that 480P was the problem when I did the hex edit to enable 480p in Metal Slug 3. When I launched it, it scrambled the exact same way that serious sam did. I obviously undid the hex-edit after that. This is my quandry.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
jack2003
post Mar 30 2005, 11:52 PM
Post #8


X-S Enthusiast


Group: Members
Posts: 29
Joined: 20-March 04
Member No.: 108446
Xbox Version: v1.0
360 version: v1 (xenon)



QUOTE
(dm71 Posted Today, 10:01 PM)
When I launched it, it scrambled the exact same way that serious sam did


What do you mean with scrambled: absolutely no recognizable picture, or artifacts that increase when there is motion.

If the latter is the case, than you probably refer to "de-interlace" problems, given by the fact that most video's are interlaced (i.e. 480i) by nature. When they are played back in progressive scan (i.e. 480p) the result is that adjacent lines have a temporal difference of 30 miliseconds as they originate from two different fields, resulting in "sawtooth" edges.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
raydn
post Mar 31 2005, 12:18 AM
Post #9


X-S Senior Member
**

Group: Members
Posts: 233
Joined: 24-March 05
Member No.: 208615



i guess you could always try 50 8B 47 30 50 8B 47 2C 51 8B 4F 04 90 6A 20 90 for interlaced
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dm71
post Mar 31 2005, 05:59 AM
Post #10


X-S Enthusiast


Group: Members
Posts: 28
Joined: 1-December 04
From: Canada
Member No.: 172183
Xbox Version: v1.6



QUOTE(jack2003 @ Mar 30 2005, 04:58 PM)
What do you mean with scrambled


This is the Serious Sam main menu:
user posted image


I can't find any matching hex strings so I have no idea where to try to edit.

I'm just going to stick with the workaround of disabling 480p in the dash.
I apologize raydn for jacking your thread.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Mr Ed
post Mar 31 2005, 08:15 AM
Post #11


Hacking Horse
**********

Group: Head Moderator
Posts: 6588
Joined: 13-November 02
Member No.: 8552
Xbox Version: v1.1
360 version: v1 (xenon)



QUOTE(raydn @ Mar 29 2005, 02:08 PM)
Background

The 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).



So raydn, is there any parameter there that specifies 720p or 1080i modes? I realize changing the actual resolution may cause many issues with a game, including scaling issues, collision detection problems, slow framerates, etc. however I'd still like to try it and see for myself. rolleyes.gif

This post has been edited by Mr Ed: Mar 31 2005, 08:15 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
raydn
post Mar 31 2005, 02:31 PM
Post #12


X-S Senior Member
**

Group: Members
Posts: 233
Joined: 24-March 05
Member No.: 208615



The first two values of D3DPRESENT_PARAMETERS specify the height and width of the backbuffer. This would be 640 (280h) x 480 (1E0h) for 480i/p. You would need to change the 280h to 500h and 1E0h to 2D0h for 720p. It is unlikely it will be possible to make it work by patching at this location simply because many games rely on these two values for placement of menus and text amoung other things.

I would recommend searching the xbe for 280h followed by 1E0h, and changing them at that location. Using this ^ method i did get I-Ninja to run at 720p, looked very crisp, only noticble problem was with the in game text and and intro vids. SuperMonkey ball worked at 720p until the game started at which point it crashed out with a blue screen displaying an out of memory error.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
twistedsymphony
post Mar 31 2005, 04:38 PM
Post #13


arrogant beyond belief
***************

Group: Head Moderator
Posts: 10465
Joined: 26-November 02
From: Almost Canada http://solid-orange.com
Member No.: 10499
Xbox Version: v1.0
360 version: v2 (zephyr)



ohmy.gif That's really friggin cool!

Any chance you know where the string is for how much memory the game uses? 720p patches along with 128MB memory patches could make for some kick ass patches for popular games

You would be a God among men if you were able to 720p & 128MB patch Halo 2, PGR 2, or Splinter Cell 3
beerchug.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
raydn
post Mar 31 2005, 06:47 PM
Post #14


X-S Senior Member
**

Group: Members
Posts: 233
Joined: 24-March 05
Member No.: 208615



spose its possible wink.gif will have a look into it
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
twistedsymphony
post Mar 31 2005, 09:49 PM
Post #15


arrogant beyond belief
***************

Group: Head Moderator
Posts: 10465
Joined: 26-November 02
From: Almost Canada http://solid-orange.com
Member No.: 10499
Xbox Version: v1.0
360 version: v2 (zephyr)



someone in another thread clued me into this: http://xbox-scene.com/tools/tools.php?page...VplyEpujTqBIzpD

I always thought it just allowed games to function with the added ram, not actually use it. Perhaps with 720p SuperMonkeyBall and this patch we could have SMB HD goodness beerchug.gif

at very least you could compare the output from that to see what it changes wink.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





7 Pages V  1 2 3 > » 
Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 26th May 2013 - 03:49 AM