src/mess/machine/applefdc.c
| r2490 | r2491 | |
| 38 | 38 | #include "applefdc.h" |
| 39 | 39 | |
| 40 | 40 | |
| 41 | /*************************************************************************** |
| 42 | PARAMETERS |
| 43 | ***************************************************************************/ |
| 44 | |
| 41 | 45 | /* logging */ |
| 42 | 46 | #define LOG_IWM 0 |
| 43 | 47 | #define LOG_IWM_EXTRA 0 |
| 44 | 48 | |
| 49 | |
| 50 | |
| 51 | /*************************************************************************** |
| 52 | CONSTANTS |
| 53 | ***************************************************************************/ |
| 54 | |
| 45 | 55 | /* mask for FDC lines */ |
| 46 | 56 | #define IWM_MOTOR 0x10 |
| 47 | 57 | #define IWM_DRIVE 0x20 |
| r2490 | r2491 | |
| 49 | 59 | #define IWM_Q7 0x80 |
| 50 | 60 | |
| 51 | 61 | |
| 62 | |
| 63 | /*************************************************************************** |
| 64 | LOCAL VARIABLES |
| 65 | ***************************************************************************/ |
| 66 | |
| 52 | 67 | static UINT8 applefdc_writebyte=0; |
| 53 | 68 | static UINT8 applefdc_lines; /* flags from IWM_MOTOR - IWM_Q7 */ |
| 54 | 69 | |
| r2490 | r2491 | |
| 87 | 102 | static emu_timer *motor_timer; |
| 88 | 103 | static applefdc_interface iwm_intf; |
| 89 | 104 | |
| 90 | | static TIMER_CALLBACK(iwm_turnmotor_onoff); |
| 91 | 105 | |
| 92 | 106 | |
| 107 | /*************************************************************************** |
| 108 | PROTOTYPES |
| 109 | ***************************************************************************/ |
| 93 | 110 | |
| 111 | static TIMER_CALLBACK(iwm_turnmotor_onoff); |
| 94 | 112 | |
| 95 | | /*************************************************************************** |
| 96 | 113 | |
| 97 | | IWM code |
| 98 | 114 | |
| 115 | /*************************************************************************** |
| 116 | CORE IMPLEMENTATION |
| 99 | 117 | ***************************************************************************/ |
| 100 | 118 | |
| 101 | 119 | void applefdc_init(const applefdc_interface *intf) |
src/mess/machine/applefdc.h
| r2490 | r2491 | |
| 11 | 11 | |
| 12 | 12 | *********************************************************************/ |
| 13 | 13 | |
| 14 | | #ifndef APPLEFDC_H |
| 15 | | #define APPLEFDC_H |
| 14 | #ifndef __APPLEFDC_H__ |
| 15 | #define __APPLEFDC_H__ |
| 16 | 16 | |
| 17 | 17 | #include "driver.h" |
| 18 | 18 | |
| 19 | |
| 20 | |
| 21 | /*************************************************************************** |
| 22 | CONSTANTS |
| 23 | ***************************************************************************/ |
| 24 | |
| 19 | 25 | #define APPLEFDC_PH0 0x01 |
| 20 | 26 | #define APPLEFDC_PH1 0x02 |
| 21 | 27 | #define APPLEFDC_PH2 0x04 |
| 22 | 28 | #define APPLEFDC_PH3 0x08 |
| 23 | 29 | |
| 30 | |
| 31 | |
| 32 | /*************************************************************************** |
| 33 | TYPE DEFINITIONS |
| 34 | ***************************************************************************/ |
| 35 | |
| 24 | 36 | typedef enum |
| 25 | 37 | { |
| 26 | 38 | APPLEFDC_APPLE2, /* classic Apple II disk controller (pre-IWM) */ |
| r2490 | r2491 | |
| 42 | 54 | }; |
| 43 | 55 | |
| 44 | 56 | |
| 57 | |
| 58 | /*************************************************************************** |
| 59 | PROTOTYPES |
| 60 | ***************************************************************************/ |
| 61 | |
| 45 | 62 | void applefdc_init(const applefdc_interface *intf); |
| 46 | 63 | READ8_HANDLER( applefdc_r ); |
| 47 | 64 | WRITE8_HANDLER( applefdc_w ); |
| 48 | 65 | UINT8 applefdc_get_lines(void); |
| 49 | 66 | |
| 50 | 67 | |
| 51 | | #endif /* APPLEFDC_H */ |
| 68 | #endif /* __APPLEFDC_H__ */ |