-
Notifications
You must be signed in to change notification settings - Fork 5
Tool: makerom
makerom
allows for the creation of N64 roms by taking in many relocatable object files and a specification file spec
describing their RAM and ROM locations. makerom
is tailored for use with the bootcode provided in pseultra/boot
, but may be easily forked to fit with the Nintendo bootcode.
Simply make
in the pseultra/makerom
directory.
To use makerom
, invoke the makerom
executable with the following arguments:
- A specification file describing the layout of the ROM (explained below)
- The path to the MIPS
ld
executable - The bootcode file to be used. This should be the
boot
file frompseultra/boot
- The output file in which to put the ROMM at which the segment starts or ends
The specification file has the following format:
<boot segment name>
<object file to include in segment>
<object file to include in segment>
<object file to include in segment>
;
<segment name>
<object file to include in segment>
<object file to include in segment>
;
<segment name>
<object file to include in segment>
The first segment in the specfile is always the boot segment, and so the main boot
function should be located in this segment. To end a segment, use a semicolon. At the end of the file, however, do not include a semicolon.
The makerom
tool provides 6 symbols which can be extern
ed to provide information on the segment:
-
_<segmentName>SegmentRom(Start/End)
, a pointer to the location in ROM at which the segment starts or ends -
_<segmentName>SegmentText(Start/End)
, a pointer to the location in RAM at which thetext
section is expected to start or end. This includes the.data
section of the object files -
_<segmentName>SegmentBss(Start/End)
, a pointer to the location in RAM where the BSS section is expected to start or end.
The makerom
tool creates 3 files:
- A
link.ld
linker script used to link all objects together into one ELF file - A
rom.elf
ELF file which is the result of invokingld
withlink.ld
- The output file whose filename is specified in the command line arguments, which is a bootable N64 ROM
There are currently no tests available.
- Allow for the inclusion of relocatable overlays.