Commit Graph
33797 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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
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
DacoTaco aabde19114 DolReader: Don't error on dol section alignment on Wii 2026-08-18 23:03:17 +02: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
Tillmann Karras ce85da6b96 DSPHLE/Zelda: prevent out-of-bounds stack read
Reported by @RickdeJager.
2026-08-09 15:56:21 +01:00
Scott Mansell 216ffb4581 Merge pull request #14803 from Andy1210/fix/bbox-memorybarrier-mainline
VideoBackends/OGL: Don't call glMemoryBarrier without ARB_shader_image_load_store
2026-08-09 15:12:01 +12:00
JosJuice cd3ea81462 Merge pull request #14767 from JosJuice/state-nand-open-file
IOS/FS: Fix loading savestate when files are open
2026-08-08 13:02:54 +02:00
Dentomologist f42c349c32 Merge pull request #14802 from phire/fallthrough_warnings
Enable Fallthrough warnings
2026-08-08 01:21:25 -07:00
Scott Mansell a6cf98332b Fix fallthough in CodeView/MemoryView widgets
This slightly changes the behaviour, but I think this is more correct.
2026-08-08 13:18:32 +12:00
Scott Mansell 7de31b291e Fix missing break in BluetoothRealDevice
Minor behaviour change, prevents an erroreous error log
2026-08-08 13:16:57 +12:00
Scott Mansell ca33c38afd Add missing breaks (no behaviour change) 2026-08-08 13:14:06 +12:00
Andy1210 21ace56160 VideoBackends/OGL: Don't call glMemoryBarrier without ARB_shader_image_load_store
glMemoryBarrier comes from ARB_shader_image_load_store, so on a desktop context
below GL 4.2 the pointer is null. bSupportsBBox is set from
bSupportsFragmentStoresAndAtomics, which such a driver can still have, so saving
a state reads the bounding box and calls a null pointer.

UsePersistentStagingBuffers() in OGLTexture.cpp already guards the same call with
bSupportsImageLoadStore.
2026-08-07 17:09:46 +02:00
Scott Mansell 1c4208e1fb Add fallthroughs to OpenGL InitExtentionList 2026-08-07 20:41:59 +12:00
Scott Mansell 4a10a9c634 Add fallthroughs to GetMurmurHash3 2026-08-07 19:27:41 +12:00
dreamsyntax ed25d5649b Require VS 2026, update WinUpdater redist
Updater now pulls VC14
Require MSVC 19.51.36252
2026-08-05 08:50:39 -07:00
Sepalani 6496d6c0c9 Common/BitCastPtr: Prevent destination type to be a pointer 2026-08-05 00:15:16 +04:00
Scott Mansell 9c5ff6b248 Mach exception thread: Fix msg alignment
msg_in and msg_out were ending up with only 4-byte alignment, which
is undefined behaviour, since they contain 64-bit fields. Probably
doesn't cause any issues, but it showed up in ubsan.
2026-08-03 22:46:45 +12:00
JosJuice f5be1c30e5 VideoCommon: Fix custom texture count in OSD message
83dc468 broke the OSD message that shows the number of custom textures.
If Prefetch Custom Textures was disabled, the number would always be 0.
2026-08-02 10:11:15 +02:00
Dr. Dystopia be3ad38ec7 Use designated constructors 2026-08-01 21:37:43 +02:00
Scott Mansell 5c6dcce721 Merge pull request #14758 from JoshuaVandaele/egl-platform-nowayland
Forbid EGL_PLATFORM to be "wayland"
2026-08-02 02:57:00 +12:00
JosJuice ad7e793548 Merge pull request #14768 from phire/security/gcz_overflows
Better validation and handling of GCZ
2026-08-01 12:26:10 +02:00
Scott Mansell 3c63788e01 Merge pull request #14776 from tygyh/Core/Use-static-cast
Replace functional cast with `static_cast`
2026-08-01 22:17:15 +12:00
Scott Mansell 463bcb8aeb Merge pull request #14781 from sepalani/gai-error
IP/Top: Add getaddrinfo() error log message
2026-08-01 22:15:10 +12:00