| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| ref:xbin [2018/02/04 00:46] – Add XBIN screen shot and links to XBimage demo pack digital man | ref:xbin [2025/10/09 05:30] (current) – [Definition] NoHigh is expected to disable bright backgrounds enabled with NoBlink as well it appears deuce |
|---|
| ====== XBin ====== | ====== XBin ====== |
| |
| XBin (''.xb'') is an ANSI/block art file format created by Tasmaniac of [[http://www.acid.org|ACiD]]. The main "image data" portion of the file is identical in format to that of a BIN (''.bin'') file: an IBM CGA text mode memory dump consisting of pairs of 8-bit character (e.g. alphanumeric or symbolic/graphic) data accompanied by 8-bit attribute (e.g. color) data. | XBin (''.xb'') is an ANSI/block art file format created by Tasmaniac of [[http://www.acid.org|ACiD]]. The main "image data" portion of the file is identical in format to that of a "Binary Text" (''.bin'') file: an IBM CGA text mode memory dump consisting of pairs of 8-bit character (e.g. CP437 alphanumeric or symbolic/graphic) data accompanied by 8-bit attribute (e.g. color) data. |
| |
| In addition to the "image data", the file may optionally contain: | In addition to the "image data", the file may optionally contain: |
| - One or two font (character set) definitions | - One or two font (character set) definitions |
| |
| {{:ref:xbin.png?400|}} | ===== Examples ===== |
| | ==== CT-XBIN.XB ==== |
| | {{:ref:xbin.png?400|An ACiD XBin demonstration file (CT-XBIN.XB) displayed in SyncTERM v1.1b}} |
| | |
| | ==== The same file displayed without embedded font or palette data ==== |
| | {{:ref:xbin_without_font_or_palette.png?400|Does your terminal display XBin's like this?}} |
| | |
| | ==== cx-unnamed.xb ==== |
| | {{:ref:unnamed.png?400|A spectacular XBin demonstration displayed in SyncTERM v1.1b (in development)}} |
| | |
| | ==== tcf - 22 - amidala.XB ==== |
| | {{:ref:amidala.png?400|Another outrageous example of the art possible through the XBin format}} |
| |
| ===== Fonts ===== | ===== Fonts ===== |
| When one or more fonts are specified in the file, the file becomes tied to a specific //character height// (or what they call "FontSize" in the XBin specs). Meaning, the viewer must be using a display mode which matches the character height in the file or else the font(s) cannot be used during the display and the file likely will not appear as intended. | When one or more fonts are specified in the file, the file becomes tied to a specific //character height// (or what they call "FontSize" in the XBin specs). Meaning, the viewer must be using a display mode which matches the character height in the file or else the font(s) cannot be used during the display and the file likely will not appear as intended. |
| |
| 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 with character heights of 8 pixels and 14 pixels being less common, but still included in the IBM CGA/EGA/VGA display standard text modes. | For example, in the typical 80x25 VGA video mode, an 8x16 character (font) is used. While in the 80x43 EGA/VGA video mode, an 8x8 character is used. So a character height of 16 pixels is most common, while character heights of 8 pixels and 14 pixels are less common, but still included in the IBM CGA/EGA/VGA display standard text modes. |
| |
| 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). |
| SyncTERM supports up to **4 active fonts** simultaneously (selected by the 4 possible combinations of bits 3 and 7 of each displayed character's attribute byte). And depending on the size and complexity of the original image and the target character height, 1-4 custom fonts might be needed to replicate the original bitmap image (and in some cases, 4 fonts isn't even enough). | SyncTERM supports up to **4 active fonts** simultaneously (selected by the 4 possible combinations of bits 3 and 7 of each displayed character's attribute byte). And depending on the size and complexity of the original image and the target character height, 1-4 custom fonts might be needed to replicate the original bitmap image (and in some cases, 4 fonts isn't even enough). |
| |
| 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/glyphs. At the same time I was discussing the possibility of custom palette definitions with [[person:Deuce]] (the BBS could dynamically control the SyncTERM display palette), so I was considering adding that as well. | 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/glyphs. At the same time I was discussing the possibility of custom palette definitions with [[person:Deuce]] (the BBS could dynamically control the SyncTERM display palette), so I was considering adding an alternate/custom palette to the file format as well. |
| |
| I don't like reinventing the wheel, so I looked through the existing BIN file format variants (Artworx/ADF, IceDraw/IDF, etc.) and the only format which supported multiple custom font definitions was: XBin. XBin also supports a custom palette definition, so that was a plus as well. | I don't like reinventing wheels, so I looked through the existing "Binary Text" file format variants (Artworx/ADF, IceDraw/IDF, etc.) and the only format which supported multiple custom font definitions was: XBin. XBin also supports a custom palette definition, so that was a plus as well. |
| |
| 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") [[ftp://vert.synchro.net/main/bbs/xbimgs01.zip|demonstration project]]: | So rather than create yet 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") [[ftp://vert.synchro.net/main/bbs/xbimgs01.zip|demonstration project]]: |
| |
| {{:xbin_sync_disks.png?400|}} | {{:ref:xbin_sync_disks_bright.png?400|}} |
| {{:xbin_einstein.png?400|}} | {{:xbin_einstein.png?400|}} |
| {{:xbin_marilyn.png?400|}} | {{:ref:xbin_marilyn_bright.png?400|}} |
| {{:xbin_starman.png?400|}} | {{:xbin_starman.png?400|}} |
| |
| The originally //unused// flags (bit positions 5 and 6) have been redefined to indicate the presence of font definitions for the normal-intensity-blinking (//BlinkFont//) characters and/or the high-intensity-blinking characters (//HighBlinkFont//). | The originally //unused// flags (bit positions 5 and 6) have been redefined to indicate the presence of font definitions for the normal-intensity-blinking (//BlinkFont//) characters and/or the high-intensity-blinking characters (//HighBlinkFont//). |
| |
| The originally //unused// flag (bit position 7) is now redefined (as //NonHigh//) to indicate that the high-intensity attribute flag (bit 3) in the //Image Data// should **not** be used to select the color for the character cell (presumably, the attribute flag is being used to select the font set instead and the effective desired color of the character is expressed **only** in the low 3 bits of each character's attribute value). | The originally //unused// flag (bit position 7) is now redefined (as //NonHigh//) to indicate that the high-intensity attribute flag (bits 3 and 7) in the //Image Data// should **not** be used to select the foreground or background color for the character cell (presumably, the attribute flag is being used to select the font set instead and the effective desired color of the character is expressed **only** in the low 3 bits of each character's attribute value). |
| |
| === Parsing === | === Parsing === |
| In the extended Xbin definition you have from 0 (none) to 4 (the maximum) custom font definitions included in the file. Each font definition's size is the character height multiplied by 256 bytes (e.g. a 16 pixel character height means 4096 bytes per font definition as 16 * 256 = 4096). | In the extended Xbin definition you have from 0 (none) to 4 (the maximum) custom font definitions included in the file. Each font definition's size is the character height multiplied by 256 bytes (e.g. a 16 pixel character height means 4096 bytes per font definition as 16 * 256 = 4096). |
| |
| 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, 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 == |
| ===== See Also ===== | ===== See Also ===== |
| * [[https://web.archive.org/web/20120212201856/http://www.acid.org/info/xbin/xbin.htm|Archived copy of The Official XBIN Homepage]] | * [[https://web.archive.org/web/20120212201856/http://www.acid.org/info/xbin/xbin.htm|Archived copy of The Official XBIN Homepage]] |
| * [[module:xbimage]] | * [[https://www.acid.org/images/0896/XBIN.TXT|Original Xbin specification]] |
| | * [[module:xbimage]] module |
| * [[ftp://vert.synchro.net/main/BBS/xbimgs01.zip|XBimages Demo Pack #1]] | * [[ftp://vert.synchro.net/main/BBS/xbimgs01.zip|XBimages Demo Pack #1]] |
| | * [[https://blog.glyphdrawing.club/moebius-ansi-and-ascii-art-editor-with-custom-font-support/|Moebius XBIN]] |
| * [[:ref:|Reference Library]] | * [[:ref:|Reference Library]] |
| |
| {{tag>ansi syncterm sauce}} | {{tag>ansi syncterm sauce xbin graphics fonts}} |
| |