Skip to content

Commit

Permalink
DEV9: Remove SDMA code
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastRar authored and refractionpcsx2 committed Jan 16, 2024
1 parent bfd0a05 commit f566769
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
1 change: 0 additions & 1 deletion pcsx2/DEV9/ATA/ATA.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class ATA
#endif

int pioMode;
int sdmaMode;
int mdmaMode;
int udmaMode;

Expand Down
13 changes: 3 additions & 10 deletions pcsx2/DEV9/ATA/ATA_Info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,9 @@ void ATA::CreateHDDinfo(u64 sizeSectors)
WriteUInt16(identifyData, &index, static_cast<u16>(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<u16>(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
Expand Down
4 changes: 0 additions & 4 deletions pcsx2/DEV9/ATA/ATA_State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,18 +304,14 @@ void ATA::ResetEnd(bool hard)
if (hard)
{
pioMode = 4;
sdmaMode = -1;
mdmaMode = 2;
udmaMode = -1;
}
else
{
pioMode = 4;
if (udmaMode == -1)
{
sdmaMode = -1;
mdmaMode = 2;
}
}

regControlEnableIRQ = false;
Expand Down
11 changes: 0 additions & 11 deletions pcsx2/DEV9/ATA/Commands/ATA_CmdNoData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f566769

Please sign in to comment.