Previous 15994 Revisions Next

r2491 Sunday 27th April, 2008 at 22:07:01 UTC by Nathan Woods
Coding standards
[src/mess/machine]applefdc.c applefdc.h

src/mess/machine/applefdc.c
r2490r2491
3838#include "applefdc.h"
3939
4040
41/***************************************************************************
42    PARAMETERS
43***************************************************************************/
44
4145/* logging */
4246#define LOG_IWM         0
4347#define LOG_IWM_EXTRA   0
4448
49
50
51/***************************************************************************
52    CONSTANTS
53***************************************************************************/
54
4555/* mask for FDC lines */
4656#define IWM_MOTOR   0x10
4757#define IWM_DRIVE   0x20
r2490r2491
4959#define IWM_Q7      0x80
5060
5161
62
63/***************************************************************************
64    LOCAL VARIABLES
65***************************************************************************/
66
5267static UINT8 applefdc_writebyte=0;
5368static UINT8 applefdc_lines;      /* flags from IWM_MOTOR - IWM_Q7 */
5469
r2490r2491
87102static emu_timer *motor_timer;
88103static applefdc_interface iwm_intf;
89104
90static TIMER_CALLBACK(iwm_turnmotor_onoff);
91105
92106
107/***************************************************************************
108    PROTOTYPES
109***************************************************************************/
93110
111static TIMER_CALLBACK(iwm_turnmotor_onoff);
94112
95/***************************************************************************
96113
97   IWM code
98114
115/***************************************************************************
116    CORE IMPLEMENTATION
99117***************************************************************************/
100118
101119void applefdc_init(const applefdc_interface *intf)
src/mess/machine/applefdc.h
r2490r2491
1111
1212*********************************************************************/
1313
14#ifndef APPLEFDC_H
15#define APPLEFDC_H
14#ifndef __APPLEFDC_H__
15#define __APPLEFDC_H__
1616
1717#include "driver.h"
1818
19
20
21/***************************************************************************
22    CONSTANTS
23***************************************************************************/
24
1925#define APPLEFDC_PH0   0x01
2026#define APPLEFDC_PH1   0x02
2127#define APPLEFDC_PH2   0x04
2228#define APPLEFDC_PH3   0x08
2329
30
31
32/***************************************************************************
33    TYPE DEFINITIONS
34***************************************************************************/
35
2436typedef enum
2537{
2638   APPLEFDC_APPLE2,   /* classic Apple II disk controller (pre-IWM) */
r2490r2491
4254};
4355
4456
57
58/***************************************************************************
59    PROTOTYPES
60***************************************************************************/
61
4562void applefdc_init(const applefdc_interface *intf);
4663READ8_HANDLER( applefdc_r );
4764WRITE8_HANDLER( applefdc_w );
4865UINT8 applefdc_get_lines(void);
4966
5067
51#endif /* APPLEFDC_H */
68#endif /* __APPLEFDC_H__ */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team