Commit Graph
85 Commits
Author SHA1 Message Date
Yaya48andClaude Opus 5.5 d486779f50 Starlet: re-sample the ARM IRQ and FIQ lines on interrupt register writes
The core's IRQ and FIQ lines were set from WiiIPC's flags and masks only at
the start of each scheduler slice (Starlet::RunSlice, StarletBootstrapProbe).
Acknowledging an interrupt (HW_ARMIRQFLAG, write one to clear) or masking it
(HW_ARMIRQMASK) left the line asserted until the next slice, so code that
acknowledged an interrupt and unmasked IRQ within the same slice took it
again with no cause pending. Hollywood's interrupt output is level-sensitive.

StarletMemory now re-samples the lines of the core attached with
AttachInterruptLines on every write to those two registers, on both its
wide and byte-assembled write paths; Starlet and StarletBootstrapProbe
attach theirs. Raising a cause still reaches the core at the next slice, as
before. ARMCore exposes IsIRQLineAsserted and IsFIQLineAsserted for the
unit test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 02:19:55 +02:00
Yaya48andClaude Opus 5.5 bef2c8cf02 StarletBootstrapProbe: print the SBR1 ring with --sbr1-record
The probe printed the ring's length only. StarOS's EXP-003 images put
lines in the ring that REV_TRACE has no room for (the MEM2 monitor, the
measurements), so under Dolphin nothing showed them. After the record's
summary, --sbr1-record now prints the ring's text between "SBR1 RING
BEGIN" and "SBR1 RING END" on stderr, as StarOS's Broadway loader prints
it over the Gecko on the console: at most the ring's 4032 bytes, a byte
outside printable ASCII and newline, and the backslash, written \xHH.

The formatting is in ProbeRing.h, tested by StarletProbeRingTest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 17:50:01 +02:00
Yaya48andClaude Opus 5.5 b457eb18c3 StarletBootstrapProbe: --cycles
The probe ran every image for a fixed 512 slices of 4096 ARM cycles
(2097152). StarOS's EXP-003 images hash MEM2 and time series of
operations, which need more (StarOS experiments/proposals/mmu-console.md,
P-7 and P-8). --cycles <n> sets the budget: a decimal number of cycles,
a whole number of slices, from one slice to 2^30, given once; anything
else is a usage error (exit 2), never rounded. Without it the probe runs
2097152 cycles, as before, and the timeout messages name the budget.

The parser is in ProbeBudget.h, tested by StarletProbeBudgetTest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 17:34:06 +02:00
Yaya48andClaude Opus 5.5 6ede30f99e StarletBootstrapProbe: wait for StarOS's whole panic path
--expect-panic passed as soon as __panic_state was nonzero at the end of
a 4096-cycle slice. StarOS's handler stores the guard first, then the
code, then publishes the SBR1 record, so the run could stop with the path
half done. The probe now keeps running until the path is finished and
still is two slices later, and fails if the run budget ends first:
- __panic_state 1 and __panic_code 1;
- with --sbr1-record: STARLET_STATE 5 (Panic), FATAL_REASON 0 and
  EXI_OWNER 1 (handed back to the PPC);
- with --sbr1-absent: every word of the record area still zero.
The failure names the first unmet condition. The check is
StarOSPanicCheck.h, pure, with the SBR1 constants moved there, and
StarletProbePanicCheckTest covers each condition; each of 7 mutants of
the check fails a test. Runs that do not expect a panic are unchanged.

With StarOS's panic test image (eb930ee), interpreter and JIT: the
scenarios pass, two slices later than before. Three images derived from
it pass the previous probe and now fail: EXI kept by the Starlet
(--sbr1-record), __panic_code never stored, the record written although
absent (--sbr1-absent). (StarOS MMU-001 review of F1.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 00:20:23 +02:00
Yaya48andClaude Opus 5.5 15da28ad7b StarletBootstrapProbe: --sbr1-record and --sbr1-absent
StarOS's SBR1 boot record (MEM1 0x00200000) is created by its Broadway
loader before the image runs; the probe never had one, so the paths
that publish into it ran only on the console. --sbr1-record writes the
record as the loader and the ARM relay leave it (header, relay at its
last step, EXI channel 1 given to the Starlet, magic last); after the run
both options print the record's magic, state, reason, EXI owner, fault
code, ring length and dropped count, and how many of its 1024 words are
nonzero (0 is expected with --sbr1-absent). Without either option the
probe behaves as before.

With the StarOS M1 images (interpreter and JIT): idle publishes state 3
and hands EXI back (owner 1, ring 258 bytes, no Gecko emulated);
fatal-data state 4 reason 3; undefined-entry state 6, fault 1, ring
empty, as on the console (gates HW2-HW4).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 22:40:28 +02:00
Yaya48andClaude Opus 5.5 612cab7b30 StarletBootstrapProbe: report StarOS's panic words
StarOS's panic path (ADR-0014 R6) writes no trace line: it sets the guard
word __panic_state, stores __panic_code and halts. LoadBootstrapELF now
returns both symbols when an image has them (optional, but both or
neither, as words of the data segment), and the probe stops a run whose
guard is set: it prints the trace published so far and
"Starlet panic state <n> code <n>", and passes --expect-panic when the
state is 1. Images without these symbols (StarletOS) load and run as
before; a REV:PANIC trace line still satisfies --expect-panic.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 21:21:58 +02:00
Yaya48andClaude Opus 5.5 cdec826bb8 StarletBootstrapProbe: --mmu-faults
Enables the ARM926 MMU aborts of ARMCore (SetMMUFaultsEnabled) for the
run. Without the option the probe behaves as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 21:09:18 +02:00
Yaya48andClaude Opus 5.5 f9193539fb StarletBootstrapProbe: back MEM1 and MEM2 as on a retail Wii
The probe never initialised Dolphin's MEM1 and MEM2, so any Starlet
access there was an access to unmapped memory: StarOS reads its SBR1
record header at 0x00200000 on every boot, which raised two alerts
(Unknown Pointer, then Invalid range in CopyFromEmu) and read 0. The
probe now initialises both, zeroed, at their retail sizes (24 and
64 MiB), and shuts them down after the run. The read still returns 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 17:49:56 +02:00
Yaya48andClaude Opus 5.5 61ebfffa97 StarletBootstrapProbe: fail on a Dolphin alert instead of opening a dialog
With no handler registered, Dolphin shows an alert in a modal MessageBox
on Windows, and the probe waits until someone closes it. A run that hits
an alert then looks like a hang (StarOS EXP-001). The probe now writes the
alert to stderr and exits at once with status 3.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 17:35:58 +02:00
Yaya48 54f5a74bbf Track exact StarletOS bootstrap integration and checkpoint provenance
Recover 16 modified and 6 previously untracked integration files. All 22 source SHA-256s match the pre-publication StarletOS snapshot. Add handoff instructions, byte-preserving attributes and private backup exclusion. This commit publishes existing behavior; it does not claim a new full build or hardware qualification. The two preceding local commits and staged files were screened before publication.
2026-10-03 16:27:07 +02:00
Yaya48 a8dbbab62d IOS LLE: emulate SD CMD6 and document Wii conformance run 2026-09-23 14:31:21 +02:00
Yaya48 c230971f07 IOS LLE: checkpoint NAND conformance and diagnostic tooling
Preserve formatted NAND boot and Wii Remote pairing, add DMA/SRAM conformance tests and a Wii comparison probe. Keep P1 profiling tools and native update A/B evidence; reject the unhelpful targeted SRAM shortcut.
2026-09-23 13:30:17 +02:00
Yaya48 a77c156bc8 IOS: add Starlet LLE milestone through HBC
Boot original Wii firmware through boot0, boot1, boot2 and IOS on an emulated ARM Starlet. Model the required IPC, memory, SD, USB and Bluetooth hardware behavior, including IOS reload into IOS58, and add focused tests, launch utilities and architecture documentation.
2026-08-25 17:11:49 +02:00
Scott Mansell 73de7b8d3e Merge pull request #13502 from tygyh/Replace-lazy-implementation-Tools-find-includes-cycles
Tools/find-includes-cycles: Replace lazy implementation
2026-07-29 18:25:39 +12:00
Jordan Woyak 62a926a0f5 Merge pull request #13515 from tygyh/Remove-redundant-parentheses
Tools/symbolicate-ppc: Remove redundant parentheses
2025-05-17 18:01:17 -05:00
Joshua Vandaële d9d0082018 linter: Bump clang-format version to 19.1 2025-04-23 11:15:52 +02:00
Dr. Dystopia a327466771 Replace lazy implementation - Tools find-includes-cycles 2025-04-18 12:18:02 +02:00
Dr. Dystopia 473cb6c3bc Remove redundant parentheses - Tools 2025-04-15 08:08:07 +02:00
OatmealDome cbbffce79a MacUpdater: Switch to mac-codesign script for code signing 2024-08-01 22:06:51 -04:00
OatmealDome 4883889e23 Tools: Add script to codesign a macOS bundle or executable
With our current setup, we use the --deep option, which should be avoided.
This tool signs bundles in the "correct" way as recommended by Apple (each Mach-O individually, from the inside-out).
2024-08-01 14:56:56 -04:00
OatmealDome 4550fc3ab5 Tools: Remove check-includes.py
Include sorting has been enforced by clang-format and lint since ~2015.
2024-07-11 15:01:15 -04:00
OatmealDome 8bd2cb40e5 Tools: Remove CleanFiles.py
This tool doesn't seem to work properly anymore, even after fixing the path in main().
2024-07-11 15:01:10 -04:00
OatmealDome 3db641ab4c Tools: Remove buildbot-try.sh
try support was removed from the buildbot master in dolphin-emu/sadm@336d0e6064.
2024-07-11 15:01:05 -04:00
OatmealDome 22aed354f5 Tools: Remove gameini-ratings-from-wiki.sh
We haven't been storing ratings in GameINIs since #6569.
2024-07-11 14:49:29 -04:00
Frajo Haider 210347ae15 Tools: fix perf-disassemble.sh.
perf now passes the proper no-show-raw-insn option instead of no-show-raw.

Keep no-show-raw as a fallback for older kernels/perf-toolings.

See also: https://github.com/torvalds/linux/commit/c5baf9089246c1356705c9ba36d767ee8ce43dd2
2023-09-04 12:29:07 +03:00
shuffle2 2c1e2c88ca Update test-updater.py
🐬
2023-03-22 15:39:28 -07:00
Shawn Hoffman fdc1626308 test-updater.py: include space and unicode in paths to test 2023-03-22 11:08:58 -07:00
Shawn Hoffman 0a8725e4a9 updater: add test for update flow
currently windows-only
2023-03-11 12:58:33 -08:00
Scott Mansell e38c0a1bbd lint: replace egrep with grep -E
Starting with grep 3.8, egrep throws the following warning
   egrep: warning: egrep is obsolescent; using grep -E

Whch is annoying... so we will use grep -E
2023-02-02 17:23:40 +13:00
Pierre Bourdon c92de420ef lint: update to clang-format-13 2023-02-02 04:56:08 +01:00
OatmealDome a25c835d00 lint: Don't check for WSL2 host path on non-Linux OSes 2022-08-15 16:13:18 -04:00
Shawn Hoffman a93babb1b3 lint: use git.exe if the source resides on v9fs
speedup for running script under wsl2 when sources are mounted from host
2022-06-08 21:10:31 -07:00
dreamsyntax d99664a4cb add IDA save/load dolphin map scripts for 7.x 2021-10-09 12:59:14 -07:00
Léo Lam 815b590dfe Update clang-format to version 12
12 is the latest release and various editors (VS, VSCode and CLion)
ship with clang-format 12 by default.
2021-08-30 00:20:18 +02:00
Sepalani 2c4585a506 Tools: Dolphin symbol map ghidra scripts added 2021-03-02 13:54:52 +04:00
Shawn Hoffman 9399e8b2bc require clang-format 10.0 2021-01-28 09:56:31 -08:00
JosJuice 838abd6536 Add script for running unit tests on Android device
Maybe a little wonky, but I needed a way to run unit tests
on AArch64, and this was the best way of running unit tests
on Android that I could come up with.
2021-01-26 19:08:22 +01:00
Léo Lam 150c832532 Tools: Add a small Python tool to print FSTs 2020-01-25 17:54:58 +01:00
Léo Lam 4cc2d97294 Require clang-format 9 and reformat source code
This updates the lint script to require clang-format 9 and reformats
existing source code. Since VS2019 ships with clang-format 9 this
should make auto reformats less painful.

This also updates the clang-format configuration to set
BraceWrapping.AfterCaseLabel to true to ensure consistent brace
style; otherwise clang-format 9+ defaults to putting braces on
the same line as switch case labels.
2020-01-08 22:18:15 +01:00
Techjar a72f56f558 Update lint.sh to clang-format 7.0 2019-05-05 19:25:42 -04:00
spycrab f43c6d68f2 Tools/lint.sh: Look for specific versions of clang-format first 2019-03-09 15:08:22 +01:00
Steven M. Vascellaro f2b17312b0 Use HTTPS urls when updating from GameTDB 2018-12-04 15:16:18 -05:00
booto 712f44edd9 lint: remove superfluous logging
Make lint script be silent unless there's a problem. This line doesn't
work anyway, trying to redirect to fd 0.
2018-10-05 19:35:46 -04:00
riking c5ecb718ac Add Android code style enforcement to lint.sh
This requires buildbot changes: the path to the Android Studio
installation must be supplied in an environment variable.

Modified files are copied out to a temporary directory, Android Studio
is asked to format the files, and a git diff is performed.
2018-08-26 19:18:31 -07:00
Sepalani a83858cac0 Tools: Dolphin symbol map IDA scripts added
Old ReadDolphinMap script removed
2018-05-30 09:13:12 +04:00
spycrab d27e85e9d7 Tools: Bump lint.sh version 2018-04-12 10:49:55 +02:00
N.E.C f9b8365190 Tools: Check for git and clang-format version 3.8.* in lint.sh 2017-08-16 22:28:02 -07:00
Michael M 4c92d8c81e Tools/lint.sh: lint all of Source, not just Core 2017-08-13 19:04:56 -07:00
Michael Maltese 6939590598 Tools/lint.sh: turn on Bash 'strict mode'
Now fails if any commands fail. I noticed that on the buildbot, the
arguments to this script can be incorrect (somehow?) which can result in
no lint checks happening but the buildbot still passing.
2017-07-18 15:36:15 -07:00
Tillmann Karras 2adaeae87c Tools: update perf-disassemble.sh
The -P command line option doesn't exist anymore.
2017-06-18 06:59:53 +01:00