‫Preparing to read from the hard disk what is a PC I.D. controller, Idy refers to the electrical specification
‫of cables which connect atay drives to another device.
‫The idea allows up to four drives to be connected.
‫ATC serial attia parallel atopic serial atap parallel kernel programmers do not have to worry if the
‫drive is serial or parallel.
‫The interface that we communicate with them on is exactly the same.
‫So we have a few possible drive types.
‫We have the primary mass to drive the primary slave drive, the secondary mass to drive and the secondary
‫slave drive.
‫However, we are only going to be concerned with the primary mass to drive.
‫So this is an ETA example for reading from the mass to drive.
‫So you can see on line eleven here we select the mass to drive and pass parts of the albar large scale
‫block address.
‫Remember, this is the sector number that we are reading from.
‫OK, so zero is sector one, one is sector two and so on.
‫So like I just said, zero zero represents the mass to drive.
‫OK, this is why we all that on.
‫So the LBA so we can see here on line 12, then we pass the total number of sectors we want to read.
‫OK, lines 13, 14 and 15.
‫We send more of the ALBAR.
‫So you can see there's a lot of bitwise logic going on here.
‫Now we pass as 20 to the Xbox One f7 part, which signifies a requirement.
‫And what we now need to do is we need to loop through the total sectors we are reading and then we then
‫need to go into a while, loop here and wait until the drive's ready for us to read from.
‫So we do that by checking this bit once we read this byte from Pozza, one of.
‫Now, once the drys read this while loop is finished and now we are now on line 31, so we enter a new
‫loop where we loop through 256 times and we read two bytes at a time, which reads one sector because
‫two times two, five, six is five, 12, one sector.
‫OK, so we use the NSW function to do that and we pass in the part zero one zero and we read from that
‫part.
‫So what we're doing out and in, we're communicating with the bus on your motherboard, which allows
‫us to communicate with the hardware and this is how we're doing it.
‫So we read two bytes at a time into the buffer.
‫OK, so this is the buffer provided to us.
‫This is where we're loading all those sectors into.
‫That's all we need to discuss for now.
‫And we can now start implementing this.