mirror of
https://github.com/ApacheThunder/GBA-Exploader.git
synced 2025-06-19 03:55:41 -04:00
Partial fix for 3in1 Plus reset after NorFlash...
* Partial fix for 3 in 1 Plus. 4MB games mostly boot up fine after intial reset after hitting X after writing them to NorFlash. Larger games almost boot but hang after Ninteno logo. Further testing and fixes still needed.
This commit is contained in:
parent
a2e7393e3e
commit
7ce405acac
@ -33,7 +33,7 @@ LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# any extra libraries we wish to link with the project
|
# any extra libraries we wish to link with the project
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
LIBS := -lfat -lnds9
|
LIBS := -lfat -lnds329
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level containing
|
# list of directories containing libraries, this must be the top level containing
|
||||||
|
@ -381,8 +381,8 @@ void WriteNorFlashINTEL(u32 address,u8 *buffer,u32 size) {
|
|||||||
OpenNorWrite();
|
OpenNorWrite();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(size>0x4000) {
|
if(size > 0x4000) {
|
||||||
size2 = size >>1;
|
size2 = size >> 1;
|
||||||
lop = 2;
|
lop = 2;
|
||||||
} else {
|
} else {
|
||||||
size2 = size;
|
size2 = size;
|
||||||
|
@ -877,6 +877,9 @@ int writeFileToNor(int sel) {
|
|||||||
|
|
||||||
dsp_bar(1, 100);
|
dsp_bar(1, 100);
|
||||||
fclose(gbaFile);
|
fclose(gbaFile);
|
||||||
|
|
||||||
|
if (is3in1Plus)chip_reset();
|
||||||
|
|
||||||
CloseNorWrite();
|
CloseNorWrite();
|
||||||
|
|
||||||
// getSaveFilename(sel, savName);
|
// getSaveFilename(sel, savName);
|
||||||
@ -1053,7 +1056,6 @@ bool nameEndsWith (const string& name, const string& extension) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Fix Filelist to use new code based on port of NDS_Backup_Tool
|
|
||||||
void FileListGBA() {
|
void FileListGBA() {
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -861,7 +861,7 @@ int gba_sel() {
|
|||||||
|
|
||||||
if(ky & KEY_X) {
|
if(ky & KEY_X) {
|
||||||
if(GBAmode == 1) {
|
if(GBAmode == 1) {
|
||||||
SetRompage(0);
|
if (!is3in1Plus)SetRompage(0);
|
||||||
SetRampage(16);
|
SetRampage(16);
|
||||||
gbaMode();
|
gbaMode();
|
||||||
} else {
|
} else {
|
||||||
@ -873,8 +873,7 @@ int gba_sel() {
|
|||||||
if(GBAmode == 1) {
|
if(GBAmode == 1) {
|
||||||
if(checkSRAM(filename)) {
|
if(checkSRAM(filename)) {
|
||||||
// if(cnf_inp(3, 4) & KEY_A)
|
// if(cnf_inp(3, 4) & KEY_A)
|
||||||
if(save_sel(0, filename) >= 0)
|
if(save_sel(0, filename) >= 0)writeSramFromFile(filename);
|
||||||
writeSramFromFile(filename);
|
|
||||||
_gba_sel_dsp(sel, yc, 0);
|
_gba_sel_dsp(sel, yc, 0);
|
||||||
} else err_cnf(4, 5);
|
} else err_cnf(4, 5);
|
||||||
} else {
|
} else {
|
||||||
@ -1130,6 +1129,9 @@ inp_key();
|
|||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
int main(void) {
|
int main(void) {
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
|
extern u64 *fake_heap_end;
|
||||||
|
*fake_heap_end = 0;
|
||||||
|
|
||||||
defaultExceptionHandler();
|
defaultExceptionHandler();
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
Loading…
Reference in New Issue
Block a user