NeSC > Emulators > TR64 > INI
TR64 INI documentation

This document has been produced unofficially, by trial and error, by making changes and observing effects - it may well contain mistakes, and I'd appreciate your corrections. Having said that, I hope this will prove useful to users and especially potential INI writers! I'll take each of the three TR64 INIs in turn:

 

Change log for this page:

04 Feb 00 added region codes, improved wording etc.
03 Feb 00 fixed typos & layout
03 Feb 00 first version

 

 

=======================
TR64.ini
=======================

TR64.ini is used to store GUI settings, plugin defaults and certain ROM entry details - specifically, the Cartridge Type and the Comment field for the GUI - it is NOT used to store UCodes!

This section sets GUI startup defaults, changes in the GUI are saved here on exit.

Setting Type Unit Default Explanation
         
romdir0= string path C:\_roms_\_doesnt_\ Path to your ROM folder
BrowseCol0= ant pixel 178 Width of 1st GUI column
BrowseCol1= int pixel 60 Width of 2nd GUI column
BrowseCol2= int pixel 60 Width of 3rd GUI column
BrowseCol3= int pixel 194 Width of 4th GUI column
BrowseCol4= int pixel 229 Width of 5th GUI column
Width= int pixel 800 Horizontal resolution (size) of window
Height= int pixel 620 Vertical resolution (size) of window
PosX= int pixel 253 Distance, left of window to left of screen
PosY= int pixel 291 Distance, top of window to top of screen
         

INI authors should probably not be fiddling with this section, though what "C:\_roms_\_doesnt_\ is about I have no idea!


This section sets the plugin startup defaults, changes in the GUI are saved here on exit.

Setting Type Default Explanation
       
Graphics= string RCP's Direct3d v0.6 Sets default video plugin
Controller= string Basic KeyBoard plugin Sets default input plugin
Audio= string Basic Audio Plugin Sets default audio plugin

INI authors probably shouldn't be making any changes to this section either, but perhaps it would make sense to set controller to TR64 DX8-Input Plugin since that is what most users will want.

 

The rest of the file contains ROM entries, that is, one entry per ROM, in the following format:

Setting Type Default Explanation
[xxxxxxxxxxxxxxxx] longint n/a ROM's CRC taken from its header
Name= string n/a ROM's title taken from its header
Comment= string "no comment" GUI text displayed in the "Comments" field
CartridgeType= int not set (see below)


So how do these entries get there? Well, uniquely for an N64 emulator, TR64 when it is started, scans the ROMs in the current ROM folder and, for each ROM not found, appends a basic entry (detailed below) to the end of the file.

For example, starting TR64 and pointing it to a folder containing the ROMs Mario64, Mario64JAP and MarioKart would produce something similar to this in the INI (the exact details depending on which ROM release you have):

[B655503E52DA922E]
Name=MARIOKART64
Comment=no comment
[A8A4FBD62CAA2663]
Name=Mario64 Rumble
Comment=no comment
[FF2B5A632623028B]
Name=SUPER MARIO 64
Comment=no comment

You can see that it has created only three lines per ROM, and set comment to "no comment". This is changed manually via cartridge options or by direct INI editing after you have established compatibility. "Comment" field can be any string up to 50 characters (or more via the INI), but going over 31 characters will result in truncation.

Below these three lines can follow the optional setting, "CartridgeType", which has 5 possible values and is set via "Cartridge Options" (or directly). By default TR64 does not create this line in the INI.

Setting Corresponds to Example game
CartridgeType=0 Autodetect n/a
CartridgeType=1 4kbit EEprom Turok
CartridgeType=2 16kbit EEprom Ridge Racer
CartridgeType=3 SRAM Zelda: OoT
CartridgeType=4 FlashRAM Zelda: MM


The "Savegame" setting is not written to the INI.

 


About the CRCs in TR64 INIs:

Mario64, the internal CRC, GoodN64 reports:
"Hdrchk: 635a2bff:8b022326"

tr64'S generated entry for this ROM:

[FF2B5A632623028B]

You can see the format is different - it's byteswapped, like so:

Doctor V64 [B A D C]
Big Endian [A B C D]
Little Endian [D C B A]


CRC1: 635a2bff
CRC2: 8b022326

byteswap each:

CRC1: ff2b5a63
CRC2: 2623028b

and put together:

ff2b5a632623028b

You'll see we're back to where we started.

Of course, you don't need to do this conversion yourself because TR64 adds the entries to the INI for you, I'm just showing you what's going on.

The CRC is not case sensitive, so:

[ff2b5a632623028b] is equivalent to
[FF2B5A632623028B] (TR64 writes in upper case but will read either).

TR64 recognises both .z64 and .v64 format ROMs as the same, but cannot cope with the third (fliprom, .n64, .rom) format:

Here is the single entry written for both the .v64 and a .z64 image:

[FF2B5A632623028B]
Name=SUPER MARIO 64
Comment=no comment

Both ROMs load normally in the emulator.

Here is the entry written for the .n64 image:

[635A2BFF8B022326]
Name=EPUSAM R OIR 46
Comment=no comment


This will not load in the emulator!

 

 

=======================
RCP_D3D.INI
=======================

This INI is used to store Ucodes for the Direct3D video plugin - that is all - there is one setting per ROM entry.

ROMs are identified in the same way as for TR64.ini, with the exception that a two digit region code is added after the CRC - for example, our USA Mario64 ROM is written like this:

[FF2B5A632623028B-45]

[{CRC}-{COUNTRY}]

The regions I have identified:

-00 Demo
-4A JAP
-44 GER/EUR?
-45 USA
-50 EUR
-58 AUS
-59 ?

Unlike TR64.ini, entries to plugin .inis are not written when TR64 is started, but rather for each game when the game is started.

When you start a game, TR64 looks up the CRC in rcp_d3d.ini. If it doesn't find a match, it appends the default entry to the end of the file. This is what the default entry for our example game looks like:


[FF2B5A632623028B-45]
Name=SUPER MARIO 64
UCode=-1


The first two lines I've already explained, but note the third.

TR64 has set the Ucode to "-1". This simply indicates "unknown" - it is NOT a valid Ucode! If you run a game marked "-1" you will automatically be asked to "Config your Ucode" whenever the game is started, and furthermore, TR64 runs in a different mode where it will request a Ucode change whenever it isn't happy with what's selected.


TR64 DOES NOT SAVE YOUR UCODE SETTING TO THE INI! You must edit the file directly once you have found the right setting.

Valid Direct3D Ucodes with the 0.6 .DLL:
Integers 0,1,2,3,4,5,6,7,21 (maybe others?)

Examples given:

0 Mario64, Pilot Wings, Demos
1, 3, 4, 6 Mario Kart
2, WaveRace
5, 7 Zelda
21 Perfect Dark

Setting invalid Ucode values will cause TR64 to crash.

 

 


=======================
TR64_OGL.INI
=======================


Follows the same rules as RCP_D3D.INI except that the Ucodes are NOT equivalent (hence the need for separate INI files).

For example, Zelda needs Ucode4 rather than 5.

Valid OGL Ucodes with the 0.6 .DLL:
Integers 0,1,2,3,4,5,6 (maybe others?)

Examples given:

0 Mario64, Demos
1 Mario Kart
2 WaveRace USA
3 Mortal Kombat 4
4 Zelda
5 Dark Project
6 Diddy Kong Racing


Setting invalid Ucode values will cause TR64 to crash.

 

I have a step by step example of finding and setting up a Ucode in the configuration section.