World Wide Guide | Knowledge BankKukushkin's Notebook | Design Fundamentals


Introduction

This document discusses some practical aspects of low-level scenery programming for FS5.

Low-level means using the scenery compiler only for translating individual SDL instructions from their textual representation into the binary format understood by FS5. Unlike that, high-level BGL programming means having some preprocessor (sometimes built into the compiler) convert the input file into individual instructions or somehow manipulate instructions while converting them into the binary format.

This file describes how to create SDL code for achieving certain results, not how to use one or another scenery compiler. For this reason, every scenery compiler capable of translating individual SDL instructions is suitable. However, this also means it is the responsibility of the reader to know how to use the scenery compiler in order to generate proper instructions.

Some notes on compilers

In this file, SCASM notation is used for identifying instructions and their parameters. SCASM is nearly ideal for low-level BGL programming, because it has a rich set of instructions, a precise manual and an almost one-to-one correspondence between textual representations of instructions and their binary format. Also, it is widely used and relatively well known. The last sections of this file also contains hints for FSASM users. Because most terms and names are the same in all scenery compilers, I hope non-SCASM scenery designers will not have much trouble reading this.

A basic knowledge of a low-level scenery assembler, like SCASM or FSASM with the FSASM Development Kit (FSADK), is required. Some experience with scenery design is also an advantage.

This file assumes reading and understanding of FS5FACTS. The information from that file is not duplicated here.

Details found in the scenery compiler or assembler documentation, like syntax of instructions or description of their arguments, are not reproduced here either. In particular, (a few) examples of code shown here serve only as illustrations and are not ready-to-compile examples. They mostly contain (...) instead of actual instruction arguments or even instructions. In such cases, the meaning of instructions and arguments should be taken from the scenery assembler documentation.

Trial and error is required

This is not a "walk-thru". Much trial and error will be needed to get practical results from this information, if any.


Last updated 11 October 1996 by Gene Kraybill.