Hi, I need to boot my os on a newer pc without the floppy support in order to test the multiprocessor code I wrote. The problem is that the first stage bootloader which works on the floppy drive, is loaded from this harddisk/floppy USB but it never copies the second stage in memory. Have I to make something particular in order to make it work?
I'm using the int 0x13 with ah,2 to read sectors isn't it right?
USB Floppy Issues
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: USB Floppy Issues
No, as far as I know that only works with floppy drives. I don't write much real mode code so I don't know exactly or not, but...
You will have to either find a BIOS interrupt which can read a USB drive, or write your own USB driver into the bootloader.
You will have to either find a BIOS interrupt which can read a USB drive, or write your own USB driver into the bootloader.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: USB Floppy Issues
If you use FAT, Floppies are FAT12, sticks are FAT16/32, and you generally need a separate bootloader for either (although if you're really good you might be able to put code for all three in the same 512 bytes).
In any case, an USB device is treated differently depending on BIOS - start with adding a BPB if you have none, and check whether it is emulated as a HD or FDD (look at the DL register), and whether the emulated CHS is what you expect.
In any case, an USB device is treated differently depending on BIOS - start with adding a BPB if you have none, and check whether it is emulated as a HD or FDD (look at the DL register), and whether the emulated CHS is what you expect.
Re: USB Floppy Issues
Karlosoft: Maybe this can help you a bit?
http://board.flatassembler.net/topic.php?t=12389
Regards
Mac2004
http://board.flatassembler.net/topic.php?t=12389
Regards
Mac2004
Re: USB Floppy Issues
What is the difference between an emulating floppy and an emulating hard disk?
I used the dd tool to copy the floppy image on the usb stick so it should be formatted fat12 (windows recognized it like a FAT12 1,4Mb floppy)
No but that link seems to be interesting
I used the dd tool to copy the floppy image on the usb stick so it should be formatted fat12 (windows recognized it like a FAT12 1,4Mb floppy)
No but that link seems to be interesting
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: USB Floppy Issues
Floppies normally don't do LBA, whereas it is the best option for harddisks. Also, it means your BPB does not match the physical characteristics of the medium: sector 1 head 1 track 0 does not need to be the 19th sector but is just as likely to be the 64th.
Re: USB Floppy Issues
I see. I'll try to solve the problem in this way, thank you