blob: b724a598a9d439609a3f963d013b783c8aa412d9 (
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
|
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria
/*********************************************************************
generic.h
Generic simple machine functions.
*********************************************************************/
#pragma once
#ifndef __MACHINE_GENERIC_H__
#define __MACHINE_GENERIC_H__
/***************************************************************************
CONSTANTS
***************************************************************************/
/* total # of coin counters */
#define COIN_COUNTERS 8
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
/* ----- initialization ----- */
/* set up all the common systems */
void generic_machine_init(running_machine &machine);
/* ----- tickets ----- */
/* return the number of tickets dispensed */
int get_dispensed_tickets(running_machine &machine);
/* increment the number of dispensed tickets */
void increment_dispensed_tickets(running_machine &machine, int delta);
/* ----- coin counters ----- */
/* write to a particular coin counter (clocks on active high edge) */
void coin_counter_w(running_machine &machine, int num, int on);
/* return the coin count for a given coin */
int coin_counter_get_count(running_machine &machine, int num);
/* enable/disable coin lockout for a particular coin */
void coin_lockout_w(running_machine &machine, int num, int on);
/* return current lockout state for a particular coin */
int coin_lockout_get_state(running_machine &machine, int num);
/* enable/disable global coin lockout */
void coin_lockout_global_w(running_machine &machine, int on);
/* ----- miscellaneous bits & pieces ----- */
/* set the status of an LED */
void set_led_status(running_machine &machine, int num, int value);
#endif /* __MACHINE_GENERIC_H__ */
|