More Floppy Driver Stuff, Can Confirm That the Standard is infact Ugly

This commit is contained in:
Tyler McGurrin 2025-05-30 20:30:37 -04:00
parent 486c92954a
commit df69f7479c
6 changed files with 12 additions and 19 deletions

View File

@ -7,8 +7,6 @@
#include <stdint.h>
#define BCD2BIN(bcd) ((((bcd)&15) + ((bcd)>>4)*10))
void CMOS_RTC_Handler();
int Master_FDD_Detect();
int Slave_FDD_Detect();

View File

@ -10,23 +10,14 @@
#include <arch/i686/io.h>
#include <arch/i686/irq.h>
#define PORT_FLOPPY_TYPE 0x10
void Floppy_Handler()
{
printf("IRQ 6 Called");
}
// I cannot get this to work for the life of me,
// OSDEV Wiki says its meant to be CMOS Register 0x10, which seems to be 0xFF for me...
// 0xFF, is NOT a vaild value at all...
// Basically Gonna hard-code the driver for 1.44MB Drives
// Since Nanite is only capable of running off one without modifications to the bootloader,
// this is not an issue... but its sure as shit annoying
// Correction im stupid...
// Moved to CMOS Driver.
void Floppy_Drive_Start(uint8_t drive)
{
uint8_t Buffer;
if (drive == 1) Buffer = 0 && DOR_DSEL1 && DOR_RESET && DOR_MOTA && 0 && 0 && 0;
if (drive == 2) Buffer = 0 && DOR_DSEL1 && DOR_RESET && 0 && DOR_MOTB && 0 && 0;
}

View File

@ -5,8 +5,10 @@
\*----------------*/
#pragma once
void Floppy_Handler();
#include <stdint.h>
void Floppy_Handler();
void Floppy_Drive_Start(uint8_t drive);
/* DOR Command Table

View File

@ -70,6 +70,7 @@ void __attribute__((section(".entry"))) start(BootParams* bootParams) {
printf("Done!\n");
masterFDDType = Master_FDD_Detect();
slaveFDDType = Slave_FDD_Detect();
Floppy_Drive_Start(1);
Print_Storage_Types(masterFDDType, slaveFDDType);

View File

@ -7,6 +7,7 @@
#define FLAG_SET(x, flag) x |= (flag)
#define FLAG_UNSET(x, flag) x &= ~(flag)
#define BCD2BIN(bcd) ((((bcd)&15) + ((bcd)>>4)*10))
uint8_t Get_Bit(uint8_t bits, uint8_t pos);

View File

@ -6,5 +6,5 @@
#pragma once
#define LOGO " _ _____ _ __________________\n / | / / | / | / / _/_ __/ ____/\n / |/ / /| | / |/ // / / / / __/ \n / /| / ___ |/ /| // / / / / /___ \n/_/ |_/_/ |_/_/ |_/___/ /_/ /_____/ \n"
#define VERSION "RD-00014"
#define VERSION "RD-00015"
#define BOOTLOGO " _ ______ ____ ____ ______\n / | / / __ )/ __ \\/ __ /_ __/\n / |/ / __ / / / / / / // / \n / /| / /_/ / /_/ / /_/ // / \n/_/ |_/_____/\\____/\\____//_/ \n"