Skip to content

PowerSaves 3DS: allow user override of auto-detected save size when chip returns uniform bytes #12

Description

@pathawks

When probeSaveChip reads a uniform-byte SPI response on the 2-byte addressing path (e.g. a brand-new, never-written EEPROM with every cell at 0x00 or 0xFF), the wrap-detection heuristic can't determine the chip's size — there's no sentinel to wrap against. The current fallback assumes 64 KB (512 Kbit EEPROM), the largest 2-byte-addressed DS EEPROM size.

That's wrong for blank 512 B, 8 KB, or 256 B "tiny" EEPROMs: the dump produces a 64 KB file whose contents repeat the chip's actual contents N times, and the .sav file ends up Nx the correct size. Emulators can sometimes load the over-sized file but third-party save editors often reject it.

The fix needs a UI override:

  • Surface a "Save Size" picker in the scanner when auto-detect falls back to the default
  • Re-run the dump at the user-selected size

Probably implemented by adding an override config field in the NDS save system handler and surfacing it conditionally in the scanner UI when cartInfo.saveType ends in "(assumed)".

Related code:

  • src/lib/drivers/powersave-3ds/powersave-3ds-driver.tsprobeSaveChip at the "Save-chip size could not be auto-detected" branch (currently logs a warning and continues with 64 KB)
  • src/lib/systems/nds/nds-save-system-handler.ts — would need a config field added to getConfigFields
  • src/components/wizard/nds-scanner.tsx — would need to surface the picker

Original reviewer note: Copilot review on PR #5, comment on powersave-3ds-driver.ts:594.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions