mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-10-01 02:17:14 -04:00
Feature/random fixes platform support (#179)
* feat: implement memory card IOP * feat: IOP trace * feat: move IOP logic to ps2xIOP refactor: small refactor on audio api on runtime * feat: android support feat: prevent race on GS feat: a bit cleanup and reimplement on memory card * feat: finish guest thread feat: android build support feat: vita build support with suspicious setup scripts * feat: remove idea from track
This commit is contained in:
@@ -183,7 +183,7 @@ void register_ps2_runtime_interrupt_tests()
|
||||
{
|
||||
MiniTest::Case("PS2RuntimeInterrupt", [](TestCase &tc)
|
||||
{
|
||||
tc.Run("SetVSyncFlag updates guest flag and monotonic tick", [](TestCase &t)
|
||||
tc.Run("SetVSyncFlag arms a one-shot vblank notification", [](TestCase &t)
|
||||
{
|
||||
notifyRuntimeStop();
|
||||
TestEnv env;
|
||||
@@ -211,12 +211,23 @@ void register_ps2_runtime_interrupt_tests()
|
||||
const uint64_t firstTick = readGuestU64(env.rdram.data(), kTickAddr);
|
||||
t.IsTrue(firstTick > 0u, "First observed VSync tick should be positive");
|
||||
t.Equals(readGuestU32(env.rdram.data(), kFlagAddr), 1u, "VSync worker should set flag to one");
|
||||
|
||||
const bool tickRewritten = waitUntil([&]() {
|
||||
return readGuestU64(env.rdram.data(), kTickAddr) != firstTick;
|
||||
}, std::chrono::milliseconds(100));
|
||||
t.IsTrue(!tickRewritten, "consumed registration should not be written again");
|
||||
|
||||
const bool secondTickSeen = waitUntil([&]() {
|
||||
// Re-arming registers a fresh one-shot notification.
|
||||
writeGuestU32(env.rdram.data(), kFlagAddr, 0u);
|
||||
R5900Context rearmCtx{};
|
||||
setRegU32(rearmCtx, 4, kFlagAddr);
|
||||
setRegU32(rearmCtx, 5, kTickAddr);
|
||||
t.IsTrue(callSyscall(0x73u, env.rdram.data(), &rearmCtx, &env.runtime), "SetVSyncFlag re-arm should dispatch");
|
||||
const bool rearmedTickSeen = waitUntil([&]() {
|
||||
return readGuestU64(env.rdram.data(), kTickAddr) > firstTick;
|
||||
}, std::chrono::milliseconds(300));
|
||||
t.IsTrue(secondTickSeen, "VSync tick should continue to advance");
|
||||
t.IsTrue(readGuestU64(env.rdram.data(), kTickAddr) > firstTick, "tick should be monotonic");
|
||||
t.IsTrue(rearmedTickSeen, "re-armed registration should observe a later tick");
|
||||
t.Equals(readGuestU32(env.rdram.data(), kFlagAddr), 1u, "re-armed registration should set flag to one");
|
||||
|
||||
cleanupRuntime(env);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user