How-to: tooling & the 12-hour clock¶
Use this page to keep a 12-hour clock on the LCD with the scripts in tooling/.
The tooling in tooling/ (originally packaged as al80_12hr_clock.zip) re-syncs the time every
~60 s to keep the 12-hour clock on the LCD. 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, a Windows toast after 3 failures in a row, and crash handlers.al80_clock.py: Python (hidapi), with the 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 it into the yunzii-game.com console.- (Optional) To start the clock automatically, put a shortcut to the hidden
.batinshell:startup, or use 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
⚠️ Troubleshooting¶
- Only one opener of the
0xFF60interface is possible at a time. Before you run the script, close the yunzii-game.com tab (and VIA). If you do not, they fight. - If the script doesn't find the device, hidapi/node-hid may not report
usagePage. In that case, match by interface number (enumerate and inspect). - The keyboard runs its own clock, and that clock drifts. That's why the re-sync loop exists.
📖 Background: reverse-engineering (RE) notes for future capture sessions (yunzii-game.com)¶
- The web app holds its own device handle. After any reconnect, it gets the handle again
through
getDevices()/request. A patch towindow.__lcd.sendReportorHIDDevice.prototype.sendReportdoes not intercept the app's sends. (The app 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 (it needs a reconnect). javascript_toolon the site: async/Promise-returning top-level expressions return{}, but their side-effects still run. To get a result back:- Do the async work.
- Store the result on
window. - Read the result with a separate synchronous call.
- A security-filter false positive (
[BLOCKED: Cookie/query string data]) fires when a call returns long hex/token-like strings. Return only short scalar fields or structural booleans.