Hacking Wii backup Manager for Windows

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
A little question, if you don't mind.
smile.gif


In the Hermes code I converted from, he had a fixed size of 512 while reading/writing sectors of the WBFS drive. I've always used the true sector size, but thought it was causing problems. That's what the test exe in the previous post does, reverts to the fixed size of 512.

I used your app to check. With the fixed size of 512, when the true sector size is 2048, there's errors shown. When I do use the true sector size, no errors.

So is my theory is correct that if the HD sector size is 2048, the read/write routines need to use that size, not 512?
 

oggzee

Well-Known Member
Member
Joined
Apr 11, 2009
Messages
2,333
Trophies
0
XP
188
Country
Slovenia
fig2k4 said:
So is my theory is correct that if the HD sector size is 2048, the read/write routines need to use that size, not 512?
no hard disk exists with a sector size different than 512.
only CDROMs have a sector size of 2048.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
I've only every came across 512, but I did a quick google search. I should read some of the results.

Anyway, that rules that out too. Cheers
smile.gif


Edit: To anyone with the phantom transfers, can you extract a CISO from the source drive or does it produce the same error?

I've no idea where the 8388608 is coming from in the error because there's only 2 calls to InternalWriteDisc(), one with 32768 (1 disc sector) and the other with 2097152 (64 disc sectors) at a time. These are fixed sizes for a HD with a sector size of 512.

That's why I was looking into the 2048 thing, because 2097152 * 4= 8388608 which would mean the WBFS sector size is 2048..
 

morgoth123

Member
Newcomer
Joined
Jul 11, 2009
Messages
21
Trophies
0
XP
76
Country
Netherlands
fig2k4, i was wondering if you saw my problem/request earlier? if so you got any comment maybe? since i really would like to be able to use your tool. Thanks.
 

pepxl

GFX W!Z4RD
Member
Joined
Jun 19, 2009
Messages
3,263
Trophies
1
XP
328
Country
Wiimm said:
Perhaps it help:
My wwt can dump the data structure of the WBFS and have an integrity check. Connect the WBFS drives and try
Code:
wwt -aA dump -lll >wbfs-dump.txt
wwt -aA check -lll >wbfs-check.txt
i havent a clue how to use cmd so that wont work for me lol
 

oggzee

Well-Known Member
Member
Joined
Apr 11, 2009
Messages
2,333
Trophies
0
XP
188
Country
Slovenia
fig2k4 said:
I've no idea where the 8388608 is coming from in the error because there's only 2 calls to InternalWriteDisc(), one with 32768 (1 disc sector) and the other with 2097152 (64 disc sectors) at a time. These are fixed sizes for a HD with a sector size of 512.
That's why I was looking into the 2048 thing, because 2097152 * 4= 8388608 which would mean the WBFS sector size is 2048..
HD sector size: 512
CDROM sector size: 2048
Wii dvd disc sector size: 32k
minimal wbfs block size: 2MB (which is 64 wii disc sectors) this size is always used in .wbfs files, but can be larger on wbfs partitions.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
@morgoth123

Sorry man, I meant to reply to that because I've got every intention to add it. It would've been done by now if it weren't for these pesky bugs.
smile.gif
AFAIK from a quick search after I read your post, I can look up the devices in the registry and use that as the device path in the CreateFile() call. That might not be 100% correct, but I'll figure it out when the time comes. The sooner I get the bugs fixed, the sooner I can start adding features again.

@oggzee
QUOTE said:
minimal wbfs block size: 2MB (which is 64 wii disc sectors) this size is always used in .wbfs files, but can be larger on wbfs partitions.

So it is possible that the drive has been formatted with a WBFS sector size of 2048 because it's a large drive? In that case the WBFS header is still only stored in the first real HD sector (probably 512), the other 1536 bytes in the first WBFS sector would be unused? That part confused me a little.
smile.gif
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
Good news. I've managed to reproduce the phantom transfers bug.
smile.gif
It is related to the WBFS sector size 2048. Because I'm using a 1 gig pen drive for testing WBFS, I didn't notice that a 500 gig drive would have a sector size of 2048. Now I can get on with solving the problem..


Edit:
I've cracked it, it was something really simple. A sector size of 512 must be aligned nicely with the layout of the Wii disc, so it's possible to read the whole disc in chunks of 64 sectors. When it's 2048 though, the last chunk isn't 256 sectors. I had a silly check that bailed out if the read count didn't equal the requested count. Basically it failed to read the last chunk of every Wii disc. Removing this check fixes it.

I noticed the progress bars are off too when the source and destination have different sector sizes. I'll need to recalculate the transfer total from the destination drive's sector size, but that's not really important..

Drive to Drive transfers didn't use the temp folder either, duh!. I fixed that. So if there wasn't enough space on the drive where WBM was, then it would fail too.
 

giantpune

Well-Known Member
Member
Joined
Apr 10, 2009
Messages
2,860
Trophies
0
XP
213
Country
United States
ok. im trying the bugfix right now. while its copying games, i thought id mention another bug i found. i was running the debug version from yesterday from a external FAT drive. i disconnected the drive before closing the program. it gives an error that it cant save the ini file and then it crashes. i didnt click to get the debug info from visual studio, but i can if you want it.
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
QUOTE said:
i disconnected the drive before closing the program. it gives an error that it cant save the ini file and then it crashes.

That was an easy one.
smile.gif
I've added a check to see if the WBM folder exists before trying to write the settings to file. It'll show as an error in the log if it doesn't.
 

wizard70

Member
Newcomer
Joined
Sep 12, 2009
Messages
7
Trophies
0
XP
28
Country
fig2k4 said:
Can you test this exe with the phantom transfers and also with the duplicate disc entries?

Cheers.


still same problem with this exe double files on my list of games but not all my games are duplicated if needed ??
 

wizard70

Member
Newcomer
Joined
Sep 12, 2009
Messages
7
Trophies
0
XP
28
Country
fig2k4 said:
Can you send me the log? You can email it to me directly if you like. Help->About.. for the address.

Thanks.

when i`m looking at the log - its fine

problems is when i`m looking at my drive

thats when the problem shows
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
That's what I was hoping the log would show me. But the log that pepxl posted shows the opposite, the duplicate discs were actually found in the WBFS disc table.
unsure.gif


What app did you use to format and copy the discs to the drive? That might help. Also, are you using WBFS or Fat32?
 

wizard70

Member
Newcomer
Joined
Sep 12, 2009
Messages
7
Trophies
0
XP
28
Country
fig2k4 said:
That's what I was hoping the log would show me. But the log that pepxl posted shows the opposite, the duplicate discs were actually found in the WBFS disc table.
unsure.gif


What app did you use to format and copy the discs to the drive? That might help. Also, are you using WBFS or Fat32?



formatted my drive using wbfs manager 3.0
using wbfs

i got a 120gb drive formatted to fat32 i`ll see what that shows gimme 2 minutes and i`ll reply.
 

pepxl

GFX W!Z4RD
Member
Joined
Jun 19, 2009
Messages
3,263
Trophies
1
XP
328
Country
i used ncWBFSTool by nubecoder to transfer my games, that doesnt show dupes.

if i delete a dupe will it delete both entries of the game and do they take up any unnessesary space on the drive?

also are they just double title entries and when using ncWBFSTool, i used it to also remane some entries could that of caused double entries of some games?
 

wizard70

Member
Newcomer
Joined
Sep 12, 2009
Messages
7
Trophies
0
XP
28
Country
wizard70 said:
fig2k4 said:
That's what I was hoping the log would show me. But the log that pepxl posted shows the opposite, the duplicate discs were actually found in the WBFS disc table.
unsure.gif


What app did you use to format and copy the discs to the drive? That might help. Also, are you using WBFS or Fat32?



formatted my drive using wbfs manager 3.0
using wbfs

i got a 120gb drive formatted to fat32 i`ll see what that shows gimme 2 minutes and i`ll reply.


it`s fine on a fat32 hdd only got 11 games on that 1 though but got 1 game that is on both but as i wrote fat32 is fine so must be wbfs format issue somewhere ??
 

fig2k4

Well-Known Member
OP
Member
Joined
Oct 30, 2009
Messages
758
Trophies
0
Location
Scotland
Website
www.wiibackupmanager.co.uk
XP
174
Country
I just added 2 duplicate files to a WBFS drive to test. WBFS Manager doesn't ignore duplicates like I thought, both show up. I can't test ncWBFSTool because it doesn't pick up my pen drive.

I think it must be a bug in my code somewhere then because if there really were duplicate entries in the WBFS disc table, they would show up in WBFS Manager. pepxl, if you can confirm that there's no duplicates in WBFS Manager, it would be a great help.

The first place I'll check is the disc indices list I've added. This lets me reference the discs by index, 0,1,2,3 even though the disc table can have gaps, like 0,2,3,4.. I wouldn't be surprised if this list doesn't get cleared somewhere, so the indices are filled twice.

Edit:
How many games do you have on the drive?
 

pepxl

GFX W!Z4RD
Member
Joined
Jun 19, 2009
Messages
3,263
Trophies
1
XP
328
Country
Wiimm said:
Perhaps it help:
My wwt can dump the data structure of the WBFS and have an integrity check. Connect the WBFS drives and try
Code:
wwt -aA dump -lll >wbfs-dump.txt
wwt -aA check -lll >wbfs-check.txt

ok so ive tried a bit cmd and im useless how do i go about using this?

QUOTE(fig2k4 @ Nov 16 2009, 08:15 PM) I just added 2 duplicate files to a WBFS drive to test. WBFS Manager doesn't ignore duplicates like I thought, both show up. I can't test ncWBFSTool because it doesn't pick up my pen drive.

I think it must be a bug in my code somewhere then because if there really were duplicate entries in the WBFS disc table, they would show up in WBFS Manager. pepxl, if you can confirm that there's no duplicates in WBFS Manager, it would be a great help.

The first place I'll check is the disc indices list I've added. This lets me reference the discs by index, 0,1,2,3 even though the disc table can have gaps, like 0,2,3,4.. I wouldn't be surprised if this list doesn't get cleared somewhere, so the indices are filled twice.

Edit:
How many games do you have on the drive?

i if your trying 1.1b3 have you selected "Enhanced Drive Detection", the app wont allow anything other than HDD's unless its checked.

i will also check WBFS Manager, which version would you suggest, v3.0?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Bunjolio @ Bunjolio: j