When using this document, keep the following in mind:nti
alGeneral Notice

1. This document is confidential. By accepting this document you acknowledge that you are boundby the terms set forth in the non-disclosure and confidentiality agreement signed separately and /inthe possession of SEGA. If you have not signed such a non-disclosure agreement, please contact
SEGA immediately and return this document to SEGA.

de2. This document may include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new versions of thedocument. SEGA may make improvements and/or changes in the product(s) and/or theprogram(s) described in this document at any time.

nfi

3. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document
without SEGA’S written permission. Request for copies of this document and for technicalinformation about SEGA products must be made to your authorized SEGA Technical Services
representative.

Co

4. No license is granted by implication or otherwise under any patents, copyrights, trademarks, orother intellectual property rights of SEGA Enterprises, Ltd., SEGA of America, Inc., or any thirdparty.
5. Software, circuitry, and other examples described herein are meant merely to indicate the characteristics and performance of SEGA’s products. SEGA assumes no responsibility for any intellectual
property claims or other problems that may result from applications based on the examples
describe herein.

GA

6. It is possible that this document may contain reference to, or information about, SEGA products(development hardware/software) or services that are not provided in countries other than Japan.
Such references/information must not be construed to mean that SEGA intends to provide such
SEGA products or services in countries other than Japan. Any reference of a SEGA licensed product/program in this document is not intended to state or simply that you can use only SEGA’slicensed products/programs. Any functionally equivalent hardware/software can be used instead.
7. SEGA will not be held responsible for any damage to the user that may result from accidents or any
other reasons during operation of the user’s equipment, or programs according to this document.

SENOTE: A reader's comment/correction form is provided with thisdocument. Please address comments to :(6/27/95- 002)

SEGA of America, Inc., Developer Technical Support (att. Evelyn Merritt)
150 Shoreline Drive, Redwood City, CA 94065
SEGA may use or distribute whatever information you supply in any way
it believes appropriate without incurring any obligation to you.

SEGACo

nfidentialTM

SEGA SATURNSMPC Sample Program(tentative title)

User's Manual
Ver. 0.56/Edition 0.2
Doc. # ST-214-111594© 1994-95 SEGA. All Rights Reserved.

ntialREFERENCES

In translating/creating this document, certain technical words and/or phrases were interpretedwith the assistance of the technical literature listed below.

Dictionary of Science and Engineering, 350,000 words, 3rd Edition
Inter Press
Tokyo, Japan
1990

2.

Computer Dictionary
Kyoritsu Publishing Co., LTD.
Tokyo, Japan
1978

3.

IBM Dictionary of Computing
McGraw-Hill, Inc.
New York, New York
1994

SEGA

Co

nfide

1.

nti
al

READER CORRECTION/COMMENT SHEETKeep us updated!
If you should come across any incorrect or outdated information while reading through the attacheddocument, or come up with any questions or comments, please let us know so that we can make therequired changes in subsequent revisions. Simply fill out all information below and return this form tothe Developer Technical Support Manager at the address below. Please make more copies of this form if
more space is needed. Thank you.
General Information:

Phone

Document number
Document namedeYour Name

Date

ST-214-111594

SEGA SATURN SMPC Sample Program User's ManualCorrections:
Correction

nfipg. #GACo

Chpt.

SE

Questions/comments:

Fax:

Where to send your corrections:(415) 802-1440
Attn: Sr. Coordinator,
Technical Publications Group

Mail:

SEGA OF AMERICA
Attn: Sr. Coordinator,
Technical Publications Group
130 Shoreline Dr.
Redwood City, CA 94065

ntialdeSEGA SATURNSMPC Sample Program(Tentative Title)

nfi

Version 0.56

User’s ManualSE

GA

Co

Edition 0.2

SATURN SMPC Sample Program1

0. Introduction
0.1
Terms Used in This Manual ......................................... 3
0.2
Changes from Version 0.50 ......................................... 3
1. Program Overview ................................................................ 4
1.1
Program Objective ....................................................... 41.2Program Functions ...................................................... 4de2. Main Menu .............................................................................. 5
2.1
Main Menu Screen ...................................................... 5
2.2
Menu Operation........................................................... 5nti
alContents

3. Peripheral Port Monitor ........................................................ 6
3.1
Peripheral Port Monitor Screen ................................... 6
3.2
Sprite Version Operation ............................................. 8
3.3
RBG Version Operation ............................................... 9nfi

4. SMPC Status Display .......................................................... 10

5. Game (Tentative Title) ..........................................................116. Paint Tools (Tentative Title) .................................................11SEGACo

7. SMPC Command Test ......................................................... 12
7.1
SMPC Command Test Screen .................................. 127.2
SMPC Command Test Operation .............................. 132

0.

Introduction

ntialThis manual explains the SMPC sample program (tentative title).
0.1
Terms Used in This Manual
The terms used in this manual are explained below.

General term for control pads, joysticks, etc., which are connected
into the port(s) at the front of the Saturn unit and are primarily
used to control characters, etc., in games.

Port:

Refers to the connectors on the front of the Saturn unit. Looking at
the front of the Saturn unit, the connector on the left is port 1 andthe connector on the right is port 2.

Port Number:This is 1 or 2 when a peripheral is connected directly to a port. If aMulti-tap, etc., for expanding the number of ports is connected,
then the numbers are 1-1, 2-3, and etc.

nfidePeripheral:

0.2
Changes from Version 0.50
1. Addition of a SMPC command test mode.
Enables issuing of all types of SMPC commands.

Co

2. Expantion of the maximum number of peripherals.
Expands the number of peripherals that can handle from 12 to 30.

SEGA

3. Addition of the peripherals which are compatible with the port monitor.
Improved compatibility for the clocked serial peripherals.

SATURN SMPC Sample Program3

1.

Program Overview

nti
al

1.1 Program Objective
The primary purpose of this program is to issue commands to the SMPC, acquire
peripheral data, etc. It enables to check peripherals by using connected peripherals
to move sprites on the screen.
1.2 Program Functions
This program has the following functions (modes).

de1. Peripheral port monitor (sprite version).
Monitors information of the peripherals connected to each port. Also moves
sprites on the screen.

2. Peripheral port monitor (RBG (rotation scroll) version).
Monitors peripheral information as well. Moves the scroll screen plane on which
information is displayed.

4. GAME (tentative title).
Cannot be used for this version.

nfi

3. SMPC status display.
Displays the status returned from the SMPC by INTBACK.

Co

5. Paint Tools (tentative title).
Enables the drawing of simple figures on screen using the mouse.

SEGA

6. SMPC Command Test (added in this version).
Issues the various kinds of SMPC commands.

42.

Main Menu>PORT MONITOR(SPRITE)PORT MONITOR(RBG)
SMPC STATUS DISPLAY
GAME
PAINT TOOLCOMMAND TEST

nti
al2.1
Main Menu Screen
The following menu is displayed first once the program is executed.

Select the functions to be executed from the menu using the pad.

de2.2
Menu Operation
1. The peripherals that can be used in menu operation are either the standard
Saturn pad, the Mega Drive 3-button pad, the Mega Drive 6-button pad, analog
joysticks, steering controllers, or the Saturn keyboard (these are referred to as“peripherals that are used in menu operation” hereafter).

Indicates Mega Drive 3-button
pad connected to port 2-1.

Co

3B PADP2-1

nfi

2. Of the peripherals that are used in menu operations, the peripheral connected tothe port with the smallest number is the one that actually operates menu screens.
The peripherals that are used in screen operations are confirmed in the small
window at the bottom right corner of the screen.

3. If no peripherals that can be used in menu operation are connected, then a message is displayed in the window at the bottom right of the screen indicating thatthe unit is waiting for a peripheral to be connected.
NOT
READY!

This message is displayed when aperipheral is not connected.

GA

4. If another peripheral that can be used in menu screens is connected, pressing theperipheral start button permits operation of menus on that peripheral.
5. If a peripheral that is being used to operate menu screens is disconnected whenother peripherals that are used to operate menu screens are still connected, thecontrol shifts to the peripheral connected to the port with the smallest number.

SE

6. The triangular cursor is moved by pressing the top or bottom of the + key andselection is made by pressing the A or C button. If the selected menu item cannot
be executed, then “NOT AVAILABLE” is displayed and returns to the menu.
7. To return to the main menu from any menu other than the main menu, press theC button and START button at the same time on any peripheral that is connected.
Menu operations are then performed by the peripheral on which the C button
and START button were pressed.

SATURN SMPC Sample Program

5Peripheral Port Monitor

ntial

3.

The port monitor displays data from the various types of peripherals connected tothe peripheral ports of the Saturn unit. With this version, the maximum number of
peripherals that can be used is 30 (when a clocked serial 15P is connected to both
ports 1 and 2). However, the peripherals displayed on the screen are only the firstseven connected to each of ports 1 and 2.

PORT 1 : DIRECT• SATURN PAD(02)FF

PORT 2 : SEGA TAP• 1 MD 3B PAD• 2 MD 6B PAD
3 ----------------------• 4 SEGA MOUSE

(E2)
(E3)
(FF)
(E3)

FF
FF

(F1)

FF

00

nfi

(04)

FF

00

00

Co

1994/01/01
00:00:30

de3.1 Peripheral Port Monitor Screen
The following screen is displayed when “PORT MONITOR(SPRITE)” or “PORTMONITOR(RBG)” is selected from the main menu.

[SAT]

ML VI VO PD S
23 10 10 15 2

TO MENU(C) SEGA '94

Port Monitor Screen

1. Port Status Display Area
Displays the status of each of ports 1 and 2.

StatusNothing is connected or a device that SMPC does notrecognize is connected.
Peripheral is connected directly.
Multi-Terminal 6 is connected.
SEGA Tap is connected.
Clocked serial peripheral is connected.
Displayed when the correct port status cannot be
obtained for some reason. This may also be displayedwhen some non-compatible peripherals are connected.
"xx" will change depending on the status.

GA

Display (Port Status)
UNKNOWN OR NO DEVICE(F0)SE

DIRECT(F1)
MULTI-TERMINAL 6(16)SEGA TAP(04)
CLOCKED SERIAL (21-2F)
ILLEGAL PORT ID(xx)6ntial2. Peripheral Name Display Area
Displays the types and ID of connected peripherals. When multi-terminal 6 or
SEGA tap is connected, a number is affixed at the beginning of the peripheral
name.
Display (Saturn ID)------------------------------(FF)
(02)
(15)
(14)
(13)
(E1)
(E2)
(E3)

deSATURN PAD
ANALOG STICKKEY BOARDSTEERING CTRL
MD 3B PAD
MD 6B PADSEGA MOUSE

Peripheral
Nothing is connected or a device that SMPC does not
identify is connected.
Saturn standard pad
Analog joy stick
Saturn keyboard
Steering controller
Mega Drive 3-button pad
Mega Drive 6-button pad
SEGA mouse

Peripherals not listed in the above table are not compatible with this version.

nfi

3. Peripheral Data Display Area
Displays data returned by peripherals. Refer to the SMPC manual for the detailsof the peripheral data.
4. Time Display Area
Displays the date and time based on the real-time clock of the SMPC.

Co

5. Program Status Area
Displays the main loop count and V-blank IN/OUT interrupt count in a 2-digit
hexadecimal number, and the total number of bytes of peripheral data and theSMPC interrupt count in decimal number.
Description
Counts up using the main loop of the program.

VI/VO (V-blank IN/OUT interruptcount) (00H-FFH)

Counts up using the V-blank interrupt function (a 16
dividing value is displayed).

PD (the total number of bytes ofperipheral data) (02–)

Displays the total number of bytes in the peripheral
data (includes for the port ID 2 bytes).

SM (SMPC interrupt count) (1–)

Displays the number of times the SMPC interrupt
occures in 1/60th of a second; normally 2 to 3 times.

SEGADisplay (Meaning)
ML (main loop count) (00H-FFH)

SATURN SMPC Sample Program7ntial

3.2 Sprite Version Operation
In the sprite version, sprites on the screen can be moved by all connected peripherals.
A ball-shaped sprite is assigned to each peripheral. The peripheral connected to port 1
is red and the peripheral connected to port 2 is blue. When peripherals are connected
to SEGA tap or Multi-tap 6, the numbers are assigned to the balls. Therefore, the color
and the number of the ball indicate which peripheral port number is used to operate
the ball.
+ key
A button
X button
Y button
Z buttonStart
Joy stick
A button
B button
X button

Steering controller

Co

SEGA mouseThrottle
StartMove
Left click
Right click
Start
Steering
Shift lever
A button
B button
X button

Y button
Z button
Start
Cursor keys
Z key
A key

GA

Saturn keyboard

S key
D key
ESC keySE

Ball movement
Quadruple-speed while depressedToggles between variable and fixed enlargement
modes
Enlargement
Reduction
Moves to initial position and changes to fixed mode
Moves (digital, analog)
Quadruple-speed while depressed (only duringdigital movement)
Digital movement while depressed
Toggles between variable and fixed enlargement
modes
Enlarges and reduces ballMoves to initial position and changes to fixed mode
Moves ball
Enlarges ball horizontally by two times
Enlarges ball vertically by two times
Moves to initial position
Moves ball left and right (digital, analog)
Moves ball up and down
Quadruple-speed while depressed (only during
digital movement)
Digital movement while depressed
Toggles between variable and fixed enlargement
modes
Enlargement
Reduction
Moves to initial position and changes to fixed mode
Moves ball
Quadruple-speed while depressed
Toggles between variable and fixed enlargement
modes
Enlargement
Reduction
Moves to initial position and changes to fixed modedeAnalog joy stickOperation

nfi

Peripheral
Saturn standard pad
Mega Drive 3-button pad
Mega Drive 6-button pad

Variable/Fixed Enlargement Modes
In the variable enlargement ratio mode, the ball can be enlarged or reduced by using
the Enlarge/Reduce button. In the enlargement ratio fixed mode, the ball size is fixedat 16 x 16 pixels.

8nti
al

3.3 RBG Version Operation
The RBG version of the port monitor is basically the same as the sprite version; thedata display screen is operated by the peripheral and not by the sprite.
The peripherals that operates in the RBG version are the peripherals used in themenu screen. The operating method is shown in the table below.

deFunction
Scrolls the screen up and down, and left and right
Enlarges the screen
Reduces the screen
Not usedNot usedNot usedNot usedNot usedNot used
Returns the screen to its initial status

SEGAConfiButton+ keyA button
B button
C button
X button
Y button
Z button
L button
R button
STARTSATURN SMPC Sample Program

94.

SMPC Status Display

ntialDisplays OREG0-15, i.e., SMPC status, in hexadecimal or binary. See the SMPC
manual for details on OREG.

STE/RESDYEAR HYEAR LWEEKDAY/MONTHDAYHOUR
MINUTESECONDCART CODE
AREA CODESYSTEM STATUS 1
SYSTEM STATUS 2
SMEM1 DATASMEM2 DATASMEM3 DATASMEM4 DATA

1994/01/01 [SAT]
01:34:28

ML VI VO PD S
00 00 00 10 2SEGA

Confi

00 (00:00000000)
01 (19:00011001)
02 (94:10010100)
03 (61:01100001))
04 (11:00010001))
05 (01:00000001))
06 (34:00110100)
07 (28:00101000)
08 (03:00000011)
09 (0F:00001111)
10 (2F:00101111)
11 (40:01000000)
12 (00:00000000)
13 (00:00000000)
14 (00:00000000)
15 (00:00000000)

deNo particular operations are performed in the SMPC STATUS DISPLAY. Return tothe main menu by simultaneously pressing the C button and START button on aperipheral that can be used to operate menus.

10TO MENU(C) SEGA 94

5.

Game (Tentative Title)

6.

nti
alCannot be used in this version.

Paint Tools (Tentative Title)

dePaint tools allows the drawing of points, lines and circles on the screen with themouse. The following three functions are used in this version; curved lines (upperleft icon), straight lines (adjacent icon) and boxes (icon below the free-hand icon).
Use the left button on the mouse to select an icon. There is no action when icons
other than above are selected.
Free Curved-Line Tool
Draws a curved line by moving the mouse while holding down the left button.

nfiStraight-Line Tool
Click the left mouse button where the line is to be started and click it again
where the line to be end. When a line is drawn, the end point becomes thestarting point of the next line, thus allowing line to be drawn continuously.

CoBox Tool
As with the straight-line tool, use the mouse to set the starting and ending
corners of rectangles. To draw boxes continuously, begin with the starting
corner again.

SEGA

Always connect the mouse to be used for the paint tools to port 1-1.
To return to the menu, press the C button and START button simultaneously ona peripheral other than the mouse.

SATURN SMPC Sample Program117.

SMPC Command Testntial

Of the 16 different commands, 14 (other than clock check) can be issued for the SMPC.
7.1 SMPC Command Test Screen

SSHON

SSHOFFSNDON

SNDOFF

CDON

CDOFF

CKCHG352

CKCHG320

RESENABRESDISANMIREQ

INTBACKSETSMEMSETTIME00 (80:10000000)
01 (19:00011001)
02 (94:10010100)
03 (00:10000000)
04 (61:01100001)
05 (11:00000000)
06 (01:00010000)
07 (34:00110100)
08 (28:00101000)
09 (03:00000011)
10 (0F:00001111)
11 (2F:00101111)
12 (00:00000000)
13 (00:00000000)
14 (00:00000000)
15 (00:00000000)

deSYSRES

nfi>MSHON00

1994/01/01 [SAT]
01:34:28

ML VI VO PD S
00 00 00 10 2

Co

MASTER SH2' ON

TO MENU(C) SEGA 94

SMPC Command Test Screen

GA

1. Command Menu
A list of the commands issued to the SMPC is displayed here. Select the command
to be issue from them.
2. SMPC Status Area
The SMPC status after issuing the command is displayed. Refer to the SMPC
manual for more information on status.

SE

3. Command Name/Code Display Area
The command name and command code of the current cursor position is displayedhere.

12ntial7.2 SMPC Command Test Operation
The command test operation is nearly the same as that of the main menu. Select acommand using the + key and enter it using the A or C button.

Press the B button to return to the main menu. Do not press the C and START buttons at the same time.

de• SETSMEM and SETTIME commands
When these commands are selected, a small window will open for input of a 4byte memory value or time and date to be input. Use the left and right arrows tomove the cursor and the up and down arrows to increase or decrease a value.
Input with the A or C buttons and cancel with the B button. Invalid dates ortimes can be set as well.

SEGAConfi• CLKCHG352, CLKCHG320 and INTBACK commands
No command is issued when any of these commands are selected.

SATURN SMPC Sample Program

13