notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drc: end block on syscall and hlecall, not insn after them
[pcsx_rearmed.git]
/
frontend
/
plugin.c
diff --git
a/frontend/plugin.c
b/frontend/plugin.c
index
6cde989
..
e2c1ca3
100644
(file)
--- a/
frontend/plugin.c
+++ b/
frontend/plugin.c
@@
-9,7
+9,9
@@
#include <string.h>
#include <stdint.h>
#include <string.h>
#include <stdint.h>
+#include "plugin_lib.h"
#include "plugin.h"
#include "plugin.h"
+#include "../plugins/cdrcimg/cdrcimg.h"
static int dummy_func() {
return 0;
static int dummy_func() {
return 0;
@@
-42,18
+44,22
@@
extern void SPUasync(unsigned int);
extern void SPUplayCDDAchannel(short *, int);
/* PAD */
extern void SPUplayCDDAchannel(short *, int);
/* PAD */
-static uint8_t CurByte;
+static uint8_t pad_buf[] = { 0x41, 0x5A, 0xFF, 0xFF };
+static uint8_t pad_byte;
static unsigned char PADstartPoll(int pad) {
static unsigned char PADstartPoll(int pad) {
- CurByte = 0;
+ pad_byte = 0;
+ pad_buf[2] = ~keystate;
+ pad_buf[3] = ~keystate >> 8;
+
return 0xFF;
}
static unsigned char PADpoll(unsigned char value) {
return 0xFF;
}
static unsigned char PADpoll(unsigned char value) {
- static uint8_t buf[] = {0x41, 0x5A, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80};
- if (CurByte >= 4)
+ if (pad_byte >= 4)
return 0;
return 0;
- return buf[CurByte++];
+
+ return pad_buf[pad_byte++];
}
/* GPU */
}
/* GPU */
@@
-185,6
+191,9
@@
void *plugin_link(enum builtint_plugins_e id, const char *sym)
{
int i;
{
int i;
+ if (id == PLUGIN_CDRCIMG)
+ return cdrcimg_get_sym(sym);
+
for (i = 0; i < ARRAY_SIZE(plugin_funcs); i++) {
if (id != plugin_funcs[i].id)
continue;
for (i = 0; i < ARRAY_SIZE(plugin_funcs); i++) {
if (id != plugin_funcs[i].id)
continue;
@@
-199,6
+208,8
@@
void *plugin_link(enum builtint_plugins_e id, const char *sym)
return NULL;
}
return NULL;
}
+#ifdef PCNT
+
/* basic profile stuff */
#include "pcnt.h"
/* basic profile stuff */
#include "pcnt.h"
@@
-275,3
+286,4
@@
void pcnt_hook_plugins(void)
hook_it(SPU_playCDDAchannel);
}
hook_it(SPU_playCDDAchannel);
}
+#endif