This page is dedicated to all kind of technical information about SWOS and how to customize the game. I assume you have more than a slight clue about what is said here, so I won't reply to e-mail whith questions such as 'how can I record a sound?'.

Customizing Sound

Sound files in SWOS, except for those read from the CD, are fairly easy to customize. Sound files are all stored on the \HARD directory on your main SWOS folder, and they are in RAW format. To be able to listen and edit them, you must use something a bit better than your ordinary Windows Sound recorder or your Creative Labs' Sound Blaster tools. There are some good freeware and shareware sample editing utilities available, you just need to search - might be a good starting point.

I used a shareware program called Goldwave to open a RAW sound file. All SWOS' sound files are Mono, 22Khz, so be sure to select that when you are asked for the sound read settings once you opend the file. Now you are free to edit the sample as you wish, or even record your own, as long as you keep the original file lenght.

I repeat: you MUST keep the original file size and sample options. The files can't be a single byte bigger as you risk messing memory allocations, and also it isn't recommended to shorten the files.

As for CD commentary, if you have a CD-burner, you may as well use the same process, just make a copy of SWOS' CD with the original sound files replaced by your own. This tip also applies to custom graphics.

Customizing Game Graphics

Unfortunately, I am yet to find a way to effectively read and edit the game graphics with paint programs. So far, I have managed to hack successfully some files with the .256 extension (not all of them).

Hacking the .256 files:

This is a rather tough procedure, so please be sure you really know what you are doing before actually trying to do anything. All .256 files are 64768 bytes long. The first 64000 bytes consist of a 320x200 picture, mapped to 256 color pallette - the last 768 bytes of the file.

So, if you manage to load that pallete into a paint program, you may create a 320x200 raw picture with that pallete, and then, with the aid of an hex-editor, replace the first 64000 bytes of the file you extracted the pallete from with the raw file you just created (it should be 64000 bytes long). I know this works, as I used this technique to change the SWOS menu screen backgrounds.

However, accuratelly extracting the color pallette out of a .256 file can be incredibly tricky, and I am yet to find a way to do this. So far, we know that the pallete is saved on the last 768 bytes of a file. As you know, each color consists of a mix of red, green and blue, and if each color normally has 256 shades - 8 bits, it makes perfect sense that a 256 color pallete will have 256 red values, 256 green values and 256 blue values. Hence the 768 bytes. However, I have noticed that the maximum value on these 768 byte palletes is hex-3F (64), instead of the typical hex-FF (256) of 24bit color palletes. So SWOS .256 files use a 18bit pallete, and that may be explained through the fact it was based on the Amiga source, and the Amiga AGA chipset had a 18bit pallette. So, you have 00 00 00 for black and 3F 3F 3F for white.

Something I haven't quite sorted out is whether these 768byte pallete is ordered by particular color or by primary. So I still don't know if the colors are ordered like RGB RGB RGB... (256 times) or R R R... G G G... B B B... (256 times each).

So, I hope this knowledge helps, and I'd like to be notified by mail in case you know anything else that would be useful.

by Eduardo Sousa - May 1999