fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
1/*****************************************************************************
2 * pce *
3 *****************************************************************************/
4
5/*****************************************************************************
6 * File name: src/devices/fdc.h *
7 * Created: 2007-09-06 by Hampa Hug <hampa@hampa.ch> *
8 * Copyright: (C) 2007-2011 Hampa Hug <hampa@hampa.ch> *
9 *****************************************************************************/
10
11/*****************************************************************************
12 * This program is free software. You can redistribute it and / or modify it *
13 * under the terms of the GNU General Public License version 2 as published *
14 * by the Free Software Foundation. *
15 * *
16 * This program is distributed in the hope that it will be useful, but *
17 * WITHOUT ANY WARRANTY, without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
19 * Public License for more details. *
20 *****************************************************************************/
21
22
23#ifndef PCE_DEVICES_FDC_H
24#define PCE_DEVICES_FDC_H 1
25
26
27#include <chipset/82xx/e8272.h>
28
29#include <devices/device.h>
30#include <devices/memory.h>
31
32#include <drivers/block/block.h>
33
34
35typedef struct {
36 device_t dev;
37 e8272_t e8272;
38
39 mem_blk_t blk;
40
41 disks_t *dsks;
42 unsigned drive[4];
43} dev_fdc_t;
44
45
46dev_fdc_t *dev_fdc_new (unsigned long addr);
47void dev_fdc_del (dev_fdc_t *fdc);
48
49void dev_fdc_mem_add_io (dev_fdc_t *fdc, memory_t *io);
50void dev_fdc_mem_rmv_io (dev_fdc_t *fdc, memory_t *io);
51
52void dev_fdc_reset (dev_fdc_t *fdc);
53
54void dev_fdc_set_disks (dev_fdc_t *fdc, disks_t *dsks);
55
56void dev_fdc_set_drive (dev_fdc_t *fdc, unsigned fdcdrv, unsigned drive);
57
58unsigned dev_fdc_get_drive (dev_fdc_t *fdc, unsigned fdcdrv);
59
60
61#endif