Dreamcast Widescreen Hacks

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

  1. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    2,517
    Likes Received:
    445
    Isn't this just logical vs physical addressing?
    We'd have to test to be sure in any case.
     
  2. IlDucci

    IlDucci Site Supporter 2015

    Joined:
    Aug 24, 2011
    Messages:
    46
    Likes Received:
    12
    In terms on how the pointers are written inside the EXE, that's correct. WS also shares the S1 format.
     
  3. Strogen

    Strogen Rapidly Rising Member

    Joined:
    Jan 3, 2015
    Messages:
    99
    Likes Received:
    7
    It would be nice if it could be patched with the SDcard Maker that GDemu uses,, like region and VGA.
     
    h1ghju1ce2 likes this.
  4. Blashyrkhmr101

    Blashyrkhmr101 <B>Site Supporter 2014</B>

    Joined:
    Sep 10, 2013
    Messages:
    170
    Likes Received:
    11
    Could anyone link me to the DOA2 LE and What's Shenmue? enable codes so I can test out widescreen on those two? Thanks!
     
  5. S4pph4rad

    S4pph4rad Site Supporter 2015

    Joined:
    Nov 28, 2014
    Messages:
    130
    Likes Received:
    99
    I agree, although it's not completely feasible. The widescreen stuff is game-specific, for example the process I followed for Shenmue 1 and 2 won't work for a game like Sonic Adventure. It will probably be possible to make something that can automatically find patches for various games, but this will be limited to games where we know what to look for. In the case of Shenmue and Shenmue II, I could actually automate the process for other versions of the games because there's a big chunk of identical data in the area that gets patched. This same 'signature check' would work for other games too, but probably not many.

    I'll look into automated patching over the weekend, but first I'll need to find widescreen codes for games that work differently.
    It's possible that they might not exist yet. There's probably not one for What's Shenmue. If someone doesn't get to it first, I can look into that as well but I won't get around to it this week. Enable codes are usually pretty easy to make too. There are automated tools for other platforms to find them for you, but I'm not sure if any exist for DC. They usually look for common SDK methods that are executed often, such as polling the controller or updating the next frame of video and the enable code patches them to apply codes at that time.

    Thanks! The 2nd one looks promising.


    On a side note, I reregistered over at Shenmue Dojo and went ahead and cleared up someone's question in the thread there. Looks like my account was on an old forum, so I didn't need to worry about it.
     
    Last edited: Oct 22, 2015
  6. Esppiral

    Esppiral Peppy Member

    Joined:
    Oct 3, 2012
    Messages:
    380
    Likes Received:
    813
    You don't need the "enable codes" for certain games, at least not with DOA 2 LE, it works with out one.

    Original.

    [​IMG]


    Widescreen.
    [​IMG]


    Best thing is,the geometry popping present on emulators is gone on a real Dreamcast!!! :)
     
  7. Anthony817

    Anthony817 Dauntless Member

    Joined:
    May 12, 2010
    Messages:
    711
    Likes Received:
    161
    Wow that looks really great.
     
  8. wombat

    wombat Site Supporter 2011,2013,2014,2015

    Joined:
    Mar 14, 2004
    Messages:
    2,571
    Likes Received:
    235
    These widescreen hacks definitely add new life to the Dreamcast library, especially seeing Shenmue running in 16:9 is unreal and makes it a more immersive experience.
     
    Esppiral likes this.
  9. Blashyrkhmr101

    Blashyrkhmr101 <B>Site Supporter 2014</B>

    Joined:
    Sep 10, 2013
    Messages:
    170
    Likes Received:
    11
    Esppiral thanks so much! I guess I'll go ahead and try What's Shenmue and Virtua Fighter 3tB without enable codes then :)

    Edit: tested What's Shenmue?, Dead or Alive 2 LE and Virtua Fighter 3TB (JP) without enable codes and they worked just fine. This is excellent.
     
    Last edited: Oct 23, 2015
    Esppiral and Anthony817 like this.
  10. Esppiral

    Esppiral Peppy Member

    Joined:
    Oct 3, 2012
    Messages:
    380
    Likes Received:
    813
    Should we make a request thread? I can fullfill one myself alone lol xD
     
    Anthony817 likes this.
  11. Anthony817

    Anthony817 Dauntless Member

    Joined:
    May 12, 2010
    Messages:
    711
    Likes Received:
    161
    Hell yeah. I will start by requesting Half-Life and Vigilante 8.
     
  12. S4pph4rad

    S4pph4rad Site Supporter 2015

    Joined:
    Nov 28, 2014
    Messages:
    130
    Likes Received:
    99
    Unfortunately, I verified this today and it is not true. The address being patched is not part of 1ST_READ.BIN, you won't be able to go from the memory location to an actual patch directly. This isn't a huge setback, it's just going to take a bit longer than expected. If someone really has a lot of time on their hands, they could try replacing each 0000A043 in the 1ST_READ one at a time until they find the one that initializes the same address that the code sets. Meanwhile, I'm going to see if I can make use of that disassembler posted earlier in the thread since one of the other changes I want to make is going to require an actual logic patch.

    I was going to update the first post with a complete list of codes posted throughout this thread so far, but given the amount of discussion I wonder if it would be better to put them somewhere else. Any suggestions?
     
  13. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    2,517
    Likes Received:
    445
    Just take note that I had made a mistake when I first guessed the address, I corrected my prediction afterward, on page 3 I think.

    It'd be nice if it's a simple bootbin fix.
     
  14. yzb37859365

    yzb37859365 Rapidly Rising Member

    Joined:
    Jul 14, 2013
    Messages:
    98
    Likes Received:
    51
    so can I do an example....

    Shenmue (US version)
    02230250 43800000

    in ist_read.bin 0x1c36d0:

    mov.l @(h'1E4,pc), r5 ; [0C1D38B8] = dword_C2A1ED4
    mova @(h'1E0,pc), r0 ; [0C1D38B4] = h'3F000000
    fmov.s @r0, fr5
    mov #4, r0
    fmov.s @r5, fr3
    fmul fr5, fr3
    fmov.s fr3, @r4

    write fr3 = 0x43a00000
    r4 = 0x0c230250
     
    Giorgio and S4pph4rad like this.
  15. Rocky5

    Rocky5 Site Supporter 2015

    Joined:
    Jan 17, 2014
    Messages:
    499
    Likes Received:
    72
    I tried patching the game directly (shenmue) didn't work.

    I replaced all instances of 0000A043 with 00008043 there were a total of 21 in the 1st_read.bin & 75 in Track6.bin.
    (Took bloody ages to, change & test)

    I also tried just replaced each value in Track6.bin, instead of extracting & rebuilding.
    (Where the 1st_read.bin is located)

    I then reverted to the cheat code & that worked first time :/
     
    Last edited: Oct 25, 2015
    Esppiral likes this.
  16. Esppiral

    Esppiral Peppy Member

    Joined:
    Oct 3, 2012
    Messages:
    380
    Likes Received:
    813
    We need a tutorial for dummies so everyone can contribute to increase the list of games with widescreen patches.
     
    americandad likes this.
  17. wombat

    wombat Site Supporter 2011,2013,2014,2015

    Joined:
    Mar 14, 2004
    Messages:
    2,571
    Likes Received:
    235
    Maybe this development will be the motivator needed for the creators of GDEMU and USB GDRom to look into adding Codebreaker / Action Replay functionality to each features. It would be great if we could just add these code in a .txt file along side the .gdi and get these hacks going :)
     
    Anthony817 likes this.
  18. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    2,517
    Likes Received:
    445
    @yzb37859365, care to explain more in details the logic? What is the routine you disassembled?

    @Rocky5, you patched at yzb's address? When you modified the raw image directly, did you rebuild the edc/ecc footer of the sector?

    Maybe the CB enabler code must also be patched into the bootbin?
     
  19. yzb37859365

    yzb37859365 Rapidly Rising Member

    Joined:
    Jul 14, 2013
    Messages:
    98
    Likes Received:
    51
    @Rocky5
    Can you upload the 1st_read.bin file


    @-=FamilyGuy=-
    I don't know
    I just know that the values are written here.
     
    Last edited: Oct 24, 2015
  20. Giorgio

    Giorgio Member

    Joined:
    Feb 2, 2015
    Messages:
    6
    Likes Received:
    3
    About clipping, the following information may help (source: PowerVR Registers).
    Code:
    a05f8068: (fb_clip_x)
    +-------------------------------+
    | 31-27 | 26-16 | 15-11 | 10-0  |
    |  n/a  | max   |  n/a  | min   |
    +-------------------------------+
      
       Specifies the horizontal pixel clipping area - 1.
    
    
    a05f806c: (fb_clip_y)
    +-------------------------------+
    | 31-27 | 26-16 | 15-11 | 10-0  |
    |  n/a  | max   |  n/a  | min   |
    +-------------------------------+
    
       Specifies the vertical pixel clipping area - 1.
    
    
    a05f8078: (object_clip)
    +--------------+
    | 31-0 (FLOAT) |
    |   distance   |
    +--------------+
    
       distance:
         Position of polygon culling.
    
    There is a lot more information in the text file (including e.g. about the horizontal/vertical border).
     

Share This Page