blob: ac3b072a449913c4d8aa1d8f7ef87cefb7bcdbc0 (
plain) (
blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// license:BSD-3-Clause
// copyright-holders:R. Belmont
/*********************************************************************
swim.h
Implementation of the Apple SWIM FDC controller; used on (less)
early Macs
*********************************************************************/
#ifndef MAME_MACHINE_SWIM_H
#define MAME_MACHINE_SWIM_H
#pragma once
#include "machine/applefdc.h"
/***************************************************************************
DEVICE
***************************************************************************/
DECLARE_DEVICE_TYPE(LEGACY_SWIM, swim_device)
class swim_device : public applefdc_base_device
{
public:
swim_device(const machine_config &mconfig, const char *tag, device_t *owner, const applefdc_interface *intrf)
: swim_device(mconfig, tag, owner, (uint32_t)0)
{
set_config(intrf);
}
swim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// read/write
virtual uint8_t read(offs_t offset) override;
virtual void write(offs_t offset, uint8_t data) override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// other overrides
virtual void iwm_modereg_w(uint8_t data) override;
private:
uint8_t m_swim_mode = 0;
uint8_t m_swim_magic_state = 0;
uint8_t m_parm_offset = 0;
uint8_t m_ism_regs[8]{};
uint8_t m_parms[16]{};
};
#endif // MAME_MACHINE_SWIM_H
|