Both ops finished with OP_DONE and produced nothing. se_rng_pseudo()
left its buffer as it was, so Nyx's partition manager wrote whatever
was on the stack into GPT partition GUIDs, and the SD benchmark drew
its random offsets from uninitialised memory. se_rsa_exp_mod() read
back zeros.
- RSA, as Lockpick's bdk drives it: two keyslots of up to 2048 bits
loaded through SE_RSA_KEYTABLE_ADDR/DATA, KEY_SIZE in 512-bit steps,
EXP_SIZE in words, the input a little-endian number over DMA and the
result in SE_RSA_OUTPUT (or memory). Montgomery multiplication on
32-bit words; an even modulus fails the op.
- RNG into memory or a keyslot quad, LAST_BLOCK + 1 blocks cut to the
buffer. The bytes come from SplitMix64 with a fixed seed, reset with
the SE, so runs stay reproducible.
tests/se/ is a new make test payload: RSA-2048 and RSA-1024 in the two
slots, each m^d and s^e checked against Python (gen_vectors.py writes
vectors.h), SHA-256 one-shot and in two parts, AES-128 ECB, and the
RNG filling a zeroed buffer, changing between calls and stopping at
the size asked for. Run against the previous binary it fails the RSA
and RNG checks. The README's "RSA, RNG and chunked SHA are stubs" is
gone; chunked SHA was already modelled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYewwDPujjo5B2xRyC5Grb
- DC: a window's fetch starts at ADDR_V_OFFSET * LINE_STRIDE +
ADDR_H_OFFSET (TRM 24.11.1). That is the window's top-left pixel, or
top-right with H_DIRECTION, or bottom-left with V_DIRECTION, and the
fetch walks away from it; before, the offsets were ignored and flips
mirrored within the window. HOS's column-scan offset (0x13FF) and
hekate's inverted-pitch offset (1279) both land where they should.
Layer order is documented: the TRM sorts windows by depth without
saying which way.
- VIC: slot and output surfaces may be block linear (BlkKind 1, 2^BlkHeight
GOBs per block) as well as pitch.
- GOB addressing moves to t210/block_linear.h, shared by the scan-out
and VIC.
- tests/display: one bare-metal payload built per scenario (a pitch
window, Nyx's VIC turn into pitch and into block-linear surfaces, a
block-linear VIC source, the DC's own column scan with an address
offset, a mirrored window with window D blended over). check.py
compares every pixel of the frame the emulator shows with the picture
drawn. It runs in make test and in CI.
hwtest's frame is unchanged, and Nyx's differs only in its clock.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYewwDPujjo5B2xRyC5Grb
- tests/ccplex: a self-contained BPMP payload (ARM, arm-none-eabi-gcc; the
AArch64 side is pre-assembled words) that drives CPU0 through bdk's
ccplex_boot_cpu0() register sequence. It checks that an unpowered
release is refused with its reason, that a powered one runs at EL3 from
the SB vector and writes the mailbox, that CPU0 sees TIMERUS move, that
WFE parks the core, and that RST_CPUG_CMPLX_SET stops it. `make test`.
- tests/hwtest: build hwtest-rcm from a pinned commit with distro
toolchains (an empty base_rules stands in for devkitARM, the CPU0 stub
builds with gcc-aarch64-linux-gnu) and run its whole sweep headless,
checking the CPU0-driven Wi-Fi probe enumerates the CYW4356.
- CI runs both in the Linux job and keeps their logs on failure.
- Makefile: `test` target; the clean rule's line continuation was a
literal "\n" that only worked by accident.
- README/DESIGN: CCPLEX CPU0, the uc_mmio_map bus, the block-level clock
and TIMERUS poll pacing, the new bug-history entries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYewwDPujjo5B2xRyC5Grb
Two things, both about being able to check the emulator's work rather than
infer it.
Sound. The samples a payload pushes through the ADMAIF PIO port were being
discarded; now they are written to last_audio.wav and played on the host.
Each FIFO word is already a stereo frame, so the capture needs only a header.
The take is played after it is complete rather than streamed while it is
produced: the emulator generates samples in bursts and stalls entirely
between phrases while the payload talks to the codec over I2C, so a live
stream underruns wherever the producer falls behind the sound card, heard as
flicker. Queueing the finished buffer removes the producer from the timing
path. The rate comes from the I2S_TIMING the payload programmed, not a
nominal 48 kHz, or the melody replays at the wrong pitch.
Windows. Cross-compiled in a container, since neither dependency has a MinGW
package. Three things had to be fixed to get there, none of them findable
without actually trying it:
- mingw GCC 13 hits an internal compiler error on unicorn's
qemu/softmmu/memory.c at -O2, so unicorn is built at -O1.
- pread/pwrite are POSIX and absent on MinGW. The SD/eMMC image access now
has a seek-then-read shim, which is equivalent here because the emulated
storage is only touched from the CPU thread.
- SDL renames main on Windows, so SDL2main must be linked before SDL2 with
SDL_MAIN_HANDLED, and unicorn's threads need winpthread.
The .exe is static: one file, no DLLs beside it. Verified running natively -
it emulates a full hwtest sweep and plays the melody through WASAPI.
CI covers both platforms, and a third job runs the .exe on a Windows runner,
because a cross-build only proves it links. Builds on push and PR, not just
tags: the Windows build broke in three separate ways the first time it was
attempted, and a Linux-only workflow would have shown none of them.