mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-08-09 01:28:45 +00:00
Add news:s service
This commit is contained in:
parent
a2ed44e6a7
commit
cb9ba4508b
6 changed files with 42 additions and 2 deletions
|
@ -151,7 +151,7 @@ set(SERVICE_SOURCE_FILES src/core/services/service_manager.cpp src/core/services
|
||||||
src/core/services/act.cpp src/core/services/nfc.cpp src/core/services/dlp_srvr.cpp
|
src/core/services/act.cpp src/core/services/nfc.cpp src/core/services/dlp_srvr.cpp
|
||||||
src/core/services/ir_user.cpp src/core/services/http.cpp src/core/services/soc.cpp
|
src/core/services/ir_user.cpp src/core/services/http.cpp src/core/services/soc.cpp
|
||||||
src/core/services/ssl.cpp src/core/services/news_u.cpp src/core/services/amiibo_device.cpp
|
src/core/services/ssl.cpp src/core/services/news_u.cpp src/core/services/amiibo_device.cpp
|
||||||
src/core/services/csnd.cpp src/core/services/nwm_uds.cpp src/core/services/ns.cpp
|
src/core/services/csnd.cpp src/core/services/nwm_uds.cpp src/core/services/ns.cpp src/core/services/news_s.cpp
|
||||||
)
|
)
|
||||||
set(PICA_SOURCE_FILES src/core/PICA/gpu.cpp src/core/PICA/regs.cpp src/core/PICA/shader_unit.cpp
|
set(PICA_SOURCE_FILES src/core/PICA/gpu.cpp src/core/PICA/regs.cpp src/core/PICA/shader_unit.cpp
|
||||||
src/core/PICA/shader_interpreter.cpp src/core/PICA/dynapica/shader_rec.cpp
|
src/core/PICA/shader_interpreter.cpp src/core/PICA/dynapica/shader_rec.cpp
|
||||||
|
@ -196,7 +196,7 @@ set(HEADER_FILES include/emulator.hpp include/helpers.hpp include/termcolor.hpp
|
||||||
include/applets/applet.hpp include/applets/mii_selector.hpp include/math_util.hpp include/services/soc.hpp
|
include/applets/applet.hpp include/applets/mii_selector.hpp include/math_util.hpp include/services/soc.hpp
|
||||||
include/services/news_u.hpp include/applets/software_keyboard.hpp include/applets/applet_manager.hpp include/fs/archive_user_save_data.hpp
|
include/services/news_u.hpp include/applets/software_keyboard.hpp include/applets/applet_manager.hpp include/fs/archive_user_save_data.hpp
|
||||||
include/services/amiibo_device.hpp include/services/nfc_types.hpp include/swap.hpp include/services/csnd.hpp include/services/nwm_uds.hpp
|
include/services/amiibo_device.hpp include/services/nfc_types.hpp include/swap.hpp include/services/csnd.hpp include/services/nwm_uds.hpp
|
||||||
include/fs/archive_system_save_data.hpp include/lua.hpp include/services/ns.hpp
|
include/fs/archive_system_save_data.hpp include/lua.hpp include/services/ns.hpp include/services/news_s.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
cmrc_add_resource_library(
|
cmrc_add_resource_library(
|
||||||
|
|
|
@ -40,6 +40,7 @@ namespace KernelHandles {
|
||||||
NDM, // ?????
|
NDM, // ?????
|
||||||
NS_S, // Nintendo Shell service
|
NS_S, // Nintendo Shell service
|
||||||
NWM_UDS, // Local multiplayer
|
NWM_UDS, // Local multiplayer
|
||||||
|
NEWS_S, // news:u on steroids
|
||||||
NEWS_U, // This service literally has 1 command (AddNotification) and I don't even understand what it does
|
NEWS_U, // This service literally has 1 command (AddNotification) and I don't even understand what it does
|
||||||
PTM_U, // PTM service (Used for accessing various console info, such as battery, shell and pedometer state)
|
PTM_U, // PTM service (Used for accessing various console info, such as battery, shell and pedometer state)
|
||||||
PTM_SYSM, // PTM system service
|
PTM_SYSM, // PTM system service
|
||||||
|
@ -98,6 +99,7 @@ namespace KernelHandles {
|
||||||
case MCU_HWC: return "MCU::HWC";
|
case MCU_HWC: return "MCU::HWC";
|
||||||
case MIC: return "MIC";
|
case MIC: return "MIC";
|
||||||
case NDM: return "NDM";
|
case NDM: return "NDM";
|
||||||
|
case NEWS_S: return "NEWS_S";
|
||||||
case NEWS_U: return "NEWS_U";
|
case NEWS_U: return "NEWS_U";
|
||||||
case NWM_UDS: return "nwm::UDS";
|
case NWM_UDS: return "nwm::UDS";
|
||||||
case NFC: return "NFC";
|
case NFC: return "NFC";
|
||||||
|
|
18
include/services/news_s.hpp
Normal file
18
include/services/news_s.hpp
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#pragma once
|
||||||
|
#include "helpers.hpp"
|
||||||
|
#include "kernel_types.hpp"
|
||||||
|
#include "logger.hpp"
|
||||||
|
#include "memory.hpp"
|
||||||
|
|
||||||
|
class NewsSService {
|
||||||
|
Handle handle = KernelHandles::NEWS_S;
|
||||||
|
Memory& mem;
|
||||||
|
MAKE_LOG_FUNCTION(log, newsLogger)
|
||||||
|
|
||||||
|
// Service commands
|
||||||
|
|
||||||
|
public:
|
||||||
|
NewsSService(Memory& mem) : mem(mem) {}
|
||||||
|
void reset();
|
||||||
|
void handleSyncRequest(u32 messagePointer);
|
||||||
|
};
|
|
@ -29,6 +29,7 @@
|
||||||
#include "services/mic.hpp"
|
#include "services/mic.hpp"
|
||||||
#include "services/ndm.hpp"
|
#include "services/ndm.hpp"
|
||||||
#include "services/nwm_uds.hpp"
|
#include "services/nwm_uds.hpp"
|
||||||
|
#include "services/news_s.hpp"
|
||||||
#include "services/news_u.hpp"
|
#include "services/news_u.hpp"
|
||||||
#include "services/nfc.hpp"
|
#include "services/nfc.hpp"
|
||||||
#include "services/nim.hpp"
|
#include "services/nim.hpp"
|
||||||
|
@ -72,6 +73,7 @@ class ServiceManager {
|
||||||
LDRService ldr;
|
LDRService ldr;
|
||||||
MICService mic;
|
MICService mic;
|
||||||
NDMService ndm;
|
NDMService ndm;
|
||||||
|
NewsSService news_s;
|
||||||
NewsUService news_u;
|
NewsUService news_u;
|
||||||
NFCService nfc;
|
NFCService nfc;
|
||||||
NwmUdsService nwm_uds;
|
NwmUdsService nwm_uds;
|
||||||
|
|
15
src/core/services/news_s.cpp
Normal file
15
src/core/services/news_s.cpp
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#include "ipc.hpp"
|
||||||
|
#include "services/news_s.hpp"
|
||||||
|
|
||||||
|
namespace NewsCommands {
|
||||||
|
enum : u32 {};
|
||||||
|
}
|
||||||
|
|
||||||
|
void NewsSService::reset() {}
|
||||||
|
|
||||||
|
void NewsSService::handleSyncRequest(u32 messagePointer) {
|
||||||
|
const u32 command = mem.read32(messagePointer);
|
||||||
|
switch (command) {
|
||||||
|
default: Helpers::panic("news:s service requested. Command: %08X\n", command);
|
||||||
|
}
|
||||||
|
}
|
|
@ -37,9 +37,11 @@ void ServiceManager::reset() {
|
||||||
mcu_hwc.reset();
|
mcu_hwc.reset();
|
||||||
mic.reset();
|
mic.reset();
|
||||||
ndm.reset();
|
ndm.reset();
|
||||||
|
news_s.reset();
|
||||||
news_u.reset();
|
news_u.reset();
|
||||||
nfc.reset();
|
nfc.reset();
|
||||||
nim.reset();
|
nim.reset();
|
||||||
|
ns.reset();
|
||||||
ptm.reset();
|
ptm.reset();
|
||||||
soc.reset();
|
soc.reset();
|
||||||
ssl.reset();
|
ssl.reset();
|
||||||
|
@ -125,6 +127,7 @@ static std::map<std::string, Handle> serviceMap = {
|
||||||
{ "mcu::HWC", KernelHandles::MCU_HWC },
|
{ "mcu::HWC", KernelHandles::MCU_HWC },
|
||||||
{ "mic:u", KernelHandles::MIC },
|
{ "mic:u", KernelHandles::MIC },
|
||||||
{ "ndm:u", KernelHandles::NDM },
|
{ "ndm:u", KernelHandles::NDM },
|
||||||
|
{ "news:s", KernelHandles::NEWS_S },
|
||||||
{ "news:u", KernelHandles::NEWS_U },
|
{ "news:u", KernelHandles::NEWS_U },
|
||||||
{ "nfc:u", KernelHandles::NFC },
|
{ "nfc:u", KernelHandles::NFC },
|
||||||
{ "ns:s", KernelHandles::NS_S },
|
{ "ns:s", KernelHandles::NS_S },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue