mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-09 11:16:23 +01:00
Dummy EXI_DeviceSD
This commit is contained in:
parent
0f33eda90f
commit
d49d1197f6
@ -15,6 +15,7 @@
|
||||
#include "Core/HW/EXI/EXI_DeviceMemoryCard.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceMic.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceModem.h"
|
||||
#include "Core/HW/EXI/EXI_DeviceSD.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
@ -162,6 +163,10 @@ std::unique_ptr<IEXIDevice> EXIDevice_Create(Core::System& system, const EXIDevi
|
||||
result = std::make_unique<CEXIAgp>(system, slot);
|
||||
break;
|
||||
|
||||
case EXIDeviceType::SD:
|
||||
result = std::make_unique<CEXISD>(system);
|
||||
break;
|
||||
|
||||
case EXIDeviceType::AMBaseboard:
|
||||
case EXIDeviceType::None:
|
||||
default:
|
||||
|
@ -42,6 +42,7 @@ enum class EXIDeviceType : int
|
||||
EthernetTapServer,
|
||||
EthernetBuiltIn,
|
||||
ModemTapServer,
|
||||
SD,
|
||||
None = 0xFF
|
||||
};
|
||||
|
||||
@ -88,7 +89,7 @@ std::unique_ptr<IEXIDevice> EXIDevice_Create(Core::System& system, EXIDeviceType
|
||||
|
||||
template <>
|
||||
struct fmt::formatter<ExpansionInterface::EXIDeviceType>
|
||||
: EnumFormatter<ExpansionInterface::EXIDeviceType::ModemTapServer>
|
||||
: EnumFormatter<ExpansionInterface::EXIDeviceType::SD>
|
||||
{
|
||||
static constexpr array_type names = {
|
||||
_trans("Dummy"),
|
||||
@ -106,6 +107,7 @@ struct fmt::formatter<ExpansionInterface::EXIDeviceType>
|
||||
_trans("Broadband Adapter (tapserver)"),
|
||||
_trans("Broadband Adapter (HLE)"),
|
||||
_trans("Modem Adapter (tapserver)"),
|
||||
_trans("SD Adapter"),
|
||||
};
|
||||
|
||||
constexpr formatter() : EnumFormatter(names) {}
|
||||
|
@ -0,0 +1,49 @@
|
||||
// Copyright 2020 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "Core/HW/EXI/EXI_DeviceSD.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
namespace ExpansionInterface
|
||||
{
|
||||
CEXISD::CEXISD(Core::System& system) : IEXIDevice(system)
|
||||
{
|
||||
}
|
||||
|
||||
void CEXISD::ImmWrite(u32 data, u32 size)
|
||||
{
|
||||
INFO_LOG_FMT(EXPANSIONINTERFACE, "EXI SD ImmWrite: {:08x}", data);
|
||||
}
|
||||
|
||||
u32 CEXISD::ImmRead(u32 size)
|
||||
{
|
||||
INFO_LOG_FMT(EXPANSIONINTERFACE, "EXI SD ImmRead");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CEXISD::DMAWrite(u32 address, u32 size)
|
||||
{
|
||||
INFO_LOG_FMT(EXPANSIONINTERFACE, "EXI SD DMAWrite: {:08x} bytes, from {:08x} to device", size,
|
||||
address);
|
||||
}
|
||||
|
||||
void CEXISD::DMARead(u32 address, u32 size)
|
||||
{
|
||||
INFO_LOG_FMT(EXPANSIONINTERFACE, "EXI SD DMARead: {:08x} bytes, from device to {:08x}", size,
|
||||
address);
|
||||
}
|
||||
|
||||
bool CEXISD::IsPresent() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CEXISD::TransferByte(u8& byte)
|
||||
{
|
||||
}
|
||||
} // namespace ExpansionInterface
|
@ -0,0 +1,31 @@
|
||||
// Copyright 2020 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/HW/EXI/EXI_Device.h"
|
||||
|
||||
namespace ExpansionInterface
|
||||
{
|
||||
// EXI-SD adapter (DOL-019)
|
||||
class CEXISD final : public IEXIDevice
|
||||
{
|
||||
public:
|
||||
explicit CEXISD(Core::System& system);
|
||||
|
||||
void ImmWrite(u32 data, u32 size) override;
|
||||
u32 ImmRead(u32 size) override;
|
||||
|
||||
void DMAWrite(u32 address, u32 size) override;
|
||||
void DMARead(u32 address, u32 size) override;
|
||||
|
||||
bool IsPresent() const override;
|
||||
|
||||
private:
|
||||
void TransferByte(u8& byte) override;
|
||||
};
|
||||
} // namespace ExpansionInterface
|
@ -135,7 +135,7 @@ void GameCubePane::CreateWidgets()
|
||||
// Add slot devices
|
||||
for (const auto device : {EXIDeviceType::None, EXIDeviceType::Dummy, EXIDeviceType::MemoryCard,
|
||||
EXIDeviceType::MemoryCardFolder, EXIDeviceType::Gecko,
|
||||
EXIDeviceType::AGP, EXIDeviceType::Microphone})
|
||||
EXIDeviceType::AGP, EXIDeviceType::Microphone, EXIDeviceType::SD})
|
||||
{
|
||||
const QString name = tr(fmt::format("{:n}", device).c_str());
|
||||
const int value = static_cast<int>(device);
|
||||
|
Loading…
x
Reference in New Issue
Block a user