summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/tms6100.h
blob: a6a13da2340ac218d8eae872284cb58e8cea6fcd (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
#pragma once

#ifndef __TMS6100_H__
#define __TMS6100_H__

/* TMS 6100 memory controller */

class tms6100_device : public device_t
{
public:
	tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	tms6100_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
	
	DECLARE_WRITE_LINE_MEMBER( tms6100_m0_w );
	DECLARE_WRITE_LINE_MEMBER( tms6100_m1_w );
	DECLARE_WRITE_LINE_MEMBER( tms6100_romclock_w );
	DECLARE_WRITE8_MEMBER( tms6100_addr_w );

	DECLARE_READ_LINE_MEMBER( tms6100_data_r );

protected:
	// device-level overrides
	virtual void device_config_complete();
	virtual void device_start();
	virtual void device_reset();
private:
	// internal state
	UINT32 m_address;
	UINT32 m_address_latch;
	UINT8  m_loadptr;
	UINT8  m_m0;
	UINT8  m_m1;
	UINT8  m_addr_bits;
	UINT8  m_tms_clock;
	UINT8  m_data;
	UINT8  m_state;
	
	const UINT8 *m_rom;	

};

extern const device_type TMS6100;

class m58819_device : public tms6100_device
{
public:
	m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);

protected:
	// device-level overrides
	virtual void device_start();
};

extern const device_type M58819;


#endif /* __TMS6100_H__ */