Commit Graph
46066 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 a62c65615a IOS LLE: StarOS's panic words must not alias
LoadBootstrapELF accepted __panic_state and __panic_code at the same
address, or as two words sharing bytes: the code's store would then also
set the guard, and nothing could tell the two apart. They must now be two
non-overlapping words of the data segment, like the other checks, before
any byte is written. BootstrapELFTest.PanicWordsMustNotAlias: the same
word and three partial overlaps, all inside the data segment, are
rejected; adjacent words are accepted. With the rule disabled, the test
fails. (StarOS MMU-001 review of F1.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 00:20:22 +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 2bae49bdad IOS LLE: the ARM926 TLB is unified (StarOS MMU-001 F1 review)
The ARM926EJ-S has one TLB for instructions and data, with lockdown
entries that whole-TLB invalidation preserves. Two comments said the
I and D TLBs were separate; they now say what the software TLB really
differs in: capacity and replacement (a direct-mapped cache of 4096
1 KiB granules), and lockdown, which is not modelled (c10 writes are
ignored). No code change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 22:03:22 +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 9b493a1e16 IOS LLE: optional ARM926 MMU aborts and CP15 privilege (StarOS MMU-001 F1)
ARMCore::SetMMUFaultsEnabled(true) makes the Starlet core deliver the
faults of the ARM926EJ-S MMU instead of the identity fallback:
- translation (section 0x5, page 0x7), domain (0x9, 0xb) and permission
  (0xd, 0xf) faults from the descriptors, the DACR (no access and the
  reserved value fault; manager skips AP) and AP with the S and R bits;
  ARMv5 has no execute permission, so a fetch needs read permission;
- data aborts (vector 0x10, LR = instruction + 8 in both states) set the
  FSR and the FAR (the MVA); prefetch aborts (vector 0x0c, LR + 4) set the
  IFSR (c5 opcode2 1) and leave the FAR unchanged;
- alignment faults (0x1) when control bit A is set;
- base-restored data aborts: the first faulting access ends the
  instruction's bus traffic and its register results are undone; words
  stored before the fault stay written;
- LDRT/STRT/LDRBT/STRBT check User permissions in any mode;
- the TLB keeps each granule's domain and AP, never caches a faulting
  walk, and c8 single-entry operations drop only the page that maps the
  MVA, so an entry stays stale until the guest invalidates it;
- MRC/MCR to CP15 from User mode is an undefined instruction.

The JIT stays usable: with the option on, every block entry goes through
C++, which checks the fetch under the current mode and DACR, and only
instructions that touch neither memory, CP15, the PSRs nor the exception
model run natively; the rest use the interpreter.

Off by default. The IOS LLE path keeps its identity fallback, its
savestate format (the option and the IFSR are not serialized) and its
idle-loop fast-forwarding; the only change there is that the data
accessors read one abort flag that stays clear.

20 StarletARMCoreMMUFaults tests, each run in the interpreter and the
JIT; the existing Starlet tests pass unchanged.

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
Yaya48andClaude Opus 5.5 ba86a7486c IOS LLE: optional Broadway hardware window after a WiiConnect24 shutdown reply (StarletOS phase 11 J1)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 22:36:20 +02:00
Yaya48andClaude Opus 5.5 3d12571127 IOS LLE: execute ARMv5TE enhanced DSP instructions (StarletOS phase 11 I1)
SMLAxy, SMLAWy, SMULWy, SMLALxy, SMULxy, QADD, QSUB, QDADD and QDSUB were
decoded as compare data processing that writes no register; the ARM926EJ-S
implements them. The interpreter now executes them with the Q flag and the
JIT leaves them to it. Adds ARMv5TEEnhancedDSPInstructions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 22:16:53 +02:00
Yaya48andClaude Opus 5.5 ba5b6de0d0 IOS LLE: shadow comparison for REV_WATCH (StarletOS phase 11 H1)
Reads and IPC-reply audits compare each watched range with what the
Starlet and the devices wrote, revealing other writers; register-list
transfers in a watched virtual range log their translation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 22:08:04 +02:00
Yaya48andClaude Opus 5.5 76a133f3a4 IOS LLE: optional Starlet write watch REV_WATCH (StarletOS phase 11 F1)
Logs Starlet CPU stores (instruction address, LR) and device DMA writes
in the given physical ranges. The ARM JIT keeps fastmem but sends accesses
overlapping a watched range to its bus slow path, recording the
instruction address there. Nothing changes without the variable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 20:21:09 +02:00
Yaya48andClaude Opus 5.5 81ebec368b IOS LLE: IPC trace prints filesystem IOCTL paths (StarletOS phase 11 M1e)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 19:44:05 +02:00
Yaya48andClaude Opus 5.5 3ce435786c IOS LLE: optional emulated Wii Remotes in bootstrap mode (StarletOS phase 11 M1)
With REV_BOOTSTRAP_WIIMOTE=1 a bootstrap-ELF session gets the emulated Wii
Remotes of the original-IOS mode, using the identities paired in the
attached NAND's SYSCONF. The NAND is never rewritten for it; without the
variable nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 19:25:04 +02:00
Yaya48andClaude Opus 5.5 09fba9bbb5 docs: StarletOS X11 window build and the phase 11 reference launch
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 19:10:35 +02:00
Yaya48andClaude Opus 5.5 cd8c8cedca IOS LLE: optional IPC request/reply metadata trace (StarletOS phase 11 L2)
With DOLPHIN_IPC_TRACE=1 and the original IOS on the emulated Starlet, log
each request Broadway posts (X1: command, descriptor, argument words, an
OPEN's path) and each reply Starlet posts (Y1: original command, result).
Buffer contents are never read; nothing changes without the variable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 18:40:56 +02:00
Yaya48 78738093ec docs: record Linux Starlet bootstrap qualification 2026-10-03 23:38:28 +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 b931671fde IOS: checkpoint native Wii Shop connectivity and Starlet optimizations
Add opt-in AX88772 Ethernet with libslirp NAT, pinned Windows runtime setup and USB/network regressions. Correct Hollywood DI/reset interrupt routing and physical SRAM DMA for AES, SHA, NAND, SDIO and OHCI. Keep aligned Thumb bus accesses inside native JIT blocks.

Validated: 164 targeted tests pass. User confirmed Wii Shop connection and channel-list navigation at 100% speed / 59.96 FPS on 2026-09-12. Downloads and general channel performance remain unvalidated; local firmware, keys and runtime data are excluded.
2026-09-12 11:08:25 +02:00
Yaya48 ebb753d09a IOS: checkpoint Starlet JIT, PPC cache and Wii timing fixes
Save the remaining ARM JIT and MMU/cache optimizations, accurate Starlet timer and Wiimote report cadence, opt-in PPC event tracing, and full texture hashing in the LLE launcher. Include regression coverage and exclude local profiling artifacts.

Validation: 127 targeted tests from 15 suites passed, with one disabled test. Includes the current user-tested source state following the persistent NAND milestone.
2026-09-08 11:45:51 +02:00
Yaya48 31760e8bce IOS: persist Starlet NAND writes across restarts
Keep the source dump immutable and replay checksummed copy-on-write transactions from the active user profile. Persist program, erase, pairing and restored snapshot writes. Preserve interrupted tails before recovery and reject corrupt journals or concurrent writers.

Validated in the current build with 127 targeted tests and a user-confirmed channel deletion surviving process exit and restart; 2944 saved NAND pages reloaded successfully.
2026-09-08 11:42:29 +02:00
Yaya48 1bd3fac1f1 IOS: optimize Starlet LLE and accurate CPU cache
Retain ARM926 FCSE translations, accelerate common Starlet JIT blocks and cache sparse Hollywood register reads. Inline the hot Broadway write-back cache path while preserving exact cache miss, locking and split-access behavior.
2026-08-30 02:35:19 +02:00
Yaya48 9389e38f75 IOS: add x64 Starlet JIT with guarded fastmem 2026-08-28 13:22:30 +02:00
Yaya48 b85667435c HW: stabilize original BootMii interaction 2026-08-25 23:26:29 +02:00
Yaya48 5387658e0c IOS: boot original BootMii through MINI 2026-08-25 19:46:28 +02:00
Yaya48 08c9886169 docs: record HackMii installer milestone
Document the validated unmodified LetterBomb and HackMii v1.2 path through IOS58 reload, preparation, Wii Remote input and the interactive installer menu.
2026-08-25 17:55:43 +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
OatmealDome 38e70fda65 Merge pull request #14800 from dreamsyntax/winupdater-vcredist
Require VS2026; Update Redist WinUpdater Pulls
2026-08-20 22:02:49 -04:00
Admiral H. Curtiss 46e38d28fa Merge pull request #14821 from SuperSamus/mmu-try-read-non-integral-fixup
MMU: Fix non-integral HostTryRead not passing space
2026-08-19 23:26:06 +02:00
Martino Fontana 591aa07b93 MMU.h: Remove useless consts in declarations
Since the issue solved by the previous commit was spotted with clang-tidy, let's also fix its other complaints.
https://clang.llvm.org/extra/clang-tidy/checks/readability/avoid-const-params-in-decls.html
2026-08-19 21:14:58 +02:00
Martino Fontana 2944fd26e3 MMU: Fix non-integral HostTryRead not passing space
Randomly spotted. Didn't test, but it was obviously wrong.
Fixes regression from 8a97ce9124.
2026-08-19 21:12:10 +02:00
JMC47 2366c4e343 Merge pull request #14820 from SuperSamus/symbol-search-fix
Debugger: Fix symbol search speed
2026-08-19 13:26:47 -04:00
Martino Fontana e407f178ba Debugger: Fix symbol search speed
Having Qt query a setting for every symbol isn't efficient.
Fixes regression introduced by #13216.
2026-08-19 10:21:48 +02:00
Admiral H. Curtiss a795eaf01d Merge pull request #14733 from DacoTaco/fixes/dolalignment
DolReader: Don't error on dol section alignment on Wii
2026-08-18 23:15:47 +02:00
DacoTaco aabde19114 DolReader: Don't error on dol section alignment on Wii 2026-08-18 23:03:17 +02:00
JosJuice fa61f77fed Merge pull request #14259 from Reonu/pikmin_wii_no_blur_gecko_code
GameINI: Add Disable Blur code for Pikmin 1 Wii
2026-08-16 11:52:36 +02:00
JosJuice a9c36ee2ef Merge pull request #14735 from tom-pratt/dual-core-warning
Android: Dual core warning when hosting netplay
2026-08-16 11:05:39 +02:00
Tilka 54070da585 Merge pull request #14813 from tygyh/DSP-Fix-Off-by-one-clamping-error
DSP: Fix `Off-by-one` clamping error
2026-08-14 21:28:39 +01:00
Dr. Dystopia f65180fa91 DSP: Fix Off-by-one clamping error 2026-08-13 08:41:37 +02:00
OatmealDome 4ff214cdd2 Merge pull request #14808 from phire/ZeldaHLE_overflow
Fix stack overflow in ZeldaHLE
2026-08-10 21:45:52 -04:00
Scott Mansell 53cd8ffa3f Fix stack overflow in ZeldaHLE
Independently spotted by both @Dentomologist and me while reviewing
PR #14805
The previous limit was correct for valid VPBs, but an invalid VPB
controlled by a malicious game could contain a non-fractional value
in current_pos_frac, which would allow writing an extra 15 samples
(30 bytes) into the stack. With AFC encoding, this is rounded up to 16
samples, but with much less control over which bytes are written.

Maybe we should be doing some validation, or bounds checking, but I'm
pretty sure this issue was copied from the original ucode, and we kinda
want to stay compatible.

The simpler fix is to just increase the size of raw_input_samples.
I've checked other code paths, and 0x514 samples seems to be the limit.
2026-08-11 12:30:54 +12:00
OatmealDome 54a651074c Merge pull request #14805 from Tilka/zelda_oob
DSPHLE/Zelda: prevent out-of-bounds stack read
2026-08-10 17:15:35 -04:00
JMC47 3450298af0 Merge pull request #14583 from jordan-woyak/gamesettings-deadly-creatures
GameSettings: Add CPU overclock to work around long black screen on boot in "Deadly Creatures".
2026-08-10 16:30:39 -04:00
Tillmann Karras ce85da6b96 DSPHLE/Zelda: prevent out-of-bounds stack read
Reported by @RickdeJager.
2026-08-09 15:56:21 +01:00