Boray Letter Fileformat description (pre-BL 5.0) ------------------------------------------------ This is a text about the .bld file format. I had forgotten that I ever made this text, so it's not up to date at all. It describes a pre-BL5.0 file format This corresponds roughly to todays .bld files that are inside every .bl file. The biggest difference is that the numbers not are written in plain ascii like the example below, but in binary codes. Every coordinate takes 3 bytes in the new format. But as BL is 100% backward compatible with the very first version, you can probably make a file as described below and load it into BL without any trouble at all.... But I can't guarantee this because this text describes the file format that was when I was working on BL5.0. Some features are from BL5.0 but in the old BL4 format.... Ok, here continues the original file..... /Anders Persson --------------------------------------------------------- The file format is a bit "space-wasting", but I have kept it for compability with older letters. And it has some advantages. It's saved as a textfile, so you can edit it with an ordinary text editor if you want to. The problem here is to know all the cryptic ascii-codes. I could have changed the codes to text keywords instead, for example: BOX, LINE and COLOR. But then I had either lost compability or speed performance (due to run time conversions). --------------------------------------------------------- Header: BLETTER MODE ;nr=1 for LoRes and 2 for MedRes DJUP ;bp=number of bitplanes, between 2 and 5 BIG ;Indicates a big screensize (PAL size), If BIG not is stated, SMALL is used (NTSC size) Body: --------------------------------------------------------- Graphics character codes: --------------------------------------------------------- ascii 132 ;Line --------------------------------------------------------- ascii 135 ;Many Lines etc... -1 =End -2 =Move pen --------------------------------------------------------- ascii 133 ;Box --------------------------------------------------------- ascii 134 ;Filled Box --------------------------------------------------------- ascii 17 ;Circle --------------------------------------------------------- ascii 127 ;Crear screen --------------------------------------------------------- Graphics Copy/Brush operations: --------------------------------------------------------- ascii 130 ;Get Copy --------------------------------------------------------- ascii 131 ;Put Copy --------------------------------------------------------- ascii 5 ;Put Many Copies etc... -1 =End ascii 136 ;Fill --------------------------------------------------------- ascii 137 ;Save Copy temporary (on RAM:) --------------------------------------------------------- ascii 138 ;Load Copy --------------------------------------------------------- ascii 0 ;Specify Animation Copies etc.. Ends with a name of nothing. ("" without the "-signs) --------------------------------------------------------- ascii 2 ;Use old animation again --------------------------------------------------------- ` ;Remove one bitplane from Copy --------------------------------------------------------- ~ ;Add one bitplane to Copy --------------------------------------------------------- Color operations: --------------------------------------------------------- ascii 129 ;Set colors --------------------------------------------------------- ascii 19 ;Set palette The color parts are numbers between 0 and 1, so black is: red=0, green=0, blue=0 white is: red=1, green=1, blue=1 grey is: red=0.5, green=0.5, blue=0.5 --------------------------------------------------------- ascii 18 ;Reset colors and turns Auto background and inverse text off --------------------------------------------------------- Speed operations: --------------------------------------------------------- ascii 23 ;Set speed ;The runtime delay time is /250 vertical blanks (The /250 is for compability reasons. Earlier versions of BorayLetter had only a busy wait loop of loops) --------------------------------------------------------- ascii 22 ;Single delay of vertical blanks --------------------------------------------------------- Interactive operations: --------------------------------------------------------- ascii 1 ;Wait for inkey and keep result --------------------------------------------------------- ascii 9 ;Wait for input and keep result --------------------------------------------------------- ascii 25 ;Run this letter again --------------------------------------------------------- ascii 21 ;Run another letter --------------------------------------------------------- ascii 4 ;Run letter stored by inkey/input --------------------------------------------------------- ascii 20 ;Quit BorayLetter --------------------------------------------------------- ascii 15 ;On inkey/input run letter If the string stored by inkey/input is the same as , then read letter. --------------------------------------------------------- Text operations: --------------------------------------------------------- @ ;Place cursor. Sorry for the waste of the @-sign... ;I knew nothing about internet in 1991 :) --------------------------------------------------------- ascii 29 ;Move cursor down --------------------------------------------------------- ascii 31 ;Move cursor left --------------------------------------------------------- ascii 30 ;Move cursor right --------------------------------------------------------- ascii 28 ;Move cursor up --------------------------------------------------------- ascii 24 ;Auto background color ON/OFF --------------------------------------------------------- ascii 26 ;Inverse Text ON/OFF --------------------------------------------------------- Characters that are converted for compability with really old letters: ;Converts to ascii 32 ;Converts to : ;Converts to , ;Converts to " ;Converts to ascii 13 nothing ;Converts to ascii 13 ascii 27 ;Is ignored --------------------------------------------------------- All other characters are printed to the screen --------------------------------------------------------- Example letter: Please note that you can't write comments like this in a letter. --------------------------------------------------------- BLETTER 5.0 ;Header MODE 2 ;MedRes DJUP 4 ;16 colors BIG ;Big screen @ ;Place cursor 5 13 H ;Write the text: Hello World! e l l o W o r l d ! ;Write a box around the text 87 25 201 46 ;Get a copy of the box with the text 79 20 212 51  ;Put many copies of the text 80 53 80 85 80 116 81 149 81 182 -1  ;Set color 1 to yellow 1 1 .9 0 ;Set foreground color to 4, and background to 3 4 3 @ ;Place cursor 15 35 P ;Write the text: Press any key. r e s s a n y k e y  ;Wait for any key