Merge pull request #485 from Subv/more_servs
Services: Stubbed more services.
This commit is contained in:
commit
e7dd4d34aa
21 changed files with 426 additions and 3 deletions
24
src/core/hle/service/am_sys.cpp
Normal file
24
src/core/hle/service/am_sys.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/am_sys.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace AM_SYS
|
||||
|
||||
namespace AM_SYS {
|
||||
|
||||
// Empty arrays are illegal -- commented out until an entry is added.
|
||||
//const Interface::FunctionInfo FunctionTable[] = { };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface class
|
||||
|
||||
Interface::Interface() {
|
||||
//Register(FunctionTable, ARRAY_SIZE(FunctionTable));
|
||||
}
|
||||
|
||||
} // namespace
|
23
src/core/hle/service/am_sys.h
Normal file
23
src/core/hle/service/am_sys.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace AM_SYS
|
||||
|
||||
namespace AM_SYS {
|
||||
|
||||
class Interface : public Service::Interface {
|
||||
public:
|
||||
Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "am:sys";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
24
src/core/hle/service/boss_p.cpp
Normal file
24
src/core/hle/service/boss_p.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/boss_p.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace BOSS_P
|
||||
|
||||
namespace BOSS_P {
|
||||
|
||||
// Empty arrays are illegal -- commented out until an entry is added.
|
||||
// const Interface::FunctionInfo FunctionTable[] = { };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface class
|
||||
|
||||
Interface::Interface() {
|
||||
//Register(FunctionTable, ARRAY_SIZE(FunctionTable));
|
||||
}
|
||||
|
||||
} // namespace
|
23
src/core/hle/service/boss_p.h
Normal file
23
src/core/hle/service/boss_p.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace BOSS_P
|
||||
|
||||
namespace BOSS_P {
|
||||
|
||||
class Interface : public Service::Interface {
|
||||
public:
|
||||
Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "boss:P";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
24
src/core/hle/service/cecd_s.cpp
Normal file
24
src/core/hle/service/cecd_s.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/cecd_s.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace CECD_S
|
||||
|
||||
namespace CECD_S {
|
||||
|
||||
// Empty arrays are illegal -- commented out until an entry is added.
|
||||
//const Interface::FunctionInfo FunctionTable[] = { };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface class
|
||||
|
||||
Interface::Interface() {
|
||||
//Register(FunctionTable, ARRAY_SIZE(FunctionTable));
|
||||
}
|
||||
|
||||
} // namespace
|
23
src/core/hle/service/cecd_s.h
Normal file
23
src/core/hle/service/cecd_s.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace CECD_S
|
||||
|
||||
namespace CECD_S {
|
||||
|
||||
class Interface : public Service::Interface {
|
||||
public:
|
||||
Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "cecd:s";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
24
src/core/hle/service/frd_a.cpp
Normal file
24
src/core/hle/service/frd_a.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/frd_a.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace FRD_A
|
||||
|
||||
namespace FRD_A {
|
||||
|
||||
// Empty arrays are illegal -- commented out until an entry is added.
|
||||
// const Interface::FunctionInfo FunctionTable[] = { };
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface class
|
||||
|
||||
Interface::Interface() {
|
||||
//Register(FunctionTable, ARRAY_SIZE(FunctionTable));
|
||||
}
|
||||
|
||||
} // namespace
|
23
src/core/hle/service/frd_a.h
Normal file
23
src/core/hle/service/frd_a.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace FRD_A
|
||||
|
||||
namespace FRD_A {
|
||||
|
||||
class Interface : public Service::Interface {
|
||||
public:
|
||||
Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "frd:a";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
|
@ -432,6 +432,28 @@ ResultCode FormatSaveData() {
|
|||
return archive_itr->second->backend->Format(FileSys::Path());
|
||||
}
|
||||
|
||||
ResultCode CreateExtSaveData(u32 high, u32 low) {
|
||||
// Construct the binary path to the archive first
|
||||
std::vector<u8> binary_path;
|
||||
binary_path.reserve(12);
|
||||
// The first word is all zero to specify a NAND archive
|
||||
for (unsigned i = 0; i < 4; ++i)
|
||||
binary_path.push_back(0);
|
||||
// Next is the low word
|
||||
for (unsigned i = 0; i < 4; ++i)
|
||||
binary_path.push_back((low >> (8 * i)) & 0xFF);
|
||||
// Next is the high word
|
||||
for (unsigned i = 0; i < 4; ++i)
|
||||
binary_path.push_back((high >> i) & 0xFF);
|
||||
FileSys::Path path(binary_path);
|
||||
std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX);
|
||||
std::string base_path = FileSys::GetExtDataContainerPath(nand_directory, true);
|
||||
std::string extsavedata_path = FileSys::GetExtSaveDataPath(base_path, path);
|
||||
if (!FileUtil::CreateFullPath(extsavedata_path))
|
||||
return ResultCode(-1); // TODO(Subv): Find the right error code
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
/// Initialize archives
|
||||
void ArchiveInit() {
|
||||
next_handle = 1;
|
||||
|
|
|
@ -131,6 +131,14 @@ ResultVal<Handle> OpenDirectoryFromArchive(ArchiveHandle archive_handle, const F
|
|||
*/
|
||||
ResultCode FormatSaveData();
|
||||
|
||||
/**
|
||||
* Creates a blank SharedExtSaveData archive for the specified extdata ID
|
||||
* @param high The high word of the extdata id to create
|
||||
* @param low The low word of the extdata id to create
|
||||
* @return ResultCode 0 on success or the corresponding code on error
|
||||
*/
|
||||
ResultCode CreateExtSaveData(u32 high, u32 low);
|
||||
|
||||
/// Initialize archives
|
||||
void ArchiveInit();
|
||||
|
||||
|
|
|
@ -484,6 +484,15 @@ static void FormatThisUserSaveData(Service::Interface* self) {
|
|||
cmd_buff[1] = FormatSaveData().raw;
|
||||
}
|
||||
|
||||
static void CreateExtSaveData(Service::Interface* self) {
|
||||
// TODO(Subv): Figure out the other parameters.
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
u32 save_high = cmd_buff[1];
|
||||
u32 save_low = cmd_buff[2];
|
||||
// TODO(Subv): For now it is assumed that only SharedExtSaveData can be created like this
|
||||
cmd_buff[1] = CreateExtSaveData(save_high, save_low).raw;
|
||||
}
|
||||
|
||||
const FSUserInterface::FunctionInfo FunctionTable[] = {
|
||||
{0x000100C6, nullptr, "Dummy1"},
|
||||
{0x040100C4, nullptr, "Control"},
|
||||
|
@ -567,6 +576,8 @@ const FSUserInterface::FunctionInfo FunctionTable[] = {
|
|||
{0x084E0342, nullptr, "UpdateSha256Context"},
|
||||
{0x084F0102, nullptr, "ReadSpecialFile"},
|
||||
{0x08500040, nullptr, "GetSpecialFileSize"},
|
||||
{0x08510242, CreateExtSaveData, "CreateExtSaveData"},
|
||||
{0x08520100, nullptr, "DeleteExtSaveData"},
|
||||
{0x08580000, nullptr, "GetMovableSedHashedKeyYRandomData"},
|
||||
{0x08610042, nullptr, "InitializeWithSdkVersion"},
|
||||
{0x08620040, nullptr, "SetPriority"},
|
||||
|
|
26
src/core/hle/service/gsp_lcd.cpp
Normal file
26
src/core/hle/service/gsp_lcd.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
#include "common/log.h"
|
||||
#include "common/bit_field.h"
|
||||
|
||||
#include "core/hle/service/gsp_lcd.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace GSP_LCD
|
||||
|
||||
namespace GSP_LCD {
|
||||
|
||||
/*const Interface::FunctionInfo FunctionTable[] = {
|
||||
};*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface class
|
||||
|
||||
Interface::Interface() {
|
||||
//Register(FunctionTable, ARRAY_SIZE(FunctionTable));
|
||||
}
|
||||
|
||||
} // namespace
|
24
src/core/hle/service/gsp_lcd.h
Normal file
24
src/core/hle/service/gsp_lcd.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace GSP_LCD
|
||||
|
||||
namespace GSP_LCD {
|
||||
|
||||
/// Interface to "gsp::Lcd" service
|
||||
class Interface : public Service::Interface {
|
||||
public:
|
||||
Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "gsp::Lcd";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
25
src/core/hle/service/news_s.cpp
Normal file
25
src/core/hle/service/news_s.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/log.h"
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/news_s.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace NEWS_S
|
||||
|
||||
namespace NEWS_S {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x000100C6, nullptr, "AddNotification"},
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface class
|
||||
|
||||
Interface::Interface() {
|
||||
Register(FunctionTable, ARRAY_SIZE(FunctionTable));
|
||||
}
|
||||
|
||||
} // namespace
|
23
src/core/hle/service/news_s.h
Normal file
23
src/core/hle/service/news_s.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace NEWS_S
|
||||
|
||||
namespace NEWS_S {
|
||||
|
||||
class Interface : public Service::Interface {
|
||||
public:
|
||||
Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "news:s";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
27
src/core/hle/service/ns_s.cpp
Normal file
27
src/core/hle/service/ns_s.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
#include "common/common.h"
|
||||
|
||||
#include "core/hle/hle.h"
|
||||
#include "core/hle/service/ns_s.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace NS_S
|
||||
|
||||
namespace NS_S {
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x000200C0, nullptr, "LaunchTitle"},
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface class
|
||||
|
||||
Interface::Interface() {
|
||||
Register(FunctionTable, ARRAY_SIZE(FunctionTable));
|
||||
}
|
||||
|
||||
} // namespace
|
24
src/core/hle/service/ns_s.h
Normal file
24
src/core/hle/service/ns_s.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2015 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace NS_S
|
||||
|
||||
namespace NS_S {
|
||||
|
||||
/// Interface to "NS:S" service
|
||||
class Interface : public Service::Interface {
|
||||
public:
|
||||
Interface();
|
||||
|
||||
std::string GetPortName() const override {
|
||||
return "ns:s";
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
|
@ -10,12 +10,15 @@
|
|||
#include "core/hle/service/act_u.h"
|
||||
#include "core/hle/service/am_app.h"
|
||||
#include "core/hle/service/am_net.h"
|
||||
#include "core/hle/service/am_sys.h"
|
||||
#include "core/hle/service/apt_a.h"
|
||||
#include "core/hle/service/apt_s.h"
|
||||
#include "core/hle/service/apt_u.h"
|
||||
#include "core/hle/service/boss_p.h"
|
||||
#include "core/hle/service/boss_u.h"
|
||||
#include "core/hle/service/cam_u.h"
|
||||
#include "core/hle/service/cecd_u.h"
|
||||
#include "core/hle/service/cecd_s.h"
|
||||
#include "core/hle/service/cfg/cfg_i.h"
|
||||
#include "core/hle/service/cfg/cfg_s.h"
|
||||
#include "core/hle/service/cfg/cfg_u.h"
|
||||
|
@ -23,18 +26,22 @@
|
|||
#include "core/hle/service/dsp_dsp.h"
|
||||
#include "core/hle/service/err_f.h"
|
||||
#include "core/hle/service/fs/fs_user.h"
|
||||
#include "core/hle/service/frd_a.h"
|
||||
#include "core/hle/service/frd_u.h"
|
||||
#include "core/hle/service/gsp_gpu.h"
|
||||
#include "core/hle/service/hid/hid_spvr.h"
|
||||
#include "core/hle/service/hid/hid_user.h"
|
||||
#include "core/hle/service/gsp_lcd.h"
|
||||
#include "core/hle/service/http_c.h"
|
||||
#include "core/hle/service/ir_rst.h"
|
||||
#include "core/hle/service/ir_u.h"
|
||||
#include "core/hle/service/ldr_ro.h"
|
||||
#include "core/hle/service/mic_u.h"
|
||||
#include "core/hle/service/ndm_u.h"
|
||||
#include "core/hle/service/news_s.h"
|
||||
#include "core/hle/service/news_u.h"
|
||||
#include "core/hle/service/nim_aoc.h"
|
||||
#include "core/hle/service/ns_s.h"
|
||||
#include "core/hle/service/nwm_uds.h"
|
||||
#include "core/hle/service/pm_app.h"
|
||||
#include "core/hle/service/ptm_play.h"
|
||||
|
@ -90,11 +97,14 @@ void Init() {
|
|||
g_manager->AddService(new ACT_U::Interface);
|
||||
g_manager->AddService(new AM_APP::Interface);
|
||||
g_manager->AddService(new AM_NET::Interface);
|
||||
g_manager->AddService(new AM_SYS::Interface);
|
||||
g_manager->AddService(new APT_A::Interface);
|
||||
g_manager->AddService(new APT_S::Interface);
|
||||
g_manager->AddService(new APT_U::Interface);
|
||||
g_manager->AddService(new BOSS_P::Interface);
|
||||
g_manager->AddService(new BOSS_U::Interface);
|
||||
g_manager->AddService(new CAM_U::Interface);
|
||||
g_manager->AddService(new CECD_S::Interface);
|
||||
g_manager->AddService(new CECD_U::Interface);
|
||||
g_manager->AddService(new CFG_I::Interface);
|
||||
g_manager->AddService(new CFG_S::Interface);
|
||||
|
@ -102,19 +112,23 @@ void Init() {
|
|||
g_manager->AddService(new CSND_SND::Interface);
|
||||
g_manager->AddService(new DSP_DSP::Interface);
|
||||
g_manager->AddService(new ERR_F::Interface);
|
||||
g_manager->AddService(new FRD_A::Interface);
|
||||
g_manager->AddService(new FRD_U::Interface);
|
||||
g_manager->AddService(new FS::FSUserInterface);
|
||||
g_manager->AddService(new GSP_GPU::Interface);
|
||||
g_manager->AddService(new HID_SPVR::Interface);
|
||||
g_manager->AddService(new GSP_LCD::Interface);
|
||||
g_manager->AddService(new HID_User::Interface);
|
||||
g_manager->AddService(new HID_SPVR::Interface);
|
||||
g_manager->AddService(new HTTP_C::Interface);
|
||||
g_manager->AddService(new IR_RST::Interface);
|
||||
g_manager->AddService(new IR_U::Interface);
|
||||
g_manager->AddService(new LDR_RO::Interface);
|
||||
g_manager->AddService(new MIC_U::Interface);
|
||||
g_manager->AddService(new NDM_U::Interface);
|
||||
g_manager->AddService(new NEWS_S::Interface);
|
||||
g_manager->AddService(new NEWS_U::Interface);
|
||||
g_manager->AddService(new NIM_AOC::Interface);
|
||||
g_manager->AddService(new NS_S::Interface);
|
||||
g_manager->AddService(new NWM_UDS::Interface);
|
||||
g_manager->AddService(new PM_APP::Interface);
|
||||
g_manager->AddService(new PTM_PLAY::Interface);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue