Hacking USB Loader GX/Nintendont: Partition Problems

sillyokid

New Member
OP
Newbie
Joined
Jun 25, 2015
Messages
1
Trophies
0
Age
29
XP
41
Country
United States
Hello all

I recently decided to get a new USB 3.0 500GB HDD for my wii and switch over to Nintendont from Devolution. After formatting my drive to FAT32 and copying over my Gamecube games into the usb:/games folder (File structure is correct), they are not loaded at all. USB Loader gives me a primary partition error, and Devolution does not read my drive at all. My old HDD with the same file structure loads fine.

Here is a screenshot of my HDD in disk manager (No other partitions at all):
lqBEEI9.png


Any idea how to fix this?
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,515
Country
United States
The partition doesn't show as being active. Try right-clicking on it and select "Mark partition as active" in the context menu and see if that does anything.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
Active has nothing to do with the Wii or the consoles.
Active is a status used by computer to know which partition to use to boot the OS.

Don't bother with the active state to fix anything related to the Wii.


The disk seems fine.
only one partition, it's a "primary" partition, it's FAT32 so it should be fine.

USB Loader gives me a primary partition error,
Could you paste the "Exact" warning message?
I created different messages based on different issues the user can have. with the correct message I will be able to know where it breaks.
also, be sure yo use latest USBLoaderGX (1239 from internal updater or 1246 in my signature)
 

GreyWolf

Well-Known Member
Member
Joined
Mar 2, 2015
Messages
5,399
Trophies
0
Age
54
XP
1,515
Country
United States
The "active" status of a partition is stored in the MBR, though. Even *nix clones use it. One partition per drive can be marked as active.

The question is whether the Wii libfat uses it or Nintendont does. :) I mentioned it because I've seen people say in the past that making their GC partition active fixed it.


EDIT: The libfat in Nintendon't is at least checking that flag:
Code:
// Check if FAT mirroring is enabled
if (!(sectorBuffer[BPB_FAT32_extFlags] & 0x80)) {
// Use the active FAT
partition->fat.fatStart = partition->fat.fatStart + ( partition->fat.sectorsPerFat * (sectorBuffer[BPB_FAT32_extFlags] & 0x0F));
}
 
Last edited by GreyWolf,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
that's something else here.
This "active" is not the activated primary partition in the MBR but the activated copy of the "File allocation table" in the currently mounted FAT32 partition.
see that it's not "== 0x80" but "& 0x80"

FAT partition has multiple copies of the file allocation table to prevent corruptions. this code just checks and selects the active "File table" (not partition).

http://www.ntfs.com/fat-mirrow.htm


"When Disabled (bit 0x0080 set)", it's the contrary with Active partition : MBR sector 0 with primary partition set to 0x80 means partition is active, here the FAT's partition first sector with "bit 0x80" (it's a flag 1000 1000) means the FAT mirroring is disabled.
if mirroring was enabled, all copy of the table were identical, if not then there's an active File table and a copy (backup) File table.
That's what your pasted code is doing:
if(first table is not 0x80) then use the active table backup located at sector size * number of the active table.
table number is stored in the first less significant 8 bits of the flags 1000 1000 (9th table).

(thanks, I'm learning at the same time :P)


Edit:
BPB_ExtFlags specification:
Code:
offset : 0x40
size : 2
This field is only defined for FAT32 media and does not exist on FAT12 and FAT16 media.
Bits 0-3	-- Zero-based number of active FAT. Only valid if mirroring is disabled.
Bits 4-6	-- Reserved.
Bit    7  	-- 0 means the FAT is mirrored at runtime into all FATs.
	        -- 1 means only one FAT is active; it is the one referenced in bits 0-3.
Bits 8-15 	-- Reserved.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Maximumbeans @ Maximumbeans: butte