External ARM9 payload chainloading for a9lh, cleaned up the sdmmc library (from the dark-samus a9lh fork)

This commit is contained in:
Aurora
2016-03-08 15:13:55 +01:00
parent 04978ebb01
commit 09380a19ff
30 changed files with 7137 additions and 717 deletions

19
loader/source/main.c Normal file
View File

@@ -0,0 +1,19 @@
#include "fatfs/ff.h"
#define PAYLOAD_ADDRESS 0x23F00000
int main()
{
FATFS fs;
FIL payload;
unsigned int br;
f_mount(&fs, "0:", 1);
if(f_open(&payload, "rei/arm9payload.bin", FA_READ) == FR_OK)
{
f_read(&payload, (void *)PAYLOAD_ADDRESS, f_size(&payload), &br);
((void (*)())PAYLOAD_ADDRESS)();
}
return 1;
}