When using this document, keep the following in mind:ntialGeneral 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 the
document. SEGA may make improvements and/or changes in the product(s) and/or the
program(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.
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 third
party.

Co

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.

SE

NOTE: A reader's comment/correction form is provided with thisdocument. Please address comments to :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.

(11/2/94- 002)

1
1
2
3
5
6
6
6
7
10

nfi

1.0 Summary
1.1 Library Configuration
1.2 Overview of Stream System Functions
2.0 Definition of Terminology and Abbreviations
3.0 Module Configuration
4.0 Overview of Stream Access
4.1 Streams and Stream Groups
4.2 Stream Area
4.3 Stream Access Procedure
4.4 Resident Stream
4.5 Precautions when Adding or Changing
Settings During CD Play
5.0 Stream Access Example
6.0 Data Specifications
6.1 Data Table
6.2 Data Details
6.2.1 Stream Access Status
6.2.2 Transfer Gate Status
6.2.3 Transfer Mode
6.2.4 Fundamental Data
6.2.5 Library Handler
6.2.6 Stream Key
6.2.7 Stream Play Area
6.2.8 Sector Information
6.2.9 Error Control
6.2.10 Transfer Function
6.2.11 Call Function when CD BufferIs Full
6.2.12 Error Function
7.0 Function Table
8.0 Function Details
8.1 Initialization
8.2 Stream Group
8.3 Streams
8.4 Transfer Setting
8.5 Read Information Acquisition
8.6 Transfer Information Acquisition
8.7 Stream Server Execution
8.8 CD Block Operation
8.9 Error Handling
Precautionary Items Regarding Stream System
Library Ver. 0.1

de

nti
al

TM

SE

GA

Co

11
12
14
14
14
14
14
15
15
15
16
17
17
17
18
18
18
19
21
21
21
23
26
29
30
31
34
36

External
Specification
Document
SaturnStream System
Doc. #ST-98-031194

37© 1994 SEGA. All Rights Reserved.

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 to
the 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-98-031194

External Specification Document: Saturn Stream System

Corrections:
Correction

nfi

pg. #

GA

Co

Chpt.

SE

Questions/comments:

Fax:

Where to send your corrections:(415) 802-3963
Attn: Manager,
Developer Technical Support

Mail:

SEGA OF AMERICA
Attn: Manager,
Developer Technical Support
275 Shoreline Dr. Ste 500
Redwood City, CA 94065

1994-02-21

deModification
Addition
Addition
ChangeAddition
Addition
Addition
Addition
Addition
Addition
ChangeChangeChangeChangeChangeChangeChangenfi

Access Image Diagram• StmArea• StmSct• StmKey• STM_SetCdbufFull• STM_OpenResi• STM_ConnectCdbuf• STM_MoveCdbuf• STM_StartTrans• STM_SetTrFad• STM_OpenFid• STM_OpenFrange• STM_SetKey• STM_GetInfo• STM_EraseCdbuf• STM_GetSctInfo• STM_GetErrStatntialHistory of Modifications

SE

GA

Co

• The stream read program modification in accordance with the STM_OpenFid change.
• The transmission function specification change and the corresponding change to the 5. (2)Transmission Function Example.
• Make it so that the word No. and not the byte No. are used for the data No.

1. Function Access from Remaining CD Buffer Capacity
Add the function STM_SetCdbufFull.

nti
alStream System Review and Other Items of Study

This function allows the registered function to be accessed when the capacity remaining in the CD
buffer is less than the set value.
2. Resident Stream Handling
Add the functions STM_OpenResi and STM_SetTrFad.

deNormally, the data that is read into the CD buffer is transmitted to the host area when the playposition reaches the transmission start FAD. Stream data that has been opened by STM_OpenResi,
however, is resident in the CD buffer even after being transmitted to the host area. This stream iscalled a resident stream. When the transmission start FAD is reset (STM_SetTrFad) after residence,
data is again transmitted when the play position reaches the set transmission start FAD.

nfi

This function can handle the steam as a SIMM file or SCSI file in the same way as a file on a CD isnormally handled. In this case, however, the stream is not resident on the CD buffer, so data is readfrom the SIMM or SCSI each time the stream is accessed.
For details, refer to External Specifications, Section 4.4 Resident Stream.

Co

3. Acquiring Actual Data Size After Data Transmission Has Begun
For the transmission function, there is a high possibility that the actual data size acquisition functions (STM_SctToByte and STM_ByteToSct) will be used, so add the function STM_StartTrans.
In addition, delete the transmission address from the transmission function argument and thenmake acquisition as the function value of STM_StartTrans. The actual data size acquisition function
is to be used before STM_StartTrans is accessed.
4. Setting and Acquiring the Data No.
For the stream system, the word No. and not the byte No. is to be used for the data number.

SEGA

5. Function Arguments
Changes were made for functions with many arguments so that performance does not degrade
when a struct is made into an argument.

Summary

nti
al

1.0

This document is the external specifications for a library that will allow streams(interleaved files, etc.) on CD to be efficiently read
1.1
Library Configuration
The library configuration for CD-related items is shown in Figure 1.1.

deApplication
Split Moving screen Play Library
MPEG
Library

Stream System
Library

CD Communications

Hardware

CD Block

Interface

SIMM, SCSI Files

Co

nfi

SoftwareFile System
LibaraySE

GA

Figure 1.1 CD Related Library Configuration

External Specification Document:
Saturn Stream System

1

1.2

Overview of Stream System Functions
Supports CD-ROM XA Level File Access• Supports access to mode 2 sector that used a sub header. (Access to mode 1
sector is also possible.)(2)

Supports a Variety of Transfer Methods• The stream data on CD can be transferred to the main CPU area.
• Registering functions makes it possible to process data while reading stream
data from the CD.
• The stream data read into the CD buffer can be freely manipulated.

(3)

Supports Access By File ID• File access is allowed via the file ID (sequence number in the directory)
using the directory management function similar to the file system.

Video1
Video2:
CD

Audio1
Audio2:

StreamSystem

Data1
Data2

GA

Multiple
Interleaved
Streams

Stream Data Acquisition

Co

Stream Selection Conditions
Transfer Destination Setting

nfiApplication

de

nti
al

(1)

:

Stream Selection(Header, Sub Header)

Data Transfer and Conversion
Transfer Control

Buffer 1

Buffer 2

Transfer
Function
Output Destination
ControlSE

Figure 1.2 Overview Diagram of Stream System

2

Table 2.1 Terminology Chart

Word

nti
al

2.0Definition of Terminology and Abbreviations

Meaning

StreamThe flow of logically connected data that has been classified via a
sub header.
The key when a stream is read into a CD buffer. The stream key
comes from the frame address range, file number (FN), channel
number (CN), sub mode (SM), and coding information (CI). With
respect to the sub mode (SM) and coding information (CI), themask pattern comparison pattern can be specified. In this case thesector that is

Stream Key{SMCI } & mask pattern == comparison pattern)(

Transfer Start FAD

A collection of streams.
The stream in a stream group that is the last stream to be played.
The return stream after a stream group’s end stream has been
played back.
The pick up position for starting the transfer of data read into the
CD buffer to the program buffer, etc.
The gate when data read into the CD buffer is transferred to theprogram buffer, etc. Closing this gate allows stream data to beaccumulated in the CD buffer.

nfiTransfer Gatedeis the sector that is read.
Stream GroupEnd Stream
Loop Start Stream

Co

CD Drive

Read

GA

CD Buffer

Stream Access

Main CPU Area

SE

Figure 2.1 Stream System Data Flow

External Specification Document:
Saturn Stream System3Abbreviation

Meaning
general file systemstreamstream group handle
stream handle
transfer mode
buffer number
coding information
channel number
frame address
file ID
file number
file nameloop stream
play area
sector information
sub mode
sector number
sector type

de

GFS
STM
StmGrpHn
StmHn
TrMode
bn
ci
cn
fad
fid
fn
fname
loopstm
plyarea
sinfo
sm
sn
stype

nti
al

Table 2.2 Abbreviation Chart

SE

GA

Co

nfi

• For other terminology, use the meanings given for the CD communications
interface and the file system.
• For details regarding the directory, refer to File System (GFS) Directory.

4

3.0

Module Configuration

ApplicationdeBranch Movie Screen
Playback LibraryntialFollowing is the module configuration as seen from the application.

File System

StreamSystemMPEG
Library

CD Communications Interface

nfi

SoftwareFile System
Bottom Module

Hardware

SIMM, SCSI FilesCo

CD Blockshows modules required for use with stream system.

Figure 3.1 Module Configuration DiagramGA

The file system library and CD communications interface library are necessary to use
the stream system library.
Each library uses the following global symbols. The application program must not
use these symbols.

SE

Table 3.1 Symbol Name for Each Library
Abbreviation
Stream system
File system
CD communications
interface

External Specification Document:
Saturn Stream System

Meaning
ST*_*
GF*_*, GP*_*
CD*_*

5

4.0

Overview of StreamAccess

nti
al

4.1
Streams and Stream Groups(1)
StreamSector groups with the same sub headers (FN, CN, SM, CI) and that undergo basically the same processing are called a stream. These sectors do not need to be physically contiguous.

de(2)
Stream GroupInterleaving and recording multiple streams as is done for audio and visual allows
related streams to be synchronized and accessed at the same time. A collection ofsuch related streams is called a stream group.
4.2
Stream Area
Stream areas are stipulated using the following methods.

nfi

(1)
Opening the Stream via File
The file ID can be specified to open the stream (STM_OpenFid). In this case, thestream area is from the start frame address in the file to the end frame address.

Co

The end frame address is actually calculated from the total number of sectors in thestart frame address and file. In the case of interleaved files, the end frame address iscalculated as having been recorded as a defined interleave factor (set interleave).
(2)
Opening the Stream by Directly Specifying the Frame Address Area
The user can open the stream by directly specifying the frame address area
(STM_OpenFrange). In this case, the specified area becomes the stream area.

SE

GA

The frame address area specifies the first frame address and physical sector number.

6

nti
al

4.3
Stream Access Procedure
The following procedure is used to access streams.

Start

Corresponding Function
STM_OpenGrp

Specify Stream Key
and Open Stream

STM_OpenFid
STM_OpenFrange

Set Transfer Destination
and Transfer Function

deOpen Stream GroupSTM_SetTrBuf, STM_SetTrFunc

Yes
Processing Finished?

nfi

Execute User Fixed Processing

STM_ExecServer

Close Stream GroupSTM_CloseGrp

Co

Repeatedly Call Up Server Function

End

SE

GA

Figure 4.1 Stream Access Procedure

External Specification Document:
Saturn Stream System

7

Current Play Position
Stream A
Stream B
Stream C

Play(a) Play Start

de

Play
(b) Seek(c) Loop

CD Buffer

YesNo(e) Data Transfer

DMA, etc.

Co

BufferBlock Anfi

0(d) Compressionntial

The stream access image is shown below.

FAD(Time)

Transfer
Destination
Program
Buffer

(f)

Yes

GA

No

BufferBlock BYes

BufferBlock C

User
Registration
Transfer
Function(g)
User Proprietary
Buffer Management

No(h) Transfer Gate

SE

DeleteFigure 4.2 Overview of StreamAccess

8

Transfer
Destination
Device

nti
al

(a)
Play Start
Of the streams in the stream group, the start FAD begins playing from stream A,
which is the front most stream.

(b)
Seek
When the playing stream has finished, the pickup moves to the start position of thenext stream (stream B) and begins playing.

de

(c)
Loop
When the last stream (stream C) has finished playing, the pickup moves to the start
position of the loop start stream (the default is the front most stream) and begins
playing.
(d)Filter and Buffer Block
Buffer blocks are allotted one-to-one with the streams.

nfi

Sector data that meets the stream key conditions is stored in a buffer block. Sector
data that does not meet the key conditions is sent to the next filter.

Co(e)
Data Transfer
When server functions are called up, the transfer start position and current playposition that is set for each stream is compared, and if there is a stream that hasreached the transfer start position, there will be an attemp to transfer data to theselected transfer area one round at a time.
If the transfer register or DMA come in use during the transfer, the server function
will end at that time, and the next test transfer will start from the next stream.

GA(f)User Registration Transfer Function
Registering the transfer function allows data to be transferred while it is being processed, such as the decompression of compressed data.
(g)
User Proprietary Buffer Management
When the transfer area and transfer function are not specified, the application program itself can manage the CD buffer data.

SE(h)Transfer Gate
Closing and opening the transfer gate temporarily stops the stream flow and thenallows it to flow again. When the transfer gate is closed, the stream data is accumulated in the CD buffer.

External Specification Document:
Saturn Stream System

9

nti
al

4.4
Resident Stream
When relatively short streams need to be transferred repeatedly, they can be opened
as resident streams (STM-OpenResi). Using resident streams allows data to be resident in the CD buffer without requiring the same data to be repeatedly read fromthe CD.

(1)
Reading Resident Streams
Files specified in resident streams are only read into the CD buffer once. Data that isaccessed repeatedly by returning to the loop start stream is not read into the CD
buffer. Therefore, during the first stream access, play must be started from before theresident stream file area.

Stream Groupnfi

Resident Stream A

deWhen the resident stream is opened during stream access and the play position has
passed the resident stream area, care must be taken that the data is not read into the
CD buffer.

Stream B

Stream C

Co

First Time
Second Time On

Not Read After First Time

GA

0

FAD

Figure 4.3 Resident Stream Read

(2)
Resident Stream Transfer Start Frame Address
Once a resident stream has been read into the CD buffer, the transfer can be performed using optional timing. This timing is set using the transfer start frame address for the resident stream (STM_SetTrFad).

SE

According to the normal stream access, the play position advances, and when it
passes the set transfer start frame address, the stream data that is resident gets
transferred.

10

nti
al

Also, for resident streams, the stream data is not erased from the CD buffer evenafter being transferred to the host area.
(3)
Using SIMM Files and SCSI Files (During Debugging)
It is possible to use SIMM files and SCSI files as resident streams only. When thespecified file is a SIMM file or a SCSI file, the data can be read at each access without
being resident in the CD buffer.

de

4.5
Precautions when Adding or Changing Settings During CD PlayIn the stream system, the settings, such as the stream key, can be dynamicallychanged during CD play. However, after processing has been assigned to the CD
block the change will be delayed until the setting contents become valid.

For this reason, the following functions must be initiated ten sectors or more before
the target position.

Set

Coordinate Position

nfi

Function Initiated10 Sectors or More
StreamFAD

Co

Current Play Position

Figure 4.4 Function Initiation Timing(1)

Functions that Are Delayed Until the Settings Are Valid
Table 4.1 Functions with Corresponding Delays
STM_OpenFid
STM_OpenFrange
STM_OpenResi
STM_Close
STM_SetKey
STM_ConnectCdbuf

SE

GA

Stream opened by file ID
Stream opened by play area
Resident stream open
Stream close
Stream key setting
Filter and CD buffer block connection

External Specification Document:
Saturn Stream System

11

5.0

Stream Access Example

GfsFidStmGrpHn
StmHn
StmKeyUint16nti
al(1)Stream Read
Read the three streams A, B, and C into a_buf, b_buf, and c_buf respectively.
a_id, b_id, C_id;/* file ID
abc_grp;/* stream group handler
a_stm, b_stm, c_stm;/* stream handler
key;/* stream key
a_buf[ABUF_SIZE], b_buf[BUFSIZE], c_buf[C_BUFSIZE];/* transfer area

*/
*/
*/
*/

/* file system initialization/* stream system initialization

*/
*/

*/

/* stream group open

*/

nfi

/* file ID acquisition
a_id = GFS_NameTold(...);.
.
.
abc_grp = STM_OpenGrp();de

GFS_Init(...);
STM_Init()*//* stream key setting/*
STM_Key_CN(&key) = STM_CN_NONE;/* channel No. */STM_KEY_CICMP(&key) = STM_KEY_CIVAL(&key) = STM_CI_NONE; /* coding INF */*/= STM_SM_VIDEO; /* video*/
stream/* stream A */= STM_SM_AUDIO; /* open*/
stream/* stream B */= STM_SM_DATA; /* data stream */Co/* stream open by file ID
STM_KEY,SMCMP(&key) =STM_KEY_SMAVAL(&key)
a_stm = STM_OpenFid(abc_grp, a_id, &key);
STM_KEY_SMCMP(&key) =STM_KEY_SMVAL(&key)b_stm = STM_OpenFid(abc_grp, b_id, &key);
STM_KEY_SMCMP(&key) =STM_KEY_SMVAL(&key)c_stm = STM_OpenFid(abc_grp, c_id, &key);GA/* transfer area setting */STM_SetTrBuf(a_stm, a_buf, A_BUFSIZE);STM_SetTrBuf(b_stm, b_buf, B_BUFSIZE);STM_SetTrBuf(c_stm, c_buf, C_BUFSIZE);STM_SetExecGrp(abc_grp);/* stream C *//* actual group settingSE/* stream access */while (1) {if (STM_ExecServer() == STM_EXEC_COMPLETED) {break;/* stream access end}
user();/* user processing}
STM_CloseGrp(abc_grp);/* stream group close

12

*/

*/
*/
*/

(2)

Transfer Function Settingntial

For program (1), make the following changes when using the function“decodeFunc” to transfer stream B’s data while it is being decompressed.
(a)Change the underlined STM_SetTrBuf to STM_SetTrFunc.
STM_SetTrFunc(b_stm, decodeFunc, readBuf);

This change makes the decodeFunc operate every time the server function
STM_ExecServer is called.
The “decodeFunc” becomes as shown below:
Uint16readBuf[READBUF_SIZE];

de

(b)

Sint32 decodeFunc(void *obj, StmHn stm, Sint32 nsct)
Sint32
Sint32i;read_len;Sint32
Uint16
Sint32

nword:
*src;
adlt;

*/

src = STM_StartTrans(stm, &adlt);/* Start transfer.

*/buffer = (Uint16 *)obj;/* The STM_SetTrFunc’s No.3*/
argument crosses over to the obj.

nfi/* Word number transferred by
sub_func.
/* Transfer word number/* Transfer address/* Part of address changed every
one-word transfer
/*
(word
unit)
/* Transfer area/* Change from sector number toword number.
/* Call STM_SctToWord before
start transfer.

GA

Co

Uint16*buffer;nword = STM_SctToWord(stm, nsct)

*/
*/
*/
*/

*/
*/
*/

for (i = 0; i < nword; i += read_len) {buffer += sub_func(src, adlt, buffer, &read_len);src += read_len * adlt;}
return (nsct);/* Returns decompressed
word count/* Return transfer
sector count

*/

*/

SE

}

(c)
(d)

If data transfer has not ended when decodeFunc ends, (-1) must be returned.
Transfer must be done in sector units.

External Specification Document:
Saturn Stream System

13

6.0

Data Specifications

6.1
Data TableThe stream system data is shown in Table 6.1.
Table 6.1 Data Table
Data
Stream Access Status
Transfer Gate Status
Transfer Mode
Fundamental Data
Library Handler
Stream Key
Stream Play Area
Sector Information
Error Control
Transfer Function
Call Function when CD Buffer Full
Error Function

6.2.1

Data Details
Stream Access Status

de

Data
Stream Access Status

Data Name
StmAcStat

No.
1.0

Co

Title
Data Specifications

StmGrpHn, StmHn
StmKeyStmFrange
StmSctStmErr
StmTrfunc
StmFullfunc
StmErrfunc

No.
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
9.0
10.0
11.0
12.0

nfi

6.2

Data Name
StmAcStat
StmGateStmTrModentialThe stream system data specifications are listed below.

Table 6.2 Stream Access Status
Constant Name
STM_EXEC_COMPLETED
STM_EXEC_PAUSE
STM_EXEC_DOING
STM_EXEC_WAIT

Stream Access Status
Access completed
Access pause
AccessingTransfer wait

GA

When the stream cannot be accessed under the following conditions, the constantbecomes STM_EXEC_WAIT.
Table 6.3 Conditions that Becomeransfer
T
Wait
Transfer Gate
OpeningSE

Closing

6.2.2

Transfer Gate Status

Title
Data Specifications

14

Condition•When the transfer area is full.
•When the empty area in the CD buffer disappears before
transfer start FAD is reached.
•When the stream read has ended.
•When the CD buffer is full.

Data
Transfer Gate Status

Data Name
StmGateNo.
2.0

Constant Name
STM_GATE_OPEN
STM_GATE_CLOSE

Transfer Gate Status
Open status
Closed status• The default is STM_GATE_OPEN.
Transfer Mode

Title
Data Specifications

Data
Transfer Mode

Data Name
StmTrMode

No.
3.0

de

6.2.3

nti
al

Table 6.4 Transfer Gate Status

T able 6.5 Transfer Mode

Transfer Method
SCU DMA

STM_TR_BDMA0
STM_TR_BDMA1
STM_TR_SDMA0
STM_TR_SDMA1
STM_TR_CPU

DMA burst channel 0
DMA burst channel 1
DMA cycle steal channel 0
DMA cycle steal channel 1
Softwarenfi

Constant Name
STM_TR_SCU

Load on CPU
If the transfer destination is on B
bus the CPU is working completely
independently.
CPU is stopped.
CPU is stopped.
Lower CPU processing capacity.
Lower CPU processing capacity.
The CPU is occupied but
interruption processing ispossible.

6.2.4

Co

• The default is STM_TR_SCU.
Fundamental Data

Title
Data Specifications

Data
Fundamental Data

Data Name

No.
4.0

Table 6.6 Fundamental Data

SEGA

Type Name
Uint8
Sint8
Uint16
Sint16
Uint32
Sint32Bool

6.2.5

Explanation
Uncoded 1-byte integer
Coded 1-byte integer
Uncoded 2-byte integer
Coded 2-byte integer
Uncoded 4-byte integer
Coded 4-byte integer
Logic type. Takes the following values:
False
True

Library Handler

Title
Data Specifications

External Specification Document:
Saturn Stream System

Data
Library Handler

Data Name
StmGrpHn, StmHn

No.
5.0

15

Type Name

Explanation

StmGrpHn
StmHn

Stream group handler
Stream handler

6.2.6

Stream Key

Title
Data Specifications

Data
Stream Key (1/2)

Data Name
StmKeyData Definitions

typedefstruct {Sint16
Sint16
Sint16
Sint16
Sint16
Sint16fn;
cn;
smmsk;
smval;
cimsk;
cival;/* File No.
/* Channel No.
/* Sum mode mask pattern/* Sub mode comparison value/* Coding information mask pattern/* Coding information comparison value} StmKey;(2)

Access Macro
STM_KEY_FN(stmkey)
STM_KEY_CN(stmkey)
STM_KEY_SMMSK(stmkey)
STM_KEY_SMVAL(stmkey)
STM_KEY_CIMSK(stmkey)
STM-KEY-CIVAL(stmkey)

Constant
File No.
STM_FN_NONE No file No. is specified.

(b)Channel No.
STM_CN_NONE No channel No. is specified.

Co

(3)
(a)

Data
Stream Key (2/2)

Constants for Sub Mode Specification

Constant Name

Type of Sector Read

STM_SM_AUDIOSTM_SM_VIDEO
STM_SM_DATA
STM_SM_NONE

Audio sector
Video sector
Data sector
No specification

SE
16

Data Name
StmKeySub Mode
The sector that is sector sub mode & smmsk == smval is read.
Table 6.8

(d)

*/
*/
*/
*/
*/
*/

((stmkey)->fn)((stmkey)->cn)((stmkey)->smmsk)((stmkey)->smval)((stmkey)->cimsk)((stmkey)->cival)

GA

Title
Data Specifications

(c)

No.
6.0

nfi

#define#define#define#define#define#define

de

(1)

nti
al

Table 6.7 Library Handler

Coding Information
The sector that is coding information & cimsk == cival is read.

No.
6.0

6.2.7

Coding information is not specified.

Stream Play Area

Title
Data Specification

(1)

Data
Stream Play Area

Data Definition

typedefstruct {Sitn32
Sitn32} StmFrange:/* Play start FAD/* Play sector No.

Access Macro#define#define

STM_AREA_SFAD(plyarea)
STM_AREA_FASNUM(plyarea)

Constant
Table 6.9

Sector Information(1)

Sector Position
Disk beginning FAD
Sector count when read to end of disk

Data
Sector Information

Co

Title
Data Specifications*/*/

Constants for Play Area Specification

Constant Name
STM_FAD_CDTOP
STM_FAD_CDEND

6.2.8

No.
7.0

((plyarea)->sfad)((plyarea)->fasnum)

nfi

(3)

Data Name
StmFrange

de

(2)

sfad;
fasnum;nti
al

STM_CI_NONE

Data Name
StmSctNo.
8.0

Data Definition

typedefstruct {Sint32
Sint32
Sint32
Uint8
Uint8

fad;
fn;
cn;
sm;
ci;

/* Frame address/* File No.
/* Channel No.
/* Sub mode/* Coding information

*/
*/
*/
*/

(2)

GA

} StmSct;

Access Macro

STM_SCT_FAD(sct)
STM_SCT_FN(sct)
STM_SCT_CN(sct)
STM_SCT_SM(sct)
STM_SCT_CI(sct)SE#define#define#define#define#define
6.2.9((sct)->fad)((sct)->fn)((sct)->cn)((sct)->sm)((sct)->ci)

Error Control

Title
Data Specifications

External Specification Document:
Saturn Stream System

Data
Error Control

Data Name
StmErr

No.
9.0

17

Data Definition

typedefstruct {Sint32
Sint32
StmErrFunc
Void

code;
where;
func
*obj;

nti
al

(1)

/* Error code/* Error occurrence location/* Call function when error occurs.
/* Call function’s first argument} StmErr;

Access Macro#define#define#define#define

STM_ERR_CODE(err)
STM_ERR_WHERE(err)
STM_ERR_FUNC(err)
STM_ERR_OBJ(err)((err)->code)((err)->where)((err)->func)((err)->obj)

6 . 2 . 1 0 Transfer Function
Title
Data Specifications[Output]

Sint32
obj
stm
nsct
None

Data Name
StmTrfunc

No.
10.0

(*StmTrFunc)(void *obj, StmHn stm, Sint32 nsct):Registration object:Stream:Sector No.

nfi[Format][Input]

Data
Transfer Function

de

(2)

*/
*/
*/
*/

Title
Data Specifications

Data
Call Function when CD Buffer Is Full

void
obj
None

Data Name
StmFullfunc

No.
11.0

Data Name
StmErrfunc

No.
12.0

(*StmFullFunc)(void *obj):Registration object

GA[Format][Input][Output]

Co

6 . 2 . 1 1 Call Function when CD Buffer Is Full

6 . 2 . 1 2 Error Function
Title
Data Specifications

void
obj
None

SE

[Format][Input][Output]

18

Data
Error Function(*StmErrFunc) (void *obj):Registration object

7.0

Function Table

Table 7.1

Function Table (1)Function Name
STM_Init

STM_OpenGrp
STM_CloseGrp
STM_GetStmNum
STM_GetStmHndl
STM_SetCdbufFull

SE

GA

Co

nfi

de

Function
Initialization
Stream system initialization
Stream GroupStream group open
Stream group close
Stream count acquisition
Stream handler acquisition
Call function registration when CD buffer is fullStreamStream open using file ID
Stream open using play area
Resident stream open
Stream close
Stream key setting
Stream information acquisition
Change from sector count to word count
Change from word count to sector countTransfer Setting
Transfer area setting
Transfer function setting
Transfer start in transfer function
Transfer gate open and close
Setting maximum transfer sector count
Setting transfer start FAD
Setting transfer mode
Transfer area reset
Read Information Acquisition
CD buffer block’s sector count acquisition
Read sector information acquisition
Transfer Information Acquisition
Transfer area’s data count acquisition
Transfer area full check
Stream Server Execution
Server execution group specification
Server execution
Play position setting
Loop start stream specification
Execution status acquisition
Stream access end check
Stream data transfer

ntial

A list of the functions found in the stream system is given in Table 7.1.

External Specification Document:
Saturn Stream System

STM_OpenFid
STM_OpenFrange
STM_OpenResi
STM_Close
STM_SetKey
STM_GetInfo
STM_SctToWord
STM_WordToSct
STM_SetTrBuf
STM_SetTrFunc
STM_StartTransSTM_SetTrGate
STM_SetTrPara
STM_SetTrFad
STM_SetTrMode
STM_ResetTrBuf
STM_GetNumCdbuf
STM_GetSctInfo
STM_GetLenTrBuf
STM_IsTrBufFull
STM_SetExecGrp
STM_ExecServer
STM_MovePickup
STM_SetLoop
STM_GetExecStat
STM_IsComplete
STM_ExecTrans

No.
1.0
1.1
2.0
2.1
2.2
2.3
2.4
2.5
3.0
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
4.0
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
5.0
5.1
5.2
6.0
6.1
6.2
7.0
7.1
7.2
7.3
7.4
7.5
7.6
7.7

19

Table 7.1

Function Table (2)Function Name
STM_ConnectCdbuf
STM_MoveCdbuf
STM_EraseCdbuf

nfi

de

STM_SetErrFunc
STM_GetErrStat

Co
GA
SE
20

No.
8.0
8.1
8.2
8.3
9.0
9.1
9.2

nti
al

Function
CD Block Operation
Filter and CD buffer block connection
CD buffer block data move
CD buffer block data erase
Error Handling
Registration of call function when error occurs
Error status acquisition

8.1

Function Details
Initialization

Title
Function Specifications[Format][Input][Output][Function Value]

Function
Stream System Initialization

nti
al

8.0

Function Name
STM_Init

No.
1.1

Bool
STM_Init(void)
None
None
Initialization can normally be done:
TRUE
Initialization cannot normally be done: FALSE

Stream Group

nfi

8.2

de

[Function]
Conduct initialization for using the stream system immediately after the
program boot.
[Remarks](a)Must be performed immediately after GFS_Init.

Title
Function Specifications

Function NameSTM_OpenGrp

No.
2.1

Function Name
STM_CloseGrp

No.
2.2

Function Name
STM_GetStmNum

No.
2.3

StmGrpHn
STM_OpenGrp(void)
None
None
Stream group handler
NULL when the stream group could not be opened.

Co[Format][Input][Output][Function Value]

Function
Stream Group Open

[Function]
Opens the stream group.
Title
Function Specifications

void
grp
None
None

GA

[Format][Input][Output][Function Value]

Function
Stream Group Close
STM_CloseGrp(StmGrpHn grp)
:Stream group handler[Function]
Closes the stream group.
Title
Function Specifications

SE[Format][Input][Output][Function Value]

Function
Stream No. Acquisition

Sint32
STM_GetStmNum(StmGrpHn grp)
grp
:Stream group handler
None
Number of streams in the stream group.

[Function]
Acquires the number of streams in the specified stream group.

External Specification Document:
Saturn Stream System

21

Function
Stream Handler Acquisition

Function Name
STM_GetStmHndl

No.
2.4

nti
al

Title
Function Specifications[Format[Input]StmHn
STM_GetStmHndl(StmGrpHn grp, Sint32 nstm)
grp:Stream group handler
nstm:Play sequence No. (0 <= nstm < STM_GetStmNum)
None
Specified play sequence stream handler.
NULL when the pertinent stream does not exist.

[Output][Function Value]

Stream GroupStream A
Stream C
Stream Bde[Function]
Acquires the handler for the streams in the specified stream group.
[Remarks](a)When four streams are in the same stream group as shown below, the playsequence Nos. will be in the order of streams A, B, C, and D.

Figure 8.1[Format]void[Input]

grp
nsct
func
obj
None
None

Function
Call Function Registration when CD
Buffer Is Full

Function Name
STM_SetCdbufFull

No.
2.5

STM_SetCdbufFull(StmGrpHn grp, Sint32 nsct, StmFullFunc func,
void *obj):Stream group handler:Empty sector count:Call function (STM_FL_NULLFUNC when erased):Registered object

GA[Output][Function Value]

FAD

Stream Play Sequence No.

Co

Title
Function Specifications

nfi

Stream DSE[Function]
When the empty areas in the CD buffer fall below the specified value, the called
functions are registered.
[Remarks](a)Registered functions have the following format.
void (*StmFullFunc)(void *obj);(b)Registered objects are turned over to the first argument of the registeredfunction.

22

Streams

Title
Function Specifications[Format][Input][Output][Function Value]

Function
Stream Open Using File ID

Function NameSTM_OpenFid

No.
3.1

nti
al

8.3

StmHn
STM_OpenFid(StmGrpHn grp, Gfsfid, StmKey *key)
grp:Stream group handler
fid:File ID
key
:Stream key
None
Stream handler (NULL when cannot be opened)de[Function]
Opens the stream using the file ID and registers the stream in the specified
stream group.
[Remarks](a)
The stream key file No. is not used.
Title
Function Specifications[Output][Function Value]

Function NameSTM_OpenFrange

No.
3.2

StmHn
STM_OpenFrange(StmGrpHn grp, StmFrange *plyarea, StmKey *key)
grp:Stream group handler
plyarea:Play area
key
:Stream key
None
Stream handler (NULL when cannot be opened)nfi[Format][Input]Function
Stream Open Using Play Area

Co

[Function]
Opens the stream using the play area and registers the stream in the stream
group.
Title
Function Specification[Output][Function Value]

Function NameSTM_OpenResi

No.
3.3

StmHn
STM_OpenResi(StmGrpHn grp, GfsFid, StmKey, *Key Sint32 Fad)
grp
:Stream handler
fid:File ID
key
:Stream key
fad:Transfer start FAD
None
Stream handler (NULL when cannot be opened)GA[Format][Input]Function
Resident Stream Open

[Function]
Opens resident streams.
Title
Function Specifications

SE[Format][Input][Output][Function Value]

void
stm
None
None

Function
Stream Close

Function Name
STM_CloseNo.
3.4

STM_Close(StmHn stm)
:Stream handler[Function]
Closes the specified stream.

External Specification Document:
Saturn Stream System

23

[Format][Input][Output][Function Value]

void
stm
stmkeyNone
None

Function
Stream Key Setting

Function Name
STM_SetKey

STM_SetKey(StmHn stm, StmKey *stmkey):Stream handler:Stream key[Function]
Sets the stream key for the specified stream.

[Input][Output][Function Value

Function Name
STM_GetInfo

StmGrpHn

No.
3.6

STM_GetInfo(StmHn stm, GfsFid *fid, StmFrange *plyarea, Sint32*bn, StmKey *stmkey)
stm:Stream handler
fid:File ID (When opened using the play area (-1))
plyarea:Play areabn
:Buffer block No.
stmkey:Stream key
Corresponding stream groupnfi[Format]Function
Stream Information Acquisition

de

Title
Function Specifications

No.
3.5

nti
al

Title
Function Specifications[Function]
Acquires specified stream information.

[Format][Input][Output][Function Value]

Function
Change From Sector count to Sector
Word

Co

Title
Function Specifications

Function Name
STM_SctToWord

No.
3.7

Sint32
STM_SctToWord(StmHn stm, Sint32 nsct)
stm:Stream handler
nsct:Sector countNone
The word Nos. corresponding to the specified Sector Nos.

SE

GA

[Function]
Acquires the word Nos. from the specified sector areas starting from the
beginning of the data that is written in the CD buffer block.
[Remarks](a)
If a value larger than the read data word count is specified, the read sector countwill return.
(b)
Valid even if Forms 1 and 2 are mixed together.

24

[Format][Input][Output][Function Value]

Function
Change From Word No. to Sector No.

Function Name
STM_WordToSct

No.
3.8

nti
al

Title
Function Specifications

Sint32
STM_WordToSct(StmHn stm, Sint32 nword)
stm:Stream handler
nword:Word countNone
Sector count corresponding to the specified word count

SE

GA

Co

nfi

de

[Function]
Acquires the sector count from the specified word areas starting from the
beginning of the data that is written in the CD buffer block.
[Remarks](a)
If a value larger than the read data word count is specified, the read sector countwill return.
(b)
Valid even if Forms 1 and 2 are mixed together.

External Specification Document:
Saturn Stream System

25

Transfer Setting

Title
Function Specifications[Format][Input][Output][Function Value]

void
stm
bufferbufsize
None
None

FunctionTransfer Area Setting

Function Name
STM_SetTrBuf

No.
4.1

nti
al

8.4

STM_SetTrBuf(StmHn stm, Uint16 *buffer, Sint32 bufsize):Stream handler:Transfer area
:Size of transfer area (word unit)[Format][Input][Output][Function Value]

void
stm
func
obj
None
None

FunctionTransfer Function Setting

Function Name
STM_SetTrFunc

No.
4.2

STM_SetTrFunc(StmHn stm, StmTrFunc func, void *obj):Stream handler:Transfer execution function:Registration object

nfi

Title
Function Specifications

de[Function]
Data transfer area is set in the specified stream.
[Remarks](a)
The default transfer mode is DMA from SCU.
(b)
When the transfer function is set, the transfer function has priority.

Sint32
obj
stm
nsct

26

(*StmTrFunc)(void *obj, StmHn stm, Sint32 nsct);:Registered object:Stream:Sector countGA

The transferred sector data is deleted from the CD buffer block.
If data is being transferred at the time of a function end from DMA, etc., (-1) will
be returned.

SE

(b)
(c)

Co

[Function]
Sets the transfer function in the specified stream. (STM_TR_NULLFUNC forerase)[Remarks](a)
The format for the registered function is given below.

[Format][Input][Output][Function Value]

FunctionTransfer Start In Transfer Function

Function Name
STM_StartTrans

No.
4.3

nti
al

Title
Function Specifications
Uint16stm
adlt*STM_StartTrans(StmHn stm, Sint32 *adlt):Stream handler:The portion of the transfer address that changes with each wordtransfer.
Transfer address[Format][Input][Output][Function Value]

FunctionTransfer Gate Open and Close

void
stm
gate
None
None

Function Name
STM_SetTrGate

No.
4.4

STM_SetTrGate(StmHn stm, Sint32 gate):Stream handler:Transfer gate status

nfi

Title
Function Specifications

de[Function]
Begins transfer based on the transfer function.
[Remarks](a)When STM_SctToWord and STM_WordToSct are used for the transfer
function, they should be called before this function is executed.

[Function]
Opens and closes the specified stream’s transfer gate.

[Format][Input][Output][Function Value]

Function
Function Name
Setting Maximum Transfer Sector count STM_SetTrPara

Co

Title
Function Specifications

void
stm
tsct
None
None

No.
4.5

STM_SetTrPara(StmHn stm, Sint32 tsct):Stream handler:Maximum transfer sector count (STM_TR_ALL for all read sectors.)

SE

GA[Function]
Sets the maximum sector count that can be transferred at one time from the CD
buffer block to the transfer area.
[Remarks](a)
The data read into the CD buffer block is divided to a size less than this sector
size and transferred.
(b)
The default is one sector.

External Specification Document:
Saturn Stream System

27

[Format][Input][Output][Function Value]

void
stm
fad
None
None

Function
Setting Transfer Start FAD

Function Name
STM_SetTrFad

STM_SetTrFad(StmHn stm, Sint32 fad):Stream handler:Transfer start FAD setting

No.
4.6

nti
al

Title
Function Specifications[Function]
Sets the FAD that begins transfer of the data in the CD buffer block.
[Remarks](a)
The default is the stream beginning FAD.

[Output][Function Value]

void
stm
tmode
None
None

Function Name
STM_SetTrModede[Format][Input]Function
Setting Transfer Mode

No.
4.7

STM_SetTrMode(StmHn stm, Sint32 tmode):Stream handler:Transfer mode

nfi

Title
Function Specifications[Function]
Sets the transfer method from the CD buffer block to the transfer area.

[Format][Input][Output][Function Value]

void
stm
None
None

FunctionTransfer Area Reset

Co

Title
Function Specifications

STM_ResetTrBuf(StmHn stm)
:Stream handler

SE

GA[Function]
Initializes the transfer destination pointer.

28

Function Name
STM_ResetTrBuf

No.
4.8

8.5

Read Information Acquisition[Format][Input][Output][Function Value]

Function
CD Buffer Block’s Sector count
Acquisition

Function Name
STM_GetNumCdbuf

No.
5.1

nti
al

Title
Function Specifications

Sint32
STM_GetNumCdbuf(StmHn stm)
stm:Stream handler
None
The CD buffer block sector count[Function]
Acquires the sector count that is read into the CD buffer block.

[Output][Function Value]

Bool
stm
sn
sinfo
TRUE
FALSE

Function Name
STM_GetSctInfode[Format][Input]Function
Read Sector Information Acquisition

No.
5.2

STM_GetSctInfo(StmHn stm, Sint32 sn, StmSct *sinfo):Stream handler:Sector No. (The first sector is STM_CDBUF_TOP):Sector information
There is a specified sector.
There is no specified sector.

nfi

Title
Function Specifications

SE

GA

Co

[Function]
Acquires the sector information that is read into the CD buffer block.

External Specification Document:
Saturn Stream System

29Transfer Information Acquisition

Title
Function Specifications[Format][Input][Output][Function Value]

FunctionTransfer Area’s Data count Acquisition

Sint32
STM_GetLenTrBuf(StmHn stm)
stm:Stream handler
None
Data count (word unit)

Title
Function Specifications[Format][Input][Output][Function Value]

Bool
stm
None
TRUE
FALSE

FunctionTransfer Area Full Check

No.
6.1

Function Name
STM_IsTrBufFull

No.
6.2

de

[Function]
Acquires the transfer area data count (word).

Function Name
STM_GetLenTrBuf

nti
al

8.6

STM_IsTrBufFull(StmHn stm)
:Stream handler

When the area size is reached.
When the area size is not reached.

SE

GA

Co

nfi

[Function]
Checks whether the transfer area data count has reached the area size.
[Remarks](a)
The transfer area can be initialized by STM_ResetTrBuf.

30

Stream Server Execution

Title
Function Specifications[Format][Input][Output]

nti
al

8.7

Function
Server Execution Group Specification

void
grp
None

Function Name
STM_SetExecGrp

No.
7.1

STM_SetExecGrp(StmGrpHn grp)
:Stream group handlerde[Function]
Specifies the stream group that is executed by the stream server.
[Remarks](a)When NULL is specified, the stream server is in stop status.
(b)
When the stream group is reaccessed, the stop position is read.
Title
Function Specifications

Function Name
STM_ExecServer

No.
7.2

Function Name
STM_MovePickup

No.
7.3

Sint32
STM_ExecServer(void)
None
None
Stream access statusnfi[Format][Input][Output][Function Value]

Function
Server Execution[Function]
Executes the stream server.

[Format][Input][Output][Function Value]

Function
Play Position Setting

Co

Title
Function Specifications

void
stm
ofs
None
None

STM_MovePickup(StmHn stm, Sint32 ofs)
:Stream handler:Offset from the stream beginning (sector unit)

SE

GA[Function]
Sets the play position of the stream group that contains the stream.
[Remarks](a)Move destination FAD = stream beginning FAD + offset.
(b)
The pickup position is moved by STM_ExecServer.

External Specification Document:
Saturn Stream System

31

[Format][Input][Output][Function Value]

void
grp
loopstm
None
None

Function
Loop Start Stream Setting

Function Name
STM_SetLoop

No.
7.4

nti
al

Title
Function Specifications

STM_SetLoop(StmGrpHn grp, StmHn loopstm):Stream group handler:Loop start stream

Title
Function Specifications

Function Name
STM_GetExecStat

No.
7.5

SINT32
STM_GetExecStat(StmGrpHn grp, Sint32 *fad)grp:Stream group handler
fad:FAD during play
Stream access statusnfi[Format][Input][Output][Function Value]

Function
Execution Status Acquisitionde[Function]
Specifies the stream group’s loop start stream.
[Remarks](a)
Does not loop when NULL is specified.
(b)
When the loop start stream is closed, the beginning stream becomes the loop
start stream.

[Function]
Acquires the execution status of the specified stream group.

[Format][Input][Output][Function Value]

Function
Stream Access End Check

Co

Title
Function Specification

Function Name
STM_IsComplete

Bool
STM_IsComplete(StmHn stm)
stm:Stream handler
None
When stream access has ended
TRUE
When stream access has not ended
FALSE

GA

[Function]
Checks whether access for the specified stream has ended.
[Remarks](a)
The timing of stream access end is given below.

SE

Table 8.1 Stream Access End Timing
Transfer Gate
TimingClosedWhen the read has ended
Open
When the transfer has ended

32

No.
7.6

[Format][Input][Output][Function Value]

Bool
stm
None
TRUE
FALSE

Function
Stream Data Transfer

Function Name
STM_ExecTrans

No.
7.7

nti
al

Title
Function Specifications

STM_ExecTrans(StmHn stm)
:Stream handler
Transferred
Could not transfer

SE

GA

Co

nfi

de

[Function]
Transfers the data of the specified stream in the CD buffer block.
[Remarks](a)Always FALSE when the transfer gate is closed.
(b)
The set transfer mode and maximum transfer sector count are valid.

External Specification Document:
Saturn Stream System

33

CD Block Operation

Title
Function Specification

Function
Filter and CD Buffer Block Connection[Format][Input]void
keystmbufstm[Output][Function Value]

None
None

Function Name
STM_ConnectCdBuf

No.
8.1

nti
al

8.8

STM_ConnectCdbuf(StmHn keystm, StmHn bufstm):Connection origin stream handler:Connection destination stream handler (STM_CON_NULBUF when
disconnected)

de[Function]
Connects the filter in the CD block to the buffer block.
[Remarks](a)Reads from the filter allocated to the connection origin stream to the CD buffer
block allotted to the connection destination stream.
(b)
The same stream handler is specified when returning to the original setting.
(c)Shows connection for when the stream key is set to the OR condition.

Figure 8.2
Title
Function Specifications
void
src
spos
snum

[Output][Function Value]

dst
None
None

A or B

Connection When Stream Key Is Set to OR Condition
Function
CD Buffer Block Data Move

Function Name
STM_MoveCdbuf

SE[Function]
Moves sector data from the buffer block in the CD block to filter.
[Remarks](a)Moves sector data from the CD buffer block allotted to the transfer origin
stream to the filter allotted to the transfer destination stream.

34

No.
8.2

STM_MoveCdbuf(StmHn src, Sint32 spos, Sint32 snum, StmHn dst)
:Transfer source stream handler:Sector position (the beginning sector is STM_CDBUF_TOP):Sector number (count) (STM_CDBUF_END when all the way to theend):Transfer destination stream handler

GA[Format][Input]

Co

B

nfi

A

Connection During Sector Data Move

Function
CD Buffer Block Data Erase[Format][Input]

void
stm
spos
snum

[Output][Function Value]

None
None

Function Name
STM_EraseCdbuf

No.
8.3

de

Title
Function Specifications

ntialFigure 8.3

STM_EraseCdbuf(StmHn stm, Sint32 spos, Sint32 snum):Stream handler:Sector position (STM_CDBUF_TOP for beginning of sector):Sector number (count) (STM_CDBUF_END when all the way to the
end)

SE

GA

Co

nfi

[Function]
Erases sector data in the CD buffer block allotted to the stream.

External Specification Document:
Saturn Stream System

35

Error Handling

Title
Function Specifications[Format][Input][Output][Function Value]

void
func
obj
None
None

Function
Registration of Call Function When
Error Occurs

Function Name
STM_SetErrFunc

No.
9.1

nti
al

8.9

STM_SetErrFunc(StmErrFunc func, void *obj):Call function:Registered object[Format][Input][Output][Function Value]

FunctionError Status Acquisition

StmErr *STM_GetErrStat(void)
None
None
Error control structure

SE

GA

Co

[Function]
Acquires error status.
[Remarks](a)
The details regarding errors have not yet been set.

36

Function Name
STM_GetErrStat

nfi

Title
Function Specifications

de[Function]
Registers the function called when an error occurs.
[Remarks](a)
The details regarding errors have not been decided yet.
(b)
The registered function has the following format:
void (*StmErrFunc)(void *obj);(c)
The registered object is turned over to the registered function’s first argument.
No.
9.2

Precautionary Items Regarding Stream System Library Ver. 0.1

ntial(a) The maximum number of stream groups that can be open at the same time is 12.
(b) The number of streams that can be opened at the same time is a maximum of 24,
including the number of files currently open per file system(c) The handling procedures for errors have not yet been set.

SE

GA

Co

nfi

de

(d) To use the stream system, the file system and CD communication interface mustbe linked.

External Specification Document:
Saturn Stream System

37