Implement event-based scheduler instead of lock-step components

This commit is contained in:
Connor McLaughlin
2020-01-24 14:53:40 +10:00
parent 624888e131
commit 1b9609ef61
26 changed files with 1089 additions and 520 deletions

View File

@ -3,10 +3,12 @@
#include "common/fifo_queue.h"
#include "types.h"
#include <array>
#include <memory>
class StateWrapper;
class System;
class TimingEvent;
class DMA;
class MDEC
@ -26,8 +28,6 @@ public:
void DMARead(u32* words, u32 word_count);
void DMAWrite(const u32* words, u32 word_count);
void Execute(TickCount ticks);
void DrawDebugStateWindow();
private:
@ -88,6 +88,7 @@ private:
};
bool HasPendingCommand() const { return m_command != Command::None; }
bool HasPendingBlockCopyOut() const;
void SoftReset();
void UpdateStatus();
@ -138,8 +139,7 @@ private:
u16 m_current_q_scale = 0;
std::array<u32, 256> m_block_rgb{};
TickCount m_block_copy_out_ticks = TICKS_PER_BLOCK;
bool m_block_copy_out_pending = false;
std::unique_ptr<TimingEvent> m_block_copy_out_event;
u32 m_total_blocks_decoded = 0;
};