diff --git a/.gitignore b/.gitignore index 3c17abf..603ba5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build.bat data/firmware.bin out -mset \ No newline at end of file +mset +build \ No newline at end of file diff --git a/README.md b/README.md index 0c2bd4d..07dd15b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ First you'll need the firmware file that I didnt include because reasons. Get that [HERE](https://www.dropbox.com/s/782eyz22lkmh434/firmware.bin?dl=0) -Secondly, You'll need armips added to your Path. +Secondly, You'll need armips added to your Path. [HERE](https://www.dropbox.com/s/ceuv2qeqp38lpah/armips.exe?dl=0) is a pre-compiled version. Lastly, just run Make and everything should work! diff --git a/mset b/mset index ba3ce22..46b7209 160000 --- a/mset +++ b/mset @@ -1 +1 @@ -Subproject commit ba3ce2262b965d4e365e277b54e9b9ed48159d83 +Subproject commit 46b7209b06c18680766201d76907b9ad8fafb914 diff --git a/source/draw.c b/source/draw.c new file mode 100644 index 0000000..849085e --- /dev/null +++ b/source/draw.c @@ -0,0 +1,11 @@ +/* +* draw.c +* by Reisyukaku +*/ + +#include "draw.h" +#include "fs.h" + +void loadSplash(void){ + fileRead(fb->top_left, "/rei/splash.bin", 0x46500); +} \ No newline at end of file diff --git a/source/draw.h b/source/draw.h new file mode 100644 index 0000000..0ae129e --- /dev/null +++ b/source/draw.h @@ -0,0 +1,14 @@ +/* +* draw.h +* by Reisyukaku +*/ + +#include "types.h" + +static struct fb { + u8 *top_left; + u8 *top_right; + u8 *bottom; +} *fb = (struct fb *)0x23FFFE00; + +void loadSplash(void); \ No newline at end of file diff --git a/source/firm.c b/source/firm.c index 0b020ad..c535a36 100644 --- a/source/firm.c +++ b/source/firm.c @@ -14,17 +14,16 @@ firmHeader *firmLocation = (firmHeader *)0x24000000; const u32 firmSize = 0xF1000; firmSectionHeader *section; -void loadSplash(void){ - fileRead((u8 *)0x20047000, "/rei/splash.bin", 0x46500); //ghetto because address varies i think - while(((~*(unsigned *)0x10146000) & 0xFFF) == (1 << 3) ? 0 : 1); //Press start to boot -} - void loadFirm(void){ //Read FIRM from SD card and write to FCRAM fileRead((u8*)firmLocation, "/rei/firmware.bin", firmSize); section = firmLocation->section; } +void loadSys(void){ + //stubbed +} + void patchFirm(void){ //Part1: Add emunand parsing code u32 offset = 0; diff --git a/source/firm.h b/source/firm.h index 59f2ee2..bdd91f8 100644 --- a/source/firm.h +++ b/source/firm.h @@ -7,6 +7,7 @@ void loadSplash(void); void loadFirm(void); +void loadSys(void); void patchFirm(void); void launchFirm(void); diff --git a/source/main.c b/source/main.c index db9c386..d8c5863 100644 --- a/source/main.c +++ b/source/main.c @@ -7,10 +7,12 @@ #include "fs.h" #include "firm.h" +#include "draw.h" int main(){ mountSD(); loadSplash(); + while(((~*(unsigned *)0x10146000) & 0xFFF) == (1 << 3) ? 0 : 1); //Press start to boot loadFirm(); patchFirm(); launchFirm();