Add stub for rumble pc implementation
This commit is contained in:
parent
72607d12e4
commit
b8f0332372
2 changed files with 35 additions and 2 deletions
|
@ -238,6 +238,7 @@ void func_sh_8024CA04(void) {
|
||||||
gCurrRumbleSettings.unk0C = 4;
|
gCurrRumbleSettings.unk0C = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TARGET_N64
|
||||||
static void thread6_rumble_loop(UNUSED void *a0) {
|
static void thread6_rumble_loop(UNUSED void *a0) {
|
||||||
OSMesg msg;
|
OSMesg msg;
|
||||||
|
|
||||||
|
@ -266,6 +267,7 @@ static void thread6_rumble_loop(UNUSED void *a0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void cancel_rumble(void) {
|
void cancel_rumble(void) {
|
||||||
sRumblePakActive = osMotorInit(&gSIEventMesgQueue, &gRumblePakPfs, gPlayer1Controller->port) < 1;
|
sRumblePakActive = osMotorInit(&gSIEventMesgQueue, &gRumblePakPfs, gPlayer1Controller->port) < 1;
|
||||||
|
@ -285,9 +287,11 @@ void cancel_rumble(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void create_thread_6(void) {
|
void create_thread_6(void) {
|
||||||
|
#ifdef TARGET_N64
|
||||||
osCreateMesgQueue(&gRumbleThreadVIMesgQueue, gRumbleThreadVIMesgBuf, 1);
|
osCreateMesgQueue(&gRumbleThreadVIMesgQueue, gRumbleThreadVIMesgBuf, 1);
|
||||||
osCreateThread(&gRumblePakThread, 6, thread6_rumble_loop, NULL, gThread6Stack + 0x2000, 30);
|
osCreateThread(&gRumblePakThread, 6, thread6_rumble_loop, NULL, gThread6Stack + 0x2000, 30);
|
||||||
osStartThread(&gRumblePakThread);
|
osStartThread(&gRumblePakThread);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void rumble_thread_update_vi(void) {
|
void rumble_thread_update_vi(void) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ s32 osJamMesg(UNUSED OSMesgQueue *mq, UNUSED OSMesg msg, UNUSED s32 flag) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
s32 osSendMesg(UNUSED OSMesgQueue *mq, UNUSED OSMesg msg, UNUSED s32 flag) {
|
s32 osSendMesg(UNUSED OSMesgQueue *mq, UNUSED OSMesg msg, UNUSED s32 flag) {
|
||||||
#ifdef VERSION_EU
|
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||||
s32 index;
|
s32 index;
|
||||||
if (mq->validCount >= mq->msgCount) {
|
if (mq->validCount >= mq->msgCount) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -44,7 +44,7 @@ s32 osSendMesg(UNUSED OSMesgQueue *mq, UNUSED OSMesg msg, UNUSED s32 flag) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
s32 osRecvMesg(UNUSED OSMesgQueue *mq, UNUSED OSMesg *msg, UNUSED s32 flag) {
|
s32 osRecvMesg(UNUSED OSMesgQueue *mq, UNUSED OSMesg *msg, UNUSED s32 flag) {
|
||||||
#if VERSION_EU
|
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||||
if (mq->validCount == 0) {
|
if (mq->validCount == 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -185,3 +185,32 @@ s32 osEepromLongWrite(UNUSED OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s32 gNumVblanks;
|
||||||
|
|
||||||
|
s32 osMotorInit(UNUSED OSMesgQueue *mq, UNUSED void *pfs, UNUSED int channel) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 osMotorStart(UNUSED void *pfs) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 osMotorStop(UNUSED void *pfs) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
OSPiHandle *osCartRomInit(void) {
|
||||||
|
static OSPiHandle handle;
|
||||||
|
return &handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
OSPiHandle *osDriveRomInit(void) {
|
||||||
|
static OSPiHandle handle;
|
||||||
|
return &handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 osEPiStartDma(UNUSED OSPiHandle *pihandle, OSIoMesg *mb, UNUSED s32 direction) {
|
||||||
|
memcpy(mb->dramAddr, (const void *) mb->devAddr, mb->size);
|
||||||
|
osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue