* Data block read and write commands
*/
#define IDEReadBlock(Address, Buffer, Count) \
- (__inwordstring(((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2))
+ (READ_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2))
#define IDEWriteBlock(Address, Buffer, Count) \
(WRITE_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2))
}
BOOLEAN
-XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
+XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
{
ULONG StartSector;
UCHAR Count;
StartSector = (ULONG) SectorNumber;
while (0 < SectorCount)
{
- Count = (SectorCount <= 255 ? SectorCount : 255);
+ Count = (SectorCount <= 255 ? (UCHAR)SectorCount : 255);
if (! XboxDiskPolledRead(XBOX_IDE_COMMAND_PORT,
XBOX_IDE_CONTROL_PORT,
0, Count,
}
BOOLEAN
-XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
+XboxDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
UCHAR SectorData[IDE_SECTOR_BUF_SZ];
}
BOOLEAN
-XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry)
+XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
{
IDE_DRIVE_IDENTIFY DrvParms;
ULONG i;
}
ULONG
-XboxDiskGetCacheableBlockCount(ULONG DriveNumber)
+XboxDiskGetCacheableBlockCount(UCHAR DriveNumber)
{
/* 64 seems a nice number, it is used by the machpc code for LBA devices */
return 64;