mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Add svcOutputDebugString, booting our first test ROM
This commit is contained in:
parent
91356f1de9
commit
36453629d5
3 changed files with 14 additions and 1 deletions
|
@ -12,6 +12,7 @@ void Kernel::serviceSVC(u32 svc) {
|
|||
case 0x38: getResourceLimit(); break;
|
||||
case 0x39: getResourceLimitLimitValues(); break;
|
||||
case 0x3A: getResourceLimitCurrentValues(); break;
|
||||
case 0x3D: outputDebugString(); break;
|
||||
default: Helpers::panic("Unimplemented svc: %X @ %08X", svc, regs[15]); break;
|
||||
}
|
||||
}
|
||||
|
@ -87,6 +88,17 @@ void Kernel::svcCloseHandle() {
|
|||
regs[0] = SVCResult::Success;
|
||||
}
|
||||
|
||||
// OutputDebugString(const char* str, int size)
|
||||
// TODO: Does this actually write an error code in r0?
|
||||
void Kernel::outputDebugString() {
|
||||
const u32 pointer = regs[0];
|
||||
const u32 size = regs[1];
|
||||
|
||||
std::string message = mem.readString(pointer, size);
|
||||
printf("OutputDebugString(message = \"%s\")\n", message.c_str());
|
||||
regs[0] = SVCResult::Success;
|
||||
}
|
||||
|
||||
std::string Kernel::getProcessName(u32 pid) {
|
||||
if (pid == KernelHandles::CurrentProcess) {
|
||||
return "current";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue