Dreamcast Widescreen Hacks

Discussion in 'Sega Dreamcast Development and Research' started by S4pph4rad, Oct 20, 2015.

  1. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
    Even if it'd require a lot of work to properly do 800x608, it would be cool to see pre-patched widescreen, up-res-ed disc images. Even using the web browser in 800x608 would be cool

    Its somewhat disappointing when people say "Well we can do it, but it'd require too much work"

    mfw
    [​IMG]
     
  2. Gromber

    Gromber Spirited Member

    Joined:
    Apr 4, 2012
    Messages:
    115
    Likes Received:
    30
    but do it yourself hahaha
    someone tested fighting vipers 2 pal code on real dreamcast and works fine?
     
  3. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    664
    Likes Received:
    353
    Trust me if I could code we'd probably all be playing Counter-Strike online using the Xash3D engine with widescreen running at 800x608. Or Morrowind on OpenMW if not both
     
    Anthony817 and Esppiral like this.
  4. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    Ok, I will give a little brief of how I did achieved widescreen on Shenmue II with virtually no clipping at all.
    First off I must say that it come with its own tradeoffs, I will explain them later.

    Ok, so I took a different approach to make Shenmue II widescreen, instead of changing the 3d matrix, to expand the horizontal view I did the opposite, I changed it to expand the vertical view, in orther to achieve widescreen without cropping the image top/bottom, I used the camera zoom value to put the camera further away, since the game renders everything "inside" the zoom camera area the end result is the game running in widescreen with zero clipping.

    Top original widescreen hack, bottom new one, notice how now everything is rendered on the right and left of the image.

    [​IMG]



    Ok now the tradeoffs.
    Cutscenes are not affected by the ingame zoom value, so the end result, while widescreen, is cropping the top and bottom of the image, I've been looking for a similar value for cutscenes with no luck so far. Anyway we can remove the black bars in orther to have the whole screen filled with the cutscene so givin us the same widescreen as the standard game but without those awefull bb, again, bad news, it seems that removing the BB requieres specific values for cutscenes, since the game does not use an universal addres for the BB.

    [​IMG] So the game will display cutscenes like the top righ image.


    Another tradeoff is that the game will lag more on Dreamcast since it is actually rendering quite a bit more geometry than with the previous hack.
    So this will come in handy for those tha want to replay the game in widescreen with no clipping.


    Shenmue II pal (alternative widescreen/no clipping)
    Code:
    02311880---C3A00000
    0227E198---35AA359E
     
  5. Gromber

    Gromber Spirited Member

    Joined:
    Apr 4, 2012
    Messages:
    115
    Likes Received:
    30
    thanks as always for the codes.

    my mistake, i thought the code was for Capcom vs. SNK: Millennium Fight 2000 but was for Capcom vs. SNK 2: Millennium Fight 2001. I like more the first game with 2d background hehehe

    xD
     
  6. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    Is anyone else having troubles with nulldc+cheat engine in Windows 10? mmm....
     
  7. masterchan777

    masterchan777 Newly Registered

    Joined:
    May 9, 2013
    Messages:
    4
    Likes Received:
    1
    Yes, Cheat Engine seems to crash NullDC in Windows 10, it's working fine with Demul though ...
     
  8. masterchan777

    masterchan777 Newly Registered

    Joined:
    May 9, 2013
    Messages:
    4
    Likes Received:
    1
    While testing the new Widescreen/No Clipping on Shenmue II, I noticed this strange geometry side-effect :

    [​IMG]
     
    Esppiral likes this.
  9. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    Yes it happens the same in the intro of the fourth disc.
    I forgot to mention it.
     
  10. Auction_Sniper

    Auction_Sniper Rapidly Rising Member

    Joined:
    Aug 2, 2008
    Messages:
    76
    Likes Received:
    9
    Are there many games that lag on the real hardware with widescreen enabled? And just how much worse does it make Shenmue II? (Super choppy and horrible to play, or just a few frames less).
     
    Last edited: Jan 10, 2016
  11. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    893
  12. S4pph4rad

    S4pph4rad Site Supporter 2015

    Joined:
    Nov 28, 2014
    Messages:
    140
    Likes Received:
    114
    The reason for this is that some of the graphical effects like the splashing you pictured, the smoke coming from the boat, and other particle-like things are actually 2D effects overlayed onto the 3D screen. Only 3d elements are being scaled by the widescreen codes, so those effects will remain in the same place as they were without the code. This same situation applies in a few other games as well, but it's more noticeable here since his new code effects the FOV in cutscenes. He could actually have used a conditional code to disable it for cutscenes but the majority of people aren't actually running these on hardware so they wouldn't be able to take advantage of it.
    I haven't had time to test Espprial's new code, but the old one was completely playable. As in, you almost never noticed a difference. I'm guessing the new code without clipping may have more impact, but it's probably very playable and I'd guess slowdown doesn't happen very often. The old code had some problems in a few cutscenes (glitches someones, one even crashed) according to someone who played the entire game with it on, and I'd expect the new one to be no better.
     
    masterchan777 likes this.
  13. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    By any meanings it is unplayable, it just lags a little bit more in certain areas whilw I haven't notice any difference in others I haven't finished the whole game with the hack though.

    S4pph4rad it is possible le to make conditions with the codes? I think your widescreen hack during cutscenes + mine for gameplay would be the perfect tandem.
     
    Gromber, Anthony817 and -=FamilyGuy=- like this.
  14. Anthony817

    Anthony817 Familiar Face

    Joined:
    May 12, 2010
    Messages:
    1,078
    Likes Received:
    535
  15. S4pph4rad

    S4pph4rad Site Supporter 2015

    Joined:
    Nov 28, 2014
    Messages:
    140
    Likes Received:
    114
    Someone at Shenmue Dojo claims that your code doesn't crash during cutscenes where the original one did. At first I thought that sounded strange, but now that I think about it, it is technically rendering less than before since you're zooming in. The stuff under the black bars was still being rendered anyway.

    Yes, it's possible to make conditional codes. The 0D code type is a conditional, 0Dxxxxxx 0000vvvv. This will execute the next code if the value at xxxxxx is equal to vvvv. You can see all of the dreamcast code types here: http://gamehacking.org/faqs/hackv500c.html#dc_code_types
    There's a value in memory that goes to 0001 whenever a cutscene is playing and back to 0000 when it's not. It would work nicely for these codes.

    But it would probably be better instead to 'fix' the black bar code to work with all cutscenes so people can have a code which doesn't crash sometimes. I'm guessing such a change will require a minor assembly hack. Do you know how the existing black bars codes were found? If there's a way to automate the process (such as a memory address that contains an address that's always a fixed number of bytes away from the addresses that the current codes modify) I could come up with an assembly version of the code that would apply to all cutscenes.
     
    Esppiral likes this.
  16. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    Let's see If I get it right. so I took ecco the dolphin as an example.

    I want to change a value at certain address after the game has loaded since the value is updated during loading and if I change it before it will hang.

    I use this tip.

    So the address I'm interested in is this one 2CFF7DE8 but only when its value is set to 3f80000 to make it 40000000, so the code should look like this?
    Code:
    0DFF7DE8
    3f800000
    02FF7DE8
    40000000

    Anytime a cutscene is displayed, if you look for the the string WARN the third from the bottom result will lead you to a an address that it is always a fixed bytes away from it. you'll see it quicly since it is the closest 00000001 value next to that warn text.
     
  17. S4pph4rad

    S4pph4rad Site Supporter 2015

    Joined:
    Nov 28, 2014
    Messages:
    140
    Likes Received:
    114
    Close, but if you want to check a 32-bit value, you need to use the 0C code type, not 0D. The 0D type is for 16-bit values.
    Code:
    0CFF7DE8 3f800000
    02FF7DE8 40000000
    I think that should work, based on your description.
    Thanks, I'll see what I can do with this information.

    Edit: Didn't want to bump this since there's still work to be done, but that helped me find what we need to make a proper no-borders code. The address 8C2BE67C contains a memory address. If you take the value at that address and subtract 0x3C from it, you'll have the memory address that needs to be set to 00 to remove the borders. (This is for Shenmue 2 EU version)

    At this point, I just need to find somewhere to insert a hack similar to the following:
    Code:
    mov H'00, R0
    mov.l @(H'8C2BE67C), R1
    sub H'3C, R1
    mov R0, @R1
    
    The Debug version of Demul doesn't work with Shenmue 2, so it's probably going to be a few days before I have time to stumble around and find a place to put this code. Anyone else is welcome to do it first. More modern cheat devices (PS2, Gamecube, Nintendo DS) have a code type called a pointer code (also called offset code) which could have done this type of lookup without a custom assembly hack, but oh well.
     
    Last edited: Jan 13, 2016
    yzb37859365, Gromber and Esppiral like this.
  18. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    S4pph4rad you are awesome!!!
     
  19. Radaron

    Radaron Member

    Joined:
    Oct 29, 2015
    Messages:
    8
    Likes Received:
    3
    Cool! No need to look for each address now!
    Here is a quick lua script for Cheat engine to use with Demul I wrote
    Code:
    local d0 = readInteger("2C2BE67C")
    writeInteger(d0-0x6000003C,0)
     
    WingMantis and Esppiral like this.
  20. yzb37859365

    yzb37859365 Spirited Member

    Joined:
    Jul 14, 2013
    Messages:
    187
    Likes Received:
    124


    test...........

    Shenmue 2 EU version 1st file
    at 0x150ff2

    01 a0 01 e1

    change

    01 a0 00 e1

    good luck
     
    Giorgio, -=FamilyGuy=- and Esppiral like this.
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page