-
Notifications
You must be signed in to change notification settings - Fork 4
Formatting Process
LuigiBlood edited this page Aug 1, 2019
·
9 revisions
The formatting process of leowrite (via DD64.DRV) uses LBA 4 which contains the initial disk formatting info without game specific information such as Disk Region, Disk Type, IPL Load Address and Block Amount, and LBA boundaries (if retail disk).
- Load LBA 4 into the buffer and add the game specific info to all 85 sectors:
- Sector size
0xE8
for retail disks / Sector size0xC0
for development disks - Offset 0x00 [32bit]: Disk Region (Retail Disk only)
-
E848D316
for Japanese Disk -
2263EE56
for US Disk -
00000000
for Development
-
- Offset 0x05 [08bit]: Disk Type + Format Type (from offset 0x04, which is always the value 0x10)
- Offset 0x06 [16bit]: IPL Load LBA 0 Block Amount
- Offset 0x1C [32bit]: IPL Load RAM Address
- Offset 0xE0 [16bit]: ROM Area LBA End (Retail Disk only)
- Offset 0xE2 [16bit]: RAM Area LBA Start (Retail Disk only)
- Offset 0xE4 [16bit]: RAM Area LBA End (Retail Disk only)
- Sector size
- Write the updated system data buffer into these LBAs:
- Retail Disk - LBA 0, 1, 8, 9
- Development Disk - LBA 2, 3, 10, 11
- Write the Disk ID data to all 85 sectors (size 0xE8) in LBAs 14 & 15.
This tool was released by Nintendo around February 1st, 1999, where it is mentioned in Developer News 2.0 in the N64 SDK Manual. Blue development disks with the following serial numbers 197-08-XX01
and 197-09-XX01
would have formatting issues causing the software to softlock, this tool would fix those disks.
Once a disk is inserted:
- Reads LBA 0, 1, 8, 9 and 12.
- If the read is successful, then the rework isn't needed and stops there.
- Writes randomized data to LBA 0, 1, 8, 9.
- Writes zeroes to LBA 12.