refactoring
This commit is contained in:
parent
e71d11e162
commit
66c5551323
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
build.bat
|
||||
data/firmware.bin
|
||||
out
|
||||
mset
|
||||
mset
|
||||
build
|
@ -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!
|
||||
|
||||
|
2
mset
2
mset
@ -1 +1 @@
|
||||
Subproject commit ba3ce2262b965d4e365e277b54e9b9ed48159d83
|
||||
Subproject commit 46b7209b06c18680766201d76907b9ad8fafb914
|
11
source/draw.c
Normal file
11
source/draw.c
Normal file
@ -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);
|
||||
}
|
14
source/draw.h
Normal file
14
source/draw.h
Normal file
@ -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);
|
@ -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;
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
void loadSplash(void);
|
||||
void loadFirm(void);
|
||||
void loadSys(void);
|
||||
void patchFirm(void);
|
||||
void launchFirm(void);
|
||||
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user