ROM Hack Can Xdelta patch iso's?

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
While we're on the topic of applying patches, anyone able to save me the trouble and apply the patch file included with the source of this modified FAT module? I'm not sure which app to use to apply the patch or if it even matters for this particular patch file. The file is in the attachment to this post, thanks!
https://gbatemp.net/threads/ciosx-rev21d2x-yet-another-hot-fix.277659/page-163#post-5092147
you just have to replace the FAT library of beta-52. @Cyan showed me this when wiiware wouldn't work with ustealth. it works perfectly now. just replace, then reinstall beta-52. beta-53 doesn't even have a FAT library, which may be why it doesn't work well with wiiware.
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
@XFlak , don't use it on the wii or on the wii u if you're not using ustealth. I don't know what might happen if you do. you get either a black screen or it returns to usb loader gx if you don't use the patch with wiiware/vc games.
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,858
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,882
Country
Cyprus
Works just fine. It's currently bundled in a modmii d2x beta along with the most recent fakemote. More info here: https://gbatemp.net/threads/best-wa...s-official-support-thread.207126/post-9740302

And I know we need to replace the fat library, but the provided source is just a patch file iirc, I think you'd need to dif/delta patch it against the original to get the new source for the new fat module. If I can get the patched source I can upload to davebaol's official d2x github
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,858
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,882
Country
Cyprus
So in the rar there's the compiled fat.app binary, and a ff.c.patch with the following code, and nothing else
Code:
Index: ff.c =================================================================== --- ff.c(revision 54) +++ ff.c(working copy) @@ -1979,7 +1979,7 @@  {  if (disk_read(fs->drv, fs->win, sect, 1) != RES_OK)/* Load boot record */   return 3; -if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature (always placed at offset 510 even if the sector size is >512) */ +if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55  && LD_WORD(&fs->win[BS_55AA]) != 0xAB55)/* Check record signature (always placed at offset 510 even if the sector size is >512) */   return 2;    if ((LD_DWORD(&fs->win[BS_FilSysType]) & 0xFFFFFF) == 0x544146)/* Check "FAT" string */ @@ -2133,7 +2133,7 @@    fs->fsi_flag = 0;   fs->fsi_sector = bsect + LD_WORD(fs->win+BPB_FSInfo);   if (disk_read(fs->drv, fs->win, fs->fsi_sector, 1) == RES_OK && -  LD_WORD(fs->win+BS_55AA) == 0xAA55 && +  (LD_WORD(fs->win+BS_55AA) == 0xAA55 || LD_WORD(fs->win+BS_55AA) == 0xAB55)&&    LD_DWORD(fs->win+FSI_LeadSig) == 0x41615252 &&    LD_DWORD(fs->win+FSI_StrucSig) == 0x61417272) {     fs->last_clust = LD_DWORD(fs->win+FSI_Nxt_Free);
How is that supposed to directly replace ff.c that's almost 4000 lines saved here
https://github.com/davebaol/d2x-cios/blob/master/source/fat-module/ff.c

I'm not disputing I could be mistaken, but if so I'm definitely missing something
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
just replace the FAT library. it works as I've tried it or what for @Cyan to chime in. it's meaningless for the wii. it's only for the wii u using ustealth. games either give a black screen or throw you back into the usb loader gx. I think the ff.c is just the modifications made to the original. it says where the changes have been made:

1645051477776.png
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
as you can see, it only makes changes to line 1979+, and 2133+, it's not the full ff.c.
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,858
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,882
Country
Cyprus
It's not meaningless for the wii, if someone has a wii and a wiiu, and they have a shared hdd for wii and vWii, and they have ustealth applied to the drive, emunand gamesaves won't work without the modified FAT module on either wii or vwii

Please shoot me over the updated /complete ff.c if u don't mind and have it handy

Edit: or I will look at it later when I'm near my pc, too much effort on mobile, maybe it's the Android text editing apps I'm using but the patch file appears to be missing linebreaks

Edit2: yeah on my mobile it was missing line breaks, I should've just looked at this on PC before troubling you guys so much, apologies and thanks for your patience
 
Last edited by XFlak,

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
I think you're making it too complicated than it needs to be. I'm starting to get agitated, so I'm signing off for the day.
 
  • Like
Reactions: XFlak

fledge68

Well-Known Member
Member
Joined
Jan 30, 2012
Messages
2,440
Trophies
2
XP
4,981
Country
United States
It's not meaningless for the wii, if someone has a wii and a wiiu, and they have a shared hdd for wii and vWii, and they have ustealth applied to the drive, emunand gamesaves won't work without the modified FAT module on either wii or vwii

Please shoot me over the updated /complete ff.c if u don't mind and have it handy

Edit: or I will look at it later when I'm near my pc, too much effort on mobile, maybe it's the Android text editing apps I'm using but the patch file appears to be missing linebreaks
hey buddy do you have notepad++? if so just download ff.c and open it in notepad++. then change the 2 lines noted in the patch file (line #1982 and #2136) and save .

https://github.com/davebaol/d2x-cios/blob/master/source/fat-module/ff.c
 
  • Like
Reactions: XFlak

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,858
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,882
Country
Cyprus
I think you're making it too complicated than it needs to be. I'm starting to get agitated, so I'm signing off for the day.
Yeah you're probably right, lol, sorry about that

Edit: yeah on my mobile it was missing line breaks, I should've just looked at this on PC before troubling you guys so much, apologies and thanks for your patience
 
Last edited by XFlak,
  • Like
Reactions: godreborn

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,858
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,882
Country
Cyprus

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
Yeah you're probably right, lol, sorry about that

Edit: yeah on my mobile it was missing line breaks, I should've just looked at this on PC before troubling you guys so much, apologies and thanks for your patience
haha, I was worried about that post, didn't sleep right. I thought it came off wrong. I wasn't agitated with you, just get agitated for no real reason at times. that's usually when I don't post anymore that day and lie down, wait for dinner.
 
  • Like
Reactions: XFlak

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
This is not a xdelta binary patch, it's a text patch.
the .patch file is a SVN file format, you need SVN program or TortoiseSVN installed to "apply" the change to the ff.c sources. (put the patch in the root of the project, right click the patch file, choose tortoise, choose apply, or double-click on it it, or use a command line to apply the patch)
or just open the patch in notepad, read what you see. it contains the line number to change, the old version and the new version.

There's only 2 lines to update, and then you need to recompile cIOS d2x FAT library if you want to get the fat.app binary file yourself.
or just use the one provided in the package.


You are right for the fact that Wii owners might benefit from it too, in case their drive(s) are Ustealth'd too.
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
This is not a xdelta binary patch, it's a text patch.
the .patch file is a SVN file format, you need SVN program or TortoiseSVN installed to "apply" the change to the ff.c sources. (put the patch in the root of the project, right click the patch file, choose tortoise, choose apply, or double-click on it it, or use a command line to apply the patch)
or just open the patch in notepad, read what you see. it contains the line number to change, the old version and the new version.

There's only 2 lines to update, and then you need to recompile cIOS d2x FAT library if you want to get the fat.app binary file yourself.
or just use the one provided in the package.
yeah, that's where I was confused. sorry @XFlak , I was trying to get you to use the FAT library provided, because it's not necessary to patch the file yourself unless you really want to. I installed TortoiseSVN quite some time ago, like when I got my laptop, but I was mainly using it to download git or other download links/checkout. I didn't realize it could add a patch like the one provided.

1645116342354.png
 
  • Like
Reactions: XFlak

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
the patch is for sources, you need to recompile the project after that (which would require old version of devkitpro ARMv32 for IOS compilation project if I remember correctly)
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,180
Country
United States
the patch is for sources, you need to recompile the project after that (which would require old version of devkitpro ARMv32 for IOS compilation project if I remember correctly)
that I was aware of, but I didn't think about needing an old version of devkitpro. they suggest not using older versions, but it's the only way to compile some older projects, same with visual studio. it's a pita, had to put vs 2015 and 2019, both on the pc. not sure if you can have more than one devkitpro due to the environmental variables.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    BigOnYa @ BigOnYa: Wish they would let us play the NCAA football 14 on newer xbox, its one of the only games I love...