ptm_sysm.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2015 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "common/make_unique.h"
  5. #include "core/file_sys/archive_extsavedata.h"
  6. #include "core/hle/hle.h"
  7. #include "core/hle/service/ptm/ptm_sysm.h"
  8. namespace Service {
  9. namespace PTM {
  10. /**
  11. * Returns whether the system is powering off (?)
  12. * Outputs:
  13. * 1: Result code, 0 on success, otherwise error code
  14. * 2: Whether the system is going through a power off
  15. */
  16. void IsLegacyPowerOff(Service::Interface* self) {
  17. u32* cmd_buff = Kernel::GetCommandBuffer();
  18. cmd_buff[1] = RESULT_SUCCESS.raw;
  19. cmd_buff[2] = 0;
  20. }
  21. const Interface::FunctionInfo FunctionTable[] = {
  22. {0x040100C0, nullptr, "SetRtcAlarmEx"},
  23. {0x04020042, nullptr, "ReplySleepQuery"},
  24. {0x04030042, nullptr, "NotifySleepPreparationComplete"},
  25. {0x04040102, nullptr, "SetWakeupTrigger"},
  26. {0x04050000, nullptr, "GetAwakeReason"},
  27. {0x04060000, nullptr, "RequestSleep"},
  28. {0x040700C0, nullptr, "ShutdownAsync"},
  29. {0x04080000, nullptr, "Awake"},
  30. {0x04090080, nullptr, "RebootAsync"},
  31. {0x040A0000, nullptr, "CheckNew3DS"},
  32. {0x08010640, nullptr, "SetInfoLEDPattern"},
  33. {0x08020040, nullptr, "SetInfoLEDPatternHeader"},
  34. {0x08030000, nullptr, "GetInfoLEDStatus"},
  35. {0x08040040, nullptr, "SetBatteryEmptyLEDPattern"},
  36. {0x08050000, nullptr, "ClearStepHistory"},
  37. {0x080600C2, nullptr, "SetStepHistory"},
  38. {0x08070082, nullptr, "GetPlayHistory"},
  39. {0x08080000, nullptr, "GetPlayHistoryStart"},
  40. {0x08090000, nullptr, "GetPlayHistoryLength"},
  41. {0x080A0000, nullptr, "ClearPlayHistory"},
  42. {0x080B0080, nullptr, "CalcPlayHistoryStart"},
  43. {0x080C0080, nullptr, "SetUserTime"},
  44. {0x080D0000, nullptr, "InvalidateSystemTime"},
  45. {0x080E0140, nullptr, "NotifyPlayEvent"},
  46. {0x080F0000, IsLegacyPowerOff, "IsLegacyPowerOff"},
  47. {0x08100000, nullptr, "ClearLegacyPowerOff"},
  48. {0x08110000, nullptr, "GetShellStatus"},
  49. {0x08120000, nullptr, "IsShutdownByBatteryEmpty"},
  50. {0x08130000, nullptr, "FormatSavedata"},
  51. {0x08140000, nullptr, "GetLegacyJumpProhibitedFlag"}
  52. };
  53. PTM_Sysm_Interface::PTM_Sysm_Interface() {
  54. Register(FunctionTable);
  55. }
  56. } // namespace PTM
  57. } // namespace Service