asylum.acornarcade.com

asylum | nobrainer


nobrainer v0.07

nobrainer is a utility for extracting/storing !Asylum game data files. Usage:

nobrainer [<options>] [<infile>] [<outfile>]

Options:

  • -h , --help Output this help text and exit
  • -l Convert to/from Asylum level file (default) (H)
  • -b Convert to/from Asylum tiled background sprite (H)
  • -s Convert to/from FastSpr files (H)
  • -e Convert to/from compressed border files
  • -m Convert to/from a hammer file
  • -t Convert to the Asylum format
  • -f Convert from the Asylum format

If infile or outfile are '-', or not specified, standard input/output will be used. This may not work on Windows. On RISC OS, use C-type redirection and not the OS redirection (i.e. < foo instead of { < foo }). If you don't know what redirection is, don't worry - just don't use it ;)

Under RISC OS, -t / -f can be ommitted in order to automatically identify the conversion direction - if the input file is data then it will be assumed to be an Asylum file. Current output formats are sprite files (when converting from Asylum) and fastspr/data files (when converting to Asylum). Options marked (H) support automatic de-Hammering when converting from Asylum. At the moment hammer files can only be read, not generated. This isn't a problem though, as Asylum 2 accepts both compressed and uncompressed files. Only FSP1 format fast spr files can be read/written, but again this shouldn't be a problem as this is the only format Asylum uses.

Source code has been included for you to disect at will. Although this release has only been tested in RISC OS, and compiled under RISC OS GCC, it should work fine on other platforms should you need to use it. It is also 32bit compatible

In the docs directory you'll find some rough docs about the file formats Asylum uses. I made them while writing nobrainer, and that's all they were intended to be for. I thought I might as well release them, despite their untidy layouts.

Files you can fiddle with:

The below refers to the full versions of Asylum only - the file names will be different in the demos. I'll be making references to Asylum 1 and 2 - Asylum 2 is not the sequel to Asylum 1, it's just version number 2. To check for version 2, look at the bottom of the instructions file accessable from the iconbar menu (Or on more recent version 2's, the number in the info window).

Asylum level files:

Each level has its own main level file, 'Brain', and 8 sub levels to make up the neurons (Neurons.cell1 to Neurons.cell8). In Asylum 1, there is also the level !Asylum.Resources.Boardfile, which has been removed in version 2 since it doesn't do anything in game. The colours in the palette match up with the block numbers detailed in the 'blocks' file. The maximum level size used by Asylum is 256x256, but if you edit the wimpslot then you may be able to go higher. Levels themselves must have a width which is a multiple of 4.

Asylum background sprites:

These are the background images that make up the tiled background in game, and have a fixed size of 48x32 pixels. Each level has it's own main background file, 'backfile', and neuron backfile, Neurons.backfile. There is also an extra background file, !Asylum.Resources.Backfile, for Asylum 1 users - again, this doesn't do anything in game, so isn't there in Asylum 2.

Asylum aliens/blocks/bloke/chars/explo sprite files:

These are the Fast Sprite files that make up most of the ingame graphics. There is !Asylum.Resources.FSPBloke for player and miscellaneous sprites, !Asylum.Resources.FSPChars for the ingame fonts, and !Asylum.Resources.FSPExplo for the explosion sprites. Each level has its own set of sprites: FSPAliens for the creepy crawlies you'll come across, and FSPBlocks for the blocks the levels are made out of. When converted to Sprite files, they are named with the following convention - <number>_<x centre><y centre> where <number> is the sprite number, and <x centre> and <y centre> is the hex location of the centre of the sprite for use when plotting. The centre coordinates are specified using 2 digit hex, and 0,0 is the top-left corner of the sprite. The maximum size for the images is 256x256, and for Asylum they must be in mode 13 in order to work correctly in Asylum.

Asylum compressed background/edge sprite/border files:

There are only two of these - !Asylum.Resources.chatscreen for the border image used in the ingame menus, and !Asylum.Resources.GameScreen for the border image used in game, with the playing area 'frame', health bar, etc.

nobrainer notes:

  • Backup any files before modifying them - I provide no warranty!
  • No/few checks are made on the files, so don't try anything too strange, and as I say above, make a backup!
  • The obey files 'extract' and 'store' will extract and store all currently editable files to/from asylum (Apart from the extra files in Asylum 1). Stick them in a directory with a copy of nobrainer and click away!
  • The hammer code should cope OK with file overruns, but will produce extra output on underruns, which may cause problems with some of the converters. The ID cell7 supplied with Aslum 2 actually produces an overrun - I'm not sure if this will crash Asylum or not.
  • I've actually checked that the extracting and storing fully works this time - extracted all the files from Asylum 2, then stored them back, and the game worked fine (well, the Ego and Psyche levels did. Didn't try Id, or the neurons)

History:

< v0.05

  • Lost to the sands of time

v0.05 (10th July 2003)

  • Supplied executable is now 32bit compatible.
  • The source code has also been tweaked to make it more likely to compile correctly on non-RISC OS machines (i.e. all 'ints' have been changed to 'longs' to ensure they are 32 bits long)

v0.06 (28th September 2004)

  • Source converted from C++ to C (since it was really just C anyway).
  • Better error messages
  • Fixes to the headers of the sprite files generated by the level & backfile converters (Although !Paint could load them fine, some programs couldn't).

v0.07 (13th April 2019)

  • Source converted to use C99 stdint.h / inttypes.h so that it should really work properly on non-RISC OS machines.
  • BSD license applied.

Coming soon to nobrainer... (Honest!)

  • Hammer output
  • A few options to make it easier to use (i.e. appending to sprite files and only using the specified sprite from a file)
  • Perhaps a scoreboard file editor, should one be needed
  • Config file editor?
  • Music file editor?

Legal

nobrainer is Copyright (c) 2019, Jeffrey Lee
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Jeffrey Lee, 13/04/19

Asylum is © Andy Southgate 1993

Don't expect to get any nobrainer support from him, as he has nothing to do with it. If you get stuck then contact me and I'll see if I can help.


Valid XHTML 1.0! Valid CSS! Best viewed with any browser Rendered on RISC OS