Big FAT CHS problems

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Revelation
Member
Member
Posts: 47
Joined: Sat Jun 21, 2008 8:15 am

Big FAT CHS problems

Post by Revelation »

In the FAT table info like the number of heads and the number of sectors per track is saved by the format utility. My code uses it to convert the LBA cluster number to CHS for int 13. This should work well in theory, if the BIOS uses the same CHS settings. But it is not working, so I guess the BIOS picks different settings.

How can I fix this problem?


edit: I should notice that I use an USB pen to boot.
Now is the winter of my disk content.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Big FAT CHS problems

Post by AJ »

Hi,

I don't know if this has all the info you want, but you may find int 13h AH=08h (get drive parameters) useful.

Cheers,
Adam
User avatar
Revelation
Member
Member
Posts: 47
Joined: Sat Jun 21, 2008 8:15 am

Re: Big FAT CHS problems

Post by Revelation »

Not long after my post, I implemented int 13 0x8. It's working for me in bochs, but not on the real system. Maybe it's because the real boot device is an usb pen, while in bochs it is a hdd image.

edit: it's not working on the real system, because my device is larger. when I tested the 10mb image I dd'd on the usb pen, it did work. I guess I'm crossing a maximum.
Now is the winter of my disk content.
Post Reply