https://github.com/aybe/b800
Renders B800 text to a BGRA buffer.
https://github.com/aybe/b800
Last synced: about 1 year ago
JSON representation
Renders B800 text to a BGRA buffer.
- Host: GitHub
- URL: https://github.com/aybe/b800
- Owner: aybe
- Created: 2014-12-12T19:31:19.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-12T19:56:01.000Z (over 11 years ago)
- Last Synced: 2025-01-31T11:23:15.589Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 484 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
B800
====
Renders B800 text to a BGRA buffer.
**Features**
- support of arbitrary fonts
- support of arbitrary column width
- character expansion style like in VGA text mode
**Showcase**
Classic mode (un-expanded):

Expanded mode:

**Example**
Reading a text file and producing a bitmap out of it (WPF):
```
string path = @"Samples\SAMPLE1.TXT";
byte[] b800Data = File.ReadAllBytes(path);
bool expand = true;
int columns = 80;
Font font = new Cp437Font16();
Tuple render = B800Renderer.Render(font, b800Data, columns, expand);
int pixelWidth = render.Item1;
int pixelHeight = render.Item2;
int[] pixels = render.Item3;
BitmapSource source =
BitmapSource.Create(pixelWidth, pixelHeight, 96, 96, PixelFormats.Bgra32, null, pixels, pixelWidth*4);
```
**TODO**
- implement the blink flag to produce an animation when content is animated
**Credits**
[Joseph Gil for the fonts.](http://ftp.sunet.se/pub/simtelnet/msdos/screen/fntcol16.zip)
[Malvineous for the B800 text page.](http://www.shikadi.net/moddingwiki/B800_Text)
And me for the code :D