THE SEUCK VAULT
Menus | Tips | Archive | Links | Contact

THE SHOOT'EM UP CONSTRUCTION KIT EXTENSION
BY IAN GOFFE

Published in Commodore Disk User
volume 4 number 5, March 1991
The Commodore Disk User logo


The Shoot 'Em Up Construction Kit was highly acclaimed when it was launched in 1987. The kit contains, in my opinion, one of the best GRAPHICS creation tools available for designing SPRITES and BACKDROPS. I was wondering how many readers own a copy of this excellent tool, and seeing that a few readers' games have been developed with the utility - namely - PHANTOM, B-RAID and ATLANTIS (There are others), then many of you have obtained a copy methinks.

A LITTLE BACKGROUND

One of the main features of the kit is the background editor, in which a level is built up by simply placing predefined blocks of characters into a level map - the jigsaw piece technique - no less! The main principle for this article is to allow the user to load in a standard S.E.U.CK. background file from disk, in which you have created the necessary characters and blocks, that can then be slotted into place on anyone of 256 screens by using my editor. These full colour screens (well, one colour per block as in S.E.U.CK. of course) can then be used in your own programs by using the source file that I have included. It can be assembled by the MIKRO assembler, 6510+, and my very own 6510 MACRO ASSEMBLER (as published in 'YOUR COMMODORE').

BLOCK COMPRESSION TECHNIQUE

Allan Webb touched on this subject in his 'HIGH SPEED GRAPHICS' series that was also run in 'YOUR COMMODORE'. I intend to go one step further by presenting a comprehensive editor that complements the S.E.U.CK. The kit uses this compression technique, which is widely used for storing many screens worth of data in a compacted form. Each block that is created within S.E.U.CK. is made from a 5 by 5 matrix of characters, and each level is further made up of a set of blocks placed together, giving the overall effect of a full screen image. This technique of expanding blocks of characters onto the main screen has wide applications in games programs, where, on most occasions memory is at a premium. Each of my screens is 40 by 20 characters, giving a total of 800 bytes per screen. Therefore, normally for 256 screens this would need to use up 204,800 bytes of memory. (Amiga please!) But, by using this compression technique, we can store 256 screens worth of data in only 8192 bytes, now THAT'S SOME SAVING.

THE EDITOR IN USE

The editor is operated simply by a joystick in Port 2, and additional key-presses. A large BLOCK CURSOR, a la S.E.U.CK. is used to guide your way around the screens. The idea behind the Editor is that it allows you to flip between the 256 screens, and insert a relevant block onto that screen at the block cursor position. Before you can actually see anything though you will need some of your previously designed blocks of characters that you have originally created with S.E.U.CK. The S.E.U.C.K. background files (saved from S.E.U.CK. from the SAVE BACKGROUNDS option within the STORAGE menu - I'm sure I don't have to tell you that!) are loaded into the editor by pressing the 'L' key. You will be asked for the filename at this stage. The filenames from S.E.U.CK. are suffixed with a file type, in this case .B for backgrounds.

This can, however, be omitted from the filename that you input; only key in the main part of the name, e.g. GRAPHICS .B can be entered as GRAPHICS. This is achieved as the editor automatically adds an asterisk to the filename, therefore loading in any file that STARTS with the filename that you input. This is the same when loading in any screen data that you have created. (Worth mentioning, don't you think?). If you just want to get used to the editor than load up a demonstration editor, containing some blocks ready for use - the Blue Peter style, hey?

THE STATUS WINDOW

Below the main graphics area is the STATUS WINDOW, where the user communicates with the editor, and certain information is displayed. The current screen number that is being edited is shown, alongside the block number that is to be used for inserting onto the current screen. The value given alongside "HOLDING" refers to the block that currently lies underneath the block cursor.

KEY/JOYSTICK FUNCTIONS

The block number can be changed in two ways:

NOTE: The '/\' symbol equals the UP ARROW key.

1. Using the '/\' and '*' keys to add to or decrease the current block number.

2. Using the 'G' key to GRAB a block that is under the cursor - in this case the BLOCK NUMBER will be given the value contained in "HOLDING".

The screen number can be changed by using the '+' and '-' keys to move to the next screen in either direction. There are also key-presses available to dump a screen into spare and then, if needed, copy it to another screen. This function is operated by the 'F' and 'T' keys to copy 'FROM' and 'TO'. Press the 'F' key when on the source screen, and then move to the screen that you wish to copy to, at which point you press 'T'. This function can also be used as an 'UNDO' option. After storing the screen with 'F', you may make a complete mess of it, at which time pressing 'T' when on the same screen will bring back the original. (Better to be safe than sorry!). If you wish to clear out all screens by filling with a particular block then get the BLOCK NUMBER holding the desired block that you wish to fill with, then press the 'E' key to erase all screens. You will be asked for confirmation of this command, pressing any key other than 'Y' at this point will allow you to breathe easily once more - that's if you pressed by mistake, of course! Individual items can be saved out; these can then be loaded back for use in your own programs. The commands you require are:

S Save screen data
A Save attributes (Block colours)
B Save block definitions
C Save character set

Screens that you have designed within the editor can be loaded back by pressing the 'K' key. The colour can be changed using the FUNCTION keys, while the '@' key allows you to send disk commands, and view the disk directory - a DOS support is a good feature of any utility program, I believe.

KEY SUMMARY TABLE

+ Screen number + 1
- Screen number - 1
/\ Block number + 1
* Block number - 1
G Grab block
F Dump screen into spare
T Copy spare to screen
E Erase all screens with block number
A Save block colours
B Save block definitions
C Save character set
S Save screens
K Load screens
L Load S.E.U.C.K. background file
@ DOS support
F1 Increase background colour by 1
F3 Increase multi-colour 0 by 1
F5 Increase multi-colour 1 by 1
F7 Increase border by 1


HOW S.E.U.C.K. HANDLES BLOCK DATA

The main components of anyone block in S.E.U.C.K. are the 25 characters that make up the block - the BLOCK DEFINITION - and the individual block colours.

S.E.U.CK. stores the block definitions in a 3200 byte table (128 blocks * 25 characters). The first 25 bytes in this table hold the characters used to make up block 0, the next 25 bytes for block 1, etc.

Therefore to get to the base address of any one particular block definition, we can find the offset in the definition table easily by: -

OFFSET =(BLOCK NUMBER * 25).

The 25 characters used in a block are then stored from (BLOCK DEFINITION TABLE)+OFFSET.

S.E.U.CK. initially stores this 3200 bytes from $lAOO-$2680. The colour for each block is stored in a 128-byte table, so as any one block colour can be easily indexed with an offset of its actual block number. The colour data is stored from $1900-$1980 in S.E.U.C.K.

The other important part of the blocks is the actual character set, this being stored in S.E.U.C.K. under the Kernal ROM, from $F800-$FFFF. However, these absolute values are irrelevant as far as we are concerned, as a standard S.E.U.CK. background file is saved as a single file, containing block definitions, block colour, character set and level data.

HOW THE EXTENSION EDITOR HANDLES DATA

When the extension editor loads in a S.E.U.C.K. background file, it gives a relocated load address of $1000. As was stated, contained in this file is the data for the level map, we won't be using this, as our 256 screens are to be stored in our own format. As the background file is now located at $1000, the relevant parts of memory that we require are;

$2000-$2080 Block colours
$2100-$2D80 Block definitions
$2D80-$3580 Character set

(A copy of the character set is dumped to $FOOO for use by my program).

SCREEN DATA CREATED BY THE EXTENSION EDITOR

Each of the screens created by the editor is 32 bytes long, each byte referring to a particular block number running from left to right - top to bottom when expanded onto the screen. The screen data runs from $4000 to $6000.

USING THE DATA IN YOUR OWN PROGRAMS

The files that you will need to view the screens from within your own programs are:

1. Block colours
2. Block definitions
3. Character set
4. Screen data

Each file is saved from the editor; see the key function summary for actual key presses. I have supplied a source file, (VIEWSCREENS.ASM), to allow you to print any of the 256 screens. The file is well documented and should be self explanatory, if you read through it thoroughly. It is initially set up to run from address $COOO (49152 decimal); once assembled load in the following set of data that you have created within the editor.

BLOCK COLOURS (attributes) to $2000
BLOCK DEFINITION to $2100
CHARACTER SET to $3000
SCREEN DATA to $4000

The labels in the source file are set up to receive the data from the above addresses, note that all of the addresses are the default (can be loaded back with LOAD"filename",8,1), except the CHARACTER SET which must be relocated to $3000. These values can be easily changed in the source file to suit your own requirements. As is stated in the source file, to print a screen use:

LDA #screen number
JSR EXPASCR

This is all that is needed. By the way, how do you like my title screen? The music accompanying it was found embedded deep inside the COMPUNET front sequence from the DISKONOMISER program from the NOVEMBER '89 issue of CDU. That just about sums it all up. So come on all you graphics guys, and gals, out there. How about a bit of full screen animation by recycling the screens in quick succession or a mega-multi screen game? Good luck, and have fun.

ED'S NOTE :- LATER IN THE MAG YOU WILL FIND ANOTHER UTILITY THAT COMPLIMENTS THIS PROGRAM: S.E.U.C.K.WITH MUSIC. IT'S GOOD TO SEE PEOPLE MAKING THE MOST OF S.E.U.C.K.


To download the disk containing the original files, click here.
This disk also includes the SEUCK WITH MUSIC files.



Back to the top