2016-01-22 02:17:25 +00:00
|
|
|
// Based from MAME's N64DD driver code by Happy_
|
2016-01-19 18:53:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-01-20 13:31:29 +00:00
|
|
|
#include <Common/stdtypes.h>
|
|
|
|
|
2016-01-19 18:53:18 +00:00
|
|
|
void DiskCommand(void);
|
|
|
|
void DiskReset(void);
|
|
|
|
void DiskBMControl(void);
|
2016-01-20 13:31:29 +00:00
|
|
|
void DiskGapSectorCheck(void);
|
|
|
|
void DiskBMUpdate(void);
|
2019-08-11 16:13:52 +00:00
|
|
|
bool DiskBMReadWrite(bool write);
|
2016-01-25 14:47:12 +00:00
|
|
|
void DiskDMACheck(void);
|
2016-01-20 13:31:29 +00:00
|
|
|
|
|
|
|
extern bool dd_write;
|
|
|
|
extern bool dd_reset_hold;
|
|
|
|
extern uint32_t dd_track_offset, dd_zone;
|
2016-01-20 16:43:23 +00:00
|
|
|
extern uint32_t dd_start_block, dd_current;
|
2016-01-20 13:31:29 +00:00
|
|
|
|
|
|
|
const uint32_t ddZoneSecSize[16] = { 232, 216, 208, 192, 176, 160, 144, 128,
|
|
|
|
216, 208, 192, 176, 160, 144, 128, 112 };
|
|
|
|
const uint32_t ddZoneTrackSize[16] = { 158, 158, 149, 149, 149, 149, 149, 114,
|
|
|
|
158, 158, 149, 149, 149, 149, 149, 114 };
|
|
|
|
const uint32_t ddStartOffset[16] =
|
|
|
|
{ 0x0, 0x5F15E0, 0xB79D00, 0x10801A0, 0x1523720, 0x1963D80, 0x1D414C0, 0x20BBCE0,
|
|
|
|
0x23196E0, 0x28A1E00, 0x2DF5DC0, 0x3299340, 0x36D99A0, 0x3AB70E0, 0x3E31900, 0x4149200 };
|
|
|
|
|
|
|
|
#define SECTORS_PER_BLOCK 85
|
|
|
|
#define BLOCKS_PER_TRACK 2
|