diff --git a/Changelog.txt b/Changelog.txt
index 7b72aa7..b4ee5eb 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -37,14 +37,13 @@ Version 0.2.4 (4-10-2011)
- Program now makes use of lower screen for most messages, which allows longer, more detailled messages.
- Adds a Readme file/Manual to the program.
-Version 0.3 (6-??-2011)
+Version 0.3.0 RC1 (8-??-2011)
This is the first non-beta, feature complete release.
- Adds the ability to translate most parts of the user interface.
- Adds Slot 2 backup mode (you will need a Slot 2 flash card; anything that has a DLDI driver should be supported).
- Enables FTP restore mode for saves bigger than the memory buffer (usually 2 MB).
-- Fixes FTP mode so that multiple transactions are possible without restarting.
- Various stability fixes.
- Many behind-the scenes improvements aimed to simplify further hacking.
- Instruction file is no longer beta.
diff --git a/HACKING.txt b/HACKING.txt
index 6df6090..113c86d 100644
--- a/HACKING.txt
+++ b/HACKING.txt
@@ -28,3 +28,6 @@ A small library for parsing ini files. Mostly untouched.
- *.i
- ini.cpp
+Debug target:
+I have finally added a debug build target, which prints some additional information on the screen. You should never need it, but one never knows. Since my skills at writing makefiles su... erm... could be better, you will need to run a "make clean" before running "make debug". If you want to add additional debug output without having to worry about removing it on a new release, just add an "#ifdef DEBUG ... #endif" block around your debug code.
+
diff --git a/arm9/source/display.cpp b/arm9/source/display.cpp
index 0ecc2ef..3649fcc 100644
--- a/arm9/source/display.cpp
+++ b/arm9/source/display.cpp
@@ -57,7 +57,7 @@ void displayInit()
void displayTitle()
{
- displayMessageF(STR_TITLE_MSG, VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO);
+ displayMessageF(STR_TITLE_MSG, VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO, VERSION_EXTRA);
displayStateF(STR_STR, "Press (B) to continue");
while (!(keysCurrent() & KEY_B));
@@ -349,7 +349,7 @@ char *ParseLine(char *start, const char *end, int &length)
while (start < end) {
if (*start == '\n') {
- length = 1;
+ length = 0;
return start;
}
diff --git a/arm9/source/gba.cpp b/arm9/source/gba.cpp
index 5ab761f..b5f2500 100644
--- a/arm9/source/gba.cpp
+++ b/arm9/source/gba.cpp
@@ -204,6 +204,12 @@ void gbaEepromRead8Bytes(u8 *out, u32 addr, bool short_addr = false)
buf[15] = addr;
buf[16] = 0;
}
+ for (int i = 0; i < 17; i++) {
+ if (buf[i])
+ buf[i] = 255;
+ else
+ buf[i] = 0;
+ }
static u32 eeprom = 0x09ffff00;
@@ -491,7 +497,6 @@ bool gbaWriteSave(u32 dst, u8 *src, u32 len, u8 type)
// FIXME: currently, you can only write "all or nothing"
nbanks = 2;
for (int j = 0; j < nbanks; j++) {
- displayStateF(STR_STR, "Switching Bank.");
*(u8*)0x0a005555 = 0xaa;
swiDelay(10);
*(u8*)0x0a002aaa = 0x55;
diff --git a/arm9/source/globals.h b/arm9/source/globals.h
index c61a598..0472dd8 100644
--- a/arm9/source/globals.h
+++ b/arm9/source/globals.h
@@ -32,6 +32,7 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 3
#define VERSION_MICRO 0
+#define VERSION_EXTRA "rc1"
extern u8 *data;
extern u32 size_buf;
diff --git a/arm9/source/hardware.cpp b/arm9/source/hardware.cpp
index a2acf2c..ee1700c 100644
--- a/arm9/source/hardware.cpp
+++ b/arm9/source/hardware.cpp
@@ -509,6 +509,7 @@ void hwBackupSlot2()
uint8 type = auxspi_save_type(slot_1_type);
// just select a filename, no extra work required!
+ displayMessageF(STR_HW_SELECT_FILE_OW);
char path[256];
char fname[256] = "";
fileSelect("/", path, fname, 0, true, false);
@@ -568,7 +569,6 @@ void hwRestoreSlot2()
fileSelect("/", path, fname, 0, false, false);
char msg[256];
// This does not have to be translated.
- // FIXME: make this more meaningful!
sprintf(msg, "%s/%s", path, fname);
FILE *file = fopen(msg, "rb");
@@ -616,7 +616,9 @@ void hwRestoreSlot2()
}
// ------------------------------------------------------------
-void hwLoginFTP(netbuf **buf)
+static netbuf *buf = NULL;
+
+void hwLoginFTP()
{
int j;
static int jmax = 10;
@@ -629,7 +631,7 @@ void hwLoginFTP(netbuf **buf)
displayMessage2F(STR_HW_FTP_SEEK_FTP);
sprintf(txt, "%s:%i", ftp_ip, ftp_port);
j = 0;
- while (!FtpConnect(txt, buf)) {
+ while (!FtpConnect(txt, &buf)) {
j++;
if (j >= jmax) {
displayWarning2F(STR_HW_FTP_ERR_FTP);
@@ -639,7 +641,7 @@ void hwLoginFTP(netbuf **buf)
}
displayMessage2F(STR_HW_FTP_LOGIN);
j = 0;
- while (!FtpLogin(ftp_user, ftp_pass, *buf)) {
+ while (!FtpLogin(ftp_user, ftp_pass, buf)) {
j++;
if (j >= jmax) {
displayWarning2F(STR_HW_FTP_ERR_LOGIN);
@@ -652,7 +654,7 @@ void hwLoginFTP(netbuf **buf)
void hwBackupFTP(bool dlp)
{
- netbuf *buf, *ndata;
+ netbuf *ndata;
// Dump save and write it to FTP server
// First: swap card
@@ -669,7 +671,7 @@ void hwBackupFTP(bool dlp)
// Second: connect to FTP server
if (!ftp_active)
- hwLoginFTP(&buf);
+ hwLoginFTP();
char fdir[256] = "";
char fname[256] ="";
@@ -704,6 +706,7 @@ void hwBackupFTP(bool dlp)
sprintf(fname, "%.12s.%i.sav", nds.gameTitle, cnt);
}
}
+ displayMessage2F(STR_HW_WRITE_FILE, fname);
// Fourth: dump save
displayStateF(STR_EMPTY);
@@ -720,19 +723,19 @@ void hwBackupFTP(bool dlp)
if (delta == 0) {
displayMessage2F(STR_HW_FTP_READ_ONLY);
} else {
- displayMessage2F(STR_EMPTY);
+ displayMessage2F(STR_HW_WRITE_FILE, fname);
}
if (delta < length) {
displayStateF(STR_HW_FTP_SLOW);
} else {
- displayStateF(STR_EMPTY);
+ displayMessage2F(STR_HW_WRITE_FILE, fname);
}
}
}
FtpCloseAccess(buf, ndata);
- FtpQuit(buf);
+ //FtpQuit(buf);
- Wifi_DisconnectAP();
+ //Wifi_DisconnectAP();
if (dlp) {
displayMessage2F(STR_HW_PLEASE_REBOOT);
@@ -800,12 +803,12 @@ bool hwRestoreFTPPartial(u32 ofs, u32 size, u32 type, netbuf *ndata)
void hwRestoreFTP(bool dlp)
{
- netbuf *buf, *ndata;
+ netbuf *ndata;
// Dump save and write it to FTP server
// First: connect to FTP server
- if (ftp_active)
- hwLoginFTP(&buf);
+ if (!ftp_active)
+ hwLoginFTP();
// Second: select a filename
char fdir[256] = "";
@@ -838,9 +841,9 @@ void hwRestoreFTP(bool dlp)
hwRestoreFTPPartial(i << len_block, len_block, type, ndata);
}
FtpClose(ndata);
- FtpQuit(buf);
+ //FtpQuit(buf);
- Wifi_DisconnectAP();
+ //Wifi_DisconnectAP();
if (dlp) {
displayMessage2F(STR_HW_PLEASE_REBOOT);
@@ -856,7 +859,7 @@ void hwBackupGBA(u8 type)
{
if ((type == 0) || (type > 5))
return;
-
+
if ((type == 1) || (type == 2)) {
// This is not to be translated, it will be removed at some point.
displayMessageF(STR_STR, "I can't read this save type\nyet. Please use Rudolphs tool\ninstead.");
@@ -895,7 +898,7 @@ void hwBackupGBA(u8 type)
fclose(file);
displayStateF(STR_STR, "Done!");
- while(1);
+ //while(1);
}
void hwRestoreGBA()
@@ -931,8 +934,11 @@ void hwRestoreGBA()
displayMessage2F(STR_HW_WRITE_GAME);
gbaWriteSave(0, data, size, type);
+ displayStateF(STR_STR, "Done!");
+/*
displayMessage2F(STR_HW_PLEASE_REBOOT);
while(1);
+ */
}
void hwEraseGBA()
@@ -940,8 +946,13 @@ void hwEraseGBA()
u8 type = gbaGetSaveType();
if ((type == 0) || (type > 5))
return;
-
+
+ displayMessage2F(STR_HW_WARN_DELETE);
+ while (!(keysCurrent() & (KEY_UP | KEY_R | KEY_Y))) {};
gbaFormatSave(type);
+ displayMessage2F(STR_HW_DID_DELETE);
+ while (1);
+
}
// -------------------------------------------------
diff --git a/arm9/source/main.cpp b/arm9/source/main.cpp
index 94255a6..594cd7a 100644
--- a/arm9/source/main.cpp
+++ b/arm9/source/main.cpp
@@ -57,6 +57,9 @@ using std::max;
char bootdir[256] = "/";
+#define REBOOT_WIFI
+
+
// ============================================================================
void mode_dsi()
{
@@ -197,18 +200,21 @@ void mode_gba()
if ((touchXY.py > 8*0) && (touchXY.py < 8*8)) {
displayPrintUpper();
hwBackupGBA(gbatype);
+ displayPrintLower();
}
// restore
if ((touchXY.py > 8*8) && (touchXY.py < 8*16)) {
displayPrintUpper();
hwRestoreGBA();
+ displayPrintLower();
}
// erase
if ((touchXY.py > 8*16) && (touchXY.py < 8*24)) {
displayPrintUpper();
hwEraseGBA();
+ displayPrintLower();
}
}
}
@@ -228,12 +234,20 @@ void mode_wifi()
// backup
if ((touchXY.py > 8*0) && (touchXY.py < 8*8)) {
hwBackupFTP();
+#ifdef REBOOT_WIFI
+ displayMessage2F(STR_HW_PLEASE_REBOOT);
+ while(1);
+#endif
displayPrintLower();
}
// restore
if ((touchXY.py > 8*8) && (touchXY.py < 8*16)) {
hwRestoreFTP();
+#ifdef REBOOT_WIFI
+ displayMessage2F(STR_HW_PLEASE_REBOOT);
+ while(1);
+#endif
displayPrintLower();
}
diff --git a/arm9/source/strings.cpp b/arm9/source/strings.cpp
index 0e7832f..540ce3c 100644
--- a/arm9/source/strings.cpp
+++ b/arm9/source/strings.cpp
@@ -62,7 +62,7 @@ bool stringsLoadFile(const char *fname)
ADD_STRING(STR_STR, "%s");
//
ADD_STRING(STR_MM_WIPE,"\n WIPES OUT ALL SAVE DATA\n ON YOUR GAME !");
- ADD_STRING(STR_TITLE_MSG,"DS savegame manager\nVersion 0.3.0\nBy Pokedoc");
+ ADD_STRING(STR_TITLE_MSG,"DS savegame manager\nVersion %i.%i.%i%s\nBy Pokedoc");
ADD_STRING(STR_BOOT_NO_INI,"Unable to open ini file!\nPlease make sure that it is\n1. in this apps folder, or"
"\n2. in the root folder\nIf 1. does not work, use 2.");
ADD_STRING(STR_BOOT_MODE_UNSUPPORTED,"This mode is DISABLED.\nPlease restart the system.");
@@ -113,7 +113,6 @@ bool stringsLoadFile(const char *fname)
remove("/tmpfile");
// Convert manual newline commands added as plaintext in the translation file.
- // FIXME: this does not seem to work reliably yet (or maybe it is the print function).
for (int i = 0; i < STR_LAST; i++) {
char *ptr = message_strings[i];
while ((ptr = strchr(ptr, '\\')) != NULL) {
diff --git a/lang/sgm_german.ini b/lang/sgm_german.ini
index 58a2f5a..766ae33 100644
--- a/lang/sgm_german.ini
+++ b/lang/sgm_german.ini
@@ -6,7 +6,7 @@
# The strings "0" and "1" should never be used; they are internal stuff for "empty" and "untranslated" strings.
# 2-5: These are boot-time messages.
-2=DS savegame manager\nVersion %i.%i.%i\nVon Pokedoc
+2=DS savegame manager\nVersion %i.%i.%i %s\nVon Pokedoc
# This is an error message appearing when the ini file can not be found.
3=Kann die ini-Datei nicht finden!\nBitte kopiere sie entweder\n1. in den selben Ordner wie die nds Datei, oder\n2. in das Hauptverzeichnis.\nWenn 1. nicht funktioniert, musst Du 2. verwenden
# Thsis is an error message called when the system tries to enter a mode that is not supported yet (e.g. DSi mode)
diff --git a/lang/template.ini b/lang/template.ini
index 00881c6..4382ebe 100644
--- a/lang/template.ini
+++ b/lang/template.ini
@@ -9,7 +9,7 @@
# 2-5: These are boot-time messages.
# You do not need to translate 2 and 3, they only appear *before* this file is read. Since the format is frozen, I leave these slots in.
-#2=DS savegame manager\nVersion %i.%i.%i\nBy Pokedoc
+#2=DS savegame manager\nVersion %i.%i.%i %s\nBy Pokedoc
# This is an error message appearing when the ini file can not be found.
#3=Unable to open ini file!\nPlease make sure that it is\n1. in this apps folder, or\n2. in the root folder\nIf 1. does not work, use 2.
# Thsis is an error message called when the system tries to enter a mode that is not supported yet (e.g. DSi mode)
diff --git a/savegame_manager.odt b/savegame_manager.odt
index 005d3ac..33c9934 100644
Binary files a/savegame_manager.odt and b/savegame_manager.odt differ
diff --git a/savegame_manager.pnproj b/savegame_manager.pnproj
index b8b7754..bf9ead6 100644
--- a/savegame_manager.pnproj
+++ b/savegame_manager.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/savegame_manager.pnps b/savegame_manager.pnps
deleted file mode 100644
index 6edac41..0000000
--- a/savegame_manager.pnps
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file