summaryrefslogtreecommitdiff
path: root/Kernel/BlkDev
AgeCommit message (Collapse)Author
9 daysFix patch tags in Blk(Read/Write)FDC.HCHarley Travis
13 daysFix typo in FDCMotorHarley Travis
Instead of assigning FDC_MOTOR_WAIT to the floppy BlkDev's motor state variable, FDCMotor was performing a comparison instead.
13 daysRemove unnecessary parentheses from FDCInitHarley Travis
The line where the highest block number is set had unneeded parentheses, as warned by the TempleOS compiler.
13 daysFix for loop in FDCResetHarley Travis
The second for loop in this function had its parameters separted by commas instead of semicolons, resulting in a compiler error.
14 daysRemove "make free" code and add increment to res.Harley Travis
Brain fart! The drive was getting destroyed because the result was not being set to 1, not because of the drive slot.
14 daysRe-add drive slot code to BlkDevAddFDC.HCHarley Travis
Removing this code caused TempleOS to no longer create drive objects for the floppy drives, so I re-added it.
14 daysFix typo in retry check in FDCReadBlksHarley Travis
14 daysPlace reset before version checkHarley Travis
Turns out my PC leaves the FDC in a reset state after POST, causing the version check to time out. Thus, it is necessary to reset the controller beforehand.
14 daysFixed a few typos in DskFDC.HCHarley Travis
2026-06-27Add patch to DskChgHarley Travis
This patch allows DskChg to run a file system check on floppy drives, allowing for file system autodetection.
2026-06-27Add missing patchesHarley Travis
These patch files are based on patches I had to make while testing the driver on my TOS machine.
2026-06-27Make FDCRBlks and FDCWBlks Bools that return trueHarley Travis
2026-06-27Update BlkDevAddFDC.HCHarley Travis
The filesystem-checking code, now part of the FDCFsChk function, was replaced with a call to said function.
2026-06-27Add FDCFsChkHarley Travis
This new function is an export of the filesystem-checking code in BlkDevAddFDC.HC. This was done to allow it to be used by DskChg, allowing filesystem autodetection when disks are swapped.
2026-06-27Update FDCChkHarley Travis
FDCChk now turns the motor on and off, and tests for the presence of a disk by performing two seeks and checking the disk change flag.
2026-06-27Update FDCReadIdHarley Travis
FDCReadId was patched to use 64-bit variables, and to remove asterisks from references to the CBlkDev pointer, bd.
2026-06-27Update FDCWriteBlksHarley Travis
FDCWriteBlks was patched for the same reasons as FDCReadBlks (64-bit variables, motor control, fix typo in head calculation, unlock at end), as well as fixing a bug where only [cnt] bytes were being copied into the DMA buffer instead of [cnt] sectors.
2026-06-27Update FDCReadBlksHarley Travis
FDCReadBlks was patched to use 64-bit variables, turn the motor on and off, use the correct variable for the head count, and unlock the block device before returning.
2026-06-27Update FDCRBlks and FDCWBlksHarley Travis
FDCRBlks and FDCWBlks were patched to use 64-bit variables, and remove unecessary parentheses.
2026-06-27Update FDCReadData and FDCWriteDataHarley Travis
FDCReadData and FDCWriteData were patched to use 64-bit variables, and to send the read/write commands in the correct format.
2026-06-27Update FDCInitHarley Travis
FDCInit was patched to use 64-bit variables, and to turn the motor on when performing the recalibration step.
2026-06-27Update FDCSelDrvHarley Travis
FDCSelDrv was patched to preserve the other DOR bits, and not reset the controller when selecting a drive, which caused I/O timeouts.
2026-06-27Update FDCMotorTask and FDCMotorHarley Travis
FDCMotorTask was patched to use 64-bit variables, preserve DOR contents when setting the motor bits, and properly set the block device's motor state. FDCMotor now properly checks the current motor status before writing to the DOR or spawning the power-off task, and also preserves the DOR bits.
2026-06-27Update FDCResetHarley Travis
I have patched FDCReset to actually do its job correctly, switching it over to DOR-twiddling instead of the DSR method. I also allowed it to skip the interrupt checks if it gets a 0x80 byte back at any point.
2026-06-27Update FDCReadByte and FDCSendByteHarley Travis
FDCReadByte and FDCSendByte have been updated to store the MSR contents into a separate variable for readability. They also now Yield; when polling to prevent the OS from feezing.
2026-06-22Split floppy IRQ handler into separate fileHarley Travis
Since KInts.HC is compiled before DskFDC.HC, undefined symbol issues could possibly occur. when attempting to compile the interrupt set-up code because the IRQ handler is not yet compiled. To prevent this, I separated the IRQ handler into another file that is included immediately after the headers. The instructions have been updated to reflect this change.
2026-06-20Re-arrange patch filesHarley Travis
Some of the patches are applied to files in subdirectories of ::/Kernel and ::/Adam. The directory tree has been re-arranged in such a way as to allow them to be #included without having the compiler backtrack to their parent directory.
2026-06-19Update source file information commentsHarley Travis
I have added the "PURPOSE", "TO USE", and "THEN" tags to make the information sections more easy to read while keeping line length down. These are used by a Python script I wrote to generate an instruction file.
2026-06-18Rename FDCInt to match TOS IRQ handler namingHarley Travis
The IRQ handlers in TempleOS' kernel code have an "IRQ_" prefix. FDCInt has been renamed to IRQ_FDC in keeping with Terry's code style. An unused definition of the same name has also been removed from KFloppyA.HH.
2026-06-12Add installation notes to source files.Harley Travis
I added comments to all patch files explaining their function and how to install them. Installation instructions were also added to some of the code files as well.
2026-06-10Update DskFDC.HCHarley Travis
The Bt call was modified to test for the corrrect bit of SRA.
2026-06-10Update DskFDC.HCHarley Travis
FDCWriteBlks now checks if the disk is write-protected before attempting a write, throwing an exception if it is. I also reworked the retry check for both it and FDCReadBlks.
2026-06-07Update DskFDC.HCHarley Travis
I realized that the logic that determined the sector size value sent to the controller would not work properly on larger sector size, so I redid it.
2026-06-06Update DskFDC.HCHarley Travis
I have added a function that will check for the presence of valid sector data on either side of a floppy disk. This function is used to check for the presence of a disk in a way that does not rely on the proper handling of the disk change flag.
2026-06-04Update DskFDC.HCHarley Travis
I moved the version check into the drive-0-only code; it wouldn't make sense to check the version each time a drive gets initialized.
2026-06-01Update DskFDC.HCHarley Travis
I have decided not to use multi-track mode and instead do atomic reads and writes to sector ranges. I have also added a timeout to the motor command when the motor is turned on (approximately 500 milliseconds to accomodate 5ΒΌ" drives). FDCInit now sets the highest-accessible block.
2026-05-31Initial commit for BlkDev branchHarley Travis
This is the initial commit for the BlkDev-ified driver. It is not at all in a working state at this point, and the old files have been left for reference purposes.