summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authormasken <masken@emulation64.com>2008-08-23 14:53:33 +0000
committermasken <masken@emulation64.com>2008-08-23 14:53:33 +0000
commit0849a96d815ee0695c442ba1182594ffb97b72da (patch)
tree8eed8f344c90649c9c864f3fa4217c816338aa1f /Source/Core
parentd697eb6a8558ddbf3a45e1297a5edc1a5d23a37a (diff)
Added SYSCONF files. Fixed the return value of FileIO::Read().
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@281 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp2
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp6
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h9
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp5
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h1
5 files changed, 19 insertions, 4 deletions
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
index 9292842e98..f80ec0559d 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
@@ -209,7 +209,7 @@ void ExecuteCommand(u32 _Address)
// HLE - Create a new HLE device
std::string DeviceName;
Memory::GetString(DeviceName, Memory::Read_U32(_Address + 0xC));
- u32 Mode = (DeviceName, Memory::Read_U32(_Address+0x10));
+ u32 Mode = Memory::Read_U32(_Address+0x10);
u32 DeviceID = GetDeviceIDByName(DeviceName);
if (DeviceID == 0)
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
index 9c9f3c1b0b..b4c7a83d69 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
@@ -62,7 +62,7 @@ CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress)
}
else
{
- PanicAlert("CWII_IPC_HLE_Device_FileIO: cant open %s", Filename.c_str());
+ //PanicAlert("CWII_IPC_HLE_Device_FileIO: cant open %s", Filename.c_str());
}
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
@@ -97,7 +97,7 @@ CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress)
if (m_pFileHandle != NULL)
{
fread(Memory::GetPointer(Address), Size, 1, m_pFileHandle);
- ReturnValue = 1;
+ ReturnValue = Size;
LOG(WII_IPC_HLE, "FileIO reads from %s (Addr=0x%08x Size=0x%x)", GetDeviceName().c_str(), Address, Size);
}
else
@@ -118,7 +118,7 @@ CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
LOG(WII_IPC_HLE, "FileIO: Write (Device=%s)", GetDeviceName().c_str());
DumpCommands(_CommandAddress);
- PanicAlert("CWII_IPC_HLE_Device_FileIO: Write (Device=%s)", GetDeviceName().c_str());
+ //PanicAlert("CWII_IPC_HLE_Device_FileIO: Write (Device=%s)", GetDeviceName().c_str());
u32 ReturnValue = 1;
Memory::Write_U32(ReturnValue, _CommandAddress + 0x4);
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h
index 03eea3ef0d..4b665e5bdd 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h
@@ -35,6 +35,15 @@ public:
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
return true;
}
+
+#if 0
+ virtual bool Close(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Close()", m_Name.c_str()); return true; }
+ virtual bool Seek(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Seek()", m_Name.c_str()); return true; }
+ virtual bool Read(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Read()", m_Name.c_str()); return true; }
+ virtual bool Write(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Write()", m_Name.c_str()); return true; }
+#endif
+ virtual bool IOCtl(u32 _CommandAddress) { return true; }
+ virtual bool IOCtlV(u32 _CommandAddress) { return true; }
};
#endif
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp
index 0c0ead2358..188e9880af 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp
@@ -48,6 +48,11 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::Open(u32 _CommandAddress)
return true;
}
+bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtl(u32 _CommandAddress)
+{
+ return IOCtlV(_CommandAddress); //hack
+}
+
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)
{
// wpadsampled.elf - patch so the USB_LOG will print somehting
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h
index e9d989a546..3076060f07 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h
@@ -52,6 +52,7 @@ public:
virtual bool Open(u32 _CommandAddress);
virtual bool IOCtlV(u32 _CommandAddress);
+ virtual bool IOCtl(u32 _CommandAddress);
virtual u32 Update();