-
Notifications
You must be signed in to change notification settings - Fork 11
Changes to the boot sector to allow mOS to boot on a greater range of hardware. #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Still needs to be cleaned up though.
On QEMU, the new error handling code in the boot sector will fail since the file generated is not 512*42 bytes large (some calls to the INT 0x13/AH=0x02 interrrupt will fail, due to the size of the drive created/mounted by QEMU). The Makefile was updated both to make the mOS.bin file large enough if necessary (using truncate), and to give an error if the generated mOS.bin file is too large (larger than 512*42 bytes). Note: This has not been an issue though for booting off of floppy disks on real hardware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work! All my comments are very minor since everything works (on qemu)!
|
Hello Trevor, thank you for your great feedback. I have made 4 small commits to address the issues that you pointed out. I have tested the changes in QEMU and it still boots correctly (I also tested forcing the error code to run to ensure that that code prints the errors). |
Real-Septicake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good to me! I'll get this merged in!
Description
This pull request changes how the code is written in the boot sector to allow a greater range of hardware to boot mOS. In short, changes were made to use the INT 13H BIOS interrupt to load mOS one sector at a time, rather than trying to load 42 sectors all at once, which did not work on some systems when loading mOS off of a 1.44M floppy disk
The issue with the old method may be that multi-track reads are not supported on the affected systems. The old method tried to read 42 sectors all at once, and since a 1.44M floppy only has 18 sectors per track, the old method requires multi-track reads to load correctly (see https://www.ctyme.com/intr/rb-0607.htm).
There were also changes to the makefile for how the mOS.bin binary is created due to changes in the boot sector code that now check the return codes of calling the INT 13H BIOS interrupt when performing reads. The issue was that QEMU stopped booting since there where technically errors when reading that were ignored before (due to the fact that mOS.bin was smaller than the number of sectors (42) that the boot sector code was trying to load). Thus the makefile was changed to pad mOS.bin to 42 (512-byte) sectors.
Type of change
Testing
Please describe tests that you ran to verify your changes. Provide instructions so that we can reproduce. Please also list any relevant details for your test configuration.
Test Configurations:
On each of these systems I checked that mOS booted correctly and that the keyboard functioned as expected.
Checklist: