This file contains two previously separate files. Part 1 - Individual Files Part 2 - Dat File Structure TRACK DAT FILES - INDIVIDUAL FILES ***************************************************************************** DESCRIPTION ***************************************************************************** A track is composed of several files that define the qualities of the track. These files can be combined into one big data file which I will refer to as the .dat file. The track will work properly as long as all of the files needed by NASCAR.EXE to form the track are either in the track directory or in the .dat file in the track directory. The track will work properly even if the .dat file is missing, as long as all of the needed files are present in the track directory. There are several files that each track NEEDS in order to work, some OPTIONAL night racing files for NASCAR Racing, and usually a large collection of OTHER files that contain the data that will vary from track to track. The files NEEDED to form a track are as follows: NEEDED FILES PURPOSE ------------ ------------------------------------------------- .3do Contains the object information for the track .cam My guess is that it defines the replay cameras .scr No Idea yet .trk My guess is that it defines the track sky.3do The sky object horiz.3do The horizon object horiz.mip Contains the graphics used for the horizon sunny.pcx Contains the palette used during racing --IndyCar Racing I uses colors.pcx instead-- map.pcx Contains palette used on track selection screen hires.stp High res track picture on track selection screen lores.stp Low res track picture on track selection screen hlogo.stp High res track logo on the track selection screen logo.stp Low res track logo on the track selection screen OPTIONAL FILES PURPOSE (only available in NASCAR Racing) -------------- ------------------------------------------------- night.pcx Contains the palette used during racing nmap.pcx Contains palette used on track selection screen nhires.stp High res track picture on track selection screen nlores.stp Low res track picture on track selection screen nhlogo.stp High res track logo on the track selection screen nlogo.stp Low res track logo on the track selection screen OTHER FILES PURPOSE ----------- ------------------------------------------------- *.3do A 3D object *.mip A multi-image picture *.pmp A 2D picture DAT FILES - STRUCTURE ***************************************************************************** DESCRIPTION ***************************************************************************** Most of the information used in Papyrus' race simulations is packed into a large DAT file (e.g. cars.dat, track.dat, main.dat, effects.dat, etc.). Each DAT file holds the information that is needed to produce a certain result. The DAT file contains smaller files that are just packed together into one big file for easier management. The game will run if the DAT file is present, or if the files within the DAT file are present withing the directory. I am unsure what would happen if a file accessed by the program is in the directory and also packed into the DAT file. ***************************************************************************** STRUCTURE ***************************************************************************** The DAT file is divided into three sections. The first section contains the number of files embedded in the file. The second section contains information related to each file, including the size, name, and position of that file within the DAT file. The third section contains the actual embedded files. SECTION ONE: Number Of Files -------------------------------- The first two bytes in the DAT file define how many files are embedded inside. The value is an unsigned integer four bytes long with the bytes stored in reverse order. SECTION TWO: File Information ----------------------------- The second section of the DAT file begins on byte three. There are 27 bytes used for each file embedded. The first two bytes contain an integer value of 5. I don't know why this value is here, but it must be there for the DAT file to work. The next four bytes contain the length of the embedded file. This value is an unsigned long integer. The length is stored again in the next four bytes. I don't know why this value is stored twice, but it must be there for the DAT file to work. Next, the filename is stored. This is stored in 13 bytes with the unfilled portion filled with zeros. The last four bytes used for this embedded file give the starting position of the file within the DAT file. This value is an unsigned long integer. SECTION THREE: Embedded Files ----------------------------- The third and final section of the DAT file stores the actual embedded files themselves. Each embedded file is located according to its starting position stored in the second section of the DAT file (the File Information section). ------------------------- -Corey Rueckheim -rueck_cw@cslab.uwlax.edu