mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-10 03:02:05 -10:00
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format" * fix ui format warnings
29 lines
589 B
C++
29 lines
589 B
C++
#pragma once
|
|
#include "pch.h"
|
|
#include "WS/WsTypes.h"
|
|
#include "Utilities/ISerializable.h"
|
|
|
|
class WsMemoryManager;
|
|
class WsApu;
|
|
|
|
class WsDmaController final : public ISerializable
|
|
{
|
|
private:
|
|
WsMemoryManager* _memoryManager = nullptr;
|
|
WsDmaControllerState _state = {};
|
|
WsApu* _apu = nullptr;
|
|
|
|
public:
|
|
void Init(WsMemoryManager* memoryManager, WsApu* apu);
|
|
|
|
void RunGeneralDma();
|
|
void ProcessSoundDma();
|
|
|
|
WsDmaControllerState& GetState() { return _state; }
|
|
|
|
uint8_t ReadPort(uint16_t port);
|
|
void WritePort(uint16_t port, uint8_t value);
|
|
|
|
void Serialize(Serializer& s) override;
|
|
};
|