I was playing Ace Attorney 2 by myself on my DS, but during a moment of shared boredom, started playing it side-by-side with my kid. He got really into it, so now we agreed that we keep playing it together, but it would be nice to do it on the living room TV instead of cramped next to each other on a DS.
So I had to figure out how to get the savefile out of the DS flash card into Desmume so we could play on an emulator on the big TV.
Took a bit of figuring out, since the DS savefile was 512 KiB but the Desmume save file is only about 64 KiB. The latter was a few bytes over 64 KiB, so after blindly trying some online converter tools and failing, I just opened up both files in Emacs to look at their bytes.
I thought that 512 KiB was an unusually large amount of data to store for Ace Attorney, and indeed, almost all of the save file is empty, except for few bytes in the first 64 KiB. Everything else is just 0xFF bytes (huh, why not 0x00?). The Desmume save file actually has a footer (huh? not a header?) past the 0x10000 offset, which explains why it's slightly more than 64 KiB.
Long story short, after copying the first 0x10000 bytes over and gluing the Desmume footer, we will be able to follow the adventures of Phoenix Wright on the big screen.