0

I'm making my own OS from scratch, called "bnbzb OS". I just managed to check if any floppy drive or ATA drive is present, and check the size if it's a floppy drive. I now want to actually read/write contents from the ATA drive or at least a floppy drive. Can anyone help me with doing that?

Because it's a lot of code I was going of put a link to GitHub, but it stops when only 2 files left to upload, so I uploaded it to Mediafire(in a .zip file): http://www.mediafire.com/file/bxaoulxs0uh04b5/bnbzb_os.zip/file

Ah, and please don't complain about my horrible OS organization or my bad English, I'm a spanish 13 year old student that loves programming.

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
  • 4
    You may be interested in https://wiki.osdev.org/Expanded_Main_Page – AProgrammer Oct 28 '19 at 17:12
  • I know about that page, almost all my knowledge about OS is from there, but the parts related to memory, drives, etc are too complicated for me to understand. I know some things about ATA and floppys but I dont know how to read/write data. – JylixCodes Oct 28 '19 at 17:22
  • 2
    You need to learn how floppies and hard drives are working *internally* which is quite a lot and not easy. Then you need to learn how to access the media in these drives. How do you check the presence of media and its size? – the busybee Oct 28 '19 at 20:58
  • I know some things already about floppys and hard drives, I know that the data is stored in sectors that are physical portions of the magnetic disk inside the floppy and I know how hard drives and the ATA system works, but I don't know what is the procedure to read or write sectors using port controlling. And I read the presence of floppys and its size reading the CMOS, but for checking an ATA drive I send direct commands to each of the 4 drives(master 0, slave 0, master 1 or slave 1). – JylixCodes Oct 29 '19 at 07:34
  • 2
    Writing using a floppy disk controller is more involved than doing PIO with ATA. On real hardware floppy disk controllers can be very finicky about timings abd real hardware may be error prone (on emulated environments much less so). Info on doing floppy controller code can be found here: https://wiki.osdev.org/Floppy_Disk_Controller . That link also provides a list of resources at the bottom. – Michael Petch Oct 29 '19 at 21:09

0 Answers0