[Kernel] - Implemented SystemManagementController Class

- Added handling (partial or dummy) for SMC actions:
 - QUERY_TEMP_SENSOR, QUERY_TRAY, QUERY_AV_PACK, QUERY_SMC_VERSION, QUERY_IR_ADDRESS, QUERY_TILT_SENSOR
 - SET_FAN_SPEED_CPU, SET_FAN_SPEED_GPU, SET_DVD_TRAY, SET_IR_ADDRESS, SET_POWER_LED, SET_LEDS

- Stub HalOpenCloseODDTray, XamLoaderGetMediaInfo, XamLoaderGetMediaInfoEx
- Partially Implement HalSendSMCMessage
- Implement XamLoaderGetDvdTrayState
- HalOpenCloseODDTray is used by dash and HalSendSMCMessage can be used by custom dashboards
This commit is contained in:
The-Little-Wolf
2025-04-01 05:34:54 -07:00
committed by Radosław Gliński
parent 4b24f128f6
commit 0771938db6
6 changed files with 453 additions and 8 deletions

View File

@@ -66,6 +66,7 @@ KernelState::KernelState(Emulator* emulator)
processor_ = emulator->processor();
file_system_ = emulator->file_system();
xam_state_ = std::make_unique<xam::XamState>(emulator, this);
smc_ = std::make_unique<SystemManagementController>();
InitializeKernelGuestGlobals();
kernel_version_ = KernelVersion(cvars::kernel_build_version);
@@ -894,6 +895,9 @@ void KernelState::RegisterNotifyListener(XNotifyListener* listener) {
// XN_SYS_SIGNINCHANGED x2
listener->EnqueueNotification(kXNotificationSystemSignInChanged, 1);
listener->EnqueueNotification(kXNotificationSystemSignInChanged, 1);
listener->EnqueueNotification(kXNotificationDvdDriveTrayStateChanged,
X_DVD_DISC_STATE::XBOX_360_GAME_DISC);
}
}