summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/ccpu/ccpu.h
blob: 595e9609477398219494010af26593b88fc8b0e1 (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
/***************************************************************************

    ccpu.h
    Core implementation for the portable Cinematronics CPU emulator.

    Written by Aaron Giles
    Special thanks to Zonn Moore for his detailed documentation.

***************************************************************************/

#pragma once

#ifndef __CCPU_H__
#define	__CCPU_H__

#include "cpuintrf.h"


/***************************************************************************
    REGISTER ENUMERATION
***************************************************************************/

enum
{
	CCPU_PC=1,
	CCPU_FLAGS,
	CCPU_A,
	CCPU_B,
	CCPU_I,
	CCPU_J,
	CCPU_P,
	CCPU_X,
	CCPU_Y,
	CCPU_T
};



/***************************************************************************
    CONFIG STRUCTURE
***************************************************************************/

typedef UINT8 (*ccpu_input_func)(const device_config *device);
typedef void (*ccpu_vector_func)(const device_config *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift);

typedef struct _ccpu_config ccpu_config;
struct _ccpu_config
{
	ccpu_input_func		external_input;		/* if NULL, assume JMI jumper is present */
	ccpu_vector_func	vector_callback;
};



/***************************************************************************
    PUBLIC FUNCTIONS
***************************************************************************/

CPU_GET_INFO( ccpu );
#define CPU_CCPU CPU_GET_INFO_NAME( ccpu )

void ccpu_wdt_timer_trigger(const device_config *device);

CPU_DISASSEMBLE( ccpu );

#endif /* __CCPU_H__ */