Japanese
FAQSBL programming related
BackForward
FAQ/SBL programming related

peripheral



Why doesn't PER_LInit return the peripheral ID?

Q)
Why is the peripheral ID not passed during initialization (PER_LInit)?

A)
This is so that you can use different peripherals within one game.

(Example → 1P = analog, 2P = mouse game)


What is written about multi-tap?

Q)
Regarding multi-tap.

what.

A)
The multi-tap ID and the number of multi-tap connectors are used to obtain information about the connection status of the main body connection terminals.

If you write it like a library document, it will look like this:

◆Multi-tap information (obtained with PER_LGetPer function)
typedef struct {
  PerMulId id; /* Multitap ID */
  PerMulCon con; /* Number of connectors */
} PerMulInfo; /* Multitap information */

[Example of acquisition]
void *per_data;
PerMulInfo *mul_info;
PER_LGetPer((PerGetPer **)&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

[detail]
The following values are returned depending on the connection status.

  • Multi-tap ID (value with the lower 8BIT of port status masked)
    connect multitap : (00~E0) Symbol undefined
    Not connected or directly connected : (F0) PER_MID_NCON_ONE
    UNKNOWN device : (MD-PID) Symbol undefined
    (*)MD-PID: Mega Drive Peripheral ID

  • Number of multi-tap connectors (value masking the upper 8 bits of port status)
    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

[remarks]
There are two types of multi-tap currently available on the market:

  1. Sega Tap (4 peripherals for Mega Drive)
    Multitap ID = 00, number of connectors = 04

  2. Multiterminal 6 (used to connect 6 Saturn peripherals)
    Multitap ID = 10, number of connectors = 06


Regarding peripheral data output.

Q)
Regarding peripheral data,

A)
Peripherals other than the mouse have a structure that extends the digital device data format, so no special conversion is required.

For example, in the case of a steering wheel controller,
"Digital PAD data" + "Analog data"
The data format is as follows.

I don't know much about the data format of "Nejicon", but I think there will be no problem if it is in the form of an extension of the digital PAD as above. The release of new peripherals itself depends on the situation, but if the data format is new, a peripheral ID will probably be added, so it is impossible to support it with the software currently under development.

Even if the software is only compatible with digital devices,

If it is connected, please program it so that you can operate the game using "digital data".

If a mouse is connected using software that does not support mice, please take measures such as ignoring it or converting it to operate digitally.

Finally, regarding detailed information about the keyboard, we believe that the necessary information is specified in the format as long as it is used for normal game operations.

For detailed peripheral data formats, see

reference
"HARDWARE MANUAL VOL.1 SMPC User's Manual"
3.2 Saturn Peripheral Standard Format
Please refer to.


What happens if different types of peripherals are connected?

Q)
What happens if a different type of device is connected to Multi-Tap?

A)
The library outputs the peripheral data collected by SMPC, aligning it to the boundary of [SIZE + 2]. At that time, the remaining peripheral data will be skipped.
Since the data contents are not processed other than peripheral ID processing and data boundary processing, there is no problem even if a different type of device is inserted.
Please use the user program to determine which peripheral is connected based on the peripheral ID and peripheral size.

(example)
If the ID is [PER_ID_DGT] and the size is greater than or equal to [PER_SIZE_DGT], the digital device is connected.


What is peripheral size used for?

Q)
SATURN\SEGALIB\MAN\MANPER.TXT
"Be sure to refer to the peripheral ID and peripheral size before..."
How should I use the peripheral size value?
Isn't ID alone sufficient?

A)
ID alone may not be enough.
If the peripheral ID is [PER_ID_NCON_UNKNOWN],

  1. Peripheral not connected
  2. SMPC UNKNOWN Peripheral connected

There are two ways, and Virtua Gun is the second one.
If the SMPC UNKNOWN peripheral is connected to a multitap,

Peripheral ID =
PER_ID_NCON_UNKNOWN
Peripheral size =
Mega Drive Peripheral ID (MDPID) of SMPC UNKNOWN peripheral

This value is returned, so it is necessary to detect from this value.
(Virtual Gun's [MDPID] is A in hexadecimal.)

Note
Virtua Gun itself does not support multi-tap.
(Even if connected, it will not work properly)

If the Virtua Gun is connected directly to the main unit terminal, the multi-tap information will have the following values.

Multitap ID = A0
Number of connectors = PER_MCON_NCON_UNKNOWN


What is PER_ID_MD's "Mega Drive"?

Q)
What is "Mega Drive" in PER_ID_MD?

A)
This is the ID when a Mega Drive PAD is connected. (Common to both 3B and 6B)


Peripherals connected to MultiTap suddenly become inoperable.

Q)
The peripherals connected to my multi-tap suddenly become inoperable.

A)
If this phenomenon occurs, please investigate what value is returned to the peripheral ID etc. when operation becomes impossible.
In addition, please take the following measures:

If the problem still occurs even after making the above changes, please execute the PER_Linit function again when the "Not connected" status is returned.
(If "Not connected" is returned even after repeating this several times, please assume that it is truly not connected.)


Please tell me more about analog peripherals.

Q)
Please tell me about the input/output relationship between the analog mission stick and the racing controller.

A)
Use PER_LInit() to initialize the library.
At that time, please specify the peripheral size required by the application. (Example: If you need analog data for 3 axes 5)
Use PER_LGetPer() to retrieve peripheral data.

Racing controllers, mission sticks, and multi-controllers all have analog device IDs and the data format is common, but the data size is different.

The application should use this information to determine what peripherals are currently connected.
Peripheral-specific buttons correspond to the following data formats.


When I connect an analog device to my multi-tap, it doesn't work.

Q)
When I connect an analog mission stick to Multitap, it takes a long time to obtain the peripheral ID.

A)
If the mission stick is connected to a multi-tap, information cannot be obtained correctly due to HARDWARE.There is no need to handle this kind of connection on the application side.


BackForward
FAQSBL programming related
Copyright SEGA ENTERPRISES, LTD. 1997