Dreamcast Widescreen Hacks

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

  1. RXShorty

    RXShorty Rising Member

    Joined:
    Apr 19, 2016
    Messages:
    50
    Likes Received:
    9
    Thanks! Will try it :)
     
  2. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22
    I just used a Codebreaker cdi image with the codes

    Also using a USB GDROM

    Though not had time to play with it much yet
     
    RXShorty likes this.
  3. Aleron Ives

    Aleron Ives Rapidly Rising Member

    Joined:
    Jan 29, 2012
    Messages:
    77
    Likes Received:
    44
    Take the 16:9 code for Draconus as an example:

    0249D7F4
    3F07C3BB

    02 <- 32-bit memory write code type
    (8C)49D7F4 <- memory address to write at
    3F07C3BB <- 32-bit value to write (little endian)

    1ST_READ.BIN is always shifted forward by 0x10000 in RAM, so to convert the RAM address to the file address, subtract 0x10000 from the RAM address:

    0x49D7F4 - 0x1000 = 0x48D7F4

    The Dreamcast's SH4 processor is little endian, but CB codes are also little endian, so using "little little" endian codes makes the values appear to be big endian, even though they shouldn't be for patching the 1ST_READ.BIN. As such, you need to byte swap the value to write as well:

    3F07C3BB -> BBC3073F

    You therefore want to patch offset 0x48D7F4 in 1ST_READ.BIN with the value 0xBBC3073F to make the widescreen patch permanent. This of course assumes that 1ST_READ.BIN is the main executable for the game and not a loader for another executable file, as may be the case for games with above average copy protection measures.
     
  4. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    Nice! Tony Hawk Pro Skater 2 HEX PATCH.


    Find
    Code:
    0000803F 0000803F 9A99193F 0000803F 01000000 01000000 01000000 01000000 01000000 00000000 CDCCCC3E 01000000 00000000
    
    Replace
    Code:
    0000403F 0000803F 9A99193F 0000803F 01000000 01000000 01000000 01000000 01000000 00000000 CDCCCC3E 01000000 00000000
    The game does still clip a lot, but this was done just tot test @Aleron Ives intructions and it indeed works!
     
    megavolt85 and Shenmue_Trilogy like this.
  5. Shenmue_Trilogy

    Shenmue_Trilogy Rapidly Rising Member

    Joined:
    Oct 29, 2015
    Messages:
    98
    Likes Received:
    40
    Need some help using alerons guide. Lets take the widescreen code for Tony Hawk 2:

    021D779C -> 0x1C779C
    3F400000 -> 0000403F

    I do see the same replace value (0000403F) as esspiral posted above but how do I find/know the value 0000803F? ...and I also see two of these values 0000803F in esspiral post. Why is the second one not replaced with 0000403F?

    Here is the transformation for MSR widescreen code ver 1.009

    Widescreen code:
    02106B5C
    3F99999A
    021111F4
    3F900000

    02106B5C -> 0xF6B5C
    3F99999A -> 9A99993F

    021111F4 -> 0x1011F4
    3F900000 -> 0000903F
     
    Last edited: Dec 18, 2016
  6. Aleron Ives

    Aleron Ives Rapidly Rising Member

    Joined:
    Jan 29, 2012
    Messages:
    77
    Likes Received:
    44
    You don't need to do a find and replace, because you already know the offset you need to modify. Use the "Go to offset" function of your hex editor to navigate to offset 0x1C779C, then write the value 0x0000403F at that offset. It doesn't matter what the original value was at that offset, nor does it matter that the original value at that offset might appear in other places, too. Having a working code means that somebody else already figured out which instance of 0x0000803F you need to modify, so the other instances are of no interest to you.

    Esppiral presumably posted a long sequence of bytes in order to make it easy to find that spot in 1ST_READ.BIN when doing a blind search, because if he used a shorter byte sequence, you would get more than one hit, and thus you wouldn't know which spot you needed to patch. This strategy is useful for porting the patch to other regions of the same game, because the offsets won't match between JP/US/EU discs. If the correct offset to patch is already known, then it's better to just post the offset and the value to write at that offset, rather than posting a byte sequence to search for.
     
    Shenmue_Trilogy likes this.
  7. megavolt85

    megavolt85 Peppy Member

    Joined:
    Jan 8, 2015
    Messages:
    311
    Likes Received:
    454
    put to folder with simple_patcher.exe your 1ST_READ.BIN
    Usage: simple_patcher.exe addres value
    Example: simple_patcher.exe 021D779C 3F400000
    Example2: simple_patcher.exe 02106B5C 3F99999A 021111F4 3F900000
     

    Attached Files:

  8. truemaster1

    truemaster1 Enthusiastic Member

    Joined:
    Nov 10, 2015
    Messages:
    512
    Likes Received:
    226
    man sorry that im late to say it. you are THE MAN.
    but as someone mention before its not always the 1stbin the one that need patching
     
    Last edited: Dec 19, 2016
  9. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22
    Would also come in handy if the game image was patched directly instead of extracting the 1ST_READ.bin file then should work for both CDI rips and GDI dumps without needing to know the exact address to patch
     
    truemaster1 likes this.
  10. truemaster1

    truemaster1 Enthusiastic Member

    Joined:
    Nov 10, 2015
    Messages:
    512
    Likes Received:
    226
    i agree not only it will be easier but 1stbin is not always the one that need patching
     
  11. megavolt85

    megavolt85 Peppy Member

    Joined:
    Jan 8, 2015
    Messages:
    311
    Likes Received:
    454
    I know
    it's simple patcher, , written in 10 minutes
     
    Shenmue_Trilogy and Esppiral like this.
  12. Shenmue_Trilogy

    Shenmue_Trilogy Rapidly Rising Member

    Joined:
    Oct 29, 2015
    Messages:
    98
    Likes Received:
    40
    Hmm so I have my MSR dump with .gdi file, track01.bin, track02.raw and track03.bin (over 1gb). How do I get 1ST_READ.BIN? or is track03.bin = 1ST_READ.BIN?
     
  13. Aleron Ives

    Aleron Ives Rapidly Rising Member

    Joined:
    Jan 29, 2012
    Messages:
    77
    Likes Received:
    44
    You can't patch a CDI this way if you want to burn it, though, because you need to patch the error correction data for the sector you modified. You can only do a direct CDI modification if you want to use it in an emulator or one of the GD-ROM drive replacement units, as all of them ignore error correction.
     
  14. megavolt85

    megavolt85 Peppy Member

    Joined:
    Jan 8, 2015
    Messages:
    311
    Likes Received:
    454
    use -=FamilyGuy=- Selfboot 45000LBA DATA/DATA Pack v1.4
    P.S. for MSR need patch 2_DP.BIN or MSR.BIN, I do not remember exactly
     
  15. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    I actually posted the binary secuence in order to directly patch the .cdi.

    I've been trying to patch more games, but the offset does not exist in the 1st read.bin, I guess I was lucky to choose THPS2 as my first attempt at patching.
     
    truemaster1 likes this.
  16. Aleron Ives

    Aleron Ives Rapidly Rising Member

    Joined:
    Jan 29, 2012
    Messages:
    77
    Likes Received:
    44
    It's possible that the data gets extracted from 1ST_READ.BIN to another offset in RAM I suppose, but if the game has a super small 1ST_READ.BIN, then it's probably just a loader for the main game binary, so the offset might be found in that file, instead. This seems to me like the kind of data that would be contained in the main binary, so I'd be surprised if there's a separate camera file with the FOV and DAR information that you're patching.
     
  17. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    MDK2 PAL

    Code:
    020C7CA5
    68000002
    [​IMG] [​IMG]


    [​IMG]
     
  18. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    Tony Hawk Pro Skater Pal

    Code:
    02160D80
    0000000A
    02160D7C
    0000000A

    [​IMG]
     
    Gromber, willjay, Roareye and 3 others like this.
  19. Esppiral

    Esppiral Gutsy Member

    Joined:
    Oct 3, 2012
    Messages:
    495
    Likes Received:
    1,041
    Cannon Spike v1.001 (2000)(Capcom)(NTSC)(US)
    Code:
    02BB3C74
    440A7C9A
    Cannon Spike v1.000 (2001)(Bigben)(PAL)
    Code:
    02BB3D14
    440A7C9A

    [​IMG]


    [​IMG]
     
    Gromber, megavolt85 and Anthony817 like this.
  20. rso

    rso Gone. See y'all elsewhere, maybe.

    Joined:
    Mar 26, 2010
    Messages:
    2,190
    Likes Received:
    447
    Dude. You're a Widescreening Machine. Stahp. Get a Life. :eek:

    Seriously though, judging by the high frequency of finding these codes, there seems to be a standard pattern to it...? Do you think your process, or at least parts thereof, could be automated to make things easier/even faster?
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page