This is in progress, and is by no means finished, fork and comment with a link to your changes and I'll update here.
Information on the 3DS side should be about done.
I still have questions, though, which would be nice to know the answers to.
My thoughts on implementing the gamecard side of things can be found here.
ARM9 code uses REG_NTRCARDMCNT, at physical address 0x1016400 as a reference. ARM9 triggers reading by writing 4 bytes to 4 bytes after this address, REG_NTRCARDROMCNT. This is located at 0x10164004.