Skip to content

Add PowerSaves for 3DS device support — DS cartridge save backup#5

Draft
pathawks wants to merge 1 commit intomainfrom
powersaves-for-3ds
Draft

Add PowerSaves for 3DS device support — DS cartridge save backup#5
pathawks wants to merge 1 commit intomainfrom
powersaves-for-3ds

Conversation

@pathawks
Copy link
Copy Markdown
Owner

PowerSaves for 3DS is a USB HID slot-1 adapter (VID 0x1C1A PID 0x03D5) made by Datel. Despite the 3DS branding, the device's generic NTR and SPI passthroughs work cleanly on DS cartridges, so this driver uses it purely as a save-backup tool for DS carts.

What ships:

  • Driver (src/lib/drivers/powersave-3ds/) — speaks the 64-byte HID protocol, switches between ROM and SPI modes, identifies the cart via NTR chip-ID, validates the on-cart header (CRC + boot-logo), probes the save chip (FLASH via JEDEC, EEPROM via wrap-detection), dumps the save with cart-swap detection at start and end. Protocol ported from kitlith/powerslaves (MIT).
  • Shared DS system (src/lib/systems/nds/) — header parsing with CRC-16/MODBUS validation, maker/licensee code lookup (derived from devkitPro/ndstool, GPL-3.0), and a save-only system handler with generic dump-quality sanity checks.
  • Scanner UI (src/components/wizard/nds-scanner.tsx, src/hooks/use-nds-scanner.ts) — polls for a cart, displays detected game info enriched with No-Intro lookup by serial, runs the dump, and surfaces hashes + .sav download.
  • Wiring — App.tsx routes nds_save devices to the new scanner; use-connection.ts adds a connect/reconnect path for the device's WebHID filter; devices.ts registers the device.

Adjacent changes:

  • nointro.ts — add "nds_save" No-Intro system mapping; prefer retail entries over (Beta)/(Proto)/(Demo)/(Sample)/(Unl) tags when multiple entries share a serial, so lookupBySerial returns the cart users actually have.
  • hashing.ts — formatBytes now scales to MB for ROM-size displays.
  • types.ts — declare "nds_save" as a known SystemId.

PowerSaves for 3DS is a USB HID slot-1 adapter (VID 0x1C1A PID 0x03D5)
made by Datel. Despite the 3DS branding, the device's generic NTR and
SPI passthroughs work cleanly on DS cartridges, so this driver uses it
purely as a save-backup tool for DS carts.

What ships:
- Driver (src/lib/drivers/powersave-3ds/) — speaks the 64-byte HID
  protocol, switches between ROM and SPI modes, identifies the cart
  via NTR chip-ID, validates the on-cart header (CRC + boot-logo),
  probes the save chip (FLASH via JEDEC, EEPROM via wrap-detection),
  dumps the save with cart-swap detection at start and end. Protocol
  ported from github.com/kitlith/powerslaves (MIT).
- Shared DS system (src/lib/systems/nds/) — header parsing with
  CRC-16/MODBUS validation, maker/licensee code lookup (derived from
  devkitPro/ndstool, GPL-3.0), and a save-only system handler with
  generic dump-quality sanity checks.
- Scanner UI (src/components/wizard/nds-scanner.tsx,
  src/hooks/use-nds-scanner.ts) — polls for a cart, displays detected
  game info enriched with No-Intro lookup by serial, runs the dump,
  and surfaces hashes + .sav download.
- Wiring — App.tsx routes nds_save devices to the new scanner;
  use-connection.ts adds a connect/reconnect path for the device's
  WebHID filter; devices.ts registers the device.

Adjacent changes:
- nointro.ts — add nds_save No-Intro system mapping; prefer retail
  entries over (Beta)/(Proto)/(Demo)/(Sample)/(Unl) tags when multiple
  entries share a serial, so lookupBySerial returns the cart users
  actually have.
- hashing.ts — formatBytes now scales to MB for ROM-size displays.
- types.ts — declare "nds_save" as a known SystemId.

Sources cited in THIRD-PARTY-LICENSES: kitlith/powerslaves and
devkitPro/ndstool. The README's supported-hardware table and license
attribution list are updated accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant