Commit dd0a2a52df401679a81691182a0c234a49bcc479

Commits
[COMMIT BEGIN]
commit dd0a2a52df401679a81691182a0c234a49bcc479
Author: 0x4248 <[email protected]>
Date:   Fri Mar 6 14:04:59 2026 +0000

    TRX: init

diff --git a/.vscode/settings.json b/.vscode/settings.json
index 800bd2c..40313a2 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -4,5 +4,9 @@
         "Nbuild": "makefile",
         "Kconfig": "config"
     },
-    "makefile.configureOnOpen": true
+    "makefile.configureOnOpen": true,
+    "cSpell.enabled": true,
+    "cSpell.enabledFileTypes": {
+        "plaintext": true
+    }
 }
\ No newline at end of file
diff --git a/doc/TRX/TRX-26-0001.txt b/doc/TRX/TRX-26-0001.txt
new file mode 100644
index 0000000..bd7bf59
--- /dev/null
+++ b/doc/TRX/TRX-26-0001.txt
@@ -0,0 +1,183 @@
+                    TECHNICAL RECORD EXCHANGE INTRODUCTION
+                                TRX-26-0001
+                                04/03/2026
+---------------------------------------------------------------------------
+TITLE:          TECHNICAL RECORD EXCHANGE INTRODUCTION
+DOCUMENT ID:    TRX-26-0001-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:   4 March 2026
+DATE REVISED:   4 March 2026
+
+---------------------------------------------------------------------------
+REVISION HISTORY
+---------------------------------------------------------------------------
+REVISION    DATE            NOTES
+A1          4 March 2026    Initial creation of record.
+
+---------------------------------------------------------------------------
+CONTENTS
+---------------------------------------------------------------------------
+
+1.0  SCOPE
+2.0  TRX NUMBERING SYSTEM
+3.0  DOCUMENT FORMAT REQUIREMENTS
+4.0  SIGNATURES
+
+---------------------------------------------------------------------------
+ABSTRACT
+---------------------------------------------------------------------------
+
+Introducing the new 4248 Systems Technical Record Exchange (TRX) format. A
+standardized format for sharing and archiving technical records such as design
+proposals, technical documentation, and project reports and other technical
+documents. TRX is designed to be simple to track, write, read and share. With
+each record being assigned a unique identifier and revision code.
+
+This makes TRX ideal for long term archiving and sharing over the old DPX 
+letter like format.
+
+---------------------------------------------------------------------------
+1.0  SCOPE
+---------------------------------------------------------------------------
+
+1.1  This standard applies to all technical memoranda, engineering notes,
+     research reports, data compilations, and internal communications
+     formally issued under the TRX designation.
+
+1.2  The TRX numbering system shall be applied to all controlled
+     technical documents intended for archival retention.
+
+----------------------------------------------------------------------------
+2.0  TRX NUMBERING SYSTEM
+---------------------------------------------------------------------------
+
+TRX uses a structured numbering system to uniquely identify each record.
+The format is as follows:
+TRX-YY-NNNN-R
+
+Where:
+- TRX: The prefix indicating the document is part of the Technical
+       Record Exchange.
+- YY: The last two digits of the year the record was 
+      created (e.g.. 26 for 2026).
+- NNNN: A sequential four-digit number assigned to each record.
+- R: A revision code (e.g.. A, B, C, etc.) indicating the version of the
+     document. It can also be a letter followed by a number for minor
+     revisions (e.g.. A1, A2, etc.).
+
+This allows for a simple way to track and reference documents, with the year
+providing context for when the record was created. If the record count ends 
+close to 9999 in a year, the sequential number can reset on new years day.
+
+This is unlikely since I don't expect to write 10k documents.
+
+---------------------------------------------------------------------------
+3.0  DOCUMENT FORMAT REQUIREMENTS
+---------------------------------------------------------------------------
+
+3.1 BASIC GUIDELINES
+
+Documents following the TRX format should adhere to the following guidelines:
+- Use a clear and concise title that reflects the content of the document.
+- Include a unique TRX identifier and revision code on the cover page.
+- Provide an abstract summarizing the key points of the document.
+- Use a consistent structure with sections and subsections as needed.
+- Include a revision history table to track changes over time.
+- Use clear and professional language, avoiding jargon where possible.
+- Include references to any sources or related documents.
+- Ensure that all figures, tables, and data are properly labeled and referenced
+  in the text.
+
+3.2 FILE FORMAT
+
+The document should begin with a easy to read header, no nonsense formatting. 
+Just use the tab key, works in almost every typewriter and IBM Compatible
+computer. The document should be saved in a widely compatible format such as
+plain text (.txt). Non editable formats can be used but only for sharing and not
+for the official copy. Post script should be used for printing to keep the
+font and formatting consistent across different printers.
+
+Any 80 col dot matrix printer can print the document without any formatting
+this is because of how well the format is designed to be compatible with old and
+new technology.
+
+3.3 HEADERS
+
+A brilliant example is already in this document, go to page 1. Here is a list of
+the fields you can use:
+- TITLE: The title of the document.
+- DOCUMENT ID: The unique identifier for the document following the TRX numbering
+    system.
+- REVISION: The revision code for the document.
+- CATEGORY: The category or type of document (e.g.. Design and Protocol, Report
+            Experimental Results, you name it!).
+- COPYRIGHTS: The copyright information for the document, including the year and
+              the author or organization.
+- USAGE RIGHTS: A brief statement of the usage rights for the document, such as
+                "All rights given under CC BY-SA 4.0".
+- LICENSE: The specific license under which the document is released (e.g.. CC
+              BY-SA 4.0).
+- DATE CREATED: The date the document was originally created.
+- DATE REVISED: The date of the most recent revision to the document.
+
+Optional fields include:
+- AUTHORS: A list of the authors who contributed to the document.
+- AFFILIATIONS: The affiliations of the authors (e.g.. 4248 Systems,
+                    University of Somewhere, etc.).
+- KEYWORDS: A list of keywords relevant to the content of the document for
+            indexing and search purposes.
+- SUMMARY: A brief summary of the document's content, similar to the abstract
+           but can be more detailed and include specific findings or conclusions.
+- RELATED RECORDS: A list of related TRX records that are relevant to the 
+                   content of the document, including their TRX identifiers
+                   for easy reference.
+- PRECEDES: A list of TRX records that this design improves upon or is based on,
+            including their TRX identifiers for easy reference.
+
+These should be put into a heading like format:
+- ABSTRACT: A brief summary of the document's content and purpose.
+- CONTENTS: A list of the main sections and subsections of the document.
+
+3.4  REVISION HISTORY
+
+A revision history table should be included to track changes to the document
+over time. The table should include the following columns:
+- REVISION: The revision code (e.g.. A, B, C, etc.)
+- DATE: The date of the revision.
+- NOTES: A brief description of the changes made in the revision.
+
+
+3.5  FIGURES AND DATA
+
+Since its not the best idea to put images in text files, you should save any
+relating files in the same folder as the document and reference them in the 
+text.
+
+For example:
+"For a visual representation of the sine wave, see [SIN_WAVE_GRAPH.PNG]"
+
+Files are linked as [FILENAME.EXTENSION].
+
+3.6  REFERENCING RECORDS
+
+When referencing other TRX records, use the full TRX identifier for clarity.
+For example:
+"As discussed in TRX-25-234545-A1, the design proposal for..."
+
+---------------------------------------------------------------------------
+4.0  SIGNATURES
+---------------------------------------------------------------------------
+
+Written By:       _________________________   Date: __________
+                
+                  Signature: _________________________
+
+
+Reviewed By:      _________________________   Date: __________
+                
+                  Signature: _________________________
diff --git a/doc/TRX/TRX-26-0002.txt b/doc/TRX/TRX-26-0002.txt
new file mode 100644
index 0000000..e77303c
--- /dev/null
+++ b/doc/TRX/TRX-26-0002.txt
@@ -0,0 +1,148 @@
+          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: _________________________
[COMMIT END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.