More Floppy Stuff
This commit is contained in:
parent
ba9d1fae90
commit
e73fb1f303
@ -35,3 +35,27 @@ int Master_FDD_Detect()
|
||||
}
|
||||
return FDDType;
|
||||
}
|
||||
|
||||
int Slave_FDD_Detect()
|
||||
{
|
||||
int Buffer;
|
||||
int FDDType;
|
||||
/* FDD Drive Values
|
||||
Value: Drive Type:
|
||||
00h no drive
|
||||
01h 360 KB 5.25 Drive
|
||||
02h 1.2 MB 5.25 Drive
|
||||
03h 720 KB 3.5 Drive
|
||||
04h 1.44 MB 3.5 Drive
|
||||
05h 2.88 MB 3.5 drive*/
|
||||
Buffer = i686_inb(PORT_FLOPPY_TYPE);
|
||||
|
||||
int bit = Byte_Parse(Buffer, 4);
|
||||
int i = 5;
|
||||
while(i < 8) {
|
||||
FDDType = bit & bit;
|
||||
bit = Byte_Parse(Buffer, i);
|
||||
i++;
|
||||
}
|
||||
return FDDType;
|
||||
}
|
||||
@ -6,3 +6,4 @@
|
||||
#pragma once
|
||||
|
||||
int Master_FDD_Detect();
|
||||
int Slave_FDD_Detect();
|
||||
@ -25,6 +25,7 @@ extern uint8_t __bss_start;
|
||||
extern uint8_t __end;
|
||||
|
||||
int masterFDDType;
|
||||
int slaveFDDType;
|
||||
|
||||
int uptime;
|
||||
void timer(Registers* regs)
|
||||
@ -65,8 +66,17 @@ void __attribute__((section(".entry"))) start(BootParams* bootParams) {
|
||||
|
||||
printf("Load Basic Storage Drivers...");
|
||||
masterFDDType = Master_FDD_Detect();
|
||||
slaveFDDType = Slave_FDD_Detect();
|
||||
printf("Done!\n");
|
||||
printf("Master FDD Type: %d", masterFDDType);
|
||||
// Nightmare to print the Storage Types.
|
||||
// Im gonna Make a Full Function For Showing ATA and FDD Types in Util.h later on,
|
||||
// this IS temporary.
|
||||
if (masterFDDType == 0) printf("No Master Floppy Drive Detected!\n");
|
||||
if (masterFDDType == 1) printf("Master Floppy Drive Detected!\nType: 360 KB 5.25 Inch Drive\n");
|
||||
if (masterFDDType == 2) printf("Master Floppy Drive Detected!\nType: 1.2 MB 5.25 Inch Drive\n");
|
||||
if (masterFDDType == 3) printf("Master Floppy Drive Detected!\nType: 720 KB 3.5 Inch Drive\n");
|
||||
if (masterFDDType == 4) printf("Master Floppy Drive Detected!\nType: 1.44 MB 3.5 Inch Drive\n");
|
||||
if (masterFDDType == 5) printf("Master Floppy Drive Detected!\nType: 2.88 MB 3.5 Inch Drive\n");
|
||||
|
||||
|
||||
// Debug Info for Memory :3 i REALLY need to make a like serial debug output thingy
|
||||
|
||||
@ -6,5 +6,5 @@
|
||||
#pragma once
|
||||
// Version Info MUST stay on line 9! (it gets incremented on build!)
|
||||
#define LOGO " _ _____ _ __________________\n / | / / | / | / / _/_ __/ ____/\n / |/ / /| | / |/ // / / / / __/ \n / /| / ___ |/ /| // / / / / /___ \n/_/ |_/_/ |_/_/ |_/___/ /_/ /_____/ \n"
|
||||
#define VERSION "RD-00008"
|
||||
#define VERSION "RD-00010"
|
||||
#define BOOTLOGO " _ ______ ____ ____ ______\n / | / / __ )/ __ \\/ __ /_ __/\n / |/ / __ / / / / / / // / \n / /| / /_/ / /_/ / /_/ // / \n/_/ |_/_____/\\____/\\____//_/ \n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user