My setup works fine in bochs and emulates the drive as a floppy. But when I test on all hardware I have I'm getting HDD emulation. I've exhausted the following BPB's they all behave the same on my hardware:
https://github.com/alexfru/BootProg
https://board.flatassembler.net/topic.php?t=17130
I'm developing on windows and I've been using BootProg and Rufus. I've analyzed the contents of the disk through 010 editor and Rufus is working fine and the image does boot. The problem occurs when I read more than 18 sectors.
On bochs things look like this:
DX = 0000 on entry to 7C00
LBA = 18 -> reads sector 18
LBA = 19 -> reads sector 19
LBA = 1A -> reads sector 1A
On the hardware I get this
DX = 0080 on entry to 7C00
LBA = 18 -> reads sector 18
LBA = 19 -> reads sector 3F
LBA = 1A -> reads sector 40
Here is the current BPB that I'm using (lifted straight from Dex), can someone see any issues? I want to avoid developing a boot loader if at all possible, and wish to continue using BootProg or some other convenient alternative under windows.
Code: Select all
jmp short init
nop
bsOemName DB "MSDOS5.0" ; 0x03
bpbBytesPerSector DW 512 ; 0x0B
bpbSectorsPerCluster DB 1 ; 0x0D
bpbReservedSectors DW 1 ; 0x0E
bpbNumberOfFATs DB 2 ; 0x10
bpbRootEntries DW 224 ; 0x11
bpbTotalSectors DW 2880 ; 0x13
bpbMedia DB 0F0h ; 0x15
bpbSectorsPerFAT DW 9 ; 0x16
bpbSectorsPerTrack DW 18 ; 0x18
bpbHeadsPerCylinder DW 2 ; 0x1A
bpbHiddenSectors DD 0 ; 0x1C
bpbTotalSectorsBig DD 0 ; 0x20
bsDriveNumber DB 0 ; 0x24
bsUnused DB 0 ; 0x25
bsExtBootSignature DB 29H ; 0x26
bsSerialNumber DD 1 ; 0x27
bsVolumeLabel DB "BOOT FLOPPY" ; 0x2B
bsFileSystem DB "FAT12 " ; 0x36