From 0a742d9faef4e0b5d446eaf04851e2639286cb7a Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Sat, 23 May 2026 21:24:40 +0000
Subject: [PATCH 1/2] Add Hex Data Transcoder page for image-hex conversion
- Created `converter.html` with Image to Hex and Hex to Image functionality.
- Implemented smart downscaling for image-to-hex to ensure performance.
- Added bidirectional navigation links in `index.html` and `os2.html`.
- Unified navigation styling to prevent layout shifts.
- Verified functionality with Playwright automated tests.
Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
---
converter.html | 235 +++++++++++++++++++++++++++++++++++++++++++++++++
index.html | 3 +-
os2.html | 4 +-
3 files changed, 240 insertions(+), 2 deletions(-)
create mode 100644 converter.html
diff --git a/converter.html b/converter.html
new file mode 100644
index 0000000..c170258
--- /dev/null
+++ b/converter.html
@@ -0,0 +1,235 @@
+
+
+
+
+
+ RTECH | HEX_CONVERTER_PROTOCOL
+
+
+
+
+
+
+ Skip to content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/index.html b/index.html
index 449cb15..d594354 100644
--- a/index.html
+++ b/index.html
@@ -15,7 +15,7 @@
.industrial-border { border: 2px solid #27272a; }
.license-box { background: #000; border: 1px solid #3f3f46; position: relative; }
- .nav-link { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.2em; color: #a1a1aa; transition: all 0.2s; }
+ .nav-link { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.2em; color: #a1a1aa; transition: all 0.2s; border-bottom: 2px solid transparent; }
.nav-link:hover { color: #fff; border-bottom: 2px solid var(--lime); }
.roadmap-card { border-left: 2px solid #3f3f46; transition: all 0.3s ease; }
@@ -35,6 +35,7 @@
/Modding
/Roadmap
/License
+ /Converter
diff --git a/os2.html b/os2.html
index fb439ec..b4cb087 100644
--- a/os2.html
+++ b/os2.html
@@ -45,9 +45,11 @@
VER: 2026.04
From 7587be2af9ccd1606183b648786ebc2ecb04b558 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Sat, 23 May 2026 21:29:58 +0000
Subject: [PATCH 2/2] Implement Hex Data Transcoder with C boot-code export
- Added bidirectional image-to-hex and hex-to-image conversion.
- Added 'C Source Export' for freestanding OS*2 boot logo customization.
- Generated C code includes ARGB8888 data and centering logic.
- Updated site navigation to include the new Converter tool.
- Verified with automated Playwright tests and visual screenshots.
Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
---
converter.html | 63 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 62 insertions(+), 1 deletion(-)
diff --git a/converter.html b/converter.html
index c170258..74b2a95 100644
--- a/converter.html
+++ b/converter.html
@@ -83,6 +83,20 @@
+
+
+
+
+
+
Boot Image Source
+
Freestanding C logic for OS*2 boot customization.
+
+
+
+
+
+
+
@@ -164,7 +178,9 @@
const b = imageData[i+2].toString(16).padStart(2, '0');
hexStrings.push(`#${r}${g}${b}`.toUpperCase());
}
- hexOutput.value = hexStrings.join(', ');
+ const hexData = hexStrings.join(', ');
+ hexOutput.value = hexData;
+ generateCCode(w, h, hexStrings);
};
img.src = event.target.result;
};
@@ -183,6 +199,51 @@
setTimeout(() => btn.innerText = originalText, 2000);
}
+ function generateCCode(w, h, hexArray) {
+ const cOutput = document.getElementById('cOutput');
+ const sanitizedHex = hexArray.map(h => '0xff' + h.substring(1)); // Add alpha FF for 32-bit colors
+
+ let cSource = `/**\n * RTECH OS*2 BOOT_IMAGE_SPEC\n * Generated: ${new Date().toISOString()}\n */\n\n`;
+ cSource += `#include \n\n`;
+ cSource += `#define BOOT_LOGO_WIDTH ${w}\n`;
+ cSource += `#define BOOT_LOGO_HEIGHT ${h}\n\n`;
+ cSource += `/* ARGB8888 Pixel Data */\n`;
+ cSource += `static const uint32_t boot_logo_data[] = {\n `;
+
+ for (let i = 0; i < sanitizedHex.length; i++) {
+ cSource += sanitizedHex[i] + (i === sanitizedHex.length - 1 ? "" : ", ");
+ if ((i + 1) % 6 === 0 && i !== sanitizedHex.length - 1) {
+ cSource += "\n ";
+ }
+ }
+
+ cSource += `\n};\n\n`;
+ cSource += `/**\n * Freestanding drawing routine for OS*2 Kernel initialization.\n * Centers the logo on screen.\n */\n`;
+ cSource += `void draw_boot_logo(uint32_t* fb, int screen_w, int screen_h) {\n`;
+ cSource += ` int start_x = (screen_w - BOOT_LOGO_WIDTH) / 2;\n`;
+ cSource += ` int start_y = (screen_h - BOOT_LOGO_HEIGHT) / 2;\n\n`;
+ cSource += ` for (int y = 0; y < BOOT_LOGO_HEIGHT; y++) {\n`;
+ cSource += ` for (int x = 0; x < BOOT_LOGO_WIDTH; x++) {\n`;
+ cSource += ` uint32_t color = boot_logo_data[y * BOOT_LOGO_WIDTH + x];\n`;
+ cSource += ` fb[(start_y + y) * screen_w + (start_x + x)] = color;\n`;
+ cSource += ` }\n }\n}\n`;
+
+ cOutput.value = cSource;
+ }
+
+ function copyCCode(btn) {
+ const cOutput = document.getElementById('cOutput');
+ cOutput.select();
+ try {
+ navigator.clipboard.writeText(cOutput.value);
+ } catch (err) {
+ document.execCommand('copy');
+ }
+ const originalText = btn.innerText;
+ btn.innerText = 'COPIED!';
+ setTimeout(() => btn.innerText = originalText, 2000);
+ }
+
/**
* HEX_TO_IMAGE_PROTOCOL
* Reconstructs an image from a stream of hex codes.