mirror of
https://github.com/ApacheThunder/GBA-Exploader.git
synced 2025-06-18 11:35:38 -04:00
Add prompt for Omega DE...
* Now prompts if user is using DE or regaulr Omega if EZFlash Omega is detected. Regular omega can be used if soft reset method is used (aka, a cart like EZFlash Parellel is used to cause console to reboot on reinsert). If DE mode is selected setRamPage is set to normal range and will make it use FRAM chip. Regular Omega will use page 0x40 for RTS section of SRAM. (normal range is read only for some reason. FPGA must unlock it after sending specific table data to SD card buffer register which I have not got working yet) * NDS files can now be booted. Since bootloader from nds-hb-menu was added to fix soft-reset stuff I might as well just add in support to boot NDS files. :P
This commit is contained in:
parent
ead3daa6b7
commit
b0e0250f0d
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ export TARGET := GBA_ExpLoader
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export VERSION_MAJOR := 0
|
||||
export VERSION_MINOR := 64
|
||||
export VERSION_MINOR := 65
|
||||
export VERSTRING := $(VERSION_MAJOR).$(VERSION_MINOR)
|
||||
|
||||
# GMAE_ICON is the image used to create the game icon, leave blank to use default rule
|
||||
|
@ -78,6 +78,13 @@ typedef bool BOOL;
|
||||
void Omega_Bank_Switching(u8 bank);
|
||||
void Omega_InitFatBuffer(BYTE saveMODE, u32 saveSize, u32 gameSize);
|
||||
u32 Omega_SetSaveSize(u8 SaveMode);
|
||||
void SetSPIWrite(u16 control);
|
||||
void SetSPIControl(u16 control);
|
||||
void SPI_Enable();
|
||||
void SPI_Disable();
|
||||
void SPI_Write_Enable();
|
||||
void SPI_Write_Disable();
|
||||
u16 Read_FPGA_ver();
|
||||
void OpenRamWrite();
|
||||
void CloseRamWrite();
|
||||
void SetSerialMode();
|
||||
|
@ -204,6 +204,40 @@ u32 Omega_SetSaveSize(u8 SaveMode) {
|
||||
}
|
||||
}
|
||||
|
||||
void SetSPIWrite(u16 control) {
|
||||
*(u16*)0x9fe0000 = 0xd200;
|
||||
*(u16*)0x8000000 = 0x1500;
|
||||
*(u16*)0x8020000 = 0xd200;
|
||||
*(u16*)0x8040000 = 0x1500;
|
||||
*(u16*)0x9680000 = control;
|
||||
*(u16*)0x9fc0000 = 0x1500;
|
||||
}
|
||||
|
||||
void SetSPIControl(u16 control) {
|
||||
*(u16*)0x9fe0000 = 0xd200;
|
||||
*(u16*)0x8000000 = 0x1500;
|
||||
*(u16*)0x8020000 = 0xd200;
|
||||
*(u16*)0x8040000 = 0x1500;
|
||||
*(u16*)0x9660000 = control;
|
||||
*(u16*)0x9fc0000 = 0x1500;
|
||||
}
|
||||
|
||||
void SPI_Enable() { SetSPIControl(1); }
|
||||
|
||||
void SPI_Disable() { SetSPIControl(0); }
|
||||
|
||||
void SPI_Write_Enable() { SetSPIWrite(1); }
|
||||
|
||||
void SPI_Write_Disable() { SetSPIWrite(0); }
|
||||
|
||||
u16 Read_FPGA_ver() {
|
||||
u16 Read_SPI;
|
||||
SPI_Enable();
|
||||
Read_SPI = *(vu16*)0x9E00000;
|
||||
SPI_Disable();
|
||||
return Read_SPI;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SetRampage(u16 page) {
|
||||
|
@ -21,6 +21,7 @@ extern "C" {
|
||||
extern void _RamPG(void);
|
||||
extern void _RamSave(int bnk);
|
||||
extern bool isOmega;
|
||||
extern bool isOmegaDE;
|
||||
extern bool isSuperCard;
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -34,18 +35,18 @@ void ctrl_get() {
|
||||
|
||||
memset((u8*)&ctrl, 0, sizeof(struct ctrl_tbl));
|
||||
|
||||
if(carttype != 5 && !isSuperCard/* && !isOmega*/) {
|
||||
if (((carttype != 5) && !isSuperCard && !isOmega) || isOmegaDE) {
|
||||
_RamPG();
|
||||
ReadSram(SRAM_ADDR, (u8*)&ctrl, sizeof(struct ctrl_tbl));
|
||||
_RamSave(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (isSuperCard) {
|
||||
sprintf(expfile, "%s/SUPERCRD.dat", ini.sign_dir);
|
||||
} else /*if (isOmega) {
|
||||
} else if (isOmega) {
|
||||
sprintf(expfile, "%s/OMEGA.dat", ini.sign_dir);
|
||||
} else*/ {
|
||||
} else {
|
||||
sprintf(expfile, "%s/EXP128K.dat", ini.sign_dir);
|
||||
}
|
||||
exp = fopen(expfile, "rb");
|
||||
@ -59,7 +60,7 @@ void ctrl_set() {
|
||||
FILE *exp;
|
||||
char expfile[64];
|
||||
|
||||
if(carttype != 5 && !isSuperCard/* && !isOmega*/) {
|
||||
if (((carttype != 5) && !isSuperCard && !isOmega) || isOmegaDE) {
|
||||
_RamPG();
|
||||
WriteSram(SRAM_ADDR, (u8*)&ctrl, sizeof(struct ctrl_tbl));
|
||||
_RamSave(0);
|
||||
@ -68,9 +69,9 @@ void ctrl_set() {
|
||||
|
||||
if (isSuperCard) {
|
||||
sprintf(expfile, "%s/SUPERCRD.dat", ini.sign_dir);
|
||||
} else/* if (isOmega) {
|
||||
} else if (isOmega) {
|
||||
sprintf(expfile, "%s/OMEGA.dat", ini.sign_dir);
|
||||
} else*/ {
|
||||
} else {
|
||||
sprintf(expfile, "%s/EXP128K.dat", ini.sign_dir);
|
||||
}
|
||||
exp = fopen(expfile, "wb");
|
||||
|
@ -4,6 +4,7 @@ struct GBA_File {
|
||||
char gamecode[5];
|
||||
u32 type;
|
||||
u32 filesize;
|
||||
int isNDSFile;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <nds.h>
|
||||
#include <nds/arm9/dldi.h>
|
||||
|
||||
#include <fat.h>
|
||||
#include <sys/iosupport.h>
|
||||
@ -30,25 +31,26 @@
|
||||
|
||||
//#include <nds/arm9/console.h> //basic print funcionality
|
||||
|
||||
#define MAX_NOR 0x2000000 // 32MByte
|
||||
#define MAX_NORPLUS 0x4000000 // 64MByte (3 in 1 Plus)
|
||||
#define MAX_PSRAM 0x1000000 // 16MByte
|
||||
#define SRAM_PAGE_SIZE 0x10000 // SRAM Page Size
|
||||
#define MAX_SRAM 0x80000 // 4MBit/512KByte total SRAM
|
||||
#define MAX_NOR 0x2000000 // 32MByte
|
||||
#define MAX_NORPLUS 0x4000000 // 64MByte (3 in 1 Plus)
|
||||
#define MAX_PSRAM 0x1000000 // 16MByte
|
||||
#define SRAM_PAGE_SIZE 0x10000 // SRAM Page Size
|
||||
#define MAX_SRAM 0x80000 // 4MBit/512KByte total SRAM
|
||||
|
||||
#define USE_SRAM 0x20000 // 128KByte
|
||||
#define USE_SRAM_PG 48 // 0x0A030000-0A031FFF
|
||||
#define USE_SRAM_PG_EZ4 11 // 0x0A008000-0A00FFFF
|
||||
#define USE_SRAM_PG_EWN 10 // 0x0A020000-0A02FFFF
|
||||
#define USE_SRAM_PG_EWN128 9 // 0x0A010000-0A01FFFF
|
||||
#define USE_SRAM_PG_M3 6
|
||||
#define USE_SRAM 0x20000 // 128KByte
|
||||
#define USE_SRAM_PG 48 // 0x0A030000-0A031FFF
|
||||
#define USE_SRAM_PG_EZ4 11 // 0x0A008000-0A00FFFF
|
||||
#define USE_SRAM_PG_EWN 10 // 0x0A020000-0A02FFFF
|
||||
#define USE_SRAM_PG_EWN128 9 // 0x0A010000-0A01FFFF
|
||||
#define USE_SRAM_PG_M3 6
|
||||
|
||||
#define USE_SRAM_NOR 16 // 0x0A010000-0A02FFFF
|
||||
#define USE_SRAM_PSR 50 // 0x0A032000-0A051FFF
|
||||
#define USE_SRAM_PSR_EZ4 16 // 0x0A010000-0A02FFFF
|
||||
#define USE_SRAM_PSR_EWN 8 // 0x0A000000-0A01FFFF
|
||||
#define USE_SRAM_PSR_M3 4
|
||||
#define USE_SRAM_PSR_OMEGA 0
|
||||
#define USE_SRAM_NOR 16 // 0x0A010000-0A02FFFF
|
||||
#define USE_SRAM_PSR 50 // 0x0A032000-0A051FFF
|
||||
#define USE_SRAM_PSR_EZ4 16 // 0x0A010000-0A02FFFF
|
||||
#define USE_SRAM_PSR_EWN 8 // 0x0A000000-0A01FFFF
|
||||
#define USE_SRAM_PSR_M3 4
|
||||
#define USE_SRAM_PSR_OMEGA 40
|
||||
#define USE_SRAM_PSR_OMEGA_DE 0
|
||||
|
||||
#define PSRAM_BUF 0x8000 // 32KB
|
||||
|
||||
@ -76,10 +78,17 @@ extern int GBAmode;
|
||||
|
||||
static u32 savesize;
|
||||
|
||||
static const char *validExtensions[3] = {
|
||||
".GBA",
|
||||
".BIN",
|
||||
".NDS"
|
||||
};
|
||||
|
||||
int carttype = 0;
|
||||
bool isSuperCard = false;
|
||||
bool is3in1Plus = false;
|
||||
bool isOmega = false;
|
||||
bool isOmegaDE = false;
|
||||
|
||||
extern int save_sel(int mod, char *name);
|
||||
extern u16 gl_ingame_RTC_open_status;
|
||||
@ -390,7 +399,7 @@ int check_M3() {
|
||||
|
||||
static bool CheckForSuperCard() {
|
||||
if (CheckSuperCardID() == 0x227E0000) {
|
||||
carttype = 6;
|
||||
carttype = 6;
|
||||
is3in1Plus = false;
|
||||
isSuperCard = true;
|
||||
return true;
|
||||
@ -401,11 +410,21 @@ static bool CheckForSuperCard() {
|
||||
static bool CheckForOmega() { // EZFlash Omega
|
||||
SetRompage(0x8002);
|
||||
if (CheckOmegaID() == 0x227EEA00) {
|
||||
Set_AUTO_save(0);
|
||||
carttype = 1;
|
||||
is3in1Plus = false;
|
||||
isSuperCard = false;
|
||||
isOmega = true;
|
||||
// Set_AUTO_save(0);
|
||||
isOmegaDE = false;
|
||||
/*char ct[4];
|
||||
ct[0] = (io_dldi_data->ioInterface.ioType & 0xFF);
|
||||
ct[1] = ((io_dldi_data->ioInterface.ioType >> 8) & 0xFF);
|
||||
ct[2] = ((io_dldi_data->ioInterface.ioType >> 16) & 0xFF);
|
||||
ct[3] = ((io_dldi_data->ioInterface.ioType >> 24) & 0xFF);
|
||||
ct[4] = 0;
|
||||
if ((ct[0] != 'E') && (ct[1] != 'Z') && (ct[2] != '5') && (ct[3] != 'N'))isOmegaDE = true;*/
|
||||
/*u16 fpgaVer = (Read_FPGA_ver() & 0xF000);
|
||||
if (fpgaVer != 0 && fpgaVer != 0xE000)isOmegaDE = true;*/
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -481,7 +500,15 @@ void _RamPG() {
|
||||
SetM3Ram(USE_SRAM_PG_M3);
|
||||
return;
|
||||
}
|
||||
if (isOmega) { SetRampage(16); } else { SetRampage(USE_SRAM_PG); }
|
||||
if (isOmega) {
|
||||
if (isOmegaDE) {
|
||||
SetRampage(16);
|
||||
return;
|
||||
}
|
||||
SetRampage(96);
|
||||
} else {
|
||||
SetRampage(USE_SRAM_PG);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -503,13 +530,24 @@ void _RamSave(int bnk) {
|
||||
|
||||
if(GBAmode == 0) {
|
||||
if (isOmega) {
|
||||
if (isOmegaDE) {
|
||||
SetRampage(USE_SRAM_PSR_OMEGA_DE + (bnk * 16));
|
||||
return;
|
||||
}
|
||||
SetRampage(USE_SRAM_PSR_OMEGA + (bnk * 16));
|
||||
} else {
|
||||
SetRampage(USE_SRAM_PSR + bnk * 16);
|
||||
}
|
||||
} else {
|
||||
if (isOmega) { SetRampage(USE_SRAM_PSR_OMEGA + (bnk * 16)); return; }
|
||||
SetRampage(USE_SRAM_NOR + bnk * 16);
|
||||
if (isOmega) {
|
||||
if (isOmegaDE) {
|
||||
SetRampage(USE_SRAM_PSR_OMEGA_DE + (bnk * 16));
|
||||
return;
|
||||
}
|
||||
SetRampage(USE_SRAM_PSR_OMEGA + (bnk * 16));
|
||||
} else {
|
||||
SetRampage(USE_SRAM_NOR + bnk * 16);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -547,11 +585,13 @@ int checkSRAM(char *name) {
|
||||
}
|
||||
|
||||
savesize = ctrl.save_siz[GBAmode];
|
||||
// if (isOmega && savesize > 0x10000)savesize = 0x10000;
|
||||
if((savesize < 0x2000) || (savesize > USE_SRAM)) {
|
||||
|
||||
if ((savesize < 0x2000) || (savesize > USE_SRAM)) {
|
||||
savesize = 0x10000;
|
||||
ctrl.save_siz[GBAmode] = savesize;
|
||||
}
|
||||
|
||||
if (isOmega && (savesize > 0x10000))savesize = 0x10000;
|
||||
|
||||
strcpy(name, (char *)ctrl.sav_nam[GBAmode]);
|
||||
ln = strlen(name) - 3;
|
||||
@ -664,9 +704,7 @@ void SRAMdump(int cmd) {
|
||||
mx = 8;
|
||||
|
||||
switch (carttype) {
|
||||
case 1:
|
||||
if (isOmega)mx = 2;
|
||||
break;
|
||||
case 1: if (isOmega)mx = 2; break;
|
||||
case 4: mx = 4; break;
|
||||
case 5: mx = 2; break;
|
||||
case 6:
|
||||
@ -681,15 +719,17 @@ void SRAMdump(int cmd) {
|
||||
dsp_bar(4, -1);
|
||||
dmp = fopen(name, "wb");
|
||||
for(i = 0; i < mx; i++) {
|
||||
if(carttype == 6 && !isSuperCard) {
|
||||
if((carttype == 6) && !isSuperCard) {
|
||||
SetM3Ram(i);
|
||||
} else if (!isSuperCard) {
|
||||
if((carttype >= 4)) {
|
||||
SetEWINRam(8 + i);
|
||||
} else if (isOmega) {
|
||||
} else if (isOmega && !isOmegaDE) {
|
||||
SetRampage(USE_SRAM_PSR_OMEGA + (i * 16));
|
||||
} else if (isOmegaDE) {
|
||||
SetRampage(USE_SRAM_PSR_OMEGA_DE + (i * 16));
|
||||
} else {
|
||||
SetRampage(i * 16);
|
||||
if(!isSuperCard)SetRampage(i * 16);
|
||||
}
|
||||
}
|
||||
|
||||
@ -727,15 +767,17 @@ void SRAMdump(int cmd) {
|
||||
memset(rwbuf, 0, USE_SRAM / 2);
|
||||
if(dmp != NULL)
|
||||
fread(rwbuf, 1, USE_SRAM / 2, dmp);
|
||||
if(carttype == 6) {
|
||||
if((carttype == 6) && !isSuperCard) {
|
||||
SetM3Ram(i);
|
||||
} else {
|
||||
if((carttype >= 4) && !isSuperCard) {
|
||||
SetEWINRam(8 + i);
|
||||
} else if (isOmega) {
|
||||
} else if (isOmega && !isOmegaDE) {
|
||||
SetRampage(USE_SRAM_PSR_OMEGA + (i * 16));
|
||||
} else if (isOmegaDE) {
|
||||
SetRampage(USE_SRAM_PSR_OMEGA_DE + (i * 16));
|
||||
} else {
|
||||
SetRampage(i * 16);
|
||||
if (!isSuperCard)SetRampage(i * 16);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1225,13 +1267,19 @@ bool nameEndsWith (const string& name, const string& extension) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isValidFile(const string& name) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (nameEndsWith(name, validExtensions[i]))return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void FileListGBA() {
|
||||
DIR *dir;
|
||||
struct stat st;
|
||||
FILE *gbaFile;
|
||||
int i;
|
||||
const char* GBAEXT = ".GBA";
|
||||
const char* BINEXT = ".BIN";
|
||||
|
||||
numFiles = 0;
|
||||
numGames = 0;
|
||||
@ -1253,10 +1301,12 @@ void FileListGBA() {
|
||||
// if(pent == NULL)break;
|
||||
if(!pent)break;
|
||||
stat(pent->d_name, &st);
|
||||
if ((((st.st_mode & S_IFMT) == S_IFDIR) && (((string)pent->d_name).compare(".") != 0)) || nameEndsWith(pent->d_name, GBAEXT) || nameEndsWith(pent->d_name, BINEXT)) {
|
||||
if ((((st.st_mode & S_IFMT) == S_IFDIR) && (((string)pent->d_name).compare(".") != 0)) || isValidFile(pent->d_name)) {
|
||||
strcpy(fs[numFiles].filename, pent->d_name);
|
||||
// strcpy(fs[numFiles].Alias, pent->d_name);
|
||||
fs[numFiles].type = st.st_mode;
|
||||
fs[numFiles].isNDSFile = 0;
|
||||
if (nameEndsWith(pent->d_name, validExtensions[2]))fs[numFiles].isNDSFile = 1;
|
||||
if ((((string)pent->d_name).compare(".") != 0) && (((string)pent->d_name).compare("..") != 0) && ((st.st_mode & S_IFMT) != S_IFDIR)) {
|
||||
FILE *file = fopen(pent->d_name, "rb");
|
||||
if (file) {
|
||||
@ -1282,11 +1332,19 @@ void FileListGBA() {
|
||||
gbaFile = fopen(tbuf, "rb");
|
||||
memset(tbuf, 0, 256);
|
||||
if(gbaFile != NULL) {
|
||||
fread(tbuf, 1, 256, gbaFile);
|
||||
tbuf[0xB0] = 0;
|
||||
strcpy(fs[i].gamecode, tbuf + 0xAC);
|
||||
tbuf[0xAC] = 0;
|
||||
strcpy(fs[i].gametitle, tbuf + 0xA0);
|
||||
if (fs[i].isNDSFile == 1) {
|
||||
fread(tbuf, 1, 256, gbaFile);
|
||||
tbuf[0x10] = 0;
|
||||
strcpy(fs[i].gamecode, tbuf + 0x0C);
|
||||
tbuf[0x0C] = 0;
|
||||
strcpy(fs[i].gametitle, tbuf); // 0x0
|
||||
} else {
|
||||
fread(tbuf, 1, 256, gbaFile);
|
||||
tbuf[0xB0] = 0;
|
||||
strcpy(fs[i].gamecode, tbuf + 0xAC);
|
||||
tbuf[0xAC] = 0;
|
||||
strcpy(fs[i].gametitle, tbuf + 0xA0);
|
||||
}
|
||||
fclose(gbaFile);
|
||||
} else {
|
||||
fs[i].gamecode[0] = 0;
|
||||
|
@ -43,18 +43,20 @@
|
||||
#include "skin.h"
|
||||
#include "message.h"
|
||||
#include "tonccpy.h"
|
||||
#include "nds_loader_arm9.h"
|
||||
|
||||
extern uint16* MainScreen;
|
||||
extern uint16* SubScreen;
|
||||
|
||||
#define BG_256_COLOR (BIT(7))
|
||||
|
||||
#define VERSTRING "v0.64"
|
||||
#define VERSTRING "v0.65"
|
||||
|
||||
int numFiles = 0;
|
||||
int numGames = 0;
|
||||
|
||||
char curpath[256];
|
||||
char* currentNDSFilePath[256];
|
||||
int sortfile[200];
|
||||
|
||||
struct GBA_File fs[200];
|
||||
@ -70,6 +72,7 @@ extern int carttype;
|
||||
extern bool isSuperCard;
|
||||
extern bool is3in1Plus;
|
||||
extern bool isOmega;
|
||||
extern bool isOmegaDE;
|
||||
extern u16 gl_ingame_RTC_open_status;
|
||||
extern void SetSDControl(u16 control);
|
||||
|
||||
@ -299,6 +302,53 @@ int cnf_inp(int n1, int n2) {
|
||||
return(ky);
|
||||
}
|
||||
|
||||
int cnf_inp2(int n1, int n2) {
|
||||
int len;
|
||||
int x1, x2;
|
||||
int y1, y2;
|
||||
int xi, yi;
|
||||
u16 *gback;
|
||||
int gsiz;
|
||||
u32 ky;
|
||||
|
||||
len = strlen(cnfmsg2[n1]);
|
||||
if(len < strlen(cnfmsg2[n2]))len = strlen(cnfmsg2[n2]);
|
||||
if(len < 20) len = 20;
|
||||
|
||||
x1 = (256 - len * 6) / 2 - 4;
|
||||
y1 = 4*12-6;
|
||||
x2 = x1 + len * 6 + 9;
|
||||
y2 = 8*12+3;
|
||||
|
||||
gsiz = (x2-x1+1) * (y2-y1+1);
|
||||
gback = (u16*)malloc(sizeof(u16*) * gsiz);
|
||||
for( yi=y1; yi<y2+1; yi++ ){
|
||||
for( xi=x1; xi<x2+1; xi++ ){
|
||||
gback[(xi-x1)+(yi-y1)*(x2+1-x1)] = Point_SUB( SubScreen, xi, yi );
|
||||
}
|
||||
}
|
||||
|
||||
DrawBox_SUB( SubScreen, x1, y1, x2, y2, 6, 0);
|
||||
DrawBox_SUB( SubScreen, x1+1, y1+1, x2-1, y2-1, 5, 1);
|
||||
DrawBox_SUB( SubScreen, x1+2, y1+2, x2-2, y2-2, 6, 0);
|
||||
|
||||
ShinoPrint_SUB(SubScreen, x1 + 6, y1 + 6, (u8 *)cnfmsg2[n1], 0, 0, 0);
|
||||
ShinoPrint_SUB(SubScreen, x1 + 6, y1 + 20, (u8 *)cnfmsg2[n2], 0, 0, 0);
|
||||
ShinoPrint_SUB(SubScreen, x1 + (len/2)*6 - 50, y1 + 37, (u8*)cnfmsg2[0], 0, 0, 0);
|
||||
|
||||
|
||||
ky = inp_key();
|
||||
|
||||
for( yi=y1; yi<y2+1; yi++ ){
|
||||
for( xi=x1; xi<x2+1; xi++ ){
|
||||
Pixel_SUB(SubScreen, xi, yi, gback[(xi-x1) + (yi-y1)*(x2+1-x1)] );
|
||||
}
|
||||
}
|
||||
free(gback);
|
||||
return(ky);
|
||||
}
|
||||
|
||||
|
||||
|
||||
u16 *gbar = NULL;
|
||||
int oldper;
|
||||
@ -874,8 +924,7 @@ int gba_sel() {
|
||||
}
|
||||
if(ky & KEY_SELECT) {
|
||||
if(softReset && (GBAmode == 0)) {
|
||||
if(!(fs[sortfile[sel]].type & S_IFDIR))
|
||||
ret = writeFileToRam(sortfile[sel]);
|
||||
if(!(fs[sortfile[sel]].type & S_IFDIR) && (fs[sortfile[sel]].isNDSFile != 1))ret = writeFileToRam(sortfile[sel]);
|
||||
if(ret != 0) {
|
||||
_gba_sel_dsp(sel, yc, 0);
|
||||
err_cnf(7, 8);
|
||||
@ -942,6 +991,15 @@ int gba_sel() {
|
||||
cmd = -1;
|
||||
break;
|
||||
}
|
||||
if (fs[sortfile[sel]].isNDSFile == 1) {
|
||||
sprintf(tbuf, "%s%s", curpath, fs[sortfile[sel]].filename);
|
||||
tonccpy((char*)currentNDSFilePath, (char*)tbuf, (strlen((const char*)tbuf) + 1));
|
||||
const char *ndsARGArray[] = { (char*)currentNDSFilePath };
|
||||
runNdsFile(tbuf, 1, ndsARGArray);
|
||||
cmd = -1;
|
||||
// sortfile[sel]
|
||||
break;
|
||||
}
|
||||
if(GBAmode == 0) { ret = writeFileToRam(sortfile[sel]); } else { ret = writeFileToNor(sortfile[sel]); }
|
||||
if(ret != 0) {
|
||||
if(ret == 2) {
|
||||
@ -1044,6 +1102,8 @@ REG_EXMEMCNT = (reg & 0xFFE0) | (1 << 4) | (1 << 2) | 1;
|
||||
|
||||
checkFlashID();
|
||||
|
||||
if(isOmega && (cnf_inp2(1, 2) & KEY_A))isOmegaDE = true;
|
||||
|
||||
switch (carttype) {
|
||||
default:
|
||||
err_cnf(2, 3);
|
||||
@ -1056,7 +1116,9 @@ REG_EXMEMCNT = (reg & 0xFFE0) | (1 << 4) | (1 << 2) | 1;
|
||||
case 1:
|
||||
if (is3in1Plus) {
|
||||
ShinoPrint_SUB( SubScreen, 23*6, 1*12-2, (u8*)"[3in1Pls]", 0, 0, 0 );
|
||||
} else if (isOmega) {
|
||||
} else if (isOmega && !isOmegaDE) {
|
||||
ShinoPrint_SUB( SubScreen, 23*6, 1*12-2, (u8*)"[ Ħmega ]", 0, 0, 0 );
|
||||
} else if (isOmegaDE) {
|
||||
ShinoPrint_SUB( SubScreen, 23*6, 1*12-2, (u8*)"[ Ħ DE ]", 0, 0, 0 );
|
||||
} else {
|
||||
ShinoPrint_SUB( SubScreen, 23*6, 1*12-2, (u8*)" [ 3in1 ]", 0, 0, 0 );
|
||||
@ -1123,7 +1185,7 @@ inp_key();
|
||||
GBA_ini();
|
||||
|
||||
if(!checkSRAM_cnf() && (carttype != 5) && (cnf_inp(9, 10) & KEY_B))turn_off(softReset);
|
||||
|
||||
|
||||
//ShinoPrint_SUB( SubScreen, 6*6, 7*12, "FILE LIST", 1, 0, 0 );
|
||||
// mkdir("/GBA_SAVE", 0777);
|
||||
// mkdir("/GBA_SIGN", 0777);
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
char *errmsg[16];
|
||||
char *cnfmsg[11];
|
||||
char *cnfmsg2[3];
|
||||
char *barmsg[6];
|
||||
char *cmd_m[4];
|
||||
char *t_msg[22];
|
||||
@ -63,6 +64,20 @@ static const char *cnfmsg_j[11] = {
|
||||
"設定(SRAMは失われます)していいですか?" // 10
|
||||
};
|
||||
|
||||
|
||||
|
||||
static const char *cnfmsg2_j[3] = {
|
||||
"(A):はい, (B):いいえ", // 0
|
||||
"EZFlash Omega を検出しました。", // 1
|
||||
"これは決定版ですか?" // 2
|
||||
};
|
||||
|
||||
static const char *cnfmsg2_e[3] = {
|
||||
"(A):Yes, (B):No", // 0
|
||||
"Detected EZFlash Omega.", // 1
|
||||
"Is this Definitive Edition?" // 2
|
||||
};
|
||||
|
||||
static const char *cnfmsg_e[11] = {
|
||||
"(A):Run, (B):Cancel", // 0
|
||||
"Write save data in SRAM", // 1
|
||||
@ -191,6 +206,7 @@ void setLangMsg() {
|
||||
if(UserLang != 0) {
|
||||
for(i = 0; i < 16; i++)errmsg[i] = (char*)errmsg_e[i];
|
||||
for(i = 0; i < 11; i++)cnfmsg[i] = (char*)cnfmsg_e[i];
|
||||
for(i = 0; i < 3; i++)cnfmsg2[i] = (char*)cnfmsg2_e[i];
|
||||
for(i = 0; i < 6; i++)barmsg[i] = (char*)barmsg_e[i];
|
||||
for(i = 0; i < 4; i++)cmd_m[i] = (char*)cmd_m_e[i];
|
||||
for(i = 0; i < 22; i++)t_msg[i] = (char*)t_msg_e[i];
|
||||
@ -200,6 +216,7 @@ void setLangMsg() {
|
||||
|
||||
for(i = 0; i < 16; i++)errmsg[i] = (char*)errmsg_j[i];
|
||||
for(i = 0; i < 11; i++)cnfmsg[i] = (char*)cnfmsg_j[i];
|
||||
for(i = 0; i < 3; i++)cnfmsg2[i] = (char*)cnfmsg2_j[i];
|
||||
for(i = 0; i < 6; i++)barmsg[i] = (char*)barmsg_j[i];
|
||||
for(i = 0; i < 4; i++)cmd_m[i] = (char*)cmd_m_j[i];
|
||||
for(i = 0; i < 22; i++)t_msg[i] = (char*)t_msg_j[i];
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
extern char *errmsg[];
|
||||
extern char *cnfmsg[];
|
||||
extern char *cnfmsg2[];
|
||||
extern char *barmsg[];
|
||||
extern char *cmd_m[];
|
||||
extern char *t_msg[];
|
||||
|
Loading…
Reference in New Issue
Block a user