Update DSP semaphore on semaphore event signal

Fixes Pokemon X and other DSP-needy games...
This commit is contained in:
wheremyfoodat 2024-02-18 03:54:00 +02:00
parent d3dc9e2f71
commit f58354af06
7 changed files with 53 additions and 15 deletions

View file

@ -27,6 +27,7 @@ class DSPService {
DSPEvent interrupt0;
DSPEvent interrupt1;
std::array<DSPEvent, pipeCount> pipeEvents;
u16 semaphoreMask = 0;
DSPEvent& getEventRef(u32 type, u32 pipe);
static constexpr size_t maxEventCount = 6;
@ -55,6 +56,9 @@ public:
void reset();
void handleSyncRequest(u32 messagePointer);
void setDSPCore(Audio::DSPCore* pointer) { dsp = pointer; }
// Special callback that's ran when the semaphore event is signalled
void onSemaphoreEventSignal() { dsp->setSemaphore(semaphoreMask); }
enum class SoundOutputMode : u8 {
Mono = 0,