Fixed disk handling

This commit is contained in:
Lucia Ceionia
2023-01-04 19:36:29 -06:00
parent 9aa56cdce2
commit 43e902e83c
7 changed files with 29 additions and 7 deletions

View File

@@ -29,6 +29,9 @@ extern void v86DiskRead();
uint32_t DFS_ReadSector(uint8_t unit, uint8_t *buffer, uint32_t sector, uint32_t count) {
v86disk_addr_packet.start_block = sector;
v86disk_addr_packet.blocks = count;
v86disk_addr_packet.transfer_buffer =
(uintptr_t)buffer & 0x000F |
(((uintptr_t)buffer & 0xFFFF0) << 12);
FARPTR v86_entry = i386LinearToFp(v86DiskRead);
enter_v86(0x8000, 0xFF00, FP_SEG(v86_entry), FP_OFF(v86_entry));
return 0;