Skip to content

Commit

Permalink
Merge pull request #1919 from skidau/AGP
Browse files Browse the repository at this point in the history
Added support for AGP. Original patch by GreyRogue.
  • Loading branch information
skidau committed Jan 27, 2015
2 parents 7df55d2 + 7dafad5 commit c20ef8b
Show file tree
Hide file tree
Showing 13 changed files with 446 additions and 38 deletions.
1 change: 1 addition & 0 deletions Source/Core/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ set(SRCS ActionReplay.cpp
HW/EXI.cpp
HW/EXI_Device.cpp
HW/EXI_DeviceAD16.cpp
HW/EXI_DeviceAGP.cpp
HW/EXI_DeviceAMBaseboard.cpp
HW/EXI_DeviceEthernet.cpp
HW/EXI_DeviceGecko.cpp
Expand Down
4 changes: 4 additions & 0 deletions Source/Core/Core/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ void SConfig::SaveCoreSettings(IniFile& ini)
core->Set("Latency", m_LocalCoreStartupParameter.iLatency);
core->Set("MemcardAPath", m_strMemoryCardA);
core->Set("MemcardBPath", m_strMemoryCardB);
core->Set("AgpCartAPath", m_strGbaCartA);
core->Set("AgpCartBPath", m_strGbaCartB);
core->Set("SlotA", m_EXIDevice[0]);
core->Set("SlotB", m_EXIDevice[1]);
core->Set("SerialPort1", m_EXIDevice[2]);
Expand Down Expand Up @@ -561,6 +563,8 @@ void SConfig::LoadCoreSettings(IniFile& ini)
core->Get("Latency", &m_LocalCoreStartupParameter.iLatency, 2);
core->Get("MemcardAPath", &m_strMemoryCardA);
core->Get("MemcardBPath", &m_strMemoryCardB);
core->Get("AgpCartAPath", &m_strGbaCartA);
core->Get("AgpCartBPath", &m_strGbaCartB);
core->Get("SlotA", (int*)&m_EXIDevice[0], EXIDEVICE_MEMORYCARD);
core->Get("SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_NONE);
core->Get("SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/ConfigManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ struct SConfig : NonCopyable

std::string m_strMemoryCardA;
std::string m_strMemoryCardB;
std::string m_strGbaCartA;
std::string m_strGbaCartB;
TEXIDevices m_EXIDevice[3];
SIDevices m_SIDevice[4];
std::string m_bba_mac;
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/Core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<ClCompile Include="HW\EXI_Channel.cpp" />
<ClCompile Include="HW\EXI_Device.cpp" />
<ClCompile Include="HW\EXI_DeviceAD16.cpp" />
<ClCompile Include="HW\EXI_DeviceAGP.cpp" />
<ClCompile Include="HW\EXI_DeviceAMBaseboard.cpp" />
<ClCompile Include="HW\EXI_DeviceEthernet.cpp" />
<ClCompile Include="HW\EXI_DeviceGecko.cpp" />
Expand Down Expand Up @@ -331,6 +332,7 @@
<ClInclude Include="HW\EXI_Channel.h" />
<ClInclude Include="HW\EXI_Device.h" />
<ClInclude Include="HW\EXI_DeviceAD16.h" />
<ClInclude Include="HW\EXI_DeviceAGP.h" />
<ClInclude Include="HW\EXI_DeviceAMBaseboard.h" />
<ClInclude Include="HW\EXI_DeviceEthernet.h" />
<ClInclude Include="HW\EXI_DeviceGecko.h" />
Expand Down
6 changes: 6 additions & 0 deletions Source/Core/Core/Core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
<ClCompile Include="HW\EXI_DeviceAD16.cpp">
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
</ClCompile>
<ClCompile Include="HW\EXI_DeviceAGP.cpp">
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
</ClCompile>
<ClCompile Include="HW\EXI_DeviceAMBaseboard.cpp">
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
</ClCompile>
Expand Down Expand Up @@ -917,6 +920,9 @@
<ClInclude Include="HW\EXI_DeviceAD16.h">
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
</ClInclude>
<ClInclude Include="HW\EXI_DeviceAGP.h">
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
</ClInclude>
<ClInclude Include="HW\EXI_DeviceAMBaseboard.h">
<Filter>HW %28Flipper/Hollywood%29\EXI - Expansion Interface</Filter>
</ClInclude>
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/DVDInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ DVDCommandResult ExecuteCommand(u32 command_0, u32 command_1, u32 command_2,
INFO_LOG(DVDINTERFACE, "DVDLowStopMotor %s %s",
command_1 ? "eject" : "", command_2 ? "kill!" : "");

if (command_1)
if (command_1 && !command_2)
EjectDiscCallback(0, 0);
break;

Expand Down
6 changes: 6 additions & 0 deletions Source/Core/Core/HW/EXI_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "Core/Core.h"
#include "Core/HW/EXI_Device.h"
#include "Core/HW/EXI_DeviceAD16.h"
#include "Core/HW/EXI_DeviceAGP.h"
#include "Core/HW/EXI_DeviceAMBaseboard.h"
#include "Core/HW/EXI_DeviceEthernet.h"
#include "Core/HW/EXI_DeviceGecko.h"
Expand Down Expand Up @@ -84,6 +85,7 @@ class CEXIDummy : public IEXIDevice
u32 ImmRead (u32 size) override {INFO_LOG(EXPANSIONINTERFACE, "EXI DUMMY %s ImmRead", m_strName.c_str()); return 0;}
void DMAWrite(u32 addr, u32 size) override {INFO_LOG(EXPANSIONINTERFACE, "EXI DUMMY %s DMAWrite: %08x bytes, from %08x to device", m_strName.c_str(), size, addr);}
void DMARead (u32 addr, u32 size) override {INFO_LOG(EXPANSIONINTERFACE, "EXI DUMMY %s DMARead: %08x bytes, from device to %08x", m_strName.c_str(), size, addr);}
bool IsPresent() override { return true; }
};


Expand Down Expand Up @@ -129,6 +131,10 @@ IEXIDevice* EXIDevice_Create(TEXIDevices device_type, const int channel_num)
result = new CEXIGecko();
break;

case EXIDEVICE_AGP:
result = new CEXIAgp(channel_num);
break;

case EXIDEVICE_NONE:
default:
result = new IEXIDevice();
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/EXI_Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enum TEXIDevices
EXIDEVICE_GECKO,
EXIDEVICE_MEMORYCARDFOLDER, // Only used when creating a device by EXIDevice_Create
// Converted to EXIDEVICE_MEMORYCARD internally
EXIDEVICE_AGP,
EXIDEVICE_NONE = (u8)-1
};

Expand Down
Loading

0 comments on commit c20ef8b

Please sign in to comment.