Merge pull request #1178 from MichonGoddijn231849/fix/spi-ps-input-reset-values

fix(agc): SPI_PS_INPUT_ENA/ADDR start at their reset value
This commit is contained in:
Adrià
2026-10-08 11:11:33 +02:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
@@ -148,7 +148,7 @@ inline Registers InitialContextRegisters() {
{0xc, 0}, {0xd, 0x40004000}, {0x81, 0x80000000}, {0x82, 0x40004000},
{0x90, 0x80000000}, {0x91, 0x40004000},
{0x105, 0}, {0x106, 0}, {0x107, 0}, {0x108, 0},
{0x1b1, 0}, {0x1b6, 0}, {0x1c3, 0}, {0x1c4, 0}, {0x1c5, 0},
{0x1b1, 0}, {0x1b3, 0}, {0x1b4, 0}, {0x1b6, 0}, {0x1c3, 0}, {0x1c4, 0}, {0x1c5, 0},
{0x1ff, 0}, {0x292, 2}, {0x293, 0}, {0x29b, 0},
{0x2ce, 0}, {0x2d3, 0}, {0x2d5, 0}, {0x2d6, 0}, {0x2db, 0},
{0x2dc, 0xaa00}, {0x2df, 0}, {0x2e4, 0}, {0x2f8, 0}, {0x2f9, 0x2d},
@@ -113,6 +113,7 @@ void testClearState() {
graphics.ClearContext();
check(graphics.context == AgcDriver::InitialContextRegisters(), "CLEAR_STATE retained context registers");
check(graphics.shader == shader && graphics.userConfig == userConfig, "CLEAR_STATE reset unrelated registers");
check(graphics.context.count(0x1b3) == 1 && graphics.context.at(0x1b3) == 0 && graphics.context.count(0x1b4) == 1 && graphics.context.at(0x1b4) == 0, "CLEAR_STATE left SPI_PS_INPUT_ENA/ADDR unset");
graphics.context.emplace(0x10, 31);
graphics.ClearContext();
check(graphics.context == AgcDriver::InitialContextRegisters(), "repeated CLEAR_STATE retained context registers");