mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
Now Mario Kart Wii can create/read/write save file correctly.
BTW: I doubt "Zelda Twilight Princess" save file might be broken since r4704, anyone who has got this game please have a test. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4708 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e39b844af6
commit
077768501b
@ -326,11 +326,24 @@ void ExecuteCommand(u32 _Address)
|
|||||||
|
|
||||||
if(pDevice->IsHardware())
|
if(pDevice->IsHardware())
|
||||||
{
|
{
|
||||||
// We have already opened this device, return -6
|
|
||||||
if(pDevice->IsOpened())
|
if(pDevice->IsOpened())
|
||||||
Memory::Write_U32(/*u32(-6)*/DeviceID, _Address + 4);
|
{
|
||||||
|
if (pDevice->GetDeviceName().find("/dev/net/") != std::string::npos)
|
||||||
|
// AyuanX: /dev/net/XXX are more like events which don't need close so they can be reopened
|
||||||
|
// At least it is so for /dev/net/kd/request & /dev/net/ncd/manage
|
||||||
|
pDevice->Open(_Address, Mode);
|
||||||
|
else
|
||||||
|
// We have already opened this hardware, return -6
|
||||||
|
|
||||||
|
// AyuanX: TO_BE_VERIFIED
|
||||||
|
// -6 seems to be a bad number as in NET it means "Retry Again"(?)
|
||||||
|
// I guess -4 stands for "Already Opened"(?)
|
||||||
|
Memory::Write_U32(u32(-6), _Address + 4);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
pDevice->Open(_Address, Mode);
|
pDevice->Open(_Address, Mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -59,15 +59,18 @@ it failed)
|
|||||||
|
|
||||||
extern std::queue<std::pair<u32,std::string> > g_ReplyQueueLater;
|
extern std::queue<std::pair<u32,std::string> > g_ReplyQueueLater;
|
||||||
|
|
||||||
|
|
||||||
// **********************************************************************************
|
// **********************************************************************************
|
||||||
// Handle /dev/net/kd/request requests
|
// Handle /dev/net/kd/request requests
|
||||||
CWII_IPC_HLE_Device_net_kd_request::CWII_IPC_HLE_Device_net_kd_request(u32 _DeviceID, const std::string& _rDeviceName)
|
CWII_IPC_HLE_Device_net_kd_request::CWII_IPC_HLE_Device_net_kd_request(u32 _DeviceID, const std::string& _rDeviceName)
|
||||||
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
||||||
{}
|
, m_UserID("Dolphin-EMU")
|
||||||
|
// TODO: Dump the true ID from real Wii
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
CWII_IPC_HLE_Device_net_kd_request::~CWII_IPC_HLE_Device_net_kd_request()
|
CWII_IPC_HLE_Device_net_kd_request::~CWII_IPC_HLE_Device_net_kd_request()
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
bool CWII_IPC_HLE_Device_net_kd_request::Open(u32 _CommandAddress, u32 _Mode)
|
bool CWII_IPC_HLE_Device_net_kd_request::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
{
|
{
|
||||||
@ -123,7 +126,8 @@ bool CWII_IPC_HLE_Device_net_kd_request::IOCtl(u32 _CommandAddress)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_NWC24_REQUEST_GENERATED_USER_ID: // (Input: none, Output: 32 bytes)
|
case IOCTL_NWC24_REQUEST_GENERATED_USER_ID: // (Input: none, Output: 32 bytes)
|
||||||
PanicAlert("IOCTL_NWC24_REQUEST_GENERATED_USER_ID");
|
INFO_LOG(WII_IPC_NET, "NET_KD_REQ: IOCTL_NWC24_REQUEST_GENERATED_USER_ID");
|
||||||
|
memcpy(Memory::GetPointer(BufferOut), m_UserID.c_str(), m_UserID.length() + 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_NWC24_GET_SCHEDULAR_STAT:
|
case IOCTL_NWC24_GET_SCHEDULAR_STAT:
|
||||||
@ -156,10 +160,12 @@ bool CWII_IPC_HLE_Device_net_kd_request::IOCtl(u32 _CommandAddress)
|
|||||||
// Handle /dev/net/ncd/manage requests
|
// Handle /dev/net/ncd/manage requests
|
||||||
CWII_IPC_HLE_Device_net_ncd_manage::CWII_IPC_HLE_Device_net_ncd_manage(u32 _DeviceID, const std::string& _rDeviceName)
|
CWII_IPC_HLE_Device_net_ncd_manage::CWII_IPC_HLE_Device_net_ncd_manage(u32 _DeviceID, const std::string& _rDeviceName)
|
||||||
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
CWII_IPC_HLE_Device_net_ncd_manage::~CWII_IPC_HLE_Device_net_ncd_manage()
|
CWII_IPC_HLE_Device_net_ncd_manage::~CWII_IPC_HLE_Device_net_ncd_manage()
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
bool CWII_IPC_HLE_Device_net_ncd_manage::Open(u32 _CommandAddress, u32 _Mode)
|
bool CWII_IPC_HLE_Device_net_ncd_manage::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,9 @@ private:
|
|||||||
IOCTL_NWC24_SET_SCRIPT_MODE = 0x22,
|
IOCTL_NWC24_SET_SCRIPT_MODE = 0x22,
|
||||||
IOCTL_NWC24_REQUEST_SHUTDOWN = 0x28,
|
IOCTL_NWC24_REQUEST_SHUTDOWN = 0x28,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Max size 32 Bytes
|
||||||
|
std::string m_UserID;
|
||||||
};
|
};
|
||||||
|
|
||||||
// **********************************************************************************
|
// **********************************************************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user