This is my current code:
Code: Select all
uint8_t odd_find_drive(uint32_t bus, uint32_t drive){
uint8_t status;
//Select the drive
//Channel = bus, device = drive
outportb(ATA_DRIVE_SELECT(bus),drive & (1 << 4));
status = inportb(ATA_COMMAND(bus));
if ((!status) || status == 0xFF)
return 0;
printf("features = 0x%x\n",status);
return 1;
}
Any ideas how I'm SUPPOSED to grab it because I'm pretty sure what I'm doing only returns if the drive exists or not (since that works).
Also here's my bochsrc.txt:
Thanks in advance.#Boot from HDD -------------------------------------------------------
ata0-master: type=disk, path="C:\Coras\coras_slim.img", mode=flat, cylinders=65, heads=16, spt=63
ata1-slave: type=disk, path="C:\Coras\hd1.img", mode=flat, cylinders=65, heads=16, spt=63
ata1-master: type=cdrom, mode=flat, path="C:\Coras\od0.iso"
ata0-slave: type=cdrom, mode=flat, path="C:\Coras\od1.iso"