FAQSBL programming related
BackForward
FAQ / SBL programming related

Peripheral



Why doesn't PER_LInit return a peripheral ID?

Q)
Why don't you pass the peripheral ID in initialization (PER_LInit)?

A)
This is to allow different peripherals to be used in one game.

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


What is the description 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 on the connection status of the main unit connection terminals.

Written like a library document, it looks like this:

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

[Acquisition example]
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 (masked value of lower 8BIT of port status)
    Connect multi-tap : (00 to 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 (masked value of top 8 BIT of port status)
    Unconnected 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 on the market.

  1. Sega Tap (Peripheral for Mega Drive x 4)
    Multi-tap ID = 00, number of connectors = 04

  2. Multi-terminal 6 (used to connect 6 peripherals for Saturn)
    Multi-tap ID = 10, number of connectors = 06


About peripheral data output.

Q)
Regarding peripheral data

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

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

I'm not familiar with the data format of "NeGcon", but it seems that there is no problem if it is an extension of digital PAD as above. The release of the new peripheral will depend on the situation, but if the data format is new, it is likely that a peripheral ID will be added, so it is not possible to support it with the software currently under development.

Even for software that only supports digital devices

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

If the mouse is connected with software that does not support the mouse, ignore it or convert it to digital operation.

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

For detailed peripheral data formats,

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


What if different types of peripherals are stuck?

Q)
What happens if a different type of device is plugged into a multi-tap?

A)
The library outputs the peripheral data collected by SMPC in a boundary of [SIZE + 2]. At that time, the excess peripheral data is skipped.
Since the data content is not processed except for peripheral ID processing and data boundary processing, there is no problem even if a device of a different type is touched.
Make sure that the user program determines which peripheral is connected from the peripheral ID and peripheral size.

(example)
If the ID is [PER_ID_DGT] and the size is [PER_SIZE_DGT] or more, the digital device is connected.


What is the peripheral size used for?

Q)
SATURN \ SEGALIB \ MAN \ MANPER.TXT "Be sure to refer to the peripheral ID and peripheral size ...."
How should I use the peripheral size value of?
ID is enough.

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

  1. Peripheral not connected
  2. SMPC UNKNOWN Peripheral is connected

There are two ways, and Virtual Gun is the second.
If the SMPC UNKNOWN peripheral is connected to a multi-tap,

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

Will be returned, so it is necessary to detect from this value.
(The [MDPID] of Virtual Gun is a hexadecimal A.)

caution
The virtual gun itself does not support multi-tap.
(It does not work properly even if connected)

If the virtual gun is directly connected to the main unit terminal, the multi-tap information will be the following values.

Multitap ID = A0
Number of connectors = PER_MCON_NCON_UNKNOWN


What is the "mega drive" of PER_ID_MD?

Q)
What is the "megadrive" of PER_ID_MD?

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


The peripheral connected to the multi-tap suddenly becomes inoperable.

Q)
The peripheral connected to the multi-tap suddenly becomes inoperable.

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

If the problem still occurs after making the above changes, re-execute the PER_Linit function when the status of "Not connected" is returned.
(If "Not Connected" is returned even after repeating several times, please consider that it is really unconnected.)


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, specify the size required by the application for the peripheral size. (Example: When analog data is required for 3 axes 5)
Use PER_LGetPer () to get the peripheral data.

Racing controllers, mission sticks and multi-controllers all have analog device IDs and the same data format, but different data sizes.

The application should use this information to determine what peripherals are currently connected.
Buttons specific to peripherals are compatible with the following data formats.


It doesn't work when I connect an analog device to a multi-tap.

Q)
When I connect the analog mission stick to the multi-tap, it takes a long time to get the peripheral ID.

A)
When the mission stick is connected to the multi-tap, the information cannot be acquired correctly in terms of HARDWARE. There is no need for the application to handle such a connection.


BackForward
FAQSBL programming related
Copyright SEGA ENTERPRISES, LTD ,. 1997