one | Title | Data | Data Name | No |
Definition value | ||
---|---|---|
0xF0 | PER_ID_NCON_UNKNOWN | Unconnected or non-SMPC-compatible peripherals |
0x00 | PER_ID_DGT | digital device |
0x10 | PER_ID_ANL | analog device |
0x20 | PER_ID_PNT | Pointing device (Mega Drive Mouse) |
0x30 | PER_ID_KBD | keyboard |
0xE0 | PER_ID_MD | Mega Drive (3 buttons, 6 buttons) |
one | Title | Data | Data Name | No |
Definition value | ||
---|---|---|
0x0F | PER_SIZE_NCON_15 | Not connected or 15 byte device |
0x02 | PER_SIZE_DGT | digital device |
0x05 | PER_SIZE_ANL | mission stick |
0x08 | PER_SIZE_ANL2 | Mission stick (2 sticks) |
0x06 | PER_SIZE_3DPAD | multi controller |
0x03 | PER_SIZE_STEERING | steering controller |
0x03 | PER_SIZE_PNT | Pointing device (shuttle mouse) |
0x04 | PER_SIZE_KBD | keyboard |
0x01 | PER_SIZE_M3BP | megadrive 3 button pad |
0x02 | PER_SIZE_M6BP | megadrive 6 button pad |
one | Title | Data | Data Name | No |
constant name | explanation |
---|---|
PER_KD_SYS | System data acquisition (excluding time) |
PER_KD_PER | Peripheral data acquisition |
PER_KD_PERTIM | Peripheral data acquisition + time data acquisition |
one | Title | Data | Data Name | No |
value | meaning |
---|---|
0-31 | 1P~32P |
one | Title | Data | Data Name | No |
access macro | mold | explanation |
---|---|---|
PER_GS_CC(data) | Uint8 | cartridge code |
PER_GS_AC(data) | Uint8 | area code |
PER_GS_SS(data) | Uint16 | system status |
PER_GS_SM(data) | Uint32 | SMPC memory |
PER_GS_SMPC_STAT(data) | Uint8 | SMPC status |
bit7 | bit0 | ||||||
---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | CTR1 | CTR0 |
bit7 | |||||||
---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | ACODE | ACODE | ACODE | ACODE |
bit position constant | Obtained value |
---|---|
PER_SS_DOTSEL | DOTSEL signal status |
PER_SS_SYSRES | SYSRES signal state |
PER_SS_MSHNMI | MSHNMI signal state |
PER_SS_SNDRES | SNDRES signal status |
PER_SS_CDRES | CDRES signal status |
value | meaning |
---|---|
0 | OFF |
1 | ON |
Definition value | bit position constant | Obtained value |
---|---|---|
0xF | PER_MSK_LANGU | Linguistic constants (see below) |
(0x1<< 8) | PER_MSK_SE | SE(0:ON,1:OFF) |
(0x1<< 9) | PER_MSK_STEREO | STEREO or MONO(0:STEREO,1:MONO) |
(0x1<< Ten) | PER_MSK_HELP | HELP(0:ON,1:OFF) |
Definition value | constant name | explanation |
---|---|---|
0x0 | PER_ENGLISH | English |
0x1 | PER_DEUTSCH | German |
0x2 | PER_FRANCAIS | French |
0x3 | PER_ESPNOL | Spanish |
0x4 | PER_ITALIANO | Italian |
0x5 | PER_JAPAN | Japanese |
Definition value | bit position constant | Obtained value |
---|---|---|
(1<< 6) | PER_SS_RESET | Reset mask status |
0: Reset enable (default) | ||
1: Reset disabled | ||
(1<< 7) | PER_SS_SETTIME | Time setting status |
0: Time has not been set after SMPC cold reset | ||
1: Setting the time after SMPC cold reset |
one | Title | Data | Data Name | No |
one | Title | Data | Data Name | No |
typedef struct { PerMulId id; /* Multitap ID */ PerMulCon con; /* Number of connectors */ }PerMulInfo;
PerGetPer *per_data; PerMulInfo *mul_info; PER_LGetPer(&per_data, &mul_info); mul_info[0].id Multi-tap ID of main unit terminal 1 mul_info[0].con Number of connectors for main unit terminal 1 mul_info[1].id Multi-tap ID for main unit terminal 2 mul_info[1].con Number of connectors for main unit terminal 2
multi-tap connection | :(00~E0) Symbol undefined |
Not connected or directly connected | :(F0) PER_MID_NCON_ONE |
UNKNOWN device | :(MD-PID) Symbol undefined |
Virtua Gun | :(A0) Symbol undefined |
Not connected or UNKNOWN device | :(00) PER_MCON_NCON_UNKNOWN |
direct connection | :(01) Symbol undefined |
Number of connected multi-tap connectors | :(02~0F) Symbol undefined |
Examples of structure definitions and bit position constants when accessing each peripheral data are shown below.
Please use this as a reference when defining types.
value | meaning |
---|---|
0 | pressing the button |
1 | button not pressed |
one | Title | Data | Data Name | No |
typedef struct { /* digital device */ PerId id; /* Peripheral type */ PerSize size; /* Peripheral size */ Uint16 data; /* Digital device data */ }smpDgtData;
BIT position | ||
---|---|---|
bit15 | PER_DGT_R | Direction key RIGHT |
bit14 | PER_DGT_L | Directional key LEFT |
bit13 | PER_DGT_D | Direction key DOWN |
bit12 | PER_DGT_U | Direction key UP |
bit11 | PER_DGT_S | START button |
bit10 | PER_DGT_A | A button |
bit9 | PER_DGT_C | C button |
bit8 | PER_DGT_B | B button |
bit7 | PER_DGT_TR | TRG-RIGHT (located at the top right of the device) |
bit6 | PER_DGT_X | X button |
bit5 | PER_DGT_Y | Y button |
bit4 | PER_DGT_Z | Z button |
bit3 | PER_DGT_TL | TRG-LEFT (located at the top left of the device) |
one | Title | Data | Data Name | No |
typedef struct { /* analog device */ PerId id; /* Peripheral type */ PerSize size; /* Peripheral size */ Uint16 data; /* Digital data */ Uint8 x; /* Analog ch0 data (0 to 255) */ Uint8 y; /* Analog ch1 data (0 to 255) */ Uint8 r; /* Analog ch2 data (0 to 255) */ Uint8 l; /* Analog ch3 data (0 to 255) */ }smpAnlData;
one | Title | Data | Data Name | No |
typedef struct { /* pointing device */ PerId id; /* Peripheral type */ PerSize size; /* Peripheral size */ Uint8 info; /* Overflow, sign information */ Uint8 x; /* Absolute value of X-axis movement amount (0 to 127) */ Uint8 y; /* Absolute value of Y-axis movement amount (0 to 127) */ }smpPntData;
BIT position | bit position constant | Obtained value |
---|---|---|
bit7 | PER_PNT_YO | Y-axis overflow (0: overflow, 1: non-overflow) |
bit6 | PER_PNT_XO | X-axis overflow (0: overflow, 1: non-overflow) |
bit5 | PER_PNT_YS | Y-axis sign (0: positive, 1: negative) |
bit4 | PER_PNT_XS | X-axis sign (0: positive, 1: negative) |
bit3 | PER_PNT_S | START button |
bit2 | PER_PNT_MID | center button |
bit1 | PER_PNT_R | right button |
bit0 | PER_PNT_L | left button |
one | Title | Data | Data Name | No |
typedef struct { /* keyboard device data */ PerId id; /* Peripheral type */ PerSize size; /* Peripheral size */ PerDgtInfo dgt; /* Digital device data */ Uint8 skey; /* Special key */ Uint8 key; /* key */ }smpKbdData;
BIT position | bit position constant | Obtained value |
---|---|---|
bit6 | PER_KBD_CL | Caps Lock |
bit5 | PER_KBD_NL | Num Lock |
bit4 | PER_KBD_SL | Scroll Lock |
bit3 | PER_KBD_MK | Make |
bit0 | PER_KBD_BR | Break |