mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-15 05:47:54 +03:00
Implement svcOutputDebugString
This commit is contained in:
parent
80955679e0
commit
e108d4a0be
@ -1,12 +1,24 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "core/arm/cpu.h"
|
#include "core/arm/cpu.h"
|
||||||
|
#include "core/arm/memory.h"
|
||||||
#include "svc.h"
|
#include "svc.h"
|
||||||
|
|
||||||
|
using namespace core::cpu;
|
||||||
namespace core::kernel {
|
namespace core::kernel {
|
||||||
|
static uint32_t OutputDebugString() {
|
||||||
|
std::string debug(GetRegister(UC_ARM64_REG_X1), '\0');
|
||||||
|
memory::Read((void*)debug.data(), GetRegister(UC_ARM64_REG_X0), GetRegister(UC_ARM64_REG_X1));
|
||||||
|
|
||||||
|
syslog(LOG_DEBUG, "svcOutputDebugString: %s", debug.c_str());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
std::pair<int, uint32_t(*)()> svcTable[] =
|
std::pair<int, uint32_t(*)()> svcTable[] =
|
||||||
{
|
{
|
||||||
|
{0x00, nullptr},
|
||||||
{0x01, nullptr},
|
{0x01, nullptr},
|
||||||
{0x02, nullptr},
|
{0x02, nullptr},
|
||||||
{0x03, nullptr},
|
{0x03, nullptr},
|
||||||
@ -45,7 +57,7 @@ namespace core::kernel {
|
|||||||
{0x24, nullptr},
|
{0x24, nullptr},
|
||||||
{0x25, nullptr},
|
{0x25, nullptr},
|
||||||
{0x26, nullptr},
|
{0x26, nullptr},
|
||||||
{0x27, nullptr},
|
{0x27, OutputDebugString},
|
||||||
{0x28, nullptr},
|
{0x28, nullptr},
|
||||||
{0x29, nullptr},
|
{0x29, nullptr},
|
||||||
{0x2a, nullptr},
|
{0x2a, nullptr},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user