mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
Add empty csnd service
This commit is contained in:
parent
f1c805d38f
commit
68346d73dc
7 changed files with 43 additions and 2 deletions
|
@ -138,6 +138,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/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/csnd.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
|
||||
|
@ -181,7 +182,7 @@ set(HEADER_FILES include/emulator.hpp include/helpers.hpp include/termcolor.hpp
|
|||
include/fs/romfs.hpp include/fs/ivfc.hpp include/discord_rpc.hpp include/services/http.hpp include/result/result_cfg.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/amiibo_device.hpp include/services/nfc_types.hpp include/swap.hpp
|
||||
include/services/amiibo_device.hpp include/services/nfc_types.hpp include/swap.hpp include/services/csnd.hpp
|
||||
)
|
||||
|
||||
cmrc_add_resource_library(
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace KernelHandles {
|
|||
CECD, // More Streetpass stuff?
|
||||
CFG_U, // CFG service (Console & region info)
|
||||
CFG_I,
|
||||
CSND, // Plays audio directly from PCM samples
|
||||
DLP_SRVR, // Download Play: Server. Used for network play.
|
||||
DSP, // DSP service (Used for audio decoding and output)
|
||||
HID, // HID service (Handles input-related things including gyro. Does NOT handle New3DS controls or CirclePadPro)
|
||||
|
@ -73,6 +74,7 @@ namespace KernelHandles {
|
|||
case CECD: return "CECD";
|
||||
case CFG_U: return "CFG:U";
|
||||
case CFG_I: return "CFG:I";
|
||||
case CSND: return "CSND";
|
||||
case DSP: return "DSP";
|
||||
case DLP_SRVR: return "DLP::SRVR";
|
||||
case HID: return "HID";
|
||||
|
|
|
@ -38,6 +38,7 @@ namespace Log {
|
|||
static Logger<false> camLogger;
|
||||
static Logger<false> cecdLogger;
|
||||
static Logger<false> cfgLogger;
|
||||
static Logger<false> csndLogger;
|
||||
static Logger<false> dspServiceLogger;
|
||||
static Logger<false> dlpSrvrLogger;
|
||||
static Logger<false> frdLogger;
|
||||
|
|
16
include/services/csnd.hpp
Normal file
16
include/services/csnd.hpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
class CSNDService {
|
||||
Handle handle = KernelHandles::CSND;
|
||||
Memory& mem;
|
||||
MAKE_LOG_FUNCTION(log, csndLogger)
|
||||
|
||||
public:
|
||||
CSNDService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
|
@ -14,6 +14,7 @@
|
|||
#include "services/cam.hpp"
|
||||
#include "services/cecd.hpp"
|
||||
#include "services/cfg.hpp"
|
||||
#include "services/csnd.hpp"
|
||||
#include "services/dlp_srvr.hpp"
|
||||
#include "services/dsp.hpp"
|
||||
#include "services/frd.hpp"
|
||||
|
@ -56,6 +57,7 @@ class ServiceManager {
|
|||
CAMService cam;
|
||||
CECDService cecd;
|
||||
CFGService cfg;
|
||||
CSNDService csnd;
|
||||
DlpSrvrService dlp_srvr;
|
||||
DSPService dsp;
|
||||
HIDService hid;
|
||||
|
|
16
src/core/services/csnd.cpp
Normal file
16
src/core/services/csnd.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "services/csnd.hpp"
|
||||
|
||||
#include "ipc.hpp"
|
||||
#include "result/result.hpp"
|
||||
|
||||
void CSNDService::reset() {}
|
||||
|
||||
void CSNDService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
|
||||
switch (command) {
|
||||
default:
|
||||
Helpers::panic("Unimplemented CSND service requested. Command: %08X\n", command);
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
ServiceManager::ServiceManager(std::span<u32, 16> regs, Memory& mem, GPU& gpu, u32& currentPID, Kernel& kernel, const EmulatorConfig& config)
|
||||
: regs(regs), mem(mem), kernel(kernel), ac(mem), am(mem), boss(mem), act(mem), apt(mem, kernel), cam(mem, kernel), cecd(mem, kernel), cfg(mem),
|
||||
dlp_srvr(mem), dsp(mem, kernel), hid(mem, kernel), http(mem), ir_user(mem, kernel), frd(mem), fs(mem, kernel, config),
|
||||
csnd(mem), dlp_srvr(mem), dsp(mem, kernel), hid(mem, kernel), http(mem), ir_user(mem, kernel), frd(mem), fs(mem, kernel, config),
|
||||
gsp_gpu(mem, gpu, kernel, currentPID), gsp_lcd(mem), ldr(mem), mcu_hwc(mem, config), mic(mem, kernel), nfc(mem, kernel), nim(mem), ndm(mem),
|
||||
news_u(mem), ptm(mem, config), soc(mem), ssl(mem), y2r(mem, kernel) {}
|
||||
|
||||
|
@ -23,6 +23,7 @@ void ServiceManager::reset() {
|
|||
cam.reset();
|
||||
cecd.reset();
|
||||
cfg.reset();
|
||||
csnd.reset();
|
||||
dlp_srvr.reset();
|
||||
dsp.reset();
|
||||
hid.reset();
|
||||
|
@ -104,6 +105,7 @@ static std::map<std::string, Handle> serviceMap = {
|
|||
{ "cecd:u", KernelHandles::CECD },
|
||||
{ "cfg:u", KernelHandles::CFG_U },
|
||||
{ "cfg:i", KernelHandles::CFG_I },
|
||||
{ "csnd:SND", KernelHandles::CSND },
|
||||
{ "dlp:SRVR", KernelHandles::DLP_SRVR },
|
||||
{ "dsp::DSP", KernelHandles::DSP },
|
||||
{ "hid:USER", KernelHandles::HID },
|
||||
|
@ -202,6 +204,7 @@ void ServiceManager::sendCommandToService(u32 messagePointer, Handle handle) {
|
|||
case KernelHandles::CAM: cam.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::CECD: cecd.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::CFG_U: cfg.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::CSND: csnd.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::DLP_SRVR: dlp_srvr.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::HID: hid.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::HTTP: http.handleSyncRequest(messagePointer); break;
|
||||
|
|
Loading…
Add table
Reference in a new issue