patch_sdcard: Brawl RSBE01 SD driver bypass (does not fix SD-mode black screen; reference) - #62
Godfather38 wants to merge 1 commit into
Conversation
Brawl opens /dev/sdio/slot0 at boot; when the game itself is streamed from the SD slot this kills the loader (black screen, remote disconnect). Replace the SD library init call at 0x803ee240 with li r3,1 so pfd_sddrv_init returns 21 and the game takes its normal no-card path. Verified in Dolphin: no slot0 open, game runs; NTSC-U v1.02 only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
I opted not to have issue reports because people often report the same issue as if it were unique. For example, someone might say, "My USB drive doesn't work" and I'm then asked to fix it. However, that isn't possible without me purchasing the same drive, which I'm obviously not going to do every time someone encounters an incompatible device. As for your issue, are you trying to load modded Brawl (e.g., Project+) or unmodded Brawl? I'm asking because I'm able to play unmodded Brawl from an SD card. However, loading modded Brawl from an SD card isn't possible due to cIOS limitations. Just so you know, even if a pull request worked as intended, if AI was used to create it, I probably wouldn't merge it. And it's not because I'm anti-AI or anything like that; it's just that I code as a hobby, and I get a sense of accomplishment from adding cool new features and figuring out how to fix complex issues myself. The debugging, problem solving, and learning that go into the process are what make coding fun for me. Because of that, I'd rather work through those things myself than accept a contribution that was generated by AI, since it takes away some of what makes working on this project enjoyable for me. |
|
Totally fair on the AI thing, no argument from me. If I'd written that many
lines myself I wouldn't want a stranger- who's not taking shrapnel in these
hallowed trenches- dropping a thousand more in either. The debugging being
the fun part is the whole reason you're in there, and I'd be annoyed too.
No hard feelings.
And I get the issues thing. "My USB drive doesn't work" isn't a bug report,
I always hear "this doesn't work with x mod" from workshop subs and I am
gonna have to can replies for it if anything gets more popular. Part of the
fun for me is just community, kind friend!
On Brawl, I own the disc, so I'm going to CleanRip my own and retest before
I waste more of your time. But im running my friends rip and if his sketchy
internet hygeine is the issue id rather tell you in a day and laugh it off.
If it boots fine off my own dump then the pack was the problem and the
whole thing is a nothing.
What I can tell you is I did some fairly stupid stuff trying to force it to
start from SD after it wouldn't go, heres whats actually behind that one
line diff.
Pulled Brawls main binary out of the disc image, 4.8MB of PowerPC, no
source, no symbols. Found its SD driver by the error strings still sitting
in the binary, then mapped what it does on boot. Opens the slot, asks
status, registers for insert and remove events. Thats it.
Had to build a bench to even look at it. Dolphin with a debugger hooked up
over a socket so I could stop the game on the exact instruction where it
touches the slot and read whats around it. That didnt exist, I made it for
this.
The patch is one instruction. Swap a single call so the driver says no card
and Brawl takes the no card path it already handles fine by itself. Proved
it two ways in the emulator. Patched before boot, it never touches the slot
and runs normal. Patched as a cheat code, too late, because Brawl grabs the
slot 66ms after launch and cheats havent loaded yet. Thats why the Gecko
code stuff people try doesnt work.
Then forked the loader, put Brawl in the per game patch list next to the
two games already done that way, and let GitHubs CI build it with your
toolchain instead of mine.
Then tested it on the actual Wii, where it doesnt fix it. Which is why its
a draft and why I(tool assisted- no reservations :) wrote it all up instead
of asking you to merge anything
Either way the addresses and the ruled-out cause were the useful part like
you said, and I appreciate you writing all that out on a repo where you
deliberately turned issues off. Close the PR, it's yours to call.
…On Wed, Sep 9, 2026, 5:37 PM blackb0x ***@***.***> wrote:
*wiidev* left a comment (wiidev/usbloadergx#62)
<#62 (comment)>
Draft on purpose: on real hardware this does not fix Brawl's SD-Mode black
screen. Issues are disabled on this repo, so the full report is below.
Merge or close as you see fit; the addresses and the ruled-out cause are
the useful part.
I opted not to have issue reports because people often report the same
issue as if it were unique. For example, someone might say, "My USB drive
doesn't work" and I'm then asked to fix it. However, that isn't possible
without me purchasing the same drive, which I'm obviously not going to do
every time someone encounters an incompatible device.
As for your issue, are you trying to load modded Brawl (e.g., Project+) or
unmodded Brawl? I'm asking because I'm able to play unmodded Brawl from an
SD card. However, loading modded Brawl from an SD card isn't possible due
to cIOS limitations.
Just so you know, even if a pull request worked as intended, if AI was
used to create it, I probably wouldn't merge it. And it's not because I'm
anti-AI or anything like that; it's just that I code as a hobby, and I get
a sense of accomplishment from adding cool new features and figuring out
how to fix complex issues myself. The debugging, problem solving, and
learning that go into the process are what make coding fun for me. Because
of that, I'd rather work through those things myself than accept a
contribution that was generated by AI, since it takes away some of what
makes working on this project enjoyable for me.
—
Reply to this email directly, view it on GitHub
<#62?email_source=notifications&email_token=AEVVARXJZZBVXDQYGHLEQ7L5OHZUPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNRRGA4DGMZUGUY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5610833451>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEVVARU2ARAIXEVPGWI5UP35OHZUPAVCNFSNUABFKJSXA33TNF2G64TZHMZDANBVGIZDQOJYHNEXG43VMU5TKMZWG42TMMJVGQY2C5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AEVVARVELNSSLQ6SVSULC5D5OHZUPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNRRGA4DGMZUGUY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/AEVVARVI77KSOHUEFEKYZKL5OHZUPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNRRGA4DGMZUGUY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Adds a
patch_sdcard()entry for Super Smash Bros. Brawl NTSC-U v1.02: replaces the SD library init call at 0x803ee240 withli r3,1, sopfd_sddrv_initreturns 21 and the game takes its normal no-card path (verified in Dolphin: no/dev/sdio/slot0open, game runs normally).Draft on purpose: on real hardware this does not fix Brawl's SD-Mode black screen. Issues are disabled on this repo, so the full report is below. Merge or close as you see fit; the addresses and the ruled-out cause are the useful part.
Only US v1.02 is covered; PAL/JP addresses not derived.
Report
Super Smash Bros. Brawl (RSBE01, v1.02) black-screens at launch when loaded from the front SD slot (SD Mode) with USB Loader GX 4.0 r1283 / d2x-v11-beta3. Video resets, the Wii Remote disconnects, console stays powered. Every other game on the same card boots (10 titles incl. Skyward Sword, Galaxy 1/2, MKW, NSMBW). Brawl boots fine from the same card in a USB card reader on port 0, and from disc.
I assumed the cause was Brawl's own SD driver re-initialising
/dev/sdio/slot0while being streamed from it, built apatch_sdcard()entry for it, and it did not help — so the failure is below the game. Posting the data in case it saves someone the same detour.Console
wbfs+wbf1(7.8 GB dual layer), verified crc32.What Brawl does at boot (Dolphin 2606a, IOS_SD logging)
~66 ms after entry, in this order and nothing else for 100 s:
No RESETCARD, no reads. Call chain (main.dol):
pfd_sddrv_init@0x803ee1a0 → SD lib init @0x803cc1b0 (allocs + strcpy of/dev/sdio/slot0/1/winto 0x80563960) → mount @0x803cc014 (IOS_Open@0x802123a8) → getstatus @0x803cb314 → event register @0x803cc930 ×2. Error return 21 is handled by the caller @0x803d6dfc as a normal “no card” path.Patch tried
*(u32 *)0x803ee240 = 0x38600001;forRSBE01inpatch_sdcard()(replacesbl SDLibInitwithli r3,1; pfd_sddrv_init logs "ERR:Failed to init SD Card Driver" and returns 21).043EE240 38600001): too late, slot0 already opened before the hook.make releasein devkitpro/devkitppc:20250527): still black screen + remote disconnect on hardware, identical to unpatched.Conclusion / ask
With the game never touching the SD slot, SD Mode still fails for this title only. Remaining suspects are in the cIOS/loader SD read path for a dual-layer split image (it's the only >4.7 GB / dual-layer title on the card). Happy to run any test build or capture logs; I have a reproducible setup and the gdb/Dolphin scripts.
🤖 Generated with Claude Code