2021-09-14 15:48:57 +00:00
|
|
|
#include "drivers.h"
|
|
|
|
#include "cmos/cmos.h"
|
|
|
|
#include "pit/pit.h"
|
|
|
|
#include "floppy/floppy.h"
|
|
|
|
#include "time.h"
|
|
|
|
#include "../hal/cpu/irq.h"
|
|
|
|
#include <debugio.h>
|
2021-09-14 15:51:43 +00:00
|
|
|
#include <settings.h>
|
2021-09-14 15:48:57 +00:00
|
|
|
|
|
|
|
void DriversInstall_Clock()
|
|
|
|
{
|
|
|
|
// Set up PIT
|
|
|
|
PitSetFrequency(PIT_FREQUENCY);
|
|
|
|
|
|
|
|
// Update internal clock
|
|
|
|
Time time;
|
|
|
|
CmosGetRTC(&time);
|
|
|
|
|
2021-09-14 15:50:50 +00:00
|
|
|
TimeSetInternalTime(ConvertTimeToTimeSystem(time));
|
2021-09-14 15:48:57 +00:00
|
|
|
|
2021-09-14 15:51:43 +00:00
|
|
|
Log("Drivers", "Read RTC time: %#%u/%u/%u %u:%u:%u.%u\n", ColorLightCyan, time.Month, time.Day,
|
2021-09-14 15:48:57 +00:00
|
|
|
time.Year, time.Hour, time.Minute, time.Second, time.Milisecond);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DriversInstall()
|
|
|
|
{
|
|
|
|
// Install clock
|
|
|
|
DriversInstall_Clock();
|
|
|
|
|
|
|
|
// Install fdc
|
2021-09-14 15:54:59 +00:00
|
|
|
Error ("Floppy", "Floppy driver is currently disabled.\n");
|
|
|
|
//IrqInstallHandler(6, FloppyIrqHandler);
|
|
|
|
//FloppyInitialize();
|
2021-09-14 15:48:57 +00:00
|
|
|
}
|