update melonds (TODO: Wire up camera)

This commit is contained in:
CasualPokePlayer 2022-10-20 00:47:16 -07:00
parent ad85be7bed
commit 8f1a0b9bb1
4 changed files with 61 additions and 14 deletions

Binary file not shown.

View File

@ -84,11 +84,7 @@ static bool LoadDSiWare(u8* TmdData)
fread(es_keyY, 16, 1, bios7i);
fclose(bios7i);
FILE* curNAND = Platform::OpenLocalFile(Config::DSiNANDPath, "r+b");
if (!curNAND)
return false;
if (!DSi_NAND::Init(curNAND, es_keyY))
if (!DSi_NAND::Init(es_keyY))
return false;
bool ret = DSi_NAND::ImportTitle("dsiware.rom", TmdData, false);
@ -106,11 +102,6 @@ EXPORT bool Init(LoadFlags loadFlags, LoadData* loadData, FirmwareSettings* fwSe
bool isDsi = !!(loadFlags & IS_DSI);
NDS::SetConsoleType(isDsi);
// time calls are deterministic under wbx, so this will force the mac address to a constant value instead of relying on whatever is in the firmware
// fixme: might want to allow the user to specify mac address?
// edit: upstream has ability to set mac address, most work is in frontend now
srand(time(NULL));
Config::RandomizeMAC = true;
biz_time = 0;
RTC::RtcCallback = BizRtcCallback;
@ -126,6 +117,7 @@ EXPORT bool Init(LoadFlags loadFlags, LoadData* loadData, FirmwareSettings* fwSe
std::string fwMessage(fwSettings->FirmwareMessage, fwSettings->FirmwareMessageLength);
fwMessage += '\0';
Config::FirmwareMessage = fwMessage;
Config::FirmwareMAC = "00:09:BF:0E:49:16"; // TODO: Make configurable
}
NANDFilePtr = isDsi ? new std::stringstream(std::string(loadData->NandData, loadData->NandLen), std::ios_base::in | std::ios_base::out | std::ios_base::binary) : nullptr;

View File

@ -23,6 +23,16 @@ void StopEmu()
{
}
int InstanceID()
{
return 0;
}
std::string InstanceFileSuffix()
{
return "";
}
int GetConfigInt(ConfigEntry entry)
{
const int imgsizes[] = {0, 256, 512, 1024, 2048, 4096};
@ -71,7 +81,6 @@ bool GetConfigBool(ConfigEntry entry)
case DSiSD_ReadOnly: return Config::DSiSDReadOnly != 0;
case DSiSD_FolderSync: return Config::DSiSDFolderSync != 0;
case Firm_RandomizeMAC: return Config::RandomizeMAC != 0;
case Firm_OverrideSettings: return Config::FirmwareOverrideSettings != 0;
case UseRealTime: return Config::UseRealTime != 0;
@ -247,12 +256,45 @@ void MP_DeInit()
{
}
int MP_SendPacket(u8* data, int len)
void MP_Begin()
{
}
void MP_End()
{
}
int MP_SendPacket(u8* data, int len, u64 timestamp)
{
return 0;
}
int MP_RecvPacket(u8* data, bool block)
int MP_RecvPacket(u8* data, u64* timestamp)
{
return 0;
}
int MP_SendCmd(u8* data, int len, u64 timestamp)
{
return 0;
}
int MP_SendReply(u8* data, int len, u64 timestamp, u16 aid)
{
return 0;
}
int MP_SendAck(u8* data, int len, u64 timestamp)
{
return 0;
}
int MP_RecvHostPacket(u8* data, u64* timestamp)
{
return 0;
}
u16 MP_RecvReplies(u8* data, u64 timestamp, u16 aidmask)
{
return 0;
}
@ -280,4 +322,17 @@ void Sleep(u64 usecs)
{
}
void Camera_Start(int num)
{
}
void Camera_Stop(int num)
{
}
void Camera_CaptureFrame(int num, u32* frame, int width, int height, bool yuv)
{
// TODO
}
}

@ -1 +1 @@
Subproject commit 8dae55983080b7dfc7be346892da9963d1645dca
Subproject commit bcbd76d780cebc0cc773a944fcd2a2fac20b38b0