forked from samkusin/clemens_iigs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clem_drive.h
43 lines (29 loc) · 1.33 KB
/
clem_drive.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef CLEM_DRIVE_H
#define CLEM_DRIVE_H
#include "clem_mmio_types.h"
#include "clem_shared.h"
#define CLEM_IWM_FLAG_MASK_PRE_STEP_CLEARED \
(CLEM_IWM_FLAG_WRPROTECT_SENSE + CLEM_IWM_FLAG_READ_DATA + CLEM_IWM_FLAG_READ_DATA_FAKE + \
CLEM_IWM_FLAG_WRITE_HI)
#define CLEM_IWM_FLAG_WRITE_HEAD_ON (CLEM_IWM_FLAG_WRITE_DATA + CLEM_IWM_FLAG_WRITE_REQUEST)
#define CLEM_IWM_DRIVE_INVALID_TRACK_POS 0xffffffff
#define CLEM_IWM_DISK35_STATUS_STEP_IN 0x0001
#define CLEM_IWM_DISK35_STATUS_IO_HEAD_HI 0x0002
#define CLEM_IWM_DISK35_STATUS_EJECTED 0x0008
#define CLEM_IWM_DISK35_STATUS_EJECTING 0x0010
#define CLEM_IWM_DISK35_STATUS_STROBE 0x8000
#ifdef __cplusplus
extern "C" {
#endif
void clem_disk_reset_drives(struct ClemensDriveBay *drives);
void clem_disk_start_drive(struct ClemensDrive *drive);
void clem_disk_35_start_eject(struct ClemensDrive *drive);
void clem_disk_control(struct ClemensDrive *drive, unsigned *io_flags, unsigned in_phase,
clem_clocks_duration_t clocks_dt);
void clem_disk_step(struct ClemensDrive *drive, unsigned *io_flags);
void clem_disk_write_head(struct ClemensDrive *drive, unsigned *io_flags);
void clem_disk_update_head(struct ClemensDrive *drive, unsigned *io_flags);
#ifdef __cplusplus
} // extern "C"
#endif
#endif