summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/includes/irisha.h
blob: a39228ccd92a84380aab6c6044b2a7571ee8ac60 (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
64
/*****************************************************************************
 *
 * includes/irisha.h
 *
 ****************************************************************************/

#ifndef IRISHA_H_
#define IRISHA_H_

#include "emu.h"
#include "cpu/i8085/i8085.h"
#include "machine/i8255.h"
#include "machine/pit8253.h"
#include "machine/pic8259.h"
#include "machine/i8251.h"
#include "sound/speaker.h"

class irisha_state : public driver_device
{
public:
	irisha_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag),
		  m_pit(*this, "pit8253"),
		  m_speaker(*this, SPEAKER_TAG)
		{ }

	required_device<device_t> m_pit;
	required_device<device_t> m_speaker;

	int m_keyboard_mask;
	UINT8 m_keypressed;
	UINT8 m_keyboard_cnt;
	UINT8 m_ppi_porta;
	UINT8 m_ppi_portc;
	int   m_sg1_line;
	DECLARE_READ8_MEMBER(irisha_keyboard_r);
	DECLARE_READ8_MEMBER(irisha_8255_portb_r);
	DECLARE_READ8_MEMBER(irisha_8255_portc_r);
	DECLARE_WRITE8_MEMBER(irisha_8255_porta_w);
	DECLARE_WRITE8_MEMBER(irisha_8255_portb_w);
	DECLARE_WRITE8_MEMBER(irisha_8255_portc_w);
	DECLARE_WRITE_LINE_MEMBER(speaker_w);
	void update_speaker();

	DECLARE_DRIVER_INIT(irisha);
};


/*----------- defined in machine/irisha.c -----------*/

extern MACHINE_START( irisha );
extern MACHINE_RESET( irisha );
extern const i8255_interface irisha_ppi8255_interface;
extern const struct pit8253_config irisha_pit8253_intf;
extern const struct pic8259_interface irisha_pic8259_config;



/*----------- defined in video/irisha.c -----------*/

extern VIDEO_START( irisha );
extern SCREEN_UPDATE_IND16( irisha );

#endif /* IRISHA_H_ */