mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-17 19:21:30 +12:00
[APT] Stub ReceiveParameter
This commit is contained in:
parent
cd13ba6271
commit
58b6791971
2 changed files with 21 additions and 1 deletions
|
@ -14,6 +14,7 @@ class APTService {
|
||||||
void checkNew3DS(u32 messagePointer);
|
void checkNew3DS(u32 messagePointer);
|
||||||
void enable(u32 messagePointer);
|
void enable(u32 messagePointer);
|
||||||
void notifyToWait(u32 messagePointer);
|
void notifyToWait(u32 messagePointer);
|
||||||
|
void receiveParameter(u32 messagePointer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
APTService(Memory& mem) : mem(mem) {}
|
APTService(Memory& mem) : mem(mem) {}
|
||||||
|
|
|
@ -5,7 +5,8 @@ namespace APTCommands {
|
||||||
GetLockHandle = 0x00010040,
|
GetLockHandle = 0x00010040,
|
||||||
Enable = 0x00030040,
|
Enable = 0x00030040,
|
||||||
CheckNew3DS = 0x01020000,
|
CheckNew3DS = 0x01020000,
|
||||||
NotifyToWait = 0x00430040
|
NotifyToWait = 0x00430040,
|
||||||
|
ReceiveParameter = 0x000D0080
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +33,7 @@ void APTService::handleSyncRequest(u32 messagePointer) {
|
||||||
case APTCommands::Enable: enable(messagePointer); break;
|
case APTCommands::Enable: enable(messagePointer); break;
|
||||||
case APTCommands::GetLockHandle: getLockHandle(messagePointer); break;
|
case APTCommands::GetLockHandle: getLockHandle(messagePointer); break;
|
||||||
case APTCommands::NotifyToWait: notifyToWait(messagePointer); break;
|
case APTCommands::NotifyToWait: notifyToWait(messagePointer); break;
|
||||||
|
case APTCommands::ReceiveParameter: receiveParameter(messagePointer); break;
|
||||||
default: Helpers::panic("APT service requested. Command: %08X\n", command);
|
default: Helpers::panic("APT service requested. Command: %08X\n", command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,3 +60,20 @@ void APTService::notifyToWait(u32 messagePointer) {
|
||||||
log("APT::NotifyToWat\n");
|
log("APT::NotifyToWat\n");
|
||||||
mem.write32(messagePointer + 4, Result::Success);
|
mem.write32(messagePointer + 4, Result::Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void APTService::receiveParameter(u32 messagePointer) {
|
||||||
|
const u32 app = mem.read32(messagePointer + 4);
|
||||||
|
const u32 size = mem.read32(messagePointer + 8);
|
||||||
|
log("APT::ReceiveParameter(app ID = %X, size = %04X) (STUBBED)\n", app, size);
|
||||||
|
|
||||||
|
if (size > 0x1000) Helpers::panic("APT::ReceiveParameter with size > 0x1000");
|
||||||
|
|
||||||
|
// TODO: Properly implement this. We currently stub it in the same way as 3dmoo
|
||||||
|
mem.write32(messagePointer + 4, Result::Success);
|
||||||
|
mem.write32(messagePointer + 8, 0); // Sender App ID
|
||||||
|
mem.write32(messagePointer + 12, 1); // Signal type (1 = app just started, 0xB = returning to app, 0xC = exiting app)
|
||||||
|
mem.write32(messagePointer + 16, 0x10);
|
||||||
|
mem.write32(messagePointer + 20, 0);
|
||||||
|
mem.write32(messagePointer + 24, 0);
|
||||||
|
mem.write32(messagePointer + 28, 0);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue