blob: 8d900048b324a412d5db3c01b0f03abdf9308620 (
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
|
// license:BSD-3-Clause
// copyright-holders:Barry Rodewald
/*
* ddi1.h -- Amstrad DDI-1 Floppy Disk Drive interface
*
* Provides uPD765A FDC, AMSDOS ROM, and 3" floppy disk drive.
* CPC464 only, 664/6128/464+/6128+ already has this hardware built-in (AMSDOS is on the included Burnin' Rubber / BASIC cartridge for the 464+ and 6128+)
*
*/
#ifndef CPC_DDI1_H_
#define CPC_DDI1_H_
#include "cpcexp.h"
#include "machine/upd765.h"
class cpc_ddi1_device : public device_t,
public device_cpc_expansion_card_interface
{
public:
// construction/destruction
cpc_ddi1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void set_mapping(uint8_t type) override;
virtual WRITE_LINE_MEMBER( romen_w ) override { m_romen = state; }
DECLARE_WRITE8_MEMBER(motor_w);
DECLARE_WRITE8_MEMBER(fdc_w);
DECLARE_READ8_MEMBER(fdc_r);
DECLARE_WRITE8_MEMBER(rombank_w);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
private:
cpc_expansion_slot_device *m_slot;
required_device<upd765_family_device> m_fdc;
required_device<floppy_connector> m_connector;
bool m_rom_active;
bool m_romen;
};
// device type definition
extern const device_type CPC_DDI1;
#endif /* CPC_DDI1_H_ */
|