Skip to content

v0.6.1 - second-scan fix, item picker, nickname editor

Latest

Choose a tag to compare

@logdog2325 logdog2325 released this 27 May 20:25

⚠️ Back up your saves first

Always back up .gci files with GCMM before using "Save to memory card." Self-verify still runs, but no undo if a bug slips past.

What's new since v0.6

🐛 The "second memcard scan" freeze — actually fixed this time

v0.6 fixed the cold-boot scan freeze. A tester immediately found the next one: scan once, do anything else (e.g. load from SD), then try to scan again → freeze. Root cause turned out to be much deeper than EXI lock state:

  1. The SD adapter sits on EXI channel 2 (SD2SP2 / serial port 2), not channel 0 or 1 as we'd assumed. v0.6's EXI_Unlock drain ran on the wrong channels.
  2. libogc's __exi_setinterrupts(EXI_CHANNEL_2) masks the channel 0 EXI IRQ on every channel-2 unlock, and only re-unmasks if a debugger is attached.
  3. CARD_Mount's state machine sleeps on that channel 0 EXI IRQ via LWP_ThreadSleep. With the IRQ masked, it never wakes. Freeze.
  4. fatUnmount("sd") doesn't release libfat's disc backend state — sdgecko_doUnmount(drv) is the missing call. GCMM does this between every SD/memcard switch.

The fix in pb_fat_release_for_card:

fatUnmount("sd");
sdgecko_doUnmount(0); sdgecko_doUnmount(1); sdgecko_doUnmount(2);
for (chn = 0..2) EXI_Unlock drain;
__UnmaskIrq(IRQ_EXI0_EXI);   // <-- THE FIX
EXI_ProbeReset();
// 2 vsync settle (was 30, no longer needed once cleanup is correct)

Diagnosed by reading libogc/exi.c lines 121-138 (the IRQ-share bug), libfat/source/disc.c lines 86-91 (the "sd" → gcsd2 mapping), and gcmm/source/main.c (the canonical SD-then-memcard recipe).

🆕 Held item editor (was a clear-to-zero button)

The "Held item" field in the editor was a clear-only stub. Now it opens a proper paged picker with a curated Gen 3 hold-item list:

  • All 43 Gen 3 berries (Cheri through Enigma)
  • All hold items 180-225: BrightPowder, White Herb, Macho Brace, Exp. Share, Quick Claw, Soothe Bell, Mental Herb, Choice Band, King's Rock, Silver Powder, Amulet Coin, Cleanse Tag, Soul Dew, Deep Sea Tooth/Scale, Smoke Ball, Everstone, Focus Band, Lucky Egg, Scope Lens, Metal Coat, Leftovers, Dragon Scale, Light Ball, the seven type-boost items, Shell Bell, Sea/Lax Incense, Up-Grade, Lucky Punch, Metal Powder, Thick Club, Stick
  • L/R pages, A equips, Y clears

Per-game legality filtering: items 175 (Enigma Berry) and 226 (Stick) are hidden when editing XD/Colosseum saves because those games reject them. Verified via PKHeX's ItemStorage3{RS,E,FRLG,Colo,XD} tables — everything else in the curated list is universal across all five games.

🆕 Nickname editor

New "Nickname" field at the bottom of the edit list. Opens an on-screen keyboard:

  • 4×8 grid, 3 layouts cycled via X (A-Z / a-z / 0-9 + .-!?)
  • D-Pad moves the cursor, A appends, L deletes, R inserts space
  • START confirms, B cancels
  • Pre-fills with the current nickname so you can backspace + edit

Writes back to the right place per format:

  • PK3 (Gen 3 GBA): writes Gen 3 charset to p->nickname
  • XK3 (XD): writes UTF-16 BE to raw + 0x4E and 0x64
  • CK3 (Colosseum): writes UTF-16 BE to raw + 0x2E and 0x44

🆕 EV editor: Gen 3 legal caps (carried over from v0.6 but undocumented)

EVs are properly capped per Gen 3 rules:

  • 252 per stat (anything 253-255 is wasted — stats only update on multiples of 4)
  • 510 total across all six stats
  • Running total + remaining displayed; increments past 510 get clamped to whatever room is left
  • "AT TOTAL LIMIT" flash when capped

Status

Format Read Edit Write Create
Gen 3 GBA (Ruby/Sapphire/Emerald/FireRed/LeafGreen)
pokeemerald-expansion ROM hacks
Pokémon XD: Gale of Darkness (SD + memcard) ✅ (Phase 1)
Pokémon Colosseum (SD + memcard) ✅ (Phase 1)
GBA cart over link cable 🟡 ported, blocked by SI-mod hardware n/a n/a n/a
Pokémon Box: Ruby & Sapphire 🟡 memcard detection only

Install

Drop the attached pokebridge.dol onto your Swiss SD at sd:/apps/pokebridge/boot.dol and boot via Swiss. Works on real GameCube + Wii in GC mode.

Credits

PKHeX (XK3/CK3 byte layouts, item legality, EV rules), Suloku's GCMM (the sdgecko_doUnmount recipe for the second-scan freeze), Extrems (libasnd/libcard diagnosis), devkitPro (libogc + the source that let us actually find the IRQ-mask bug).