DEV9: Run clang format on ATA code

This commit is contained in:
TheLastRar 2021-01-03 03:40:53 +00:00 committed by refractionpcsx2
parent dc3bd53f7b
commit b501a1deae
5 changed files with 11 additions and 10 deletions

View File

@ -31,7 +31,7 @@ class ATA
public: public:
//Transfer //Transfer
bool dmaReady = false; bool dmaReady = false;
int nsector = 0; //sector count int nsector = 0; //sector count
int nsectorLeft = 0; //sectors left to transfer int nsectorLeft = 0; //sectors left to transfer
private: private:
const bool lba48Supported = false; const bool lba48Supported = false;
@ -51,7 +51,7 @@ private:
u8 curMultipleSectorsSetting = 128; u8 curMultipleSectorsSetting = 128;
u8 identifyData[512] = { 0 }; u8 identifyData[512] = {0};
//LBA48 in use? //LBA48 in use?
bool lba48 = false; bool lba48 = false;
@ -175,7 +175,7 @@ public:
u16 ATAreadPIO(); u16 ATAreadPIO();
//ATAwritePIO; //ATAwritePIO;
private: private:
//Info //Info
void CreateHDDinfo(int sizeMb); void CreateHDDinfo(int sizeMb);
void CreateHDDinfoCsum(); void CreateHDDinfoCsum();
@ -273,4 +273,3 @@ public:
static void WriteUInt64(u8* data, int* index, u64 value); static void WriteUInt64(u8* data, int* index, u64 value);
static void WritePaddedString(u8* data, int* index, std::string value, u32 len); static void WritePaddedString(u8* data, int* index, std::string value, u32 len);
}; };

View File

@ -260,6 +260,7 @@ void ATA::CreateHDDinfo(int sizeMb)
//Command set/feature enabled/supported (See word 82) //Command set/feature enabled/supported (See word 82)
WriteUInt16(identifyData, &index, (u16)((fetSmartEnabled << 0) | (fetSecurityEnabled << 1) | (fetWriteCacheEnabled << 5) | (fetHostProtectedAreaEnabled << 10) | (1 << 14))); //Fixed //word 85 WriteUInt16(identifyData, &index, (u16)((fetSmartEnabled << 0) | (fetSecurityEnabled << 1) | (fetWriteCacheEnabled << 5) | (fetHostProtectedAreaEnabled << 10) | (1 << 14))); //Fixed //word 85
//Command set/feature enabled/supported (See word 83) //Command set/feature enabled/supported (See word 83)
// clang-format off
WriteUInt16(identifyData, &index, (u16)( WriteUInt16(identifyData, &index, (u16)(
/*(1 << 8) | //SET MAX */ /*(1 << 8) | //SET MAX */
((lba48Supported ? 1 : 0) << 10) | //Fixed ((lba48Supported ? 1 : 0) << 10) | //Fixed
@ -270,6 +271,7 @@ void ATA::CreateHDDinfo(int sizeMb)
WriteUInt16(identifyData, &index, (u16)( WriteUInt16(identifyData, &index, (u16)(
(1) | //Fixed (1) | //Fixed
((1) << 1))); //Fixed //word 87 ((1) << 1))); //Fixed //word 87
// clang-format on
//UDMA modes //UDMA modes
/* /*
* bits 0-7: ultraword modes supported (0,1,2,4,5,6,7) * bits 0-7: ultraword modes supported (0,1,2,4,5,6,7)

View File

@ -310,7 +310,7 @@ void ATA::Async(uint cycles)
if (waitingCmd != nullptr) //Are we waiting to continue a command? if (waitingCmd != nullptr) //Are we waiting to continue a command?
{ {
//Log_Info("Running waiting command"); //Log_Info("Running waiting command");
void(ATA::*cmd)() = waitingCmd; void (ATA::*cmd)() = waitingCmd;
waitingCmd = nullptr; waitingCmd = nullptr;
(this->*cmd)(); (this->*cmd)();
} }

View File

@ -876,7 +876,7 @@ void DEV9write16(u32 addr, u16 value)
dev9.fifo_bytes_write = 0; dev9.fifo_bytes_write = 0;
dev9.fifo_bytes_read = 0; dev9.fifo_bytes_read = 0;
dev9.xfr_ctrl &= ~SPD_XFR_WRITE; //? dev9.xfr_ctrl &= ~SPD_XFR_WRITE; //?
dev9.if_ctrl |= SPD_IF_READ; //? dev9.if_ctrl |= SPD_IF_READ; //?
FIFOIntr(); FIFOIntr();
} }