Commit Graph
5 Commits
Author SHA1 Message Date
MoHadiShibli 4331ec79fd Cleanup: drop the diagnostic spike, one version source, public tests
The staged spike that worked out the VDA call order is no longer part of the
build. It is kept at tag spike-final.

- src/main.c is the service only: instance lock, credentials, MBus and pad
  init, then the web service. src/server.c and include/c4f_server.h are gone
  with stage 8, and so are the stage-only helpers in src/vda.c: the MBus bind
  and holds, the assignment and button-map probes, and the GoldHEN klog stream
  path. The service reads /dev/klog, which is what works.
- VERSION holds the only version number. Both Makefiles pass it in, the
  packager reads it for param.sfo and the package name, and the build and
  deploy scripts read it for the file they look for.
- The payload's log is /data/control4free/control4free.log, not spike.log.
- The page drops the protocol 1 branches: the payload has always answered 2.
  A console slot is a "controller" and a pad plugged into the phone or PC is a
  "gamepad", so the two no longer read as the same word.
- The host tests move to tests/, with tests/run.py to run all four suites. They
  build the real sources with the PS4 calls stubbed, so they need no console.
  klog_test now covers the device path only, and asserts that nothing ever
  connects to GoldHEN's klog server.
2026-10-05 01:53:11 +03:00
MoHadiShibli f008db6e16 0.2.2: read /dev/klog directly for sign-in again
On the console, 0.2.1 often could not add a controller ("Cannot read
controller sign-in events"). Its log shows why: once Control4Free let go
of GoldHEN's klog stream, every new connection read nothing for 4-5
minutes. GoldHEN's klog server serves one client at a time and is slow to
notice that one has left.

The browser service now opens /dev/klog itself, only while a controller
waits for sign-in, and releases it afterwards, so GoldHEN's klog server
works the rest of the time. It never uses GoldHEN's stream; only the
diagnostic stages still fall back to it.

Version 0.2.2 (APP_VER 00.22).
2026-10-05 00:03:34 +03:00
MoHadiShibli 5611a55075 0.2.1: survive rest mode, share GoldHEN's klog, timestamped logs
- The service checks its listener every second and notices long pauses
  such as rest mode. It then drops stale connections, keeps controllers
  neutral, and rebuilds the listener. Confirmed on the console: Control4Free
  survives rest mode.
- A lock in /data/control4free stops a second copy before it touches the
  host process's credentials or the log.
- Browser mode reads klog through GoldHEN's klog server first, after a
  marker check, and falls back to /dev/klog. It holds a reader only while
  controllers wait for sign-in, so GoldHEN's own klog keeps working.
- Log lines carry elapsed time, the previous run is kept as
  spike.log.previous, and a heartbeat is logged every minute.
- Version 0.2.1 (APP_VER 00.21).
2026-10-04 22:59:59 +03:00
MoHadiShibli 0fe839ad2e Launcher: set up GoldHEN auto-start itself; reach Control4Free from the app
- The first Cross copies the bundled payload to /data/payloads and adds it
  to GoldHEN's AutoRun list, then starts it if PayLoader is on. Triangle
  turns auto-start on or off, or updates an older copy. The app leaves its
  sandbox for this through GoldHEN's SDK call and returns right after.
- The app tries 127.0.0.1 and then the console's own address, for both
  Control4Free and PayLoader, and shows why neither answered.
- The launcher API no longer requires a loopback source address, since
  the app's sandbox may not appear as 127.0.0.1. The custom header and
  the Origin check still keep websites out.
- The screen and messages no longer assume a phone.
2026-10-04 21:12:51 +03:00
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