Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmupen64plus/mupen64plus-input-bkm/plugin.h
2 views
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
* Mupen64plus-input-sdl - plugin.h *
3
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4
* Copyright (C) 2008-2009 Richard Goedeken *
5
* Copyright (C) 2008 Tillin9 *
6
* Copyright (C) 2002 Blight *
7
* *
8
* This program is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU General Public License as published by *
10
* the Free Software Foundation; either version 2 of the License, or *
11
* (at your option) any later version. *
12
* *
13
* This program is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU General Public License *
19
* along with this program; if not, write to the *
20
* Free Software Foundation, Inc., *
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
23
24
#ifndef __PLUGIN_H__
25
#define __PLUGIN_H__
26
27
#define M64P_PLUGIN_PROTOTYPES 1
28
#include "m64p_plugin.h"
29
#include "m64p_config.h"
30
31
// Some stuff from n-rage plugin
32
#define RD_GETSTATUS 0x00 // get status
33
#define RD_READKEYS 0x01 // read button values
34
#define RD_READPAK 0x02 // read from controllerpack
35
#define RD_WRITEPAK 0x03 // write to controllerpack
36
#define RD_RESETCONTROLLER 0xff // reset controller
37
#define RD_READEEPROM 0x04 // read eeprom
38
#define RD_WRITEEPROM 0x05 // write eeprom
39
40
#define RD_ABSOLUTE 0x01 // Default gamepad
41
#define RD_RELATIVE 0x02
42
#define RD_GAMEPAD 0x04 // Default gamepad
43
//B2
44
#define RD_EEPROM 0x80
45
#define RD_NOEEPROM 0x00
46
47
//C3
48
// No Plugin in Controller
49
#define RD_NOPLUGIN 0x00 // No pak in controller
50
#define RD_PLUGIN 0x01 // Any pak in controller
51
#define RD_NOTINITIALIZED 0x02 // Pak was uninitialized before call
52
#define RD_ADDRCRCERR 0x04 // Last I/O address was invalid
53
#define RD_EEPROMBUSY 0x80 // EEPROM busy
54
55
typedef struct
56
{
57
CONTROL *control; // pointer to CONTROL struct in Core library
58
BOOL rumbling;
59
} SController;
60
61
/* global data definitions */
62
extern SController controller[4]; // 4 controllers
63
64
/* global function definitions */
65
extern void DebugMessage(int level, const char *message, ...);
66
67
#endif // __PLUGIN_H__
68
69