Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ keeper of knowledge. Seemed fitting for a preservation tool.
| --- | --- | --- |
| [GBxCart RW](https://www.gbxcart.com/) v1.4 Pro | Web Serial | Game Boy, Game Boy Color, Game Boy Advance |
| [PowerSaves for Amiibo](https://www.yourpowersaves.com/) | WebHID | Amiibo (NTAG215) |
| PowerSaves for 3DS | WebHID | DS cartridge saves |

This is still early. More hardware and more systems are in the works.

## What It Does

- **Dumps ROMs** from Game Boy, Game Boy Color, and Game Boy Advance cartridges
- **Backs up save data** (SRAM, Flash, EEPROM)
- **Backs up DS cartridge saves** via the PowerSaves 3DS adapter
- **Reads Amiibo** tags (and generic NTAG215 tags, best-effort)
- **Verifies dumps** against the No-Intro database using CRC32, SHA-1, and SHA-256
- **Auto-detects** the inserted cartridge -- title, mapper, ROM size, save type
Expand Down Expand Up @@ -58,5 +60,10 @@ npm run lint

See [THIRD-PARTY-LICENSES](THIRD-PARTY-LICENSES) for attribution of code
derived from [FlashGBX](https://github.com/lesserkuma/FlashGBX),
[amiigo](https://github.com/malc0mn/amiigo), and
[amiigo](https://github.com/malc0mn/amiigo),
[powerslaves](https://github.com/kitlith/powerslaves),
[ndstool](https://github.com/devkitPro/ndstool), and
[AmiiboAPI](https://github.com/N3evin/AmiiboAPI).

PowerSaves and Datel are trademarks of Datel Ltd. nabu is not affiliated
with or endorsed by Datel.
50 changes: 48 additions & 2 deletions THIRD-PARTY-LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ https://github.com/lesserkuma/FlashGBX
GBxCart RW command opcodes and device protocol sequences in
src/lib/drivers/gbxcart/ were ported from FlashGBX's LK_Device.py.

License: GNU General Public License v3.0
License: GNU General Public License v3.0 only (GPL-3.0-only)

See LICENSE in this repository (same license applies to nabu as a whole).
See LICENSE in this repository — the full GPL-3.0 text reproduced
there applies to this component as well.

================================================================================

Expand Down Expand Up @@ -46,6 +47,51 @@ SOFTWARE.

================================================================================

powerslaves
https://github.com/kitlith/powerslaves

PowerSaves 3DS HID protocol (packet framing, opcodes, mode-switch sequence,
SPI/NTR passthrough) in src/lib/drivers/powersave-3ds/ was ported from the
powerslaves C library.

License: MIT

Copyright (c) 2017 kitlith

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

================================================================================

ndstool (devkitPro)
https://github.com/devkitPro/ndstool

NDS maker-code → publisher name lookup table in
src/lib/systems/nds/nds-maker-codes.ts was derived from ndstool's
ndscodes.cpp.

License: GNU General Public License v3.0 only (GPL-3.0-only)

See LICENSE in this repository — the full GPL-3.0 text reproduced
there applies to this component as well.

================================================================================

AmiiboAPI
https://github.com/N3evin/AmiiboAPI

Expand Down
18 changes: 17 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import { GBSystemHandler } from "@/lib/systems/gb/gb-system-handler";
import { GBASystemHandler } from "@/lib/systems/gba/gba-system-handler";
import { AmiiboScanner } from "@/components/wizard/amiibo-scanner";
import { InfinityScanner } from "@/components/wizard/infinity-scanner";
import { NDSScanner } from "@/components/wizard/nds-scanner";
import type { InfinityDriver } from "@/lib/drivers/infinity/infinity-driver";
import type { NDSDeviceDriver } from "@/lib/systems/nds/nds-header";
import type {
DeviceDriver,
DeviceInfo,
Expand Down Expand Up @@ -142,7 +144,10 @@ function App() {
(_driver: DeviceDriver, _info: DeviceInfo) => {
// Scanner-based devices handle detection in their own polling loop
const isScanner = _driver.capabilities.some(
(c) => c.systemId === "amiibo" || c.systemId === "disney-infinity",
(c) =>
c.systemId === "amiibo" ||
c.systemId === "disney-infinity" ||
c.systemId === "nds_save",
);
if (!isScanner) autoDetectSystem(_driver);
},
Expand Down Expand Up @@ -176,6 +181,9 @@ function App() {
connection.driver?.capabilities.some(
(c) => c.systemId === "disney-infinity",
) ?? false;
const isNDSSaveDevice =
connection.driver?.capabilities.some((c) => c.systemId === "nds_save") ??
false;

const badgeState = useMemo(() => {
if (dumpJob.state !== "idle") return dumpJob.state;
Expand Down Expand Up @@ -331,6 +339,14 @@ function App() {
onDisconnect={handleDisconnect}
log={log}
/>
) : isNDSSaveDevice ? (
<NDSScanner
driver={connection.driver! as NDSDeviceDriver}
deviceInfo={connection.deviceInfo}
onDisconnect={handleDisconnect}
log={log}
nointroDb={nointro.getDb("nds_save")}
/>
) : (
<div className="flex flex-col gap-6">
<ConfigureStep
Expand Down
Loading