From f56676942b6e63a4f5fb9c9be43eaed73fc52e9b Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Tue, 2 Jan 2024 12:21:32 +0000 Subject: [PATCH] DEV9: Remove SDMA code --- pcsx2/DEV9/ATA/ATA.h | 1 - pcsx2/DEV9/ATA/ATA_Info.cpp | 13 +++---------- pcsx2/DEV9/ATA/ATA_State.cpp | 4 ---- pcsx2/DEV9/ATA/Commands/ATA_CmdNoData.cpp | 11 ----------- 4 files changed, 3 insertions(+), 26 deletions(-) diff --git a/pcsx2/DEV9/ATA/ATA.h b/pcsx2/DEV9/ATA/ATA.h index 55c9176c37510..736c836e896c2 100644 --- a/pcsx2/DEV9/ATA/ATA.h +++ b/pcsx2/DEV9/ATA/ATA.h @@ -40,7 +40,6 @@ class ATA #endif int pioMode; - int sdmaMode; int mdmaMode; int udmaMode; diff --git a/pcsx2/DEV9/ATA/ATA_Info.cpp b/pcsx2/DEV9/ATA/ATA_Info.cpp index 2db914554092f..239ca6e99f397 100644 --- a/pcsx2/DEV9/ATA/ATA_Info.cpp +++ b/pcsx2/DEV9/ATA/ATA_Info.cpp @@ -154,16 +154,9 @@ void ATA::CreateHDDinfo(u64 sizeSectors) WriteUInt16(identifyData, &index, static_cast(curMultipleSectorsSetting | (1 << 8))); //word 59 //Total number of user addressable logical sectors WriteUInt32(identifyData, &index, nbSectors); //word 60-61 - //DMA modes - /* - * bits 0-7: Singleword modes supported (0,1,2) - * bits 8-15: Transfer mode active - */ - if (sdmaMode > 0) - WriteUInt16(identifyData, &index, static_cast(0x07 | (1 << (sdmaMode + 8)))); //word 62 - else - WriteUInt16(identifyData, &index, 0x07); //word 62 - //DMA Modes + //SDMA modes (Unsupported by original HDD) + index += 1 * 2; //word 62 + //MDMA Modes /* * bits 0-7: Multiword modes supported (0,1,2) * bits 8-15: Transfer mode active diff --git a/pcsx2/DEV9/ATA/ATA_State.cpp b/pcsx2/DEV9/ATA/ATA_State.cpp index b98c55f36ad80..8aefb1b72c647 100644 --- a/pcsx2/DEV9/ATA/ATA_State.cpp +++ b/pcsx2/DEV9/ATA/ATA_State.cpp @@ -304,7 +304,6 @@ void ATA::ResetEnd(bool hard) if (hard) { pioMode = 4; - sdmaMode = -1; mdmaMode = 2; udmaMode = -1; } @@ -312,10 +311,7 @@ void ATA::ResetEnd(bool hard) { pioMode = 4; if (udmaMode == -1) - { - sdmaMode = -1; mdmaMode = 2; - } } regControlEnableIRQ = false; diff --git a/pcsx2/DEV9/ATA/Commands/ATA_CmdNoData.cpp b/pcsx2/DEV9/ATA/Commands/ATA_CmdNoData.cpp index 4418238fe44ac..10113a01d713e 100644 --- a/pcsx2/DEV9/ATA/Commands/ATA_CmdNoData.cpp +++ b/pcsx2/DEV9/ATA/Commands/ATA_CmdNoData.cpp @@ -101,35 +101,24 @@ void ATA::HDD_SetFeatures() //if mode = 1, disable IORDY DevCon.WriteLn("DEV9: PIO Default"); pioMode = 4; - sdmaMode = -1; mdmaMode = -1; udmaMode = -1; break; case 0x01: //pio mode (3,4) DevCon.WriteLn("DEV9: PIO Mode %i", mode); pioMode = mode; - sdmaMode = -1; - mdmaMode = -1; - udmaMode = -1; - break; - case 0x02: //Single word dma mode (0,1,2) - DevCon.WriteLn("DEV9: SDMA Mode %i", mode); - //pioMode = -1; - sdmaMode = mode; mdmaMode = -1; udmaMode = -1; break; case 0x04: //Multi word dma mode (0,1,2) DevCon.WriteLn("DEV9: MDMA Mode %i", mode); //pioMode = -1; - sdmaMode = -1; mdmaMode = mode; udmaMode = -1; break; case 0x08: //Ulta dma mode (0,1,2,3,4,5,6) DevCon.WriteLn("DEV9: UDMA Mode %i", mode); //pioMode = -1; - sdmaMode = -1; mdmaMode = -1; udmaMode = mode; break;