Nintendo 64 emulator for macOS by Gerrit Goossen, closed source since its first
release in 2001. ES-DE runs it from
/Applications/sixtyforce.app/Contents/MacOS/sixtyforce and passes the ROM path.
Everything below is read from the distributed 2.0.2 build (CFBundleVersion 87,
single x86_64 slice, macOS 10.9 or later). Addresses are the virtual addresses
of Contents/MacOS/sixtyforce. None of it appears on the site, in the help pages
or in the release notes.
The boot chain reads nothing. There is no PIF ROM and no CIC image: the boot
writes the constants for the CIC itself, dispatching on a number in the 6101 to
7106 range kept in the machine state (0x100071dbf-0x100071e2c). That number is
what Overrides.plist gives for the game, and when the table has no entry the
code sums the ROM's own IPL3 region instead (0x100071c78-0x100071c8f,
0x100071e31-0x100071e94). The country code byte of the cartridge header takes
the PAL branch for D, F, I, P, S, U, X and Y (0x100071d84-0x100071da3).
Every primitive the binary can open a file with (URLForResource:withExtension:,
initWithContentsOfURL:options:error:, initWithFileURL:,
fileHandleForReadingFromURL:error:, the two directory enumerators, mmap)
resolves to three sources: the ROM the user picks, the five bundle resources
below, and the app's own saves.
A ROM is read in any of three byte orders. The first word decides:
0x80371240, 0x80371241 and the 64DD IPL word 0x80270740 are big endian and get
a 32 bit reversal, 0x37804012, 0x37804112 and 0x27804007 are word swapped and
get a 16 bit reversal, 0x40123780, 0x41123780 and 0x40072780 are already in the
internal little endian word order and pass through. A gzip stream or a 60gz
container is decompressed first, and the length has to be a multiple of four
(0x1000ad5c0-0x1000ad6ce, SFGZFile at 0x1000ae2d0). Anything else fails with
"Error Loading Cartridge Format".
64DD support stops at the IPL image. HardwareState carries a cartridge slot
(pointer at +0x120, length at +0x128) and an IPL slot (+0x138, +0x140) and no
disk slot. The document types are n64, v64 and z64, and the only occurrences of
the letters ndd in the whole binary are the two NDDJ immediates in the loader.
Loading the IPL while a cartridge is open leaves the cartridge in place.
Autosaves, game freezes, controller paks and the controller configuration are
written by the app, so none of them is an entry here.
Opened through the file panel like a cartridge. The loader builds the four byte game code from the header, media format at 0x3b, then the two cartridge id bytes read 0x3d before 0x3c, then country at 0x3e, and keeps the image in the 64DD slot instead of the cartridge slot when that code reads NDDJ. That is the Japanese retail IPL. The USA image reads NDDE and the development image NDXJ, so neither can reach that slot. No code path opens the file by name, so the entry carries no alias and the name is a label. The image is mapped at 0x06000000 and read back by PI DMA bounded by its own length, and the 64DD register window at 0x05000000, 0x524 bytes for the ASIC buffers and registers, is installed only once the image is loaded. The same pointer and length decide the disk drive flag the booting game reads, so an absent image is a supported state. Nothing checks a hash, and nothing checks a size beyond the container format and the multiple of four.
561 entries keyed by the four byte game code, read at cartridge load and carrying the CIC seed, the cartridge memory type, the framebuffer flags and the expanded memory and timing settings. The CIC a game boots with comes from this table, and the code falls back to a checksum of the ROM when the table has no entry for it.
Size: 12.6 KB, SHA1 010db2adfc6f
Hashes and source
SHA1: 010db2adfc6f895f6b21762b213dfcf379117883
Source: offset 0x100039336 in sixtyforce 2.0.2 MacOS/sixtyforce (resource name), offset 0x1000392d0-0x1000393fa in sixtyforce 2.0.2 MacOS/sixtyforce (lookup by game code, CIC key), offset 0x100026e67-0x100026e89 in sixtyforce 2.0.2 MacOS/sixtyforce (called with the game code), offset 0x100071c78-0x100071c8f in sixtyforce 2.0.2 MacOS/sixtyforce (CIC read at boot), offset 0x1000d21a0 in sixtyforce 2.0.2 MacOS/sixtyforce (expanded memory log)
SHA1 010db2adfc6f
Controller-Devices.plist
Controller device database
Path: Contents/Resources/Controller-Devices.plist
The bundle carries one device list. SFControllerManager loads a bundle property list while it initialises and keeps it in its supportedDevices table, which the handlers read when a HID device arrives or leaves. The user's own mappings are a separate file the manager reads and writes from the application support folder.
Size: 72.3 KB, SHA1 696ef278a51c
Hashes and source
SHA1: 696ef278a51c6a4ceb9d3009925aef835cac58f4
Source: offset 0x100013494-0x1000134e6 in sixtyforce 2.0.2 MacOS/sixtyforce (bundle load into supportedDevices), offset 0x10001918e in sixtyforce 2.0.2 MacOS/sixtyforce (read on device arrival), offset 0x100013870-0x100013a87 in sixtyforce 2.0.2 MacOS/sixtyforce (user mappings, separate read)
SHA1 696ef278a51c
HID-Usage-Names.plist
HID usage names
Path: Contents/Resources/HID-Usage-Names.plist
Read from the bundle to name the HID usages and usage pages shown while mapping a controller element.
Size: 27.6 KB, SHA1 24fcb060636d
Hashes and source
SHA1: 24fcb060636de11dca0c3b1655c8acbb270fbe39
Source: offset 0x10001cc6d-0x10001cc81 in sixtyforce 2.0.2 MacOS/sixtyforce (resource name and load)
Localised key names for the keyboard controller configuration sheet, read from the bundle through the same loader as the other property lists.
Size: 2.4 KB, SHA1 938a04199c4e
Hashes and source
SHA1: 938a04199c4e8584497d05551061f571e3a8e359
Source: offset 0x100010c8d-0x100010ca1 in sixtyforce 2.0.2 MacOS/sixtyforce (resource name and load)
SHA1 938a04199c4e
Unit.data
Display texture
Path: Contents/Resources/Unit.data
Read from the bundle while the video controller sets up its OpenGL context and kept as the unitTexture the controller draws with.
Size: 64.0 KB, SHA1 1f951f63da30
Hashes and source
SHA1: 1f951f63da303e19d0c3a723b22fa509b44afb9b
Source: offset 0x10004245b-0x10004247b in sixtyforce 2.0.2 MacOS/sixtyforce (resource name and load), offset 0x10004686d in sixtyforce 2.0.2 MacOS/sixtyforce (called from video setup), offset 0x10004658a in sixtyforce 2.0.2 MacOS/sixtyforce (unitTexture use)