★ PROGRAMMER'S GUIDE ★ SMPC Interface User's ManualList | Title | Data | Data Name | No |
Defined value | ||
|---|---|---|
0xF0 | PER_ID_NCON_UNKNOWN | Unconnected or SMPC-incompatible peripheral |
0x00 | PER_ID_DGT | Digital device |
0x10 | PER_ID_ANL | Analog devices |
0x20 | PER_ID_PNT | Pointing device (mega drive mouse) |
0x30 | PER_ID_KBD | keyboard |
0xE0 | PER_ID_MD | Mega drive (3 buttons, 6 buttons) |
List | Title | Data | Data Name | No |
Defined value | ||
|---|---|---|
0x0F | PER_SIZE_NCON_15 | Unconnected 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 | Mega drive 3 button pad |
0x02 | PER_SIZE_M6BP | Mega drive 6 button pad |
List | 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 |
List | Title | Data | Data Name | No |
value | meaning |
|---|---|
0-31 | 1P ~ 32P |
List | 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 | Acquisition value |
|---|---|
PER_SS_DOTSEL | DOTSEL signal status |
PER_SS_SYSRES | SYSRES signal status |
PER_SS_MSHNMI | MSHNMI signal state |
PER_SS_SNDRES | SNDRES signal state |
PER_SS_CDRES | CDRES signal state |
value | meaning |
|---|---|
0 | OFF OFF |
1 | ON |
Defined value | Bit position constant | Acquisition value |
|---|---|---|
0xF | PER_MSK_LANGU | Language 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 << 10) | PER_MSK_HELP | HELP (0: ON, 1: OFF) |
Defined 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 |
Defined value | Bit position constant | Acquisition value |
|---|---|---|
(1 << 6) | PER_SS_RESET | Reset mask state |
0: Reset enable (default) | ||
1: Reset disable | ||
(1 << 7) | PER_SS_SETTIME | Time setting status |
0: Time is not set after SMPC cold reset | ||
1: The time is set after SMPC cold reset. |
List | Title | Data | Data Name | No |
List | 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 2Multi-tap connection | : (00 to E0) Symbol undefined |
Not connected or directly connected | : (F0) PER_MID_NCON_ONE |
UNKNOWN device | : (MD-PID) Symbol undefined |
Virtual Gun | : (A0) Symbol undefined |
Unconnected or UNKNOWN device | : (00) PER_MCON_NCON_UNKNOWN |
Direct connection | : (01) Symbol undefined |
Number of connected multi-tap connectors | : (02-0F) Symbol undefined |
The structure definition example when accessing each peripheral data and the bit position constant are shown.
Please refer to it when defining the type.
value | meaning |
|---|---|
0 | Pressing the button |
1 | Not pressing the button |
List | 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 | Direction 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 (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 (at the top left of the device) |
List | 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;
List | Title | Data | Data Name | No |
typedef struct {/ * pointing device * /
PerId id; / * Peripheral type * /
PerSize size; / * Peripheral size * /
Uint8 info; / * Overflow, code information * /
Uint8 x; / * Absolute value of X-axis movement (0 to 127) * /
Uint8 y; / * Absolute value of Y-axis movement (0 to 127) * /
} smpPntData;
BIT position | Bit position constant | Acquisition 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 | Middle button |
bit1 | PER_PNT_R | Right button |
bit0 | PER_PNT_L | Left button |
List | 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 | Acquisition value |
|---|---|---|
bit6 | PER_KBD_CL | Caps Lock |
bit5 | PER_KBD_NL | Num Lock |
bit4 | PER_KBD_SL | Scrool Lock |
bit3 | PER_KBD_MK | Make |
bit0 | PER_KBD_BR | Break |
★ PROGRAMMER'S GUIDE ★ SMPC Interface User's Manual