Japanese
SGL
Programmer's
Tutorial
1. About Sega Saturn 3D Game Library
1.Programming work flow
.Host machine settings
.ICE settings
.Make file settings/execution
.Starting the debugger and initial settings
.Load and run the program
.debug
2.Precautions when using the library
.Numeric values used in the library
 .Coordinate system

2. drawing
1. Polygon
2.Polygon in SGL
.Polygon drawing routine
.Parameters required for drawing polygons
3. Combination of multiple polygons
.Creating a cube
4. Polygon distortion problem
Note: SGL library functions that appeared in this chapter

3. light source
1.Light source
2.Light source settings
Note: SGL library functions that appeared in this chapter

4. Coordinate transformation
1. Coordinate system
2. Projection transformation
.Perspective transformation
.Viewing volume
3.Modeling conversion
.Rotate an object
.Moving objects
.Scaling objects
.Special modeling transformations
.Differences in results due to conversion order
4. Clipping
.2D clipping
.3D clipping
5. Window
.Window concept
.Window settings in SGL
.Resetting the default window
.Sample program
.Scope of influence by window
Note: SGL library functions that appeared in this chapter

[Demo program A: Bouncing Cube]

5. matrix
1. Matrix
2. Object representation using hierarchical structure
 .stack
.Hierarchical structure concept
.Definition of hierarchical structure by Sega Saturn
3. Matrix function
Note: SGL library functions that appeared in this chapter

[Demo program B: Matrix Animation]

6. camera
1. Camera definition and settings
2. Camera settings using “slLookAt”
3.Actual camera operation
Note: SGL library functions that appeared in this chapter

7. Polygon surface attributes
1. Attribute
2.Plane
3.Sort
4.Texture
5.Color
6.Gouraud
7.Mode
8.Command
9.Option

8. scroll
1.Scroll in SGL
2. Scroll unit
3.Screen mode
4.Scroll screen
5.Storing scroll data in memory
.Scroll data type
.Storing scroll data to VRAM
.Notes on storing data in VRAM 1
.Notes on storing data in VRAM 2
.Color RAM
.Storing data to color RAM
6.Scroll function settings
.About VRAM access restrictions
.Character pattern
.Scroll restrictions based on the number of character colors
Scroll restrictions due to .VRAM access
.Pattern name data
.Data type of pattern name data
.About auxiliary data
.page
.Plane
.map
.Reduction settings
.Function settings specific to the rotating scroll screen 1
.Function settings specific to the rotating scroll screen 2
.Flow of scroll settings

7.Drawing a scroll
.Back screen settings
.Display position setting
.Scroll registration
.Notes regarding scroll registration
.Start drawing
.Flow of scroll drawing
8.Normal scroll screen
.Normal scroll screen movement
.Scaling the normal scroll screen
9. Rotating scroll screen
.Rotation scroll movement
.Rotating scroll screen scaling
.Rotate scroll screen rotation
10.Special scrolling function
.ASCII scroll
.Transparent color bit
.Color calculation
.Line color screen
.Color offset
11.Priority
12.Character numerical display
Supplementary note: SGL library functions that appeared in this chapter
9. controller input
1. Input system used in Sega Saturn
2.Actual operation
.Bits used for input system
.Bit operation by input
Handling of device information in .SGL
.Identification of input data
3.Sample program
4.Library functions used in the sample
.sprite function
.Other functions
Note: SGL library functions that appeared in this chapter

Ten. event control
1. Event structure
.Event processing
.EVENT structure
.Event list
2.Event processing using SGL functions
.Initialize the event
.Creating an event list
.Event format
.Execution of event
3. Change event list
.Add event
.Insert event
.Delete an event
.Changing the event list while an event is running
4.Expanding the USER area
.Expansion of user area using work area
.Expansion of user area using event area
5. Notes on event processing
6. Flow of event processing
7. Examples of using events
Note: SGL library functions that appeared in this chapter

11. Arithmetic function
1. General arithmetic functions
2. Trigonometric functions
3. Special calculation functions
Note: SGL library functions that appeared in this chapter

[Demo program C: Walking Akira]

12. CD-ROM library
1.About CD-ROM library
2.CD-ROM access
.Logical structure of CD-ROM
.Load file
.Reading files separately
.About the read-ahead function
Playing .CDDA files
.Other general matters
3.CD library functions
.CDHN file handle
.CDKEY Key for classifying sector data
.CDBUF reading area information
.Sint32 slCdInit (Sint32 nfile, void *work) Initialize
.Sint32 slCdChgDir (Sint8 *pathname) Change directory
.CDHN slCdOpen (Sint8 *pathname, CDKEY key[]) File open
.Sint32 slCdLoadFile (CDHN cdhn, CDBUF buf[]) Load file
.Sint32 slCdTrans (CDHN cdhn, CDBUF buf[], Sint32 ndata[]) Stream transfer
.Bool slCdResetBuf (CDHN cdhn, CDKEY *key) Reset transfer area
.Sint32 slCdAbort (CDHN cdhn) Loading abort
.Sint32 slCdPause (CDHN cdhn) Pause reading
.Sint32 slCdGetStatus (CDHN cdhn, Sint32 ndata[]) Get status
 .Error code

13. backup library
1. Features of backup library
.device
 .File
.Deploying the library
2.Basic processing flow
3.Sample program
Note: Backup library function
14. sound library
1. Sound control overview
2.Sound driver settings
.Set the sound driver and start the MC68000
.Sound data set
.BGM performance
.Sound effect output
.Output of sound effects using PCM sound source
.Functions that affect the overall sound output
3.Memory map
4.Sample program
.Sample program for BGM and sound effect playback test
.PCM sound source playback test sample program
Note: Sound library functions that appeared in this chapter

Demo program summary
[Demo A: Bouncing Cube]
[Demo B: Matrix Animation]
[Demo C: Walking Akira]

(C)SEGA ENTERPRISES, LTD., 1997