mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
4bd69d4352
(also increase the number of sectors loaded by the bootloader in the since I just noticed we were at the limit. This is not the ideal way of doing this.)
34 lines
641 B
C++
34 lines
641 B
C++
#pragma once
|
|
|
|
#include "types.h"
|
|
|
|
#define IDE0_DATA 0x1F0
|
|
#define IDE0_STATUS 0x1F7
|
|
#define IDE0_COMMAND 0x1F7
|
|
#define BUSY 0x80
|
|
#define DRDY 0x40
|
|
#define DRQ 0x08
|
|
#define IDENTIFY_DRIVE 0xEC
|
|
#define READ_SECTORS 0x21
|
|
|
|
#define IDE0_DISK0 0
|
|
#define IDE0_DISK1 1
|
|
#define IDE1_DISK0 2
|
|
#define IDE1_DISK1 3
|
|
|
|
typedef struct
|
|
{
|
|
WORD cylinders;
|
|
WORD heads;
|
|
WORD sectors_per_track;
|
|
} ide_drive_t;
|
|
|
|
extern void ide_init();
|
|
extern ide_drive_t drive[4];
|
|
|
|
namespace Disk {
|
|
|
|
void initialize();
|
|
bool readSectors(DWORD sectorIndex, WORD count, BYTE* buffer);
|
|
|
|
}
|