Give movies firmware settings as well as bios settings. (For now, it's write only!)
This commit is contained in:
parent
61e06aea02
commit
ee7244e382
|
@ -30,6 +30,7 @@
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "wifi.h"
|
#include "wifi.h"
|
||||||
#include "emufile.h"
|
#include "emufile.h"
|
||||||
|
#include "firmware.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -499,6 +500,7 @@ extern struct TCommonSettings {
|
||||||
strcpy(ARM9BIOS, "biosnds9.bin");
|
strcpy(ARM9BIOS, "biosnds9.bin");
|
||||||
strcpy(ARM7BIOS, "biosnds7.bin");
|
strcpy(ARM7BIOS, "biosnds7.bin");
|
||||||
strcpy(Firmware, "firmware.bin");
|
strcpy(Firmware, "firmware.bin");
|
||||||
|
NDS_FillDefaultFirmwareConfigData(&InternalFirmConf);
|
||||||
|
|
||||||
wifi.mode = 0;
|
wifi.mode = 0;
|
||||||
wifi.infraBridgeAdapter = 0;
|
wifi.infraBridgeAdapter = 0;
|
||||||
|
@ -519,6 +521,7 @@ extern struct TCommonSettings {
|
||||||
bool UseExtFirmware;
|
bool UseExtFirmware;
|
||||||
char Firmware[256];
|
char Firmware[256];
|
||||||
bool BootFromFirmware;
|
bool BootFromFirmware;
|
||||||
|
struct NDS_fw_config_data InternalFirmConf;
|
||||||
|
|
||||||
bool DebugConsole;
|
bool DebugConsole;
|
||||||
bool EnsataEmulation;
|
bool EnsataEmulation;
|
||||||
|
|
|
@ -823,6 +823,7 @@ int NDS_CreateDummyFirmware( struct NDS_fw_config_data *user_settings)
|
||||||
//Wifi settings CRC16
|
//Wifi settings CRC16
|
||||||
(*(u16*)(MMU.fw.data + 0x2A)) = calc_CRC16(0, (MMU.fw.data + 0x2C), 0x138);
|
(*(u16*)(MMU.fw.data + 0x2A)) = calc_CRC16(0, (MMU.fw.data + 0x2C), 0x138);
|
||||||
|
|
||||||
|
memcpy(&CommonSettings.InternalFirmConf, user_settings, sizeof(struct NDS_fw_config_data));
|
||||||
return TRUE ;
|
return TRUE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -293,6 +293,35 @@ int MovieData::dump(EMUFILE* fp, bool binary)
|
||||||
if(CommonSettings.UseExtBIOS)
|
if(CommonSettings.UseExtBIOS)
|
||||||
fp->fprintf("swiFromBios %d\n", CommonSettings.SWIFromBIOS);
|
fp->fprintf("swiFromBios %d\n", CommonSettings.SWIFromBIOS);
|
||||||
|
|
||||||
|
fp->fprintf("useExtFirmware %d\n", CommonSettings.UseExtFirmware);
|
||||||
|
|
||||||
|
if(CommonSettings.UseExtFirmware) {
|
||||||
|
fp->fprintf("bootFromFirmware %d\n", CommonSettings.BootFromFirmware);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
char temp_str[27];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* FIXME: harshly only use the lower byte of the UTF-16 character.
|
||||||
|
* This would cause strange behaviour if the user could set UTF-16 but
|
||||||
|
* they cannot yet.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < CommonSettings.InternalFirmConf.nickname_len; i++) {
|
||||||
|
temp_str[i] = CommonSettings.InternalFirmConf.nickname[i];
|
||||||
|
}
|
||||||
|
temp_str[i] = '\0';
|
||||||
|
fp->fprintf("firmNickname %s\n", temp_str);
|
||||||
|
for (i = 0; i < CommonSettings.InternalFirmConf.message_len; i++) {
|
||||||
|
temp_str[i] = CommonSettings.InternalFirmConf.message[i];
|
||||||
|
}
|
||||||
|
temp_str[i] = '\0';
|
||||||
|
fp->fprintf("firmMessage %s\n", temp_str);
|
||||||
|
fp->fprintf("firmFavColour %d\n", CommonSettings.InternalFirmConf.fav_colour);
|
||||||
|
fp->fprintf("firmBirthMonth %d\n", CommonSettings.InternalFirmConf.birth_month);
|
||||||
|
fp->fprintf("firmBirthDay %d\n", CommonSettings.InternalFirmConf.birth_day);
|
||||||
|
fp->fprintf("firmLanguage %d\n", CommonSettings.InternalFirmConf.language);
|
||||||
|
}
|
||||||
|
|
||||||
char timestr[32];
|
char timestr[32];
|
||||||
struct tm *tm = gmtime(&rtcStart);
|
struct tm *tm = gmtime(&rtcStart);
|
||||||
strftime(timestr, 32, "%Y-%m-%dT%H:%M:%SZ", tm);
|
strftime(timestr, 32, "%Y-%m-%dT%H:%M:%SZ", tm);
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue