From 49b2939f0d83b3ad753f9e7b14edbee17b73eded Mon Sep 17 00:00:00 2001 From: daniel229 Date: Thu, 4 Dec 2014 22:44:41 +0800 Subject: [PATCH 1/2] sceSha256 --- Core/Core.vcxproj | 2 ++ Core/Core.vcxproj.filters | 6 ++++++ Core/HLE/HLETables.cpp | 2 ++ Core/HLE/sceSha256.cpp | 35 +++++++++++++++++++++++++++++++++++ Core/HLE/sceSha256.h | 20 ++++++++++++++++++++ 5 files changed, 65 insertions(+) create mode 100644 Core/HLE/sceSha256.cpp create mode 100644 Core/HLE/sceSha256.h diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index ad0cc66e4a..0eb7b63e04 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -258,6 +258,7 @@ + @@ -539,6 +540,7 @@ + diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters index 3144b4caae..1cbc1453d7 100644 --- a/Core/Core.vcxproj.filters +++ b/Core/Core.vcxproj.filters @@ -550,6 +550,9 @@ Ext\udis86 + + HLE\Libraries + @@ -1020,6 +1023,9 @@ Ext\udis86 + + HLE\Libraries + diff --git a/Core/HLE/HLETables.cpp b/Core/HLE/HLETables.cpp index 6beff72a77..bba5b44d19 100644 --- a/Core/HLE/HLETables.cpp +++ b/Core/HLE/HLETables.cpp @@ -69,6 +69,7 @@ #include "sceVaudio.h" #include "sceMt19937.h" #include "sceUsbGps.h" +#include "sceSha256.h" #define N(s) s @@ -330,5 +331,6 @@ void RegisterAllModules() { Register_sceMpegbase(); Register_sceUsbGps(); Register_sceLibFttt(); + Register_sceSha256(); } diff --git a/Core/HLE/sceSha256.cpp b/Core/HLE/sceSha256.cpp new file mode 100644 index 0000000000..f8be4d2637 --- /dev/null +++ b/Core/HLE/sceSha256.cpp @@ -0,0 +1,35 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#include "Core/HLE/HLE.h" +#include "Core/HLE/FunctionWrappers.h" +#include "Core/HLE/sceSha256.h" + +int sceSha256_unknow(u32 unknow1, int unknow2, u32 unknow3) { + ERROR_LOG(HLE, "UNIMPL sceSha256_unknow (%08x,%08x,%08x)", unknow1, unknow2, unknow3); + return 0; +} + +const HLEFunction sceSha256[] = +{ + { 0x318A350C, WrapI_UIU, "sceSha256_unknow" }, +}; + +void Register_sceSha256() +{ + RegisterModule("sceSha256", ARRAY_SIZE(sceSha256), sceSha256); +} diff --git a/Core/HLE/sceSha256.h b/Core/HLE/sceSha256.h new file mode 100644 index 0000000000..eefb687f48 --- /dev/null +++ b/Core/HLE/sceSha256.h @@ -0,0 +1,20 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#pragma once + +void Register_sceSha256(); From 3d56e952f9bb23427243b43662a888ed294c1218 Mon Sep 17 00:00:00 2001 From: daniel229 Date: Fri, 5 Dec 2014 15:24:39 +0800 Subject: [PATCH 2/2] add files include in CMakeLists.txt and Android.mk. --- CMakeLists.txt | 2 ++ android/jni/Android.mk | 1 + 2 files changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb71c0c6cf..45ff841b69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1236,6 +1236,8 @@ add_library(${CoreLibName} ${CoreLinkType} Core/HLE/sceRtc.h Core/HLE/sceSas.cpp Core/HLE/sceSas.h + Core/HLE/sceSha256.cpp + Core/HLE/sceSha256.h Core/HLE/sceSsl.cpp Core/HLE/sceSsl.h Core/HLE/sceUmd.cpp diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 1a8b82ff8e..a0d15f330a 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -261,6 +261,7 @@ EXEC_AND_LIB_FILES := \ $(SRC)/Core/HLE/sceRtc.cpp \ $(SRC)/Core/HLE/scePsmf.cpp \ $(SRC)/Core/HLE/sceSas.cpp \ + $(SRC)/Core/HLE/sceSha256.cpp \ $(SRC)/Core/HLE/sceSsl.cpp \ $(SRC)/Core/HLE/sceUmd.cpp \ $(SRC)/Core/HLE/sceUsb.cpp \