2022-12-04 11:03:45 +00:00
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
2019-09-09 07:01:26 +00:00
|
|
|
#pragma once
|
|
|
|
#include "types.h"
|
|
|
|
|
2019-09-14 10:28:47 +00:00
|
|
|
class StateWrapper;
|
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
namespace DMA {
|
2019-09-09 07:01:26 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
enum : u32
|
2019-09-09 07:01:26 +00:00
|
|
|
{
|
2023-01-11 08:51:38 +00:00
|
|
|
NUM_CHANNELS = 7
|
|
|
|
};
|
2019-09-09 07:01:26 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
enum class Channel : u32
|
|
|
|
{
|
|
|
|
MDECin = 0,
|
|
|
|
MDECout = 1,
|
|
|
|
GPU = 2,
|
|
|
|
CDROM = 3,
|
|
|
|
SPU = 4,
|
|
|
|
PIO = 5,
|
|
|
|
OTC = 6
|
|
|
|
};
|
2019-09-24 09:43:10 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
void Initialize();
|
|
|
|
void Shutdown();
|
|
|
|
void Reset();
|
|
|
|
bool DoState(StateWrapper& sw);
|
2019-09-24 09:43:10 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
u32 ReadRegister(u32 offset);
|
|
|
|
void WriteRegister(u32 offset, u32 value);
|
2019-09-24 09:43:10 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
void SetRequest(Channel channel, bool request);
|
2019-09-24 09:43:10 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
// changing interfaces
|
|
|
|
void SetMaxSliceTicks(TickCount ticks);
|
|
|
|
void SetHaltTicks(TickCount ticks);
|
2019-09-24 09:43:10 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
void DrawDebugStateWindow();
|
2020-07-31 07:09:18 +00:00
|
|
|
|
2023-01-11 08:51:38 +00:00
|
|
|
} // namespace DMA
|