#include <acess.h>
#include <modules.h>
#include <fs_devfs.h>
-#include <tpl_drv_disk.h>
+#include <api_drv_disk.h>
#include <dma.h>
#include <iocache.h>
// Ensure the FDD version is 0x90
{
- Uint8 tmp;
+ Uint8 tmp = 0;
FDD_int_SendByte(cPORTBASE[0], CMD_VERSION);
FDD_int_GetByte(cPORTBASE[0], &tmp);
if( tmp != 0x90 ) {
*/
int FDD_int_SeekTrack(int disk, int head, int track)
{
- Uint8 sr0, cyl;
+ Uint8 sr0=0, cyl=0;
int base;
base = cPORTBASE[disk>>1];
{
tTime end = now() + 1000; // 1s
- while( (inb(base + PORT_MAINSTATUS) & 0xC0) != 0x80 && now() < end )
+ while( (inb(base + PORT_MAINSTATUS) & 0x80) != 0x80 && now() < end )
Threads_Yield(); //Delay
+
+ if( inb(base + PORT_MAINSTATUS) & 0x40 ) {
+ Log_Warning("FDD", "FDD_int_SendByte: DIO set, is this ok?");
+ }
if( now() < end )
{
{
tTime end = now() + 1000; // 1s
- while( (inb(base + PORT_MAINSTATUS) & 0xd0) != 0xd0 && now() < end )
+ while( (inb(base + PORT_MAINSTATUS) & 0x80) != 0x80 && now() < end )
Threads_Yield();
+ if( !(inb(base + PORT_MAINSTATUS) & 0x40) ) {
+ Log_Warning("FDD", "FDD_int_GetByte: DIO unset, is this ok?");
+ }
+
if( now() < end )
{
Uint8 tmp = inb(base + PORT_DATA);