Dreamcast Widescreen Hacks

Thanks! Will try it :)
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
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.
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!
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
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.
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
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
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
i agree not only it will be easier but 1stbin is not always the one that need patching
I know
it's simple patcher, , written in 10 minutes
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?
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.
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
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.
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.
MDK2 PAL

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


[​IMG]
Tony Hawk Pro Skater Pal

Code:
02160D80
0000000A
02160D7C
0000000A

[​IMG]
Cannon Spike v1.001 (2000)(Capcom)(NTSC)(US)
Code:
02BB3C74
440A7C9A
Cannon Spike v1.000 (2001)(Bigben)(PAL)
Code:
02BB3D14
440A7C9A

[​IMG]


[​IMG]
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?

Original thread: https://assemblergames.com/threads/dreamcast-widescreen-hacks.58620/