SBL6.0 Scroll Library Contents

1. SBL6.0 Summary

* Original SBL Scroll Functions
* Expanded SGL Scroll Functions
* Bug Fixes

2. Advantages and Disadvantages of Using SBL6.0

* Advantages

- Scrolling Using the Polygon Coordinate System
- Simplified Cycle Pattern Generation

* Disadvantages

- Disadvantages When SGL Polygons are Not Used
- Inability to Use the Original SBL Rotational Scroll Function
- SGL Coefficient Table Data Resolution
- Requirement of Using SGL Work from 0x060ffc00

3. Using the Library

* Using the Original SBL
* Using SBL + SGL Polygons
* Using SBL + SGL Polygons + SGL Rotational Scroll

4. Function Reference

5. Technical Information

* Changed the SclRotreg structures in order to integrate with SGL
* Changed SclRotregBuff from an array to a pointer

******************************************************************

1. SBL6.0 Summary

* Original SBL Scroll Functions

Almost all of the functions available until now can be used.  The
exception is that there are restrictions on the use of certain
functions in the sprite library when the SGL mode is used.  This
restriction is required to match V_Sync processing between SGL and
SBL.  For details, see the sprite function manual as well as
documentation on the SBL scroll function.

* Expanded SGL Scroll Functions

Cycle pattern auto-generation functions as well as rotational
scroll control-related functions can be used.  For details, refer
to the respective function's instructions.

* Bug Fixes

Due to a bug, different map addresses could not be specified for
rotation parameters A and B with the scroll configuration setting
function.  This has now been fixed so that different addresses can
be specified for both parameters.

******************************************************************

2. Advantages and Disadvantages of Using SBL6.0

* Advantages

- Scrolling Using the Polygon Coordinate System

In SGL, a polygon matrix can be used for the scroll plane.
Scrolling utilizing the polygon coordinate system was also
possible with the previous SBL, but it was impractical to
implement.  With SBL6.0, scroll display control is made possible
by using the matrix functions in SGL.

- Simplified Cycle Pattern Generation

Setting cycle patterns, considered to be a difficult concept to
understand, can now be semi-automated.  Until now, programmers
usually got stuck setting up cycle patterns when they wanted to
display a scroll plane.  With SBL6.0, this task is now made easier
with the porting of SGL's cycle pattern auto-generation function.

However, note that there are always limits to optimization.
Therefore, the use of this function is not recommended for
developers who completely understand cycle patterns or those who
want to use them to their limit.

* Disadvantages

- Disadvantages When SGL Polygons are Not Used

When SGL polygons are not used, the advantages of using SBL6.0 are
greatly reduced.  For example, if polygons are manipulated with
the user's own matrix calculation system, it is meaningless to use
the SGL mode.

- Inability to Use the Original SBL Rotational Scroll Function

When the ported SGL scroll function is used, the SBL's original
rotation matrix function cannot be used.  This is due to the
fundamental differences in the coefficient tables for SGL and SBL.
If only the SBL rotation matrix function is used, the SBL scroll
function will operate normally as before.

- SGL Coefficient Table Data Resolution

The resolution of SGL coefficient table data is fairly low, so it
is not geared towards the display of detailed graphics.  As can be
seen from the library's demo programs, the image quality is low.
Use of the SGL scroll function is not recommended if the display
of a detailed image is desired.

- Requirement of Using SGL Work from 0x060ffc00

SGL's system work is mapped from 0x060ffc00.  Since this is not
relocatable, the SGL mode cannot be used by users who wish to use
this memory area for other purposes.

******************************************************************

3. Using the Library

* Using the Original SBL

No changes are required.  Basically, all functions will work.
There is no need to change the LIB files that are linked.

* Using SBL + SGL Polygons

LIBSGL must be linked.  V_sync-related functions in the scroll
library such as SCL_SetFrameInterval and SCL_DisplayFrame cannot
be used.  In addition, instead of using the SCL_Vdp2Init function,
use the slInitSystem function provided in SGL.
For information on V_sync-related functions, see the documentation
on the SGL mode sprite library.

* Using SBL + SGL Polygons + SGL Rotational Scroll

LIBSGL must be linked.  For normal scrolling, SBL functions can be
used as is.  Also, when a user wants to use the rotational scroll
function, it is necessary to execute SCL_SglOn() during
initialization.

Note that there are restrictions on the execution order of these
functions below. Refer to the function reference for more
information.

Rotational scroll parameter functions:

	slRparaInitSet
	slRparaMode

Coefficient table functions:

	slMakeKtable
	slKtableRA
	slKtableRB


******************************************************************

4. Function Reference

* void SCL_SglOn(void);

The SGL flag is turned on during SBL scrolling. The SGL rotational
scroll function can be used by executing this function.
Specifically, the pointer variable is modified so that SBL uses
SGL's rotational scroll plane rotation parameter buffer.
Accordingly, the V_sync parameter transfer portion also passes SGL
parameters.

To use the SGL rotational scroll function, it is necessary to call
the function during the initialization process.

* void SCL_SglOff(void);

The SGL flag is turned off during scroll work.  With the default
setting, SGL scrolling is turned OFF.  Use this function to
disable the expanded SGL scroll functions.  This function is
useful when it is necessary to use the SBL scroll functions
instead.

* void slCurRpara(Uint16 flag);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

* void slDispCenterR(FIXED x,FIXED y);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

* void slKtableRA(void *ktable_adr ,Uint16 mode);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

This function sets the coefficient table-related registers.  In
addition, settings must be made in advance with SCL_SetConfig
since SBL work is read for internal processing purposes.

* void slKtableRB(void *ktable_adr ,Uint16 mode);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

This function sets the coefficient table-related registers.  In
addition, settings must be made in advance with SCL_SetConfig
since SBL work is read for internal processing purposes.
Naturally, normal operations should not be expected if conflicting
settings are made by both SGL and SBL functions.

* void slLookR(FIXED x,FIXED y);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

* void slMakeKtable(void *adr);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

This function creates the coefficient table used by SGL in VRAM.
In addition, settings must be made in advance with
SCL_SetVramConfig since SBL work is read for internal processing
purposes.  Naturally, normal operations should not be expected if
conflicting settings are made by both SGL and SBL functions.

* void slRparaInitSet(ROTSCROLL *ptr);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

This function sets the rotation parameters used by SGL.  In
addition, settings must be made in advance with
SCL_InitRotateTable since SBL work is read for internal processing
purposes.

* void slRparaMode(Uint16 mode);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

* Bool slScrAutoDisp(Uint32 ptr);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

* void slScrMatConv(void);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

* void slScrMatSet(void);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

* void slTVOff(void);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

Enables the screen.  The upper bit of Scl_s_reg.tvmode is changed
by this function.

* void slTVOn(void);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call slInitSystem
during initialization.

Disables the screen.  The upper bit of Scl_s_reg.tvmode is changed
by this function.

* void slZoomR(FIXED x,FIXED y);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call slInitSystem
during initialization.

* void slZrotR(ANGLE angz);

This function was ported from SGL.  This function is used in the
same manner as in SGL.  It is necessary to call SCL_SglOn and
slInitSystem during initialization.

******************************************************************

5. Technical Information

* Change in SclRotreg Structure Size

The structure size of SclRotreg was changed for SGL compatibility
purposes.

The structure size was changed from 0x80 to 0x68.  Be careful when
there are code that are dependent on this structure size.

* Change of SclRotregBuff from an Array to a Pointer

Since SclRotregBuff was changed from an array to a pointer,
caution is required if there are code that are dependent on this
size.
