Hacking Wii backup Manager for Windows

3DPiper

Well-Known Member
Member
Joined
Jun 13, 2004
Messages
417
Trophies
1
XP
861
Country
United States
Lucif3r:

I tried CFG and in fact it does see the drive and appears to work...!

Not sure what happened with USB Loader GX, I really liked that loader..

Thanks for the advice! :)
 

Burton

Real Life VIP and Educator
Member
Joined
Mar 7, 2006
Messages
880
Trophies
0
Website
Visit site
XP
283
Country
@fig2k4

I tried your New Sneek Converter and none of my backups worked. I verified again and they work well with Modmii's Bulk Extraction converter. It would be nice if someone can test it too on their emulated nands to see if they reproduce the same problem.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
@nobody_tw
The bug fix might explain that. If the old error occurred it might've looked like the hash check failed before, but now it doesn't. The best way to confirm it is to use wit verify. If that hash check fails, then it means WBM is working correctly.

@Burton
Thanks for the feedback. I checked this out further with Beyond Compare and can see that with some games, some of the files fail a binary comparison with wit's output. I'll debug this tonight. Because I have the names of the extracted files that are corrupt, it should hopefully be straight forward to fix.

I've been out the game for the past week with man flu, as my wife calls it. :) My head's been too screwed up to do anything, especially with the kids on the October break from school too.. I'll get the ball rolling again tonight with some bug hunting.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
It looks like I didn't quite fix the SHA-1 hash bug. Me being the idiot that I am, forgot to increment the read offset when I changed the code to read in 1MB chunks. So, it's only reading the first 1MB of each file over and over. It explains why the SNEEK format doesn't work and the weird results with the hash test.

I'll send a PM to both of you later if you'd like to test the changes. If anyone else wants a link to the exe, let me know.

One thing I noticed is that Wiimm put more work into this and calculates the exact size of the main.dol. Both WBM and DiscEx just use the difference between 2 offsets as the size. It results in the dol sometimes having a few extra bytes at the end. It shouldn't interfere with anything, the dol will work fine, but it'll sometimes be a few bytes larger than the output from wit.
 

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
It looks like I didn't quite fix the SHA-1 hash bug. Me being the idiot that I am, forgot to increment the read offset when I changed the code to read in 1MB chunks. So, it's only reading the first 1MB of each file over and over. It explains why the SNEEK format doesn't work and the weird results with the hash test.

I'll send a PM to both of you later if you'd like to test the changes. If anyone else wants a link to the exe, let me know.

One thing I noticed is that Wiimm put more work into this and calculates the exact size of the main.dol. Both WBM and DiscEx just use the difference between 2 offsets as the size. It results in the dol sometimes having a few extra bytes at the end. It shouldn't interfere with anything, the dol will work fine, but it'll sometimes be a few bytes larger than the output from wit.

The size calulation is very easy. First see the dol header:
Code:
#define DOL_N_TEXT_SECTIONS  7
#define DOL_N_DATA_SECTIONS 11
#define DOL_N_SECTIONS (DOL_N_TEXT_SECTIONS+DOL_N_DATA_SECTIONS)
#define DOL_HEADER_SIZE 0x100

typedef struct dol_header_t
{
/* 0x00 */	u32 sect_off [DOL_N_SECTIONS];
/* 0x48 */	u32 sect_addr[DOL_N_SECTIONS];
/* 0x90 */	u32 sect_size[DOL_N_SECTIONS];
/* 0xd8 */	u32 bss_addr;
/* 0xdc */	u32 bss_size;
/* 0xe0 */	u32 entry_addr;
/* 0xe4 */	u8  padding[DOL_HEADER_SIZE-0xe4];
}
__attribute__ ((packed)) dol_header_t;
And now find the maximum sector end (sect_off+sect_size).

Code:
u32 dol_size = 0;
for ( i = 0; i < DOL_N_SECTIONS; i++ )
{
const u32 size = dol->sect_off[i] + dol->sect_size[i];
if ( dol_size < size )
dol_size = size;
}
And don't forget big endian. In my example all values are already stored in local endian.
 

Burton

Real Life VIP and Educator
Member
Joined
Mar 7, 2006
Messages
880
Trophies
0
Website
Visit site
XP
283
Country
Me being the idiot that I am, forgot to increment the read offset---Nah you are great!!---when I changed the code to read in 1MB chunks.  So, it's only reading the first 1MB of each file over and over.---That explains why my backups kept loading over and over---
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
Cheers for that Wiimm, I'll try to get that working soon, so the dol file is identical to the output from wit.

I'll get the test version up soon and post a link. I've been messing around with a little present someone sent me today. :) A shiny new copy of RAD Studio XE2.

Anyone want to test a native x64 build? I need everything tested from the ground up. To me it looks like everything is working fine, I only had a few problems with some GUI controls. I also lost the use of BZip2 because there's no way for me to compile the C++ Builder obj files for x64. I replaced it in a few seconds with ZLib. Other than that, everything's the same as before.

I'll post the x64 version here too but it's for testing only for now, don't spread it around too much yet.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
This is the x86 build with the fixes for the SHA-1 test and SNEEK..
http://www.4shared.com/file/BYWsTfRo/WiiBackupManager_x86_build67.html

And the x64 build for testing..
http://www.4shared.com/file/RH6KaKFZ/WiiBackupManager_x64_build67.html

A few notes..
The cover renderers don't work yet, so don't select DirectX or OpenGL.
I had to embed the manifest (for admin privileges) because the separate manifest file doesn't work in Windows 7 x64. It never has?
The exception stack trace in the log doesn't show details like the x86 version. I need to wait until the the JCLDebug code gets updated to support x64.
 

icebrg5

Well-Known Member
Member
Joined
Apr 1, 2007
Messages
2,328
Trophies
0
Website
Visit site
XP
412
Country
United States
I have a new feature request. No idea if its possible but i'll ask anyway.


I know WBM has the option of only installing the game partition when transferring iso files to the drive.

How about the option to remove unwanted partitions from games already on the drive.

So for example

You put a check in the box next to the game that has a Update partition on the hard drive.


Then you go to

Go up to Remove > Update partitions


Not sure how much space update partitions actually take up but im sure it would help free up some space.

I know some loaders by default install the game and update partitions when ripping discs to the hard drive.
 

Wiimm

Developer
Member
Joined
Aug 11, 2009
Messages
2,292
Trophies
1
Location
Germany
Website
wiimmfi.de
XP
1,519
Country
Germany
How about the option to remove unwanted partitions from games already on the drive.
wit can do this. But it will only change the image and will not free the memory on WBFS. You see the impact of this only when copying the image. Implementing a "WBFS free" is not hard, it's a long time on my to do list:
* Free the wbfs space claimed by the image
* Redo the libwbfs scrubbing and mark all needed WBFS blocks as used.

I haven't implemented the "WBFS free" into wit for different reasons:
* I love complete backups including the update partition
* It save only about 180 MB and I haven't space problems.
* It's additional programming and testing time for users, who forget scrubbing on adding.
* No one asked me yet.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
It shouldn't be too difficult to add that. For WBFS drives the relevant parts of the Wii disc could be overwritten and the free space recovered very quickly, but WBFS files would really need to be copied to recover the space. Unless I make them sparse and zero out the update partition's data, causing fragmentation.

The function could be almost instant if I don't recover the free space on WBFS files. I could make that an option for people that just want the partition removed.

I've updated my "release packer" Delphi expert (IDE plugin) so now I can easily build the release for x86/x64 just the same, 2 clicks and it's ready for uploading. :) I decided to call it Win32 and Win64 though because it makes more sense. I've got the OpenGL cover renderer working, but no joy with Direct3D9. For some reason it always fails on CreateDevice() but I'm not sure why so I've just disabled it in the 64-bit exe.

I've been waiting, but since I haven't had any feedback at all from the fixes or the x64 build, I'll just get things cleaned up and get an official release out so I can move on to other things.
 

Lucif3r

Well-Known Member
Member
Joined
Sep 10, 2011
Messages
1,468
Trophies
0
XP
228
Country
Ill just pop in a quick question here, it probably have already been asked but... 152 pages...
I was cleaning some discspace on C: yesterday. I found that there was a file simply called "1" (no extension) in the WBM folder... It was almost 4GB big...

So the question.. What is this file used for?
I dont really care, I just got curious :)
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
@Patryc
Gamecube support is on the todo list, but it's not the highest priority right now. I will get round to it one day. It probably won't take too long actually because it's mostly implemented already, but it wasn't working correctly.

@Lucif3r
Honestly, I've no idea. Any file that WBM creates will have a .tmp extention and will generally be in the temp folder. It sounds like an extracted ISO because of the size. If you still have the file you could rename it to .iso or .wbfs and check to see what game it was at least.
 

Lucif3r

Well-Known Member
Member
Joined
Sep 10, 2011
Messages
1,468
Trophies
0
XP
228
Country
@Lucif3r
Honestly, I've no idea. Any file that WBM creates will have a .tmp extention and will generally be in the temp folder. It sounds like an extracted ISO because of the size. If you still have the file you could rename it to .iso or .wbfs and check to see what game it was at least.

Ah, yea now that you mention it I had one game that didnt fit on my USB stick back when I used that, so the transfer failed near the end. So yea that might be it. I cant check the file though because I deleted it :P
Good to know if it would happen again :)
 

nobody_tw

Well-Known Member
Newcomer
Joined
Feb 18, 2011
Messages
45
Trophies
0
XP
33
Country
Taiwan
Hi, fig

I have checked all the problematic backups.

It seems ok right now.
(compare to the previous log file, it's all the same!!)

Thanks. :P
 

Patryc

Well-Known Member
Member
Joined
Jul 30, 2007
Messages
452
Trophies
0
XP
182
Country
@Patryc
Gamecube support is on the todo list, but it's not the highest priority right now. I will get round to it one day. It probably won't take too long actually because it's mostly implemented already, but it wasn't working correctly.

@Lucif3r
Honestly, I've no idea. Any file that WBM creates will have a .tmp extention and will generally be in the temp folder. It sounds like an extracted ISO because of the size. If you still have the file you could rename it to .iso or .wbfs and check to see what game it was at least.


Thanks for your reply! Love this backup manager.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    OctoAori20 @ OctoAori20: Nice nice-