Hacking Fat32 4kb Sector Size Support?

crwys

Well-Known Member
OP
Member
Joined
Jun 26, 2008
Messages
1,146
Trophies
1
XP
637
Country
United States
So here I am again with more 4kb sector issues.
For more info on the topic you can read here:
http://gbatemp.net/topic/311976-can-we-please-get-universal-sector-size-support/page__p__3943497#entry3943497
Some less useful sources but related to this issue here:
http://www.wiimc.org/forum/viewforum.php?f=6
http://www.wiimc.org/forum/viewtopic.php?f=6&t=1475

Now libext2fs supports 4kb sector drives, so does libntfs.
But it seems fat32 does not support 4kb sector drives.
If I am correct this must be a problem in libogc. Because the libogc devs are the creator of fat32 implementation in the Wii correct?
So to make it simple my two questions are:
Does WiiMC support 4kb cluster drives?
What is the best way to contact the devs of libogc to fix this bug?
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
You could try the devkitpro forum to reach the dev's of libogc.
Wintermute who is a driving force there helped me out once to compile scummvm.
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
- A cios isn't required for large sector size support.
- Making an app run on top of a cios is not magically going to make it work with large sector sizes.
- To support large sector sizes, the app has to be compiled with a recent build of libfat or libntfs or whatever filesystem you're using.
 

crwys

Well-Known Member
OP
Member
Joined
Jun 26, 2008
Messages
1,146
Trophies
1
XP
637
Country
United States
One last edit:
Tueidj, from what you are saying the only problem it could be is with WiiMC?
So I can report this as a bug over at the WiiMC bug reports?

....
"- To support large sector sizes, the app has to be compiled with a recent build of libfat or libntfs or whatever filesystem you're using."
That is no where near close to "libfat already supports 4kb sectors".
I don't understand how you expected me or anyone else to get that information from that sentence.
I have already tried compiling apps with the latest libfat and still results in code dumps. I have learned from Dimok (unless I misunderstood) that apps must also be edited to be 4kb sector ready.
So if libfat does support 4kb sectors then that means WiiMC is not 4kb sector ready?

I just did a test and I am still confused. I have a 4kb sector ready version of WiiXplorer that Dimok made for me when I was testing his libextfs.
I just made a fat32 partition and it code dumps. While only an NTFS partition does not code dump. (ext ,ext2, partitions do not code dump either)

Edit again:
Here is the code dump from Wiixplorer:
http://imageshack.us...2261718481.jpg/
Here is the code dump from WiiMC
http://imageshack.us...1226172407.jpg/
Both from the same hard drive. NTFS partition 1, Fat32 partition 2.
CFG loader mounts and uses both partitions no problem. (On cIOSx rev21 D2X V7, base 57) (I know you say this does not matter I am just including it just in case it will help someone or not)
And the code dump from vbaGX
http://imageshack.us...1226173400.jpg/
All the code dumps are the same besides on WiiXplorer and I am guessing that is because it is 4kb sector ready. And maybe it wasn't compiled with the latest libfat? Or there is some other reason why it does not work.
 

tueidj

I R Expert
Member
Joined
Jan 8, 2009
Messages
2,569
Trophies
0
Website
Visit site
XP
999
Country
I can compile an app with the latest libfat (no other changes) and successfully use it with a 4KB sector drive without any issues at all. Dimok himself was the one who added support for it in libfat (over 6 months ago) and that is how the usb loaders were able to support it. Apps don't need to know anything about the sector size if they don't do any direct drive access (most don't).
Which partitioning scheme does your drive use, MBR or GPT? What did you use to create the FAT32 partition? Is the correct sector size written in the boot parameter block? Do you have a hex dump of the first sector of the disc and the first sector of each partition?
I suggest you just drop this since you don't understand how everything works. If you have a problem with a specific app take it up with the author instead of blaming whichever library (libogc, libfat etc.) someone happens to mention.
 

crwys

Well-Known Member
OP
Member
Joined
Jun 26, 2008
Messages
1,146
Trophies
1
XP
637
Country
United States
Well can you send me whatever app you compiled and works so I can test it?

Basic MBR
Paragon Hard Disk Manager 11 Server
How can I tell?
You can find the hex dump of the first sector of each the hard drive and each partition here:
http://www.mediafire...dq6e0ojv00t7ar8 Fat32
http://www.mediafire...1oz66awlzz210j3 Hard Drive
http://www.mediafire...abv7j0h2es3dydb NTFS

You are right I don't understand how everything works but as I kept pushing it got me a resolution last time.
I didn't exactly blame anyone, I asked what could be the problem and I stated here
http://www.wiimc.org....php?f=6&t=1622
that it is a problem with WiimC or Libogc or both. I didn't single out or blame anyone.
But based on the information you just provided. I submitted a bug report over at WiiMC.
http://www.wiimc.org/tracker/index.php?do=details&task_id=416

More Info:

Hard Drive
Total Size: 2328.7 GB
Sectors Per Track: 63
Heads: 255
Cylinders: 38000

Partition 1 NTFS
Type: Primary
File System: NTFS
Root entries: 16
Sectors Per Boot: 8
Sectors Per cluster: 1
Serial number: C343-7433-6F58-210A
Partition ID: 0x07 NTFS
NTFS version: 3.01
Volume size: 2290 GB
Partition size: 2290 GB
Activity: Yes
Hidden state: No

Partiton 2 Fat32
Type: Primary
File system: FAT32
Root entries: 512
Sectors per boot: 1
Sectors per cluster: 8
Serial number: FFBC-4900
Partition ID: 0x0C FAT32 LBA
Volume size: 38.7 GB
Partition size: 38.7 GB
Activity: No
Hidden state: No
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: or fucking Clu Clu Land for that matter