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:
ApacheThunder 2024-06-01 01:17:31 -05:00
parent a2e7393e3e
commit 7ce405acac
4 changed files with 12 additions and 8 deletions

View File

@ -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
#---------------------------------------------------------------------------------
LIBS := -lfat -lnds9
LIBS := -lfat -lnds329
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing

View File

@ -381,8 +381,8 @@ void WriteNorFlashINTEL(u32 address,u8 *buffer,u32 size) {
OpenNorWrite();
}
if(size>0x4000) {
size2 = size >>1;
if(size > 0x4000) {
size2 = size >> 1;
lop = 2;
} else {
size2 = size;

View File

@ -877,8 +877,11 @@ int writeFileToNor(int sel) {
dsp_bar(1, 100);
fclose(gbaFile);
if (is3in1Plus)chip_reset();
CloseNorWrite();
// getSaveFilename(sel, savName);
if(cmd >= 0) { writeSramFromFile(savName); } else { blankSRAM(savName); }
@ -1053,7 +1056,6 @@ bool nameEndsWith (const string& name, const string& extension) {
return false;
}
// TODO: Fix Filelist to use new code based on port of NDS_Backup_Tool
void FileListGBA() {
DIR *dir;
struct stat st;

View File

@ -861,7 +861,7 @@ int gba_sel() {
if(ky & KEY_X) {
if(GBAmode == 1) {
SetRompage(0);
if (!is3in1Plus)SetRompage(0);
SetRampage(16);
gbaMode();
} else {
@ -873,8 +873,7 @@ int gba_sel() {
if(GBAmode == 1) {
if(checkSRAM(filename)) {
// if(cnf_inp(3, 4) & KEY_A)
if(save_sel(0, filename) >= 0)
writeSramFromFile(filename);
if(save_sel(0, filename) >= 0)writeSramFromFile(filename);
_gba_sel_dsp(sel, yc, 0);
} else err_cnf(4, 5);
} else {
@ -1130,6 +1129,9 @@ inp_key();
//---------------------------------------------------------------------------------
int main(void) {
//---------------------------------------------------------------------------------
extern u64 *fake_heap_end;
*fake_heap_end = 0;
defaultExceptionHandler();
int i;