#include <string.h>
#include <stdint.h>
+#include "plugin_lib.h"
#include "plugin.h"
static int dummy_func() {
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) {
- CurByte = 0;
+ pad_byte = 0;
+ pad_buf[2] = ~keystate;
+ pad_buf[3] = ~keystate >> 8;
+
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 buf[CurByte++];
+
+ return pad_buf[pad_byte++];
}
/* GPU */
return NULL;
}
+#ifdef PCNT
+
/* basic profile stuff */
#include "pcnt.h"
void pcnt_hook_plugins(void)
{
+ /* test it first */
+ pcnt_get();
+
hook_it(GPU_writeStatus);
hook_it(GPU_writeData);
hook_it(GPU_writeDataMem);
hook_it(SPU_playCDDAchannel);
}
+#endif