summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/samcoupe/drive/atom.h
blob: 0abfee867492faa142c66ecd93727f870a71a5ee (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
// license: GPL-2.0+
// copyright-holders: Dirk Best
/***************************************************************************

    ATOM hard disk interface for SAM Coupe

***************************************************************************/

#ifndef MAME_BUS_SAMCOUPE_DRIVE_ATOM_H
#define MAME_BUS_SAMCOUPE_DRIVE_ATOM_H

#pragma once

#include "drive.h"
#include "bus/ata/ataintf.h"


//**************************************************************************
//  TYPE DEFINITIONS
//**************************************************************************

// ======================> sam_atom_hdd_device

class sam_atom_hdd_device : public device_t, public device_samcoupe_drive_interface
{
public:
	// construction/destruction
	sam_atom_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	// from host
	virtual uint8_t read(offs_t offset) override;
	virtual void write(offs_t offset, uint8_t data) override;

protected:
	virtual void device_add_mconfig(machine_config &config) override;
	virtual void device_start() override;

private:
	required_device<ata_interface_device> m_ata;

	int m_address_latch;
	uint8_t m_read_latch, m_write_latch;
};

// device type definition
DECLARE_DEVICE_TYPE(SAM_ATOM_HDD, sam_atom_hdd_device)

#endif // MAME_BUS_SAMCOUPE_DRIVE_ATOM_H