14 Commits

Author SHA1 Message Date
AriA99
65b55f9d60
Dump cart ID2 properly in private header (#862)
* Add cart_id2 to gamecart.h

This prepares changes to fix private header dumps.

The name ID2 matches Lotus3 (see Switchbrew) since it's evident Lotus3 is just a continuation of the 3DS cart controller

* Add Cart_GetID2() to protocol.h

This prepares changes to fix private header dumps.

The name ID2 matches Lotus3 (see Switchbrew) since it's evident Lotus3 is just a continuation of the 3DS cart controller.

* gc protocol: Add support to get ID2

This renames the unknowna0_cmd to its proper name and the A0_Response to CartID2, matching Lotus3 terminology.

* Store ID2 in private header at +0x44

The ID2 contains important information that in particular determines the cryptographic keys used. It is impossible to decrypt a dump of cart<->controller communications without knowing the ID2 or trying all possible keys.

This behavior matches Gateway. I suppose that it was presumed that Gateway would always store zeroes there because regular cartridges on retail would always report zero and then everybody just copied this false assumption.

* fix build (gamecart.c): memset->memcpy

* fix build (protocol.c): Fix dupe definition of Cart_GetID()
2026-03-20 15:53:37 +01:00
Balint Kovacs
60f2c5192d Add save chip JEDEC ID to gamecard info 2021-03-18 00:28:44 +01:00
Balint Kovacs
f2e52bd1c7 Initial support for CARD2 read
Can I get card2 writing to work?

Am I _that_ good?

Will I break by copy of X?

I won't know until I try!
2021-03-18 00:28:44 +01:00
Balint Kovacs
dfb2dff352 Some groundwork for CARD2 save support 2021-03-18 00:28:44 +01:00
d0k3
8ebb74b0bc Allow dumping NDS carts with secure area encrypted
Fixes #417
2021-01-30 13:22:05 +01:00
d0k3
647d5722aa gamecart: Replaced ID file with info file 2020-12-24 15:53:59 +01:00
David Korth
25a22d30d0 gamecart: Added a gamecart_id.bin file.
This contains the 4-byte chip ID.
2020-12-24 15:53:59 +01:00
Balint Kovacs
84d5f800a9 Get rid of card_eeprom.c, move spi.c to card_spi.c
It was bugging me that there was two spi.c's
2019-10-11 16:24:08 +02:00
Balint Kovacs
fa741b265b Write support for NTR saves
Why does this work? We are writing flash memories without erasing them,
and writing pages without regard to alignment. Yet it works?
2019-10-11 16:24:08 +02:00
Balint Kovacs
38d9a23427 Minor cleanup of gamecart.c 2019-10-11 16:24:07 +02:00
Balint Kovacs
f60a4c1f63 Add a vfile to show the JEDEC id for the inserted cart
This is meant to replace the Prompt I was using previously.
Fun fact: WarioWare DIY seems to have *something* on the SPI bus, as it
returns an ID of 0x000001 consistently. Or am I just glitching the
parallel flash? Or did I get a fake?
2019-10-11 16:24:07 +02:00
d0k3
01bc082ca0 Initial support of cartridge savegame reads 2019-10-11 16:24:07 +02:00
Wolfvak
d6c6f56526 fix compilation warnings due to unaligned packed structures in newer gcc 2019-09-29 19:53:27 +02:00
Wolfvak
beeea37d07 Revised Makefile 2017-11-17 19:37:45 +01:00