Hello,
I am trying to make a fully open source flashcart for all DS/DSi/3DS consoles, although currently I am just going to focus on getting it working on the DS lite.
However, I can't seem to find much information on a few areas making it difficult to get what I need to actually start making the thing on my FPGA dev kit thing (me failing to find this information could just be my fault, lol).
Firstly, I can't really find any good resources on how the SD protocol works, I tried looking through the SDIO simplified specifications but that just feels like it has a lot of information missing, I understand that the way it appears to work is you send commands over the CMD pin of the SD card and then you can get a response or no response depending on the command, but beyond that, I can't find much on it. The sort of things I am looking for are how the commands are set out, like, what format are the commands in, what does all the abbreviations for the commands actually mean in binary (for example, I am seeing a lot of things like CMD0 Pin1=high, CMD8, IO=0, etc. but what does this actually look like if I were to try to send this down the CMD pin in binary, how would it be sent down as well), also an explanation of how to initialise the SD card and pull data from it would be nice too, their flow charts from their SDIO simplified specifications feels like there is some information I am just missing to understand it (BTW, I would prefer to use SD mode rather than SPI mode for the faster transfer speeds).
Secondly, I could find some resources on how the DS protocol worked but I am not understanding how the AP of the DS works, found nothing on the DSi, and also have no idea how the data transfer works, some information on how that works would be greatly appreciated. I understand it uses XOR encryption for most of the game file (I think) and than has some special encryption for the first few bytes of the game data which is double encrypted? But how does the encryption work and where are the encryption keys from?
Thirdly, I want to have IR sensors and receivers built into this flashcart for games that use them. How do games that have integrated IR sensors and receivers built into their cartridges go about using them? Like, do they have some special custom command that they send to the cartridge some how from the DS to send IR signals and a custom command that the IR receiver sends over the cartridge to the DS, or does it work some other way?
Finally, is there anything else I should know that I haven't asked about, something that all or most flashcarts have as standard and would be required, something about the DSIO protocol I should know (maybe something about SDHC/SDXC cards or something like that), anything else that could be an issue due to the DS hardware begin what it is (like how I have heard that the DS can be finicky with timings, how true is that, how precise do the timings need to be, and so on), etc?
I am trying to make a fully open source flashcart for all DS/DSi/3DS consoles, although currently I am just going to focus on getting it working on the DS lite.
However, I can't seem to find much information on a few areas making it difficult to get what I need to actually start making the thing on my FPGA dev kit thing (me failing to find this information could just be my fault, lol).
Firstly, I can't really find any good resources on how the SD protocol works, I tried looking through the SDIO simplified specifications but that just feels like it has a lot of information missing, I understand that the way it appears to work is you send commands over the CMD pin of the SD card and then you can get a response or no response depending on the command, but beyond that, I can't find much on it. The sort of things I am looking for are how the commands are set out, like, what format are the commands in, what does all the abbreviations for the commands actually mean in binary (for example, I am seeing a lot of things like CMD0 Pin1=high, CMD8, IO=0, etc. but what does this actually look like if I were to try to send this down the CMD pin in binary, how would it be sent down as well), also an explanation of how to initialise the SD card and pull data from it would be nice too, their flow charts from their SDIO simplified specifications feels like there is some information I am just missing to understand it (BTW, I would prefer to use SD mode rather than SPI mode for the faster transfer speeds).
Secondly, I could find some resources on how the DS protocol worked but I am not understanding how the AP of the DS works, found nothing on the DSi, and also have no idea how the data transfer works, some information on how that works would be greatly appreciated. I understand it uses XOR encryption for most of the game file (I think) and than has some special encryption for the first few bytes of the game data which is double encrypted? But how does the encryption work and where are the encryption keys from?
Thirdly, I want to have IR sensors and receivers built into this flashcart for games that use them. How do games that have integrated IR sensors and receivers built into their cartridges go about using them? Like, do they have some special custom command that they send to the cartridge some how from the DS to send IR signals and a custom command that the IR receiver sends over the cartridge to the DS, or does it work some other way?
Finally, is there anything else I should know that I haven't asked about, something that all or most flashcarts have as standard and would be required, something about the DSIO protocol I should know (maybe something about SDHC/SDXC cards or something like that), anything else that could be an issue due to the DS hardware begin what it is (like how I have heard that the DS can be finicky with timings, how true is that, how precise do the timings need to be, and so on), etc?