summaryrefslogtreecommitdiff
path: root/docs/DEVELOPER_GUIDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/DEVELOPER_GUIDE.md')
-rw-r--r--docs/DEVELOPER_GUIDE.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/DEVELOPER_GUIDE.md b/docs/DEVELOPER_GUIDE.md
index e6f53a9..eacea84 100644
--- a/docs/DEVELOPER_GUIDE.md
+++ b/docs/DEVELOPER_GUIDE.md
@@ -25,6 +25,8 @@ Everything runs in Docker through the `Makefile`; the host needs only Docker and
| Accept changed screens after reviewing build/screenshots/ | `make screenshots-approve` |
| Start-up time and memory budgets | `make perf`, `make memtest` |
| Signed package for the Store beta | `make package` |
+| Regenerate the crypto/OTP test vectors | `make vectors` |
+| Build the M1 settings spike | `make spike` (instructions: [SETTINGS_SPIKE.md](SETTINGS_SPIKE.md)) |
| Everything, in order | `make ci` |
| A shell in the container | `make shell` |
@@ -66,6 +68,14 @@ The simulator is a GTK program. The scripts start it on a virtual display (Xvfb
- `monkeydo` exits with 1 even when every unit test passed, so `tools/ciq_test_report.py` judges the console output instead.
- For a normal (non-test) run, `monkeydo` blocks while the app runs and streams the app's `System.println` output. Quotes in that output arrive escaped, which is why the diagnostics use plain `key=value` pairs.
+### Monkey C facts that matter here (verified with SDK 9.2.0)
+
+- `Long` is 64-bit and wraps on overflow; `>>` is an arithmetic shift, so logical shifts and rotations mask off the copied sign bits (see `source/crypto/Sha512.mc`).
+- Assigning a value above 255 to a ByteArray element throws; mask with `& 0xFF`.
+- Native HMAC supports only SHA-256; HMAC-SHA1 and HMAC-SHA512 go through `Hmac.generic`.
+- Function calls are expensive in the VM; hot loops inline small helpers (SHA-512 went 37 % faster that way).
+- The simulator doesn't enforce the watchdog in test runs. Anything long runs as a `Jobs.Job` with a bounded step.
+
### Screenshots
`tools/sim_screenshot.py` doesn't assume where the watch is drawn in the simulator window. It searches for the device drawing (named in the device's `simulator.json`) in the window capture, comparing only the bezel, because the app draws inside the display area. The match is near-exact (mean difference below 0.3 out of 255); the drawing sits at offset (1, 26) because of the window border and the menu bar. The display rectangle from `simulator.json` is then cut out, round screens get their corners blacked out, and the result is compared with `test/golden/<device>.png`.