Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
3b23c5a
Add machine code monitor step/breakpoint debugger
chrisgleissner Jul 30, 2026
e1dcbec
Report visible-ROM breakpoint entry misses instead of hanging
chrisgleissner Jul 31, 2026
a1a5180
Add boundary-traversal rows to the debugger matrix
chrisgleissner Jul 31, 2026
81329a7
Fix breakpoint leak and cursor assumption in the debug e2e suite
chrisgleissner Jul 31, 2026
ab5c7ad
Cover breakpoint slot exhaustion in the debug e2e suite
chrisgleissner Jul 31, 2026
774a8bb
Clear e2e breakpoints through the popup, not the row marker
chrisgleissner Jul 31, 2026
a886212
Merge branch 'test-merge' into feature/machine-code-monitor-debug
chrisgleissner Jul 31, 2026
ab238ad
Merge remote-tracking branch 'origin/test-merge' into feature/machine…
chrisgleissner Jul 31, 2026
1b045ac
Merge remote-tracking branch 'origin/feature/machine-code-monitor-deb…
chrisgleissner Jul 31, 2026
4603f0d
Merge test-merge
chrisgleissner Aug 4, 2026
b4b57a5
Stabilize monitor E2E gate
chrisgleissner Aug 4, 2026
171e0d8
Fix visible-ROM breakpoint entry: stop chaining IRQs to $0000
chrisgleissner Aug 5, 2026
9fb2f9f
Fix monitor E2E harness: Telnet width, status form, breakpoint leak
chrisgleissner Aug 5, 2026
8d7ae9d
Fix UI teardown faults and make the debugger E2E matrix gate green
chrisgleissner Aug 8, 2026
a53bb8c
Delete doc/machine-code-monitor-rom-fetch-coherency.md
chrisgleissner Aug 8, 2026
925aed7
Step Out from untraced frames, and pre-merge cleanup
chrisgleissner Aug 8, 2026
b6e6f68
Step Out keeps a traced frame that is still on the stack
chrisgleissner Aug 8, 2026
c78ddb1
Merge test-merge (FPGA V1.4E-123, PDsid fix)
chrisgleissner Aug 10, 2026
554b962
Merge test-merge (readmem OOM fix, U2 drops MCM)
chrisgleissner Aug 10, 2026
a103dbd
MCM: instant CPU banking on U2, menu-button escape, ROM safety net
chrisgleissner Aug 10, 2026
95c5a8a
Merge test-merge
chrisgleissner Aug 19, 2026
7b285de
Handle U2 monitor G tests
chrisgleissner Aug 19, 2026
f0c616b
Handle U2 terminal limits
chrisgleissner Aug 19, 2026
b2cf265
Merge remote-tracking branch 'upstream/test-merge' into feature/machi…
chrisgleissner Aug 19, 2026
7802f28
Preserve debugger interfaces
chrisgleissner Aug 19, 2026
bbde5e3
Fix monitor CI reporting
chrisgleissner Aug 19, 2026
5a0f4ab
Reconcile debugger with test-merge
chrisgleissner Aug 19, 2026
61eb6f9
Remove duplicate reset capability
chrisgleissner Aug 19, 2026
c1accbf
Fix monitor target regressions
chrisgleissner Aug 19, 2026
de4734c
Fix U2 debugger launch
chrisgleissner Aug 19, 2026
3b87824
Wait for U2 monitor redraws
chrisgleissner Aug 19, 2026
4e7aedb
Use Ctrl-R for reset and shorten comments
chrisgleissner Aug 19, 2026
9dd32e8
Adjust breakpoint shortcuts to use P instead of R
chrisgleissner Aug 20, 2026
d8a8e29
Fix Debug suite target detection and popup-open settle
chrisgleissner Aug 20, 2026
ae70d4b
Restore monitor rows lost in the merge and block clipboard IO
chrisgleissner Aug 20, 2026
3432adb
Perform the reset C=+R asks for, and configure a cartridge host
chrisgleissner Aug 20, 2026
f7cd81b
Merge remote-tracking branch 'upstream/test-merge' into feature/machi…
chrisgleissner Aug 20, 2026
71a6be8
Show the bookmark note when it is drawn, and pace the cartridge
chrisgleissner Aug 21, 2026
7783320
Reboot the cartridge host after changing its preference
chrisgleissner Aug 21, 2026
dd535e9
Save a ROM patch byte from the ROM, not the banked-out aperture
chrisgleissner Aug 21, 2026
08c6989
Take a ROM patch original from the ROM image, not the aperture
chrisgleissner Aug 21, 2026
f33c591
Deliver the contextless Go launch's NMI on U2 unconditionally
chrisgleissner Aug 22, 2026
acc217c
Reboot the split-session computer on every cartridge-preference check
chrisgleissner Aug 22, 2026
96b85b3
Fix the breakpoint popup shortcut and tolerate an empty table
chrisgleissner Aug 22, 2026
b80f4d9
Harden the debugger matrix's split-session driver and add cell selection
chrisgleissner Aug 22, 2026
8d4cdcd
Add the debugger regression gate as the fast pre-merge suite
chrisgleissner Aug 22, 2026
370f284
Draw the debug register row inside a critical section
chrisgleissner Aug 23, 2026
8dd331c
Verify the patch restore write and rewrite it when it is lost
chrisgleissner Aug 23, 2026
ab8babf
Record footer evidence on a mismatch and cover the reproducing repeti…
chrisgleissner Aug 23, 2026
da7877d
Re-record the observability golden fixture
chrisgleissner Aug 23, 2026
89a9a48
Repaint the breakpoint popup box instead of the whole screen
chrisgleissner Aug 24, 2026
24fe8da
Give concurrent matrix runs distinct VICE oracle ports
chrisgleissner Aug 24, 2026
db47ec5
Merge remote-tracking branch 'upstream/test-merge' into fix/pr705-mer…
chrisgleissner Aug 27, 2026
ab2e690
Merge upstream/test-merge, resolving the monitor conflicts
chrisgleissner Aug 29, 2026
4396629
Enter Debug before the no-context Step Over
chrisgleissner Aug 29, 2026
cd6b2a6
Read the banking hygiene row after a redraw, not before one
chrisgleissner Aug 29, 2026
69c8ba9
Put the monitor's view bank back in the banking hygiene restore
chrisgleissner Aug 29, 2026
f0b08dd
Read the cartridge's monitor the way it actually draws
chrisgleissner Aug 29, 2026
5533902
Say what a G that did not run left behind
chrisgleissner Aug 30, 2026
f0c9dd9
Hand the machine back on a Go whoever stopped it
chrisgleissner Aug 30, 2026
7c48cc5
Hand a cartridge's machine back when a Go takes it over
chrisgleissner Aug 30, 2026
8d35a3f
Release the machine on a Go only where this interface owns it
chrisgleissner Aug 30, 2026
3228d8b
Serve screen RAM from the freeze copy in the frozen block path
chrisgleissner Sep 1, 2026
ee7ca85
Stop a debug session writing over RAM at $0800
chrisgleissner Sep 1, 2026
81b4ec3
Take one visible-ROM step route on every transport, and reinstall the…
chrisgleissner Sep 1, 2026
cc6b3c6
Hand the machine back when a cartridge monitor closes after a Go
chrisgleissner Sep 1, 2026
b425ead
Clear poll mode on Debug entry and keep the breakpoint list off the c…
chrisgleissner Sep 1, 2026
a1c1519
Build the NMI cpu-port capture only where the monitor is built
chrisgleissner Sep 1, 2026
3c86723
Cover the debugger defects this branch fixes
chrisgleissner Sep 1, 2026
4938031
Pace a repeated key on a cartridge target
chrisgleissner Sep 1, 2026
2cf00ae
Check low RAM after a debug session, and say what a launch timeout left
chrisgleissner Sep 1, 2026
ae8d9e6
Correct the monitor documentation against the code
chrisgleissner Sep 1, 2026
9eac22e
Skip the matrix cells a cartridge cannot run, and claim a VICE port slot
chrisgleissner Sep 1, 2026
052022d
Keep the oracle in step with the device, and stop keying a screen we …
chrisgleissner Sep 1, 2026
2539ff1
Merge test-merge into machine code monitor debugger
chrisgleissner Sep 3, 2026
bf4f4d1
Trim monitor manual to test-merge plus verified debug content
chrisgleissner Sep 3, 2026
f26de2f
Merge remote-tracking branch 'upstream/test-merge' into pr705-head
chrisgleissner Sep 4, 2026
91874dd
Apply ruff autofixes to monitor tests
chrisgleissner Sep 4, 2026
8d8c4b0
Meet the tests lint and registry gates from test-merge
chrisgleissner Sep 4, 2026
cfd2788
Merge test-merge into the monitor debugger
chrisgleissner Sep 6, 2026
379fc02
Bring the firmware-fix table up to date with the merge and the bench
chrisgleissner Sep 7, 2026
e50aa40
Confirm what each keystroke did before the monitor suite acts on it
chrisgleissner Sep 7, 2026
bd2d280
Tell a lost keystroke or byte from the defect a debugger check is for
chrisgleissner Sep 7, 2026
ebcae24
Retry an iteration's whole fixture when its launch does not arrive
chrisgleissner Sep 7, 2026
ed4bf0b
Merge test-merge into machine code monitor debugger
chrisgleissner Sep 8, 2026
d48349c
Re-export Snapshot and write_rest_memory_confirmed from the monitor c…
chrisgleissner Sep 8, 2026
cad0126
fix(u2): scan the cartridge keyboard from a timer, not the UI task
chrisgleissner Sep 9, 2026
39105de
test(mcm): widen the split-session step re-send budget
chrisgleissner Sep 9, 2026
91afef3
fix(mcm): trap the KERNAL-out entry breakpoint on the U2
chrisgleissner Sep 9, 2026
7f30fd8
fix(u2): defer the keyboard scan during the DMA banking window
chrisgleissner Sep 9, 2026
927f088
test(mcm): retry the entry-footer BASIC launch
chrisgleissner Sep 9, 2026
ade66d3
fix(mcm): re-issue a missed KERNAL-out launch instead of writing the …
chrisgleissner Sep 9, 2026
beae684
fix(mcm-test): settle the overlay menu redraw before reading it
chrisgleissner Sep 12, 2026
ef8a6c6
fix(mcm-test): back out a popup before C=+D when leaving a stale debu…
chrisgleissner Sep 12, 2026
75d55a6
Merge upstream/master into feature/machine-code-monitor-debug
chrisgleissner Sep 12, 2026
8ad8b85
Merge upstream/master into feature/machine-code-monitor-debug
chrisgleissner Sep 14, 2026
3fdfeb6
Merge upstream master into feature/machine-code-monitor-debug
chrisgleissner Sep 15, 2026
7991029
Merge remote-tracking branch 'upstream/master' into feature/machine-c…
chrisgleissner Sep 16, 2026
6198e7c
Simplify Debug help screen documentation
chrisgleissner Sep 27, 2026
893877c
Merge upstream/master into feature/machine-code-monitor-debug
chrisgleissner Sep 28, 2026
31d27b3
Merge upstream/master into feature/machine-code-monitor-debug
chrisgleissner Oct 1, 2026
42b0d7a
Rewrite the monitor Debug section for machine code developers
chrisgleissner Oct 1, 2026
230d2f3
Merge remote-tracking branch 'upstream/master' into feature/machine-c…
chrisgleissner Oct 2, 2026
d874a24
Merge upstream/master into feature/machine-code-monitor-debug
chrisgleissner Oct 15, 2026
bcca3e1
Monitor harness test: use the manual phrase the Debug section now req…
chrisgleissner Oct 15, 2026
2cc4d95
ui_backend: leave a cartridge host that already prefers External alone
chrisgleissner Oct 16, 2026
71b0ade
Fix observability golden report after cartridge preflight change
chrisgleissner Oct 16, 2026
ba2e3ea
Merge branch 'GideonZ:master' into feature/machine-code-monitor-debug
chrisgleissner Oct 23, 2026
4d6fcc1
Merge upstream master
chrisgleissner Nov 10, 2026
8502e8f
Merge upstream master
chrisgleissner Nov 11, 2026
9cf7d8b
Merge branch 'master' into feature/machine-code-monitor-debug
chrisgleissner Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,7 @@ tools/64tass/.build-lock
python/grab*
fpga/cpu_unit/rvlite/vhdl_source/bootrom_pkg_u2.vhd
fpga/cpu_unit/rvlite/vhdl_source/bootrom_pkg_u2_loader.vhd

# Python bytecode cache
__pycache__/
.gstack/
566 changes: 479 additions & 87 deletions doc/machine_code_monitor.md

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ class Suite:
on-device UI through Telnet as well as REST/Freeze/Overlay, or only works
one way, is a per-suite call documented next to its entry below.

@DEVICE@ and @COMPUTER@ are for a suite whose own CLI does not accept the
composite `device@computer` token @HOST@ carries and instead wants the two
machines as separate flags. @DEVICE@ is always the bare device host;
@COMPUTER@ is the bare computer host on a split target and an empty string
otherwise, so a flag templated as `--c64-host @COMPUTER@` can be included
unconditionally and still read as "not split" to the suite it configures.

`manual` marks a suite that needs an operator decision, extra privileges, a
long wall-clock wait, or a device setting it changes, so it runs only from
the deep profile up, or when named with -s.
Expand Down Expand Up @@ -205,6 +212,11 @@ SUITES: Sequence[Suite] = (
# told apart by watching a real device, which never produces them on
# demand. Scripted bursts can.
Suite("e2e", "telnet-drain", "tests/e2e/lib/telnet_drain_test.py", "", profile=profiles.QUICK),
# The debugger matrix has a substantial host-side contract as well as its
# device scenarios. Keep those deterministic checks before the hardware
# suites, so a bad vector or stale fixture names itself immediately.
Suite("e2e", "machine-code-monitor-harness",
"tests/e2e/monitor/monitor_harness_test.py", ""),
# Also needs no device: the two pages the device serves decide their theme
# in the browser, and both read sessionStorage above the code that installs
# their handlers, so a browser set to block site data cost the whole page.
Expand Down Expand Up @@ -424,6 +436,43 @@ SUITES: Sequence[Suite] = (
# under --mode telnet.
Suite("e2e", "machine-code-monitor", "tests/e2e/monitor/monitor_test.py",
"--host @HOST@ --password @PASS@ --timeout @TIMEOUT@ --mode @MODE@", profile=profiles.DEEP),
Suite("e2e", "machine-code-monitor-debug",
"tests/e2e/monitor/monitor_debug_test.py",
"--host @HOST@ --password @PASS@ --timeout @TIMEOUT@ --mode telnet",
# Manual because of what it costs, not because of what it finds: 95
# checks and about 40 minutes on an Ultimate 64, most of it spent
# running programs on the 6510 and waiting for them to stop.
manual=True),
# The debugger gate. It runs the places the firmware genuinely takes a
# different code path per UI transport, so one lane's result says nothing
# about another, plus the intersections that have actually failed before. It drives them through the two suites above
# rather than owning any test logic of its own. tests/e2e/doc/machine-code-monitor-regression.md records
# which lanes those are and the evidence for each; `--list-plan` prints the
# same thing without touching a device.
#
# Manual for the same reason machine-code-monitor-debug is: about an hour
# on an Ultimate 64. It is the suite to name before a merge, and it takes
# the two hosts as separate flags for the reason described on the matrix
# entry below.
Suite("e2e", "machine-code-monitor-regression",
"tests/e2e/monitor/monitor_debug_regression_test.py",
"--host @DEVICE@ --rest-host @DEVICE@ --c64-host @COMPUTER@ "
"--password @PASS@ --timeout @TIMEOUT@", manual=True),
# The exhaustive debugger matrix repeats every memory/UI lane and writes a
# diagnostic ledger. It is deliberately opt-in rather than a release-gate
# default, but it still shares the runner's host/password conventions.
#
# Unlike its sibling monitor suites, this script does not parse a
# composite `device@computer` token out of --host: it takes the two
# machines as separate flags, so @DEVICE@/@COMPUTER@ carry them rather
# than @HOST@. --timeout matters here beyond the per-request budget: its
# default (5s) is also the preflight's telnet-quiet-window timeout, too
# short for the 1.7KB screen a Step Out redraw sends, which made the
# preflight fail before any matrix cell ran.
Suite("e2e", "machine-code-monitor-matrix",
"tests/e2e/monitor/monitor_debug_matrix_test.py",
"--host @DEVICE@ --rest-host @DEVICE@ --c64-host @COMPUTER@ "
"--password @PASS@ --timeout @TIMEOUT@", manual=True),
# Reproduces #783: service settings used to start listeners live but could
# not stop them again until reboot. Ident is the smallest protocol probe.
Suite("e2e", "ident-service-switch", "tests/e2e/network/ident_service_switch_test.py",
Expand Down Expand Up @@ -770,6 +819,8 @@ def ui_state_ready(options: Options, label: str) -> str:

def build_command(suite: Suite, options: Options, mode: str) -> list[str]:
command = [sys.executable, os.path.join(ROOT, suite.path)]
target = targets_lib.resolve(options.host)
computer = target.computer if target.split else ""
for token in suite.args.split():
if token == "@PASS@":
command.append(options.password)
Expand All @@ -779,6 +830,8 @@ def build_command(suite: Suite, options: Options, mode: str) -> list[str]:
command += ["--command-interface"] if options.command_interface else []
continue
token = token.replace("@HOST@", options.host)
token = token.replace("@DEVICE@", target.device)
token = token.replace("@COMPUTER@", computer)
token = token.replace("@TIMEOUT@", options.timeout)
token = token.replace("@MODE@", mode)
token = token.replace("@SOAKPROFILE@", options.soak_profile)
Expand Down
11 changes: 4 additions & 7 deletions software/api/route_input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,10 @@ static const TickType_t REST_KEYBOARD_TAP_SETUP_TICKS = 0;
static const TickType_t REST_KEYBOARD_TAP_HOLD_TICKS = (pdMS_TO_TICKS(60) > 0) ? pdMS_TO_TICKS(60) : 1;
static const TickType_t REST_KEYBOARD_TAP_RELEASE_TICKS = 0;
static const TickType_t REST_KEYBOARD_TAP_GAP_TICKS = (pdMS_TO_TICKS(40) > 0) ? pdMS_TO_TICKS(40) : 1;
// How long a queued tap holds its keys down, in ticks of the 20ms REST input
// timer (keyboard_usb.cc REST_INPUT_TIMER_TICKS). The C64 KERNAL scans the
// keyboard once per video frame, so two ticks put the key in front of at least
// two scans, and the one-tick gap that follows (REST_TAP_GAP_TICKS) puts the
// release in front of at least one. Together they set the rate at which
// batched keys cross the matrix: 3+2 ticks measured 100ms a key, 2+1 measured
// 60.7ms a key with nothing lost. See tests/e2e/doc/key-injection-rate.md.
// Ticks (20ms REST input timer) a queued tap holds a key down before the
// REST_TAP_GAP_TICKS release gap: 2+1 puts the key/release in front of at
// least two/one KERNAL keyboard scans with nothing lost at 60.7ms/key. See
// tests/e2e/doc/key-injection-rate.md.
static const uint8_t REST_KEYBOARD_TAP_HOLD_QUEUE_TICKS = 2;
static const int ROUTE_INPUT_MENU_MAX_PENDING_REPEAT_KEYS = 2;
static const TickType_t ROUTE_INPUT_MENU_REPEAT_TIMER_TICKS = (pdMS_TO_TICKS(20) > 0) ? pdMS_TO_TICKS(20) : 1;
Expand Down
Loading
Loading