Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ref:xbin [2018/02/03 02:38] – [History] Fix typo and move sample screen shots digital man | ref:xbin [2020/05/28 19:33] (current) – [XBin] .bin files usually contain CP437 chars digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== XBin ====== | ====== XBin ====== | ||
- | XBin ('' | + | XBin ('' |
In addition to the "image data", the file may optionally contain: | In addition to the "image data", the file may optionally contain: | ||
- A custom color palette definition | - A custom color palette definition | ||
- One or two font (character set) definitions | - One or two font (character set) definitions | ||
+ | |||
+ | ===== Examples ===== | ||
+ | ==== CT-XBIN.XB ==== | ||
+ | {{: | ||
+ | |||
+ | ==== The same file displayed without embedded font or palette data ==== | ||
+ | {{: | ||
+ | |||
+ | ==== cx-unnamed.xb ==== | ||
+ | {{: | ||
+ | |||
+ | ==== tcf - 22 - amidala.XB ==== | ||
+ | {{: | ||
===== Fonts ===== | ===== Fonts ===== | ||
Line 12: | Line 25: | ||
When one or more fonts are specified in the file, the file becomes tied to a specific //character height// (or what they call " | When one or more fonts are specified in the file, the file becomes tied to a specific //character height// (or what they call " | ||
- | For example, in the typical 80x25 video mode, an 8x16 character (font) is used. While in 80x43 video mode, an 8x8 character is used. So a character height of 16 pixels is most common | + | For example, in the typical 80x25 VGA video mode, an 8x16 character (font) is used. While in the 80x43 EGA/ |
There is no provision in the XBin file format for a single file to apply to multiple character heights (video modes). | There is no provision in the XBin file format for a single file to apply to multiple character heights (video modes). | ||
Line 39: | Line 52: | ||
SyncTERM supports up to **4 active fonts** simultaneously (selected by the 4 possible combinations of bits 3 and 7 of each displayed character' | SyncTERM supports up to **4 active fonts** simultaneously (selected by the 4 possible combinations of bits 3 and 7 of each displayed character' | ||
- | In any case, initial experiments using an ad hoc file format were encouraging. I was using SAUCE fields for most of the additional data needed (character height, number of fonts, etc.) and the basic BIN file format with additional data defining the font characters/ | + | In any case, initial experiments using an ad hoc file format were encouraging. I was using SAUCE fields for most of the additional data needed (character height, number of fonts, etc.) and the basic BIN file format with additional data defining the font characters/ |
- | I don't like reinventing | + | I don't like reinventing |
However, XBin only supports a maximum of 2 fonts (the so-called "512 char" mode detailed earlier). Some of my experimental XBin images required more than 2 custom font definitions (especially in 8-pixel character height video modes), even 4 custom fonts could be required at times. | However, XBin only supports a maximum of 2 fonts (the so-called "512 char" mode detailed earlier). Some of my experimental XBin images required more than 2 custom font definitions (especially in 8-pixel character height video modes), even 4 custom fonts could be required at times. | ||
- | So rather than create another file format that many useful software tools may never fully support, I decided to move forward using the XBin format, but add the functionality that I needed for my XBin Image (XBimage) demonstration project: | + | So rather than create |
- | {{:xbin_sync_disks.png?400|}} | + | {{:ref: |
{{: | {{: | ||
- | {{:xbin_marilyn.png?400|}} | + | {{:ref: |
{{: | {{: | ||
Line 63: | Line 76: | ||
==== Illegal Characters ==== | ==== Illegal Characters ==== | ||
- | Although still defined in the font sets (256 character definitions each), the following characters must never be used in the //Image Data// to avoid problems with terminal programs that treat byte received with these ASCII values | + | Although still defined in the font sets (256 character definitions each), the following characters must **never** be used as character values |
- 0 (NUL) | - 0 (NUL) | ||
- 7 (BEL) | - 7 (BEL) | ||
Line 85: | Line 98: | ||
The usage of the low 5 bits (0-4) remains unchanged from the original XBin definition, so long as the upper most 3 bits (5-7) are set to '' | The usage of the low 5 bits (0-4) remains unchanged from the original XBin definition, so long as the upper most 3 bits (5-7) are set to '' | ||
- | I renamed the '' | + | I renamed the //512chars// flag to //HighFont// because its being set does not necessarily mean that there are 512 character definitions (2 font sets of 256 glyphs) - there may now be more or //fewer// than 2 font sets when this flag is set. |
- | In the original XBin definition, | + | In the original XBin definition, |
- | The //Font// flag was re-defined as // | + | The //Font// flag was re-defined as // |
=== New Flags === | === New Flags === | ||
Line 95: | Line 108: | ||
The originally //unused// flags (bit positions 5 and 6) have been redefined to indicate the presence of font definitions for the normal-intensity-blinking (// | The originally //unused// flags (bit positions 5 and 6) have been redefined to indicate the presence of font definitions for the normal-intensity-blinking (// | ||
- | The originally //unused// flag (bit position 7) is now redefined (as // | + | The originally //unused// flag (bit position 7) is now redefined (as // |
=== Parsing === | === Parsing === | ||
Line 101: | Line 114: | ||
In the extended Xbin definition you have from 0 (none) to 4 (the maximum) custom font definitions included in the file. Each font definition' | In the extended Xbin definition you have from 0 (none) to 4 (the maximum) custom font definitions included in the file. Each font definition' | ||
- | To determine the total number of font definitions included in the file (following the optional //Palette// and preceding any //Image Data//), you must count number of set bits from the //Flags// field from the set of bit positions: 1, 4, 5 and 6. If all 4 of these Flags are set, then there are 4 font definitions included in the file. If none of them are set, then there are no font definitions included in the file. | + | To determine the total number of font definitions included in the file (following the optional //Palette// and preceding any //Image Data//), you must count the number of set bits from the //Flags// field from the set of bit positions: 1, 4, 5 and 6. If all 4 of these Flags are set, then there are 4 font definitions included in the file. If none of them are set, there are no font definitions included in the file. |
== Font Priority == | == Font Priority == | ||
- | So now that we know the number of font definitions, | + | So now that we know the number of font definitions |
- BlinkFont | - BlinkFont | ||
Line 112: | Line 125: | ||
- HighFont | - HighFont | ||
- | So if, for example, flags 6 (HighBlinkFont) and 1 (NormalFont) are set, and the other 2 Font flags are unset/OFF, then the first font definition would be for the HighBlinkFont and the second/last font definition would be for the NormalFont. | + | So if, for example, flags 6 (//HighBlinkFont//) and 1 (//NormalFont//) are set, and the other 2 Font flags are unset/OFF, then the first font definition would be for the //HighBlinkFont// and the second/last font definition would be for the //NormalFont//. |
===== See Also ===== | ===== See Also ===== | ||
* [[https:// | * [[https:// | ||
* [[module: | * [[module: | ||
+ | * [[ftp:// | ||
* [[: | * [[: | ||
- | {{tag> | + | {{tag> |