Add support for changing the DS and DSi battery level

The DS battery level is configured via the SPI Power Management Device,
and the DSi's is configured via the I2C BPTWL. Add support for changing
these registers and add the "Power Management" dialog in the UI.
This commit is contained in:
Rayyan Ansari
2022-02-18 15:32:46 +00:00
parent 03b5c48088
commit 3c92afa3fc
16 changed files with 1360 additions and 0 deletions

View File

@ -624,6 +624,9 @@ void Reset()
RegMasks[4] = 0x0F;
}
bool GetBatteryLevelOkay() { return !Registers[1]; }
void SetBatteryLevelOkay(bool okay) { Registers[1] = okay ? 0x00 : 0x01; }
void DoSavestate(Savestate* file)
{
file->Section("SPPW");