Files
PS2Recomp/ps2xRuntime/src/lib/ps2_iop.cpp
T
Ranieri 8c8a97af65 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
2026-06-26 21:04:39 -03:00

106 lines
3.3 KiB
C++

#include "runtime/ps2_iop.h"
#include "runtime/ps2_iop_audio.h"
#include "runtime/ps2_iop_cl.h"
#include "runtime/ps2_iop_dbcman.h"
#include "runtime/ps2_iop_sdrdrv.h"
#include "runtime/ps2_memory.h"
#include "ps2_runtime.h"
#include "Kernel/Syscalls/RPC.h"
ps2_iop::ps2_iop()
{
reset();
}
void ps2_iop::init(uint8_t *rdram)
{
m_rdram = rdram;
}
void ps2_iop::reset()
{
ps2_iop_cl::reset();
ps2_iop_dbcman::reset();
ps2_iop_sdrdrv::reset();
}
bool ps2_iop::handleRPC(PS2Runtime *runtime,
uint32_t sid,
uint32_t rpcNum,
uint32_t sendBufAddr,
uint32_t sendSize,
uint32_t recvBufAddr,
uint32_t recvSize,
uint32_t &resultPtr,
bool &signalNowaitCompletion)
{
resultPtr = 0u;
signalNowaitCompletion = false;
if (ps2_syscalls::handleSoundDriverRpcService(m_rdram,
runtime,
sid,
rpcNum,
sendBufAddr,
sendSize,
recvBufAddr,
recvSize,
resultPtr,
signalNowaitCompletion))
{
return true;
}
if (ps2_iop_dbcman::handleDbcManRpc(m_rdram,
sid,
rpcNum,
sendBufAddr,
sendSize,
recvBufAddr,
recvSize,
resultPtr))
{
return true;
}
if (ps2_iop_audio::handleLibSdRpc(m_rdram,
runtime,
sid,
rpcNum,
sendBufAddr,
sendSize,
recvBufAddr,
recvSize,
resultPtr))
{
return true;
}
if (ps2_iop_cl::handleSoundRpc(m_rdram, sid,
rpcNum, sendBufAddr,
sendSize, recvBufAddr,
recvSize, resultPtr,
signalNowaitCompletion))
{
return true;
}
if (ps2_iop_cl::handleClFileRpc(m_rdram, sid,
rpcNum, sendBufAddr,
sendSize, recvBufAddr,
recvSize, resultPtr))
{
return true;
}
if (ps2_iop_sdrdrv::handleSdrdrvRpc(m_rdram, sid,
rpcNum, sendBufAddr,
sendSize, recvBufAddr,
recvSize, resultPtr))
{
return true;
}
return false;
}