N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

makedisk

Format
makedisk [-D name[=def]] [-l dir] [-U name]
         [-d] [-m] [-o] [-b bootstrap filename]
         [-h header filename] [-s romsize]
         [-f filldata] [-C clockrate] [-t type]
         [-p pif2 bootstrap filename]
         [-f romfile] specfile
Command Line Options
Except for the -t option, which is explained below, the meanings of the options are the same as those for makerom tool.
  • -t type Specifies the disk type
What This Tool Does
It creates the N64 Disk Drive disk image and its related ELF object file. Specifically, makedisk is used in place of makerom when you are creating disk games instead of Game Paks.

The makedisk tool performs three main operations:
  • Links segments based on the spec file specifications
  • Creates the gwrite batch file
  • Generates the disk-use symbols
These three operations are explained in more detail below.

Linking Segments Based on the spec File Specifications
The makedisk tool differs from makerom in two ways concerning the spec file specifications:
  • In makedisk there is no romAlign to specify the alignment of the storage address in the ROM image.
  • In makedisk there is an lba specification to specify the disk LBA in which the segment is stored.
Otherwise, makedisk is the same as makerom in terms of both the spec file specifications and the command actions.

The following example shows how the lba specification is used.
�..
beginseg
	name "road"
	lba 100
	flags OBJECT
	number TEXTURE_SEGMENT
	include "road.o"
endseg
�..
The lba specification only specifies segments stored on the disk. A "segment stored on the disk" is a segment of non-zero size in the ROM image. For example, segments from the color frame buffer and the Z-Buffer are only maintained in RDRAM, so no space is secured in ROM. Therefore, if this type of segment were specified with lba an error would be returned. Conversely, an error would arise if a ROM image segment of non-zero size were not specified with lba.

The lba specification specifies which LBA to write the segment to on the disk. The format can be any of these:
  • lba (number) Writes the segment beginning from the LBA number specified by number.
  • lba RAMSTART [ + (number)] Writes the segment beginning from the LBA number expressed by the disk�s RAM region header + number. The number of LBAs in the RAM region header differs depending on the disk type, so this notation is convenient to use. For details about RAM regions and disk types, please see Chapter 11, "Hardware Specifications," in the N64 Disk Drive Programmer's Guide. Be sure you put one space on either side of the plus (+) symbol.
  • lba after (segment name) Writes the segment after the segment specified by segment name. For example, if the formula reads �lba after code� and �code� is a segment written using LBA 0 to LBA 100, then the segment in question is written from LBA 101. The segment specified with segment name must be defined in advance.
Creating the gwrite Batch File
The gwrite file is the batch file for writing games to the disk. It can be executed using the < instruction in the Partner command window. (The < instruction executes the commands written in a specified file.)

Generating Disk-Use Symbols
For example, to know the storage LBA for the texture segment on the disk, write the following into the program to have makedisk resolve the symbols:

extern char_textureSegmentRomStart[ ], _textureSegmentRomEnd[]

These will be displayed respectively as [texture segment starting LBA] and [texture segment ending LBA + 1].

See Also
makerom
leowrite



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.

Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998