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 "gorgon-gdk/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 operating systems 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 five 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 attempts to blockload a file, it first looks for the file in the current folder; if the file is not found it will then try to locate the file specified inside the "res0.dat" file.
There are up to four 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 three 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 four extensions: ".DAT", ".CGA", ".TGA", and ".VGA". 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_1.ext through res2_999.ext.
RES3 files are 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. 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.
RES3.OPL contains a series of Reality Adlib Tracker files that have been somewhat compressed. Emulation of the RAD capabilities cannot be guaranteed to always be 100% accurate, as the file format has been altered quite a bit. For more details, see the music section.
RES3.TND contains the Tandy 3 Voice Sound music tracks.
Gorgon assumes the track orders are identical for all device specific files.
RES4.SND is the only digital audio file the engine currently uses. It contains an index of PCM sound clips generated from .WAV files. The file format can contain 8-bit or 4-bit audio data.