n64mdisk n64mdisk (tool command)

Produces master data from the created game

Syntax

n64mdisk [config file] ...... Follows the config file specifications to create the master data.

n64mdisk -m [master data] ... Creates mwrite, mwrite.id from the master data.

Description

n64mdisk is the tool used to create the game program's master data. The master data is used by the developer when submitting an N64 Disk Drive game program to Nintendo after debugging. The data follows a certain fixed format. A disk is created from the master data using a batch file called mwrite for final checking of the game. n64mdisk creates this batch file when it is producing the master data.

Note: When presenting the master data, please also provide NCC, the code used for checking the data. Use calcncc to calculate the NCC.

[For the PARTNER-N64NW]

% n64mdisk

[For the PARTNER-N64PC]

C> n64mdisk

When you enter as shown above, the file n64mdisk.cfg (the default config file) is read and its contents are used to create the master data file. The following files are produced at the time the master data is created:

master.d64 The master data file mwrite The batch file that writes the master data to a disk. A disk for final checking can be created by entering <mwrite in the PARTNER command window. ("<" is the PARTNER command for executing a batch file.) Please make sure to complete final debugging before creating the master data for submission.
mwrite.id
The ID file used by mwrite. This is a 32-byte file and it is copied as-is into the ID region when mwrite is executed. The information includes the "factory line number" and the "production time" of the machine on which mwrite was executed. For details, please refer to "Chapter 6: ID" in the N64 Disk Drive Programming Manual.

It is also possible to create mwrite and mwrite.id from the already-created master data. To do this, enter as follows:

n64mdisk -m (master file name)

When the master file name is omitted, master.d64 is used. If n64mdisk is used with this format, it performs a simple check of whether or not the specified file (master.d64 if omitted) is the correct master data. If the file extension is not .d64, the system prompts for confirmation and waits for input.

Note: When creating the master data, make sure to use the libraries libleo.a and libultra_rom.a for linking. The libraries libleo_d.a and libultra_d.a are for debugging. Please create a disk for final checking using master data linked to libleo.a and libultra_rom.a, and conduct sufficient debugging with this disk before submitting the master.

[For the PARTNER-N64NW]

% n64mdisk n64mdisk.yes

[For the PARTNER-N64PC]

C> n64mdisk n64mdisk.yes

A master production config file can be specified as the above (here named n64mdisk.yes).

Following is an example of such a config file and details about each line.

<Example of config file>

USE GWRITE              gwrite
DISK TYPE               AUTO
IPL LOAD ADDRESS        0x80000400
RAM START LBA           AUTO
RAM END LBA             AUTO
INITIAL CODE            NINT
GAME VERSION            0
DISK NUMBER             0
DISK USE                0
DESTINATION CODE        JAPAN
COMPANY CODE            01
FREE AREA               0x123456789abc

* USE GWRITE

Specifies NO or gwrite. When NO is specified, ROM INIT. FILE must also be specified. When gwrite is specified, the master's ROM region data is created based on the contents of the gwrite file. If RAM region data is specified in the gwrite file, then RAM region data is also created.

(Example) USE GWRITE gwrite

(Example) USE GWRITE NO

* DISK TYPE

Specifies the disk type. Numerical values of 0 to 6 can be specified. AUTO can also be specified, in which case the disk type is the value specified by gwrite. For details, see "Chapter 11.5: Disk Types (ROM area and RAM area)" in the N64 Disk Drive Programming Manual. Generally, gwrite created with makedisk needs to be specified when creating master data for game disk.

(Example) DISK TYPE AUTO
(Example) DISK TYPE 0

* IPL LOAD ADDRESS

Specifies the IPL load address. (See "Chapter 11.4: System Area" in the N64 Disk Drive Programming Manual to read about the load address.) When data is created with gwrite, any address specified with "leowrite -a xxxxxx" in gwrite is given priority.

(Example) IPL LOAD ADDRESS 0x80000400

* IPL LOAD SIZE

Specifies the IPL load size. When data is created with gwrite, this is not needed (it is ignored). (See "Section 11.4: System Area" in the N64 Disk Drive Programming Manual for information about the IPL size.)

(Example) IPL LOAD SIZE 8

* ROM INIT. FILE

Specifies the image file for the ROM area data. This must be specified when no data is created using gwrite. Conversely, when gwrite is used to create data, this cannot be specified.

(Example) ROM INIT. FILE romimage

* RAM START LBA

Specifies the starting LBA for the RAM area data. When AUTO is specified, the RAM area's starting LBA is set according to the disk type specified by DISK TYPE. Specify AUTO even when the RAM area is not being used.

(Example) RAM START LBA AUTO

(Example) RAM START LBA 1500

* RAM END LBA

Specifies the ending LBA for the RAM area data. When AUTO is specified, the ending LBA is automatically set from the RAM area image file size specified by gwrite or by RAM INIT. FILE.

(Example) RAM END LBA AUTO

(Example) RAM END LBA 2000

* RAM INIT. FILE

Specifies the image file for the RAM area data.

(Example) RAM INIT. FILE ramimage

Note: When there is a clearly specified value for RAM END LBA, the RAM area from the starting LBA to the specified ending LBA is secured. But parts whose initial data values are not specified by gwrite or by RAM INIT. FILE at that time are filled with 0xFF.

For details concerning all of the following specifications, please refer to "Chapter 6: Disk ID" in the N64 Disk Drive Programming Manual.

* INITIAL CODE

Specifies the initial code. (Up to 4 ASCII characters).

(Example) INITIAL CODE NINT

* GAME VERSION

Specifies the game version. (Maximum two-digit decimal number).

(Example) GAME VERSION 1

(Example) GAME VERSION 99

* DISK NUMBER

Specifies the disk number. (Maximum two-digit decimal number).

(Example) DISK NUMBER 0

(Example) DISK NUMBER 99

* RAM USE

Specifies usage of RAM (no greater than 2-digit hexadecimal). 1 indicates use of Nintendo's recommended file system. Specify 0 when no special format like Nintendo's recommended file system is used.

(Example) RAM USE 0x0

* DISK USE

Specifies disk use. 0 is normally specified.

(Example) DISK USE 0

* DESTINATION CODE

Specifies the destination (code). Specify JAPAN or 0 for Japan. Specify 1 for the U.S.

(Example) DESTINATION CODE JAPAN

(Example) DESTINATION CODE 1

* COMPANY CODE

Specifies the company code (ASCII 2-byte) of the game manufacturer.

(Example) COMPANY CODE 12

* FREE AREA

An area for writing data freely (Maximum 12-digit hexadecimal number).

(Example) FREE AREA 0x123456789abc

See Also

calcncc

Revision History

01/21/1999 Modified the contents on -m option. Modified the contents on USE GWRITE and DISK USE. Added RAM USE.
04/30/1999 Changed Format