mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 21:40:03 +00:00
[ntsc-1.2] Match padmgr.c, sys_cfb.c, rcp_utils.c (#2111)
* Match padmgr.c * Match sys_cfb.c, rcp_utils.c * Format
This commit is contained in:
parent
d54c573132
commit
808fe81deb
3 changed files with 35 additions and 21 deletions
|
@ -237,7 +237,7 @@ void PadMgr_RumbleStop(PadMgr* padMgr) {
|
|||
if (osMotorInit(serialEventQueue, &padMgr->rumblePfs[i], i) == 0) {
|
||||
// If there is a rumble pak attached to this controller, stop it
|
||||
|
||||
if (FAULT_MSG_ID == 0 && padMgr->rumbleOnTimer != 0) {
|
||||
if (!FAULT_MSG_ID && padMgr->rumbleOnTimer != 0) {
|
||||
PADMGR_LOG(i, T("振動パック 停止", "Stop rumble pak"));
|
||||
}
|
||||
osMotorStop(&padMgr->rumblePfs[i]);
|
||||
|
@ -348,8 +348,6 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
|
|||
|
||||
void PadMgr_HandleRetrace(PadMgr* padMgr) {
|
||||
OSMesgQueue* serialEventQueue = PadMgr_AcquireSerialEventQueue(padMgr);
|
||||
u32 mask;
|
||||
s32 i;
|
||||
|
||||
// Begin reading controller data
|
||||
osContStartReadData(serialEventQueue);
|
||||
|
@ -384,8 +382,11 @@ void PadMgr_HandleRetrace(PadMgr* padMgr) {
|
|||
|
||||
PadMgr_ReleaseSerialEventQueue(padMgr, serialEventQueue);
|
||||
|
||||
{
|
||||
u32 mask = 0;
|
||||
s32 i;
|
||||
|
||||
// Update the state of connected controllers
|
||||
mask = 0;
|
||||
for (i = 0; i < MAXCONTROLLERS; i++) {
|
||||
if (padMgr->padStatus[i].errno == 0) {
|
||||
// Only standard N64 controllers are supported
|
||||
|
@ -399,6 +400,7 @@ void PadMgr_HandleRetrace(PadMgr* padMgr) {
|
|||
}
|
||||
}
|
||||
padMgr->validCtrlrsMask = mask;
|
||||
}
|
||||
|
||||
if (FAULT_MSG_ID != 0) {
|
||||
// If fault is active, no rumble
|
||||
|
|
|
@ -1,18 +1,26 @@
|
|||
#include "global.h"
|
||||
|
||||
#if PLATFORM_N64 || OOT_DEBUG
|
||||
#define RCP_UTILS_PRINTF osSyncPrintf
|
||||
#elif IDO_PRINTF_WORKAROUND
|
||||
#define RCP_UTILS_PRINTF(args) (void)0
|
||||
#else
|
||||
#define RCP_UTILS_PRINTF(format, ...) (void)0
|
||||
#endif
|
||||
|
||||
#define printSpStatus(x, name) \
|
||||
if (x & SP_STATUS_##name) \
|
||||
PRINTF(#name " ")
|
||||
RCP_UTILS_PRINTF(#name " ")
|
||||
|
||||
#define printDpStatus(x, name) \
|
||||
if (x & DPC_STATUS_##name) \
|
||||
PRINTF(#name " ")
|
||||
RCP_UTILS_PRINTF(#name " ")
|
||||
|
||||
void RcpUtils_PrintRegisterStatus(void) {
|
||||
u32 spStatus = __osSpGetStatus();
|
||||
u32 dpStatus = osDpGetStatus();
|
||||
|
||||
PRINTF("osSpGetStatus=%08x: ", spStatus);
|
||||
RCP_UTILS_PRINTF("osSpGetStatus=%08x: ", spStatus);
|
||||
printSpStatus(spStatus, HALT);
|
||||
printSpStatus(spStatus, BROKE);
|
||||
printSpStatus(spStatus, DMA_BUSY);
|
||||
|
@ -28,9 +36,9 @@ void RcpUtils_PrintRegisterStatus(void) {
|
|||
printSpStatus(spStatus, SIG5);
|
||||
printSpStatus(spStatus, SIG6);
|
||||
printSpStatus(spStatus, SIG7);
|
||||
PRINTF("\n");
|
||||
RCP_UTILS_PRINTF("\n");
|
||||
|
||||
PRINTF("osDpGetStatus=%08x:", dpStatus);
|
||||
RCP_UTILS_PRINTF("osDpGetStatus=%08x:", dpStatus);
|
||||
printDpStatus(dpStatus, XBUS_DMEM_DMA);
|
||||
printDpStatus(dpStatus, FREEZE);
|
||||
printDpStatus(dpStatus, FLUSH);
|
||||
|
@ -42,7 +50,7 @@ void RcpUtils_PrintRegisterStatus(void) {
|
|||
printDpStatus(dpStatus, DMA_BUSY);
|
||||
printDpStatus(dpStatus, END_VALID);
|
||||
printDpStatus(dpStatus, START_VALID);
|
||||
PRINTF("\n");
|
||||
RCP_UTILS_PRINTF("\n");
|
||||
}
|
||||
|
||||
void RcpUtils_Reset(void) {
|
||||
|
|
|
@ -32,7 +32,11 @@ void SysCfb_Init(s32 n64dd) {
|
|||
PRINTF("RAM4M mode\n");
|
||||
sSysCfbEnd = 0x80400000;
|
||||
} else {
|
||||
#if PLATFORM_N64
|
||||
LogUtils_HungupThread("../sys_cfb.c", 322);
|
||||
#else
|
||||
LogUtils_HungupThread("../sys_cfb.c", 354);
|
||||
#endif
|
||||
}
|
||||
|
||||
screenSize = SCREEN_WIDTH * SCREEN_HEIGHT;
|
||||
|
|
Loading…
Reference in a new issue