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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
/*************************************
*
* Implementation of ASIC65
*
*************************************/
#include "cpu/tms32010/tms32010.h"
enum {
ASIC65_STANDARD,
ASIC65_STEELTAL,
ASIC65_GUARDIANS,
ASIC65_ROMBASED
};
class asic65_device : public device_t
{
public:
asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// (static) configuration helpers
static void set_type(device_t &device, int type) { downcast<asic65_device &>(device).m_asic65_type = type; }
void reset_line(int state);
DECLARE_WRITE16_MEMBER( data_w );
DECLARE_READ16_MEMBER( read );
DECLARE_READ16_MEMBER( io_r );
TIMER_CALLBACK_MEMBER( m68k_asic65_deferred_w );
WRITE16_MEMBER( m68k_w );
READ16_MEMBER( m68k_r );
WRITE16_MEMBER( stat_w );
READ16_MEMBER( stat_r );
READ16_MEMBER( get_bio );
enum
{
TIMER_M68K_ASIC65_DEFERRED_W
};
protected:
// device-level overrides
virtual void device_config_complete();
virtual void device_start();
virtual void device_reset();
virtual machine_config_constructor device_mconfig_additions() const;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
private:
UINT8 m_asic65_type;
int m_command;
UINT16 m_param[32];
UINT16 m_yorigin;
UINT8 m_param_index;
UINT8 m_result_index;
UINT8 m_reset_state;
UINT8 m_last_bank;
/* ROM-based interface states */
required_device<legacy_cpu_device> m_ourcpu;
UINT8 m_tfull;
UINT8 m_68full;
UINT8 m_cmd;
UINT8 m_xflg;
UINT16 m_68data;
UINT16 m_tdata;
FILE * m_log;
};
extern const device_type ASIC65;
#define MCFG_ASIC65_ADD(_tag, _type) \
MCFG_DEVICE_ADD(_tag, ASIC65, 0) \
asic65_device::set_type(*device, _type);
|