-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rumble + ifdefs + rumble documentation #594
base: develop/2.4.0
Are you sure you want to change the base?
Changes from all commits
5addcfa
d6bc40b
53ffeb2
a5ae732
f91293a
2ded494
8e256e9
8933197
e9e1185
c6b3ad4
27af7ae
1f39c1c
04e9a6f
fc1e4a6
5ece07d
60085d9
db7ce69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,24 +134,29 @@ The Indy development board use cartridge domain 1: | |
* 1FC00000 +-------+-----------------+-----+ | ||
* | ||
*/ | ||
#define PIF_ROM_SIZE 0x07C0 | ||
#define PIF_ROM_START 0x1FC00000 | ||
#define PIF_ROM_END 0x1FC007BF | ||
#define PIF_RAM_START 0x1FC007C0 | ||
#define PIF_RAM_END 0x1FC007FF | ||
#define PIF_ROM_END (PIF_ROM_START + PIF_ROM_SIZE - 1) /* 0x1FC007BF */ | ||
|
||
#define PIF_RAM_SIZE 0x0040 | ||
#define PIF_RAM_START (PIF_ROM_END + 1 ) /* 0x1FC007C0 */ | ||
#define PIF_RAM_END (PIF_RAM_START + PIF_RAM_SIZE - 1) /* 0x1FC007FF */ | ||
|
||
|
||
/************************************************************************* | ||
* Controller channel | ||
* Controller channel | ||
* Each game controller channel has 4 error bits that are defined in bit 6-7 of | ||
* the Rx and Tx data size area bytes. Programmers need to clear these bits | ||
* when setting the Tx/Rx size area values for a channel | ||
*/ | ||
#define CHNL_ERR_NORESP 0x80 /* Bit 7 (Rx): No response error */ | ||
#define CHNL_ERR_OVERRUN 0x40 /* Bit 6 (Rx): Overrun error */ | ||
#define CHNL_ERR_FRAME 0x80 /* Bit 7 (Tx): Frame error */ | ||
#define CHNL_ERR_COLLISION 0x40 /* Bit 6 (Tx): Collision error */ | ||
#define CHNL_ERR_SUCCESS 0x00 | ||
|
||
#define CHNL_ERR_NORESP (0b1 << 7) /* 0x80: Bit 7 (Rx): No response error */ | ||
#define CHNL_ERR_OVERRUN (0b1 << 6) /* 0x40: Bit 6 (Rx): Overrun error */ | ||
#define CHNL_ERR_FRAME (0b1 << 7) /* 0x80: Bit 7 (Tx): Frame error */ | ||
#define CHNL_ERR_COLLISION (0b1 << 6) /* 0x40: Bit 6 (Tx): Collision error */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed |
||
|
||
#define CHNL_ERR_MASK 0xC0 /* Bit 6-7: channel errors */ | ||
#define CHNL_ERR_MASK (0b11 << 6) /* 0xC0: Bit 6-7: channel errors */ | ||
|
||
|
||
/************************************************************************* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
|
||
/*---------------------------------------------------------------------* | ||
Copyright (C) 1998 Nintendo. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I personally think we shouldn't be touching any of the |
||
$RCSfile: os_motor.h,v $ | ||
$Revision: 1.1 $ | ||
$Date: 1998/10/09 08:01:15 $ | ||
*---------------------------------------------------------------------*/ | ||
|
||
#ifndef _OS_MOTOR_H_ | ||
#define _OS_MOTOR_H_ | ||
#define _OS_MOTOR_H_ | ||
|
||
#ifdef _LANGUAGE_C_PLUS_PLUS | ||
extern "C" { | ||
#endif | ||
#endif /* _LANGUAGE_C_PLUS_PLUS */ | ||
|
||
#include <PR/ultratypes.h> | ||
#include "os_message.h" | ||
|
@@ -61,25 +61,26 @@ extern "C" { | |
|
||
/* Rumble PAK interface */ | ||
|
||
extern s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int controller_no); | ||
extern s32 osMotorInit( OSMesgQueue *mq, OSPfs *pfs, int controller_no); | ||
extern s32 osMotorInitEx(OSMesgQueue *mq, OSPfs *pfs, int controller_no); | ||
#if 1 | ||
#define MOTOR_START 1 | ||
#define MOTOR_STOP 0 | ||
#define osMotorStart(x) __osMotorAccessEx((x), MOTOR_START) | ||
#define osMotorStop(x) __osMotorAccessEx((x), MOTOR_STOP) | ||
extern s32 __osMotorAccess(OSPfs *pfs, s32 flag); | ||
#define MOTOR_MASK_N64 0b01 | ||
#define MOTOR_MASK_GCN 0b11 | ||
enum OSMotorOP { | ||
MOTOR_STOP, | ||
MOTOR_START, | ||
MOTOR_STOP_HARD, // GCN only. | ||
}; | ||
#define osMotorStopHard(x) __osMotorAccessEx((x), MOTOR_STOP_HARD) | ||
#define osMotorStart(x) __osMotorAccessEx((x), MOTOR_START) | ||
#define osMotorStop(x) __osMotorAccessEx((x), MOTOR_STOP) | ||
extern s32 __osMotorAccess( OSPfs *pfs, s32 flag); | ||
extern s32 __osMotorAccessEx(OSPfs *pfs, s32 flag); | ||
#else | ||
extern s32 osMotorStop( OSPfs *pfs); | ||
extern s32 osMotorStart(OSPfs *pfs); | ||
#endif | ||
|
||
|
||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */ | ||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */ | ||
|
||
#ifdef _LANGUAGE_C_PLUS_PLUS | ||
} | ||
#endif | ||
#endif /* _LANGUAGE_C_PLUS_PLUS */ | ||
|
||
#endif /* !_OS_MOTOR_H_ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either this should be disabled by default, or if it is safe to always leave on, the comment two lines up should be modified/deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the comment. I think it should be on by default since it's never crashed in any of my testing with these changes. I think that comment was about the old PJ64 crash from around 2 years ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not totally sure about it being left on even if it doesnt cause too much instability just because its extra code being added and most people won't care about it, and we can't be totally certain its not unstable