HARDWARE ManualSMPC User's Manual
Back | ■
SMPC User's Manual / Chapter 3 Peripheral Control

■ 3.4 Peripheral access protocol

This section shows the peripheral access protocol in SH-2 direct mode.

● About peripheral port bit names

The SMPC peripheral port configuration inherits the Megadrive peripheral port to maintain compatibility with the Megadrive. Therefore, the port bit name is also handled by inheriting the name used in Mega Drive. Table 3.22 shows the correspondence between port bit numbers and port bit names. From now on, in this manual, we will proceed with the explanation using the port bit name.

Table 3.22 Correspondence between port bit numbers and port bit names
 Port bit number
 bit6
 bit5
 bit4
 bit3
 bit2
 bit1
 bit0
 Port bit name
 TH
 TR
 TL
 R
 L
 D
 U

● How to calculate Mega Dry Peripheral ID in SH-2 direct mode

The formula for calculating the Mega Drive Peripheral ID is shown below.
The Mega Dry Peripheral ID is represented by 4 bits, ID3 ID2 ID1 ID0.

ID3 = R # L (TH = 1) ID2 = D # U (TH = 1) ID1 = R # L (TH = 0) ID0 = D # U (TH = 0)

# Indicates the OR.

● Port setting when acquiring Mega Drive Peripheral ID

Table 3.23 shows the port direction register settings when acquiring the MegaDrive peripheral ID. You can set the port direction as follows, read the RLDU when TH = 1 and the RLDU when TH = 0, and calculate the MegaDrive peripheral ID using the above formula.
After changing TH, lead R, L, D, and U after 2 μS.

Table 3.23 Port direction register setting values when acquiring the MegaDrive peripheral ID
 Port bit name
 TH
 TR
 TL
 R
 L
 D
 U
 Port direction
 Set to output
 Set to input 

● Mega Drive Peripheral ID for each peripheral

Table 3.24 shows the megadrive peripheral ID for each peripheral.

Table 3.24 Megadrive Peripheral ID for each peripheral
 Peripheral name
 Mega Drive Peripheral ID
 Mega Drive 3 Button PAD
 DH
 Mega Drive 6 Button PAD
 DH & CH
 Sega Mouse
 3H
 Sega tap
 7H
 Saturn standard putt
 BH
 Saturn analog joystick
 5H
 Saturn keyboard
 5H
 Saturn multitap
 5H

Note "Saturn standard pad", "Saturn analog joystick", "Saturn keyboard", and "Saturn multi-tap" are development names.


Back | ■
HARDWARE ManualSMPC User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997