mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-29 17:58:24 -04:00
Feature/mpeg decoder (#120)
* feat: added ffmepg as dependency * feat: wip decoder video * feat: some perf and cleanup * feat: added generic MPEG stream notification * feat: CMakeLists.txt in ps2xStudio to configure SDL2 build options for static linking. fix: fix ffmpeg setup for linux fix: now MPEG decoder now identify that movie has ended and can play again anytime feat: better audio stub to not block games * feat: fix expansion test * feat: foo * a * feat: finally added a helper to to prevent thread starvation * feat: added basic vu0 code execution * feat: added yield Guest Execution After Wake to prevent deadlock * feat: added options on cmake for logs feat: better input for keyboard pad * feat: small corrections like top and itop vu branches etc * feat: changes * feat: working feature * feat: fatal frame iop * feat: test fix feat: z buffer fix * fix: gix GsPutIMR IMR * feat: added rl imgui * feat: added helper to get snapshot * feat: added debug panel consuming snapshots * feat: added pad snapshot feat: added RCP debug events * feat: final cleanup from old code * feat: added EE timer counter feat: applyed sound driver for Lotr feat: better check for sound driver compat layout feat: enquee and cosumed DMa cause feat: added Pad execCMd feat: update GS vsync signal flag feat: custom IOPs for LotR * feat: small cleanups * fix: fix wrong import
This commit is contained in:
@@ -195,6 +195,49 @@ void register_pad_input_tests()
|
||||
t.Equals(static_cast<uint32_t>(getRegU32(&ctx, 2)), static_cast<uint32_t>(0), "closed port should return DISCONNECTED after close");
|
||||
});
|
||||
|
||||
tc.Run("pad command state reports EXECCMD once before returning STABLE", [](TestCase &t)
|
||||
{
|
||||
std::vector<uint8_t> rdram(PS2_RAM_SIZE, 0);
|
||||
R5900Context ctx;
|
||||
|
||||
ps2_stubs::scePadInit(rdram.data(), &ctx, nullptr);
|
||||
openPadPort(ctx, rdram);
|
||||
|
||||
setRegU32(ctx, 4, 0u);
|
||||
setRegU32(ctx, 5, 0u);
|
||||
setRegU32(ctx, 6, 1u);
|
||||
setRegU32(ctx, 7, 3u);
|
||||
ps2_stubs::scePadSetMainMode(rdram.data(), &ctx, nullptr);
|
||||
t.Equals(static_cast<uint32_t>(getRegU32(&ctx, 2)), static_cast<uint32_t>(1), "scePadSetMainMode should succeed");
|
||||
|
||||
setRegU32(ctx, 4, 0u);
|
||||
setRegU32(ctx, 5, 0u);
|
||||
ps2_stubs::scePadGetState(rdram.data(), &ctx, nullptr);
|
||||
t.Equals(static_cast<uint32_t>(getRegU32(&ctx, 2)), static_cast<uint32_t>(5), "first state after mode command should be EXECCMD");
|
||||
|
||||
setRegU32(ctx, 4, 0u);
|
||||
setRegU32(ctx, 5, 0u);
|
||||
ps2_stubs::scePadGetState(rdram.data(), &ctx, nullptr);
|
||||
t.Equals(static_cast<uint32_t>(getRegU32(&ctx, 2)), static_cast<uint32_t>(6), "second state after mode command should return STABLE");
|
||||
|
||||
setRegU32(ctx, 4, 0u);
|
||||
setRegU32(ctx, 5, 0u);
|
||||
ps2_stubs::scePadEnterPressMode(rdram.data(), &ctx, nullptr);
|
||||
t.Equals(static_cast<uint32_t>(getRegU32(&ctx, 2)), static_cast<uint32_t>(1), "scePadEnterPressMode should succeed");
|
||||
|
||||
setRegU32(ctx, 4, 0u);
|
||||
setRegU32(ctx, 5, 0u);
|
||||
ps2_stubs::scePadGetState(rdram.data(), &ctx, nullptr);
|
||||
t.Equals(static_cast<uint32_t>(getRegU32(&ctx, 2)), static_cast<uint32_t>(5), "first state after press-mode command should be EXECCMD");
|
||||
|
||||
setRegU32(ctx, 4, 0u);
|
||||
setRegU32(ctx, 5, 0u);
|
||||
ps2_stubs::scePadGetState(rdram.data(), &ctx, nullptr);
|
||||
t.Equals(static_cast<uint32_t>(getRegU32(&ctx, 2)), static_cast<uint32_t>(6), "second state after press-mode command should return STABLE");
|
||||
|
||||
closePadPort(ctx, rdram);
|
||||
});
|
||||
|
||||
tc.Run("pad info and mode helpers return consistent values", [](TestCase &t)
|
||||
{
|
||||
std::vector<uint8_t> rdram(PS2_RAM_SIZE, 0);
|
||||
|
||||
Reference in New Issue
Block a user