| Age | Commit message (Collapse) | Author |
|
The second for loop in this function had its parameters separted by commas instead of semicolons, resulting in a compiler error.
|
|
Brain fart! The drive was getting destroyed because the result was not being set to 1, not because of the drive slot.
|
|
Removing this code caused TempleOS to no longer create drive objects for the floppy drives, so I re-added it.
|
|
|
|
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.
|
|
|
|
This patch allows DskChg to run a file system check on floppy drives, allowing for file system autodetection.
|
|
These patch files are based on patches I had to make while testing the driver on my TOS machine.
|
|
Through an oversight, I forgot to change the I/O write that sets the IRQ mask so that bit 6 (which masks IRQ6) is cleared. As a result, IRQ6 is never unmasked, and the floppy drive interrupt does not work.
|
|
|
|
KFloppyB was updated to reflect the return type changes to FDCRBlks and FDCWBlks.
|
|
|
|
I fixed some indentation in this header file and added definitions for the check codes used by FDCChk.
|
|
The filesystem-checking code, now part of the FDCFsChk function, was replaced with a call to said function.
|
|
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.
|
|
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.
|
|
FDCReadId was patched to use 64-bit variables, and to remove asterisks from references to the CBlkDev pointer, bd.
|
|
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.
|
|
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.
|
|
FDCRBlks and FDCWBlks were patched to use 64-bit variables, and remove unecessary parentheses.
|
|
FDCReadData and FDCWriteData were patched to use 64-bit variables, and to send the read/write commands in the correct format.
|
|
FDCInit was patched to use 64-bit variables, and to turn the motor on when performing the recalibration step.
|
|
FDCSelDrv was patched to preserve the other DOR bits, and not reset the controller when selecting a drive, which caused I/O timeouts.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
I forgot to stage the change I made to this file's code tags. Whoops.
|
|
I fixed the punctuation on some of the info tags, and added a few more THEN tags where they were needed.
|
|
I had updated several more files after staging the previous ones, but forgot to stage these files as well. Thus, I had to commit these separately.
|
|
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.
|
|
KFloppyB2.HH has now replaced KFloppyB.HH, and has been renamed accordingly.
|
|
The time has finally come for the old code to be removed from the source tree.
|
|
As a result of a "brain fart," I erroneously added install instructions to the old version of KernelB.HH; KernelB2.HH already had install instructions.
|
|
I realized that KFloppyA would have to be included before KInts is, so that the IRQ definition can be used by IntInit2. The install instructions have been updated accordingly. Installation instructions were also added to KernelB.
|
|
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.
|
|
The register offsets apply to all floppy controllers, and not just the first. The comment I had there has been updated to reflect this.
|
|
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.
|
|
Since this file is effectively a patch to KStart32, it makes sense to keep it in the Patches subdirectory.
|
|
I added headers for the "read ID" and disk check functions, and added the proper types.
|
|
|
|
|
|
This file patches Let2BlkDevType to provide drive letters for floppy drives. The original function is to be commented out and this file included in its place.
|
|
This file adds a case to BlkDevInit for the floppy BDT, allowing it to be initialized. It is to be placed after the last case in the function's switch statement.
|
|
The Bt call was modified to test for the corrrect bit of SRA.
|
|
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.
|
|
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.
|
|
The BlkDevAdd code now checks if the floppy disk has a valid RedSea boot sector before attempting to initialize it.
|