Files
MoHadiShibli b3863fa5f1 Launcher app: home-screen PKG to start, check and stop Control4Free
An OpenOrbis app that sends the bundled payload to GoldHEN's PayLoader,
shows its address and a QR code, and stops it through the loopback API.
It draws its screen in software in the controller page's style
(stb_truetype with Roboto), and its icon with the same code.

The package (title ID CFRE00001) carries OpenOrbis's stub libc.prx and
libSceFios2.prx in sce_module/, as the toolchain asks.

The README covers GoldHEN AutoRun, the launcher, the page and the build.
2026-10-04 19:53:45 +03:00

16 lines
709 B
Python

"""Embed binary files in a C source: embed_file.py out.c symbol=path [symbol=path ...]"""
import sys
from pathlib import Path
out, pairs = Path(sys.argv[1]), [arg.split('=', 1) for arg in sys.argv[2:]]
lines = ['/* Generated by tools/embed_file.py; do not edit. */', '#include <stddef.h>']
for symbol, path in pairs:
data = Path(path).read_bytes()
lines.append(f'/* {Path(path).name} */')
lines.append(f'__attribute__((aligned(4))) const unsigned char {symbol}[] = {{')
for i in range(0, len(data), 24):
lines.append(''.join(f'{b},' for b in data[i:i + 24]))
lines.append('};')
lines.append(f'const size_t {symbol}Size = {len(data)};')
out.write_text('\n'.join(lines) + '\n')