How-to: tooling & the 12-hour clock¶
The tooling in tooling/ (originally packaged as al80_12hr_clock.zip) keeps the LCD showing a
12-hour clock by re-syncing the time every ~60 s. The hack itself is on
Time & Date sync → 12-hour clock hack.
🔧 What's in tooling/¶
al80_clock.js— Node (node-hid). Loop or--once, file logging, Windows toast after 3 consecutive failures, crash handlers.al80_clock.py— Python (hidapi). Same features.al80_clock.bat— visible launcher (console + pause).al80_clock_hidden.bat+run_hidden.vbs— silent background launcher.browser_console_snippet.js— no-install: paste into the yunzii-game.com console.- Auto-start: shortcut to the hidden
.batinshell:startup, or Task Scheduler at logon with restart-on-failure.
🕐 Core recipe (language-agnostic)¶
h = (hour24 % 12) or 12
cksum = (0x41 + 0x03 + h + minute + second) & 0xFF
write pad([0x40,0,0,0x07,0xF6,0x02,0,0xA5,0x5A,0x09,0,0x03,0xC3,0xE1]) // announce
write pad([0x41,0,0,0x03,cksum,0,0,h,minute,second]) // data
write pad([0x42,0,0,0x38,0x7A]) // finish
// pad() = prepend 0x00 report id (OS libs), then zero-fill to 64 data bytes
⚠️ Gotchas¶
- Only one opener of the
0xFF60interface at a time: close the yunzii-game.com tab (and VIA) before running the script, or they fight. - If the device is not found, hidapi/node-hid may not report
usagePage; match by interface number instead (enumerate and inspect). - The keyboard free-runs its own clock and drifts, which is why the re-sync loop exists.
📖 RE notes for future capture sessions (yunzii-game.com)¶
- The web app holds its own device handle (re-acquired via
getDevices()/request after any reconnect). Patchingwindow.__lcd.sendReportorHIDDevice.prototype.sendReportdoes not intercept the app's sends (it captured a bound reference first). Read the app's ownwindow.__hidCapturesbuffer instead. - Console state:
targetDevice HIDDevice= device (re)selected;sendCount 1= a send fired;No HID device selected= the app lost its handle (needs reconnect). javascript_toolon the site: async/Promise-returning top-level expressions return{}but side-effects still run — do async work → stash towindow→ read back with a separate synchronous call.- A security-filter false positive (
[BLOCKED: Cookie/query string data]) fires when returning long hex/token-like strings. Emit only short scalar fields or structural booleans.