PHOTON X VGA LIBRARY FOR DOS AND IBM COMPATIBLE SYSTEMS TRX-26-0002 06/03/2026 --------------------------------------------------------------------------- TITLE: PHOTON X VGA LIBRARY FOR DOS AND IBM COMPATIBLE SYSTEMS DOCUMENT ID: TRX-26-0002-A1 REVISION: A1 CATEGORY: DESIGN AND PROTOCOL COPYRIGHTS: (C) 2026 0x4248. CC BY-SA 4.0. USAGE RIGHTS: All rights given under CC BY-SA 4.0 LICENSE: CC BY-SA 4.0 DATE CREATED: 6 March 2026 DATE REVISED: 6 March 2026 --------------------------------------------------------------------------- REVISION HISTORY --------------------------------------------------------------------------- REVISION DATE NOTES A1 6 March 2026 Initial creation of record. --------------------------------------------------------------------------- CONTENTS --------------------------------------------------------------------------- 1.0 SCOPE 2.0 FEATURES 3.0 LIMITATIONS 4.0 API DIAGRAM 5.0 SIGNATURES --------------------------------------------------------------------------- ABSTRACT --------------------------------------------------------------------------- PhotonX VGA Library is a graphics library designed for DOS and IBM compatible systems to provide an easy to use interface for programming on compatible video graphics array hardware. The library provides functions for text and graphics mode programming, including support for drawing basic shapes, handling colors. --------------------------------------------------------------------------- 1.0 SCOPE --------------------------------------------------------------------------- 1.1 This library is intended for use in DOS and IBM compatible systems with VGA hardware. It provides a set of functions for programming graphics and text modes, allowing developers to create applications that utilize the capabilities of VGA graphics. 1.2 The library is designed to be simple and easy to use, making it accessible for developers of all skill levels. It is suitable for a wide range of applications, including games, graphical user interfaces, and educational software. 1.3 The library should not be used in games, operating systems or applications that require high performance graphics or advanced features such as 3D rendering. --------------------------------------------------------------------------- 2.0 FEATURES --------------------------------------------------------------------------- There is two main modes for photon X VGA Library, text mode and graphics mode. Text mode provides functions for displaying text on the screen, including support for colors and cursor control.. Graphics mode provides functions for drawing basic shapes such as lines, circles, and rectangles, as well as support for handling colors and pixel manipulation. The library also has a basic font for graphics mode to make it easier to display some text in graphics mode. Text mode will have these functions: - putch(char c): Display a single character on the screen. - puts(const char* str): Display a null-terminated string on the screen. - setcolor(uint8_t fg, uint8_t bg): Set the foreground and background colors for text output. This will also affect any text behind the current text on the screen since the background color is applied to the entire character cell. - gotoxy(uint8_t x, uint8_t y): Move the cursor to the specified position. - cls(): Clear the screen. Graphics mode will have these functions: - putpixel(uint16_t x, uint16_t y, uint8_t color): Put a pixel at the specified coordinates with the given color. - line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t color): - rect(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t color): - circle(uint16_t x, uint16_t y, uint16_t radius, uint8_t color): - cls(): Clear the screen. - setclscolor(uint8_t color): Set the color used for clearing the screen - putch(char c, int x, int y, uint8_t color): Display a single character at the specified coordinates with the given color. - puts(const char* str, int x, int y, uint8_t color): Display a null-terminated string at the specified coordinates with the given color. --------------------------------------------------------------------------- 3.0 LIMITATIONS --------------------------------------------------------------------------- It is expected that the library will not perform well in games or applications that require high performance graphics or advanced features such as 3D rendering. This expensive limitation is due to the fact that the library is designed to be simple and easy to use, rather than optimized for performance on specific hardware. It also means that even IBM VGA ISA cards can use this software. Pros to this design also means there is no need for helper drivers or other software to use the library, but helper drivers can be added to give configuration options and other features if desired. --------------------------------------------------------------------------- 4.0 API DIAGRAM --------------------------------------------------------------------------- +------------------+ | | | GRAPHICS CARD | | | +------------------+ ^ ^ | | | | +---+------+ +-+-----------+ | VGA TEXT| |VGA GRAPHICS | | API | | API | +----------+ +------------+ ^ +----------+ ^ +---| PROGRAM |-----+ +----------+ --------------------------------------------------------------------------- 5.0 SIGNATURES --------------------------------------------------------------------------- Written By: 0x4248 / 4248 Systems Date: __________ Signature: _________________________ Reviewed By: _________________________ Date: __________ Signature: _________________________