Shenmue 1 and 2 widescreen hacks Dreamcast

(Modding and other series related projects)

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Giorgio » Sun Oct 25, 2015 2:31 pm

johnvivant wrote:
Sappharad wrote: Small update... The original widescreen codes actually added twice as much width to the screen as they should have. You may have noticed this in the screenshots on the first page, Ryo was thinner than he should have been. Here are the corrected codes:

Shenmue 1 US: (Updated 2015-10-25)
02230250 438E38E4

Shenmue 2 EU: (Updated 2015-10-25)
0231186C 438E38E4

This is the exact width it should be if you're going from 640x480 to 720x480 and want to maintain the same aspect ratio. Only change is the value part of the code, which is controlling the width. This helps reduce pop-in even further, since you have less extra area to notice it. :-)

16x9 is only 12.5% wider than 4x3. The code was crushing the horizontal display by 25%. The new code crushes it by 12.5% instead. This was my fault for eyeballing it, I hadn't bothered to convert the hex numbers to floating point to see what they were.
do you know what the correct Shenmue 1 PAL code would be?

Logically, this is it: 02231EF8 438E38E4
User avatar
Giorgio
"After Burner...Great!"
"After Burner...Great!"
 
Joined: February 2009
Favorite title: Shenmue
Currently playing: Yakuza series

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby johnvivant » Sun Oct 25, 2015 2:44 pm

Giorgio wrote:
johnvivant wrote:
Sappharad wrote: Small update... The original widescreen codes actually added twice as much width to the screen as they should have. You may have noticed this in the screenshots on the first page, Ryo was thinner than he should have been. Here are the corrected codes:

Shenmue 1 US: (Updated 2015-10-25)
02230250 438E38E4

Shenmue 2 EU: (Updated 2015-10-25)
0231186C 438E38E4

This is the exact width it should be if you're going from 640x480 to 720x480 and want to maintain the same aspect ratio. Only change is the value part of the code, which is controlling the width. This helps reduce pop-in even further, since you have less extra area to notice it. :-)

16x9 is only 12.5% wider than 4x3. The code was crushing the horizontal display by 25%. The new code crushes it by 12.5% instead. This was my fault for eyeballing it, I hadn't bothered to convert the hex numbers to floating point to see what they were.
do you know what the correct Shenmue 1 PAL code would be?

Logically, this is it: 02231EF8 438E38E4


yeah, figured it out right after i posted.

edit ; i can confirm 02231EF8 438E38E4 is the code for PAL Shenmue 1, i've just been using it.
Last edited by johnvivant on Sun Oct 25, 2015 2:59 pm, edited 1 time in total.
User avatar
johnvivant
Alpha Trading Boss
Alpha Trading Boss
 
Joined: November 2008

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Sappharad » Sun Oct 25, 2015 2:57 pm

BlueMue wrote: Why actually 720x480? Does is have something to do with the correct streching ratio when you use this on TVs? Because 480p with proper 16:9 aspect ratio actually has a resolution of 854x480.

Because I'm stupid. I thought it was 720x480 because that's what 60hz widescreen DVD's are.
https://en.wikipedia.org/wiki/DVD-Video

So I guess I need do this one more time. :-)

Based on 854x480, the value part of the code should be 43700000. That's actually even wider than the first version of the code I posted, so you'll get even more pop-in. Feel free to use whichever value you think looks best.

Sappharad has received a thanks from: johnvivant
Sappharad
Man Mo Acolyte
Man Mo Acolyte
 
Joined: October 2015
Favorite title: Shenmue II

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby masterchan777 » Sun Oct 25, 2015 4:35 pm

Sappharad wrote:
BlueMue wrote: Why actually 720x480? Does is have something to do with the correct streching ratio when you use this on TVs? Because 480p with proper 16:9 aspect ratio actually has a resolution of 854x480.

Because I'm stupid. I thought it was 720x480 because that's what 60hz widescreen DVD's are.
https://en.wikipedia.org/wiki/DVD-Video

So I guess I need do this one more time. :-)

Based on 854x480, the value part of the code should be 43700000. That's actually even wider than the first version of the code I posted, so you'll get even more pop-in. Feel free to use whichever value you think looks best.


I've experimented with multiple values before posting my two simple emulator files earlier, and found out that 43800000 gives the best results in terms of aspect ratio and pop-ups when used with emulators.
User avatar
masterchan777
Master of the Three Blades
Master of the Three Blades
 
Joined: April 2014
Favorite title: Shenmue II

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Esppiral » Sun Oct 25, 2015 5:08 pm

Sappharad wrote:
BlueMue wrote: Why actually 720x480? Does is have something to do with the correct streching ratio when you use this on TVs? Because 480p with proper 16:9 aspect ratio actually has a resolution of 854x480.

Because I'm stupid. I thought it was 720x480 because that's what 60hz widescreen DVD's are.
https://en.wikipedia.org/wiki/DVD-Video

So I guess I need do this one more time. :-)

Based on 854x480, the value part of the code should be 43700000. That's actually even wider than the first version of the code I posted, so you'll get even more pop-in. Feel free to use whichever value you think looks best.


Thats exactly the value I've been using since with the previous one I still felt the game was still stretched.
User avatar
Esppiral
Alpha Trading Boss
Alpha Trading Boss
 
Joined: May 2012
PSN: Esppiral
XBL: Esppiral
Steam: Esppiral
Favorite title: Shenmue
Currently playing: The Witcher 2

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Giorgio » Sun Oct 25, 2015 5:52 pm

The address of where the value of the view matrix is stored in the "1st_read.bin" file (of Shenmue I PAL):
- Open the "1st_read.bin" file in a hex editor and go to offset 0022DFF8 (relative to the begin of file). You will see the hexadecimal value 00 00 00 00.

Of course, this does not mean that if you change the value then this is equivalent to a patch, because the value is being re-written programatically during run time.

Running Shenmue I PAL on the nullDC emulator and using a hex editor to open the RAM:
- Search for the first text string "NAOMI" (without quotes). Place the cursor just before the "N" character.
- From there, go to offset 0022C478. The offset must be relative to the current offset! Then, if the cursor is positioned before the hexadecimal value 00 00 A0 43, you can be mostly sure that you found the value that you're looking for.
- So, if you change it to anything else (like e.g. 00 00 80 43), then you will notice the effect on the screen/window.

There are other values after that one, which manipulate the camera. Here are some raw observations:
after the text string "NAOMI":
+0022C478 => 4 bytes: view matrix
after the previous offset:
+04 => 4 bytes: tilting
+0C => 4 bytes: field of view
+10 => 4 bytes: tilting
+14 => 4 bytes: vertical scale
+1C => 4 bytes: tilting
+20 => 4 bytes: vertical movement
+24 => 4 bytes: vertical angle
+2C => 4 bytes: depth of view
+30 => 4 bytes: tilting???
+34 => 4 bytes: vertical angle
+3C => 4 bytes: zoom in/out

Giorgio has received 3 thanks from: Anthony817, Esppiral, shengoro86
User avatar
Giorgio
"After Burner...Great!"
"After Burner...Great!"
 
Joined: February 2009
Favorite title: Shenmue
Currently playing: Yakuza series

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Radar » Mon Oct 26, 2015 2:14 am

Sappharad wrote:
Based on 854x480, the value part of the code should be 43700000. That's actually even wider than the first version of the code I posted, so you'll get even more pop-in. Feel free to use whichever value you think looks best.


I compared an overlay of screenshots from Demul and according to them 43700000 is closest value in terms of getting original aspect ratio without any stretching. and yes, more pop-in as result.
I also tested it with changing both vertical and horizontal size value, it increases camera focal length but as result less pop-in without any stretching.
P.S: the coolest thing i like about all this stuff is that effects like snow or rain are actually on full 16:9 area of screen!! I'll try to capture video with snow later. it is amazing!
User avatar
Radar
Man Mo Acolyte
Man Mo Acolyte
 
Joined: February 2013
Favorite title: Shenmue

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby shengoro86 » Mon Oct 26, 2015 12:33 pm

I really like the progress here. I am stepping down as I just don't have the time to help out sadly. Been in the hospital :X
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Radar » Mon Oct 26, 2015 1:44 pm

as promised, I used 43700000 value
phpBB [video]

Radar has received 4 thanks from: Anthony817, BlueMue, johnvivant, shengoro86
User avatar
Radar
Man Mo Acolyte
Man Mo Acolyte
 
Joined: February 2013
Favorite title: Shenmue

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby shengoro86 » Mon Oct 26, 2015 1:47 pm

Radar wrote: as promised, I used 43700000 value
phpBB [video]



That is so awesome

shengoro86 has received a thanks from: Anthony817
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby BlueMue » Mon Oct 26, 2015 2:38 pm

Now THIS is a definitive improvement over nullDC's extra geometry!

BlueMue has received 2 thanks from: Anthony817, shengoro86
User avatar
BlueMue
Machine Gun Fist
Machine Gun Fist
 
Joined: August 2008
Location: Germany
Favorite title: Shenmue II

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Anthony817 » Mon Oct 26, 2015 3:27 pm

That looks almost fucking legit like a real Shenmue HD!
User avatar
Anthony817
Man Mo Acolyte
Man Mo Acolyte
 
Joined: November 2009
Location: Texas
Steam: Anthony817
Favorite title: Shenmue II
Currently playing: Shenmue II English 99min

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby johnvivant » Mon Oct 26, 2015 4:09 pm

wide screen really benefits the whole experience and a great enhancement to the feeling of openness and immersion.

the 70 man battle doesn't feel so restricted and the camera during fight scenes is much less of a problem than it is in 4:3.
shenmue HD has so much potential.

p.s. during the end sequence of the boat, the widescreen code causes the sea to flicker briefly during one of the perspective shots. very brief however. also the smoke plumes from the ships chimneys seem to be out of position in one of the shots, but I couldn't remember if it was like that in the original. i would think not though, since it seems too big of an error.
User avatar
johnvivant
Alpha Trading Boss
Alpha Trading Boss
 
Joined: November 2008

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby GYO6161 » Mon Oct 26, 2015 7:21 pm

A little comparison i made
The widescreen hack no doubt has way less glitches.
Image

GYO6161 has received a thanks from: Yokosuka
User avatar
GYO6161
Man Mo Acolyte
Man Mo Acolyte
 
Joined: September 2015
Favorite title: Shenmue IIx
Currently playing: God of War

Re: Shenmue 1 and 2 widescreen hacks Dreamcast

Postby Sappharad » Mon Oct 26, 2015 7:47 pm

shengoro86 wrote: I really like the progress here. I am stepping down as I just don't have the time to help out sadly. Been in the hospital :X

Sorry to hear about that. When I have time and feel like doing it, I can just find a good place to inject some extra code and give you the bytes to patch in 1ST_READ for it. It's going to end up being very simple like the save hack I posted in the other thread, I just need to find somewhere safe to patch it in.

I spent a lot of time on Saturday trying to resolve the geometry issues with ultimately no real progress and kind of got bored for trying for the moment. I did figure out how to cause even less geometry (pop-in with standard 4x3) but it's not entirely clear what was affected because I intentionally broke one of the calculations responsible for setting the view up. That's why on Sunday I made the save file import hack instead. :-)

In my original post on Assembler, I updated it to provide 3 versions of the code. I prefer the original because my TV has small black borders on both sides like the video at the beginning of this thread, but the true 16x9 and "DVD res" versions are there for those who prefer them.

Sappharad has received 2 thanks from: Anthony817, masterchan777
Sappharad
Man Mo Acolyte
Man Mo Acolyte
 
Joined: October 2015
Favorite title: Shenmue II

PreviousNext

Return to Community Projects

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000-
ShenmueDojo.net