Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/genplus-gx32/core/input_hw/gamepad.h
2 views
1
/***************************************************************************************
2
* Genesis Plus
3
* 3-Buttons & 6-Buttons pad support
4
* Support for J-CART & 4-Way Play adapters
5
*
6
* Copyright (C) 2007-2011 Eke-Eke (Genesis Plus GX)
7
*
8
* Redistribution and use of this code or any derivative works are permitted
9
* provided that the following conditions are met:
10
*
11
* - Redistributions may not be sold, nor may they be used in a commercial
12
* product or activity.
13
*
14
* - Redistributions that are modified from the original source must include the
15
* complete source code, including the source code for all components used by a
16
* binary built from the modified sources. However, as a special exception, the
17
* source code distributed need not include anything that is normally distributed
18
* (in either source or binary form) with the major components (compiler, kernel,
19
* and so on) of the operating system on which the executable runs, unless that
20
* component itself accompanies the executable.
21
*
22
* - Redistributions must reproduce the above copyright notice, this list of
23
* conditions and the following disclaimer in the documentation and/or other
24
* materials provided with the distribution.
25
*
26
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
30
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
* POSSIBILITY OF SUCH DAMAGE.
37
*
38
****************************************************************************************/
39
40
#ifndef _GAMEPAD_H_
41
#define _GAMEPAD_H_
42
43
/* Function prototypes */
44
extern void gamepad_reset(int port);
45
extern void gamepad_refresh(int port);
46
extern unsigned char gamepad_1_read(void);
47
extern unsigned char gamepad_2_read(void);
48
extern void gamepad_1_write(unsigned char data, unsigned char mask);
49
extern void gamepad_2_write(unsigned char data, unsigned char mask);
50
extern unsigned char wayplay_1_read(void);
51
extern unsigned char wayplay_2_read(void);
52
extern void wayplay_1_write(unsigned char data, unsigned char mask);
53
extern void wayplay_2_write(unsigned char data, unsigned char mask);
54
extern unsigned int jcart_read(unsigned int address);
55
extern void jcart_write(unsigned int address, unsigned int data);
56
57
#endif
58
59