Home
Memoirs of a Gamer
Movies I watched
Guidebook
Code Projects
Links
The tools used to generate Gorgon data files can be found in the "gorgon3/tools/*operating system*/" sub folder in the repo. At the present time, only 32 bit DOS and 64 bit Linux are actively supported, though most of the tools only use the Standard C libraries so porting to other OSes in the future should be trivial.
Executable | Sub Folder | Description |
adlibpacker | adlibsnd | Generates Adlib Music files |
imgpacker | imgpackr | Generates Sprite files |
midi2rad | midi2rad | Converts a standard MIDI file to a Reality Adlib Tracker file |
mt32packer | mt32snd | Generates MT-32/General MIDI Music files |
mt32patcher | mt32snd | Generates the MT-32 custom patch file |
respacker | respackr | Generates file collection packages |
scriptor | scriptor | Compiles Gorgon Script files into bytecode files |
descriptor | scriptor | Decompiles Gorgon Script bytecode files |
scrpacker | scrpackr | Generates Full Screen Art files |
strbuilder | strbuilder | Generates String packages |
Next let's go over the files used by the engine. There are 5 categories of resource file, each identified by a name starting with "res" followed by the resource class ID. The classes are:
Games that support the Roland MT-32 may also provide an "mt32.pat" file which can contain a series of custom patches to be loaded dynamically into the MT-32's program memory.
"RES0.DAT" is the only file in the res0 class. It's a file container created using the "respacker" tool. The file contains a header followed by a table of file records and then the files uncompressed in sequence. When Gorgon goes to blockload a file, it first looks for the file in the current folder, if it's not found it will then try to locate the file specified inside the "res0.dat" file.
There are up to 4 res1 files, with extensions ".DAT", ".TGA", ".CGA", and ".VGA". These files are generated using the "scrpacker" tool. All 4 require the Run Length Encoding flag(-rle) to be set during packaging. The CGA record should be packaged in 4 color / CGA mode, where as the other 3 necessitate the 16 color / Tandy Graphics mode. These files are a collection of compressed 160x200 pixel full screen images. When loaded by the engine, they will automatically be rendered starting in the top left corner of the screen and spanning the full width of the 320x200 resolution frame.
Similar to the RES1 packages, there are 4 extensions. Again they fall into the ".DAT", ".CGA", ".TGA", and ".VGA", only unlike RES1, the ".dat" extension is monochrome, as it's used for masking sprites. Unlike the RES1 files however, the engine allows for multiple RES2 files per channel. Beyond the default res2.ext files, there can be res2_#.ext files with as high a numeral value as DOS's 8.3 file naming convention will allow.
The music files contain a series of music files. Both ".GM" and ".MT" files contain converted MIDI files. GM is used when the General MIDI option is chosen from the list of music devices and MT is used for the Roland MT-32. This allows for MT-32 tracks to be tailored to the unique features the MT-32 offers, like custom patches.
The "RES3.OPL" file contains a series of Reality Adlib Tracker files that have been somewhat compressed. Emulation of the RAD capabilities can not be guaranteed to always be 100% as the file format has been altered quite a bit. More details can be found in the music document.
The last file is the RES3.TND file, which contains the Tandy 3 Voice Sound music files.
Gorgon assumes the track orders are identical for all device specific files.
RES4.SND is the only file the engine currently uses. It contains an index of PCM sound bytes generated from .WAV files. The file format can contain 8 bit or even 4 bit audio data.