summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/includes/apple1.h
blob: aab559bc5d656ef47b5c9de6fa9fc23791c1791c (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
65
66
67
68
69
70
71
72
73
74
75
76
/*****************************************************************************
 *
 * includes/apple1.h
 *
 ****************************************************************************/

#ifndef APPLE1_H_
#define APPLE1_H_

#include "imagedev/snapquik.h"
#include "machine/6821pia.h"

typedef short termchar_t;

typedef struct
{
	tilemap_t *tm;
	int gfx;
	int blank_char;
	int char_bits;
	int num_cols;
	int num_rows;
	int (*getcursorcode)(int original_code);
	int cur_offset;
	int cur_hidden;
	termchar_t mem[1];
} terminal_t;


class apple1_state : public driver_device
{
public:
	apple1_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag) { }

	int m_vh_clrscrn_pressed;
	int m_kbd_data;
	UINT32 m_kbd_last_scan[4];
	int m_reset_flag;
	int m_cassette_output_flipflop;
	terminal_t *m_current_terminal;
	terminal_t *m_terminal;
	int m_blink_on;
	DECLARE_READ8_MEMBER(apple1_cassette_r);
	DECLARE_WRITE8_MEMBER(apple1_cassette_w);
	DECLARE_DRIVER_INIT(apple1);
	TILE_GET_INFO_MEMBER(terminal_gettileinfo);
};


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

extern const pia6821_interface apple1_pia0;

MACHINE_RESET( apple1 );
SNAPSHOT_LOAD( apple1 );



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

VIDEO_START( apple1 );
SCREEN_UPDATE_IND16( apple1 );

void apple1_vh_dsp_w (running_machine &machine, int data);
void apple1_vh_dsp_clr (running_machine &machine);
attotime apple1_vh_dsp_time_to_ready (running_machine &machine);



/*----------- defined in drivers/apple1.c -----------*/

extern const gfx_layout apple1_charlayout;


#endif /* APPLE1_H_ */