DEV9: Remove SDMA code

This commit is contained in:
TheLastRar 2024-01-02 12:21:32 +00:00 committed by refractionpcsx2
parent bfd0a05289
commit f56676942b
4 changed files with 3 additions and 26 deletions

View File

@ -40,7 +40,6 @@ private:
#endif
int pioMode;
int sdmaMode;
int mdmaMode;
int udmaMode;

View File

@ -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

View File

@ -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;

View File

@ -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;