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-20 06:47:41 +00:00
|
|
|
#pragma once
|
|
|
|
#include "types.h"
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
class StateWrapper;
|
|
|
|
|
2019-12-08 14:51:52 +00:00
|
|
|
class Controller;
|
2019-10-27 06:45:23 +00:00
|
|
|
class MemoryCard;
|
2023-01-11 09:10:21 +00:00
|
|
|
class Multitap;
|
2019-09-20 06:47:41 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
namespace Pad {
|
2019-09-20 06:47:41 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
static constexpr u32 NUM_SLOTS = 2;
|
2019-09-20 06:47:41 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
void Initialize();
|
|
|
|
void Shutdown();
|
|
|
|
void Reset();
|
2023-03-16 11:22:08 +00:00
|
|
|
bool DoState(StateWrapper& sw, bool is_memory_state);
|
2019-09-29 15:07:38 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
Controller* GetController(u32 slot);
|
|
|
|
void SetController(u32 slot, std::unique_ptr<Controller> dev);
|
2019-09-20 06:47:41 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
MemoryCard* GetMemoryCard(u32 slot);
|
|
|
|
void SetMemoryCard(u32 slot, std::unique_ptr<MemoryCard> dev);
|
|
|
|
std::unique_ptr<MemoryCard> RemoveMemoryCard(u32 slot);
|
2021-01-21 07:59:40 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
Multitap* GetMultitap(u32 slot);
|
2019-09-20 06:47:41 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
u32 ReadRegister(u32 offset);
|
|
|
|
void WriteRegister(u32 offset, u32 value);
|
2021-01-05 14:00:56 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
bool IsTransmitting();
|
2019-09-22 15:25:58 +00:00
|
|
|
|
2023-01-11 09:10:21 +00:00
|
|
|
} // namespace Pad
|