Skip to content
LuigiBlood edited this page Jun 18, 2020 · 9 revisions

leowrite

Basics

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).

Process

  • Load LBA 4 into the buffer and add the game specific info to all 85 sectors:
    • Sector size 0xE8 for retail disks / Sector size 0xC0 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
      • Format Type is taken 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)
  • 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.
  • Write the Protection Block to LBA 12.
    • (Development Disk) A regular block write of 00s or FFs.
    • (Retail Disk) A long block write of FFs, replacing C1 error correction info with FFs (invalid).

dn (disk normalizer)

Basics

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.

Process

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.