First Commit of my working state
[simh.git] / AltairZ80 / wd179x.h
... / ...
CommitLineData
1/*************************************************************************\r
2 * *\r
3 * $Id: wd179x.h 1907 2008-05-21 07:04:17Z hharte $ *\r
4 * *\r
5 * Copyright (c) 2007-2008 Howard M. Harte. *\r
6 * http://www.hartetec.com *\r
7 * *\r
8 * Permission is hereby granted, free of charge, to any person obtaining *\r
9 * a copy of this software and associated documentation files (the *\r
10 * "Software"), to deal in the Software without restriction, including *\r
11 * without limitation the rights to use, copy, modify, merge, publish, *\r
12 * distribute, sublicense, and/or sell copies of the Software, and to *\r
13 * permit persons to whom the Software is furnished to do so, subject to *\r
14 * the following conditions: *\r
15 * *\r
16 * The above copyright notice and this permission notice shall be *\r
17 * included in all copies or substantial portions of the Software. *\r
18 * *\r
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *\r
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *\r
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *\r
22 * NONINFRINGEMENT. IN NO EVENT SHALL HOWARD M. HARTE BE LIABLE FOR ANY *\r
23 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, *\r
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE *\r
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *\r
26 * *\r
27 * Except as contained in this notice, the name of Howard M. Harte shall *\r
28 * not be used in advertising or otherwise to promote the sale, use or *\r
29 * other dealings in this Software without prior written authorization *\r
30 * Howard M. Harte. *\r
31 * *\r
32 * SIMH Interface based on altairz80_hdsk.c, by Peter Schorn. *\r
33 * *\r
34 * Module Description: *\r
35 * Generic Intel 8272 Disk Controller module for SIMH. *\r
36 * *\r
37 * Environment: *\r
38 * User mode only *\r
39 * *\r
40 *************************************************************************/\r
41\r
42extern t_stat wd179x_attach(UNIT *uptr, char *cptr);\r
43extern t_stat wd179x_detach(UNIT *uptr);\r
44extern uint8 WD179X_Set_DMA(const uint32 dma_addr);\r
45extern uint8 WD179X_Read(const uint32 Addr);\r
46extern uint8 WD179X_Write(const uint32 Addr, uint8 cData);\r
47\r
48extern void wd179x_external_restore(void);\r
49\r
50#define WD179X_FDC_MSR 0 /* R=FDC Main Status Register, W=Drive Select Register */\r
51#define WD179X_FDC_DATA 1 /* R/W FDC Data Register */\r
52\r
53#define WD179X_STATUS 0\r
54#define WD179X_TRACK 1\r
55#define WD179X_SECTOR 2\r
56#define WD179X_DATA 3\r
57\r
58typedef struct {\r
59 PNP_INFO pnp; /* Plug-n-Play Information */\r
60 uint8 intrq; /* WD179X Interrupt Request Output (EOJ) */\r
61 uint8 hld; /* WD179X Head Load Output */\r
62 uint8 drq; /* WD179X DMA Request Output */\r
63 uint8 ddens; /* WD179X Double-Density Input */\r
64 uint8 fdc_head; /* H Head Number */\r
65 uint8 sel_drive; /* Currently selected drive */\r
66 uint8 drivetype; /* 8 or 5 depending on disk type. */\r
67} WD179X_INFO_PUB;\r