blob: 923b4cde39b6035662dcae1372abf122032f3f49 (
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
57
58
59
60
61
62
63
|
// license:LGPL-2.1+
// copyright-holders:Michael Zapf
/****************************************************************************
Nouspikel IDE controller card
See tn_ide.c for documentation
Michael Zapf
February 2012: Rewritten as class
*****************************************************************************/
#ifndef __TNIDE__
#define __TNIDE__
#include "machine/ataintf.h"
#include "machine/rtc65271.h"
#include "machine/ram.h"
extern const device_type TI99_IDE;
class nouspikel_ide_interface_device : public ti_expansion_card_device
{
public:
nouspikel_ide_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8Z_MEMBER(readz) override;
DECLARE_WRITE8_MEMBER(write) override;
DECLARE_READ8Z_MEMBER(crureadz) override;
DECLARE_WRITE8_MEMBER(cruwrite) override;
void do_inta(int state);
bool m_ata_irq;
int m_cru_register;
DECLARE_WRITE_LINE_MEMBER(clock_interrupt_callback);
DECLARE_WRITE_LINE_MEMBER(ide_interrupt_callback);
protected:
virtual void device_start(void) override;
virtual void device_reset(void) override;
virtual machine_config_constructor device_mconfig_additions() const override;
virtual ioport_constructor device_input_ports() const override;
private:
rtc65271_device* m_rtc;
required_device<ata_interface_device> m_ata;
bool m_clk_irq;
bool m_sram_enable;
bool m_sram_enable_dip;
int m_cur_page;
bool m_tms9995_mode;
uint16_t m_input_latch;
uint16_t m_output_latch;
required_device<ram_device> m_ram;
};
#endif
|