******************************************************************
*Readme file name: MANSCL.TXT
*Library prefix: scl
*Library name: VDP2 library
*Version: 1.20
*Creator: K.M
*Created: 1995-03-24
*Comments: None
******************************************************************

[Ver. 1.04->Ver. 1.20 Upgrade Notes]

* Performance Improvement Effects of VDP1 Library Ver. 1.20

When creating the VDP1 library, if SPR_SYNC_VB_OUT is defined 
(default setting), the wait for the sprite frame buffer switch of 
SCL_DisplayFrame() exceeds the V blank period and thereby 
increases the processing time by 1 field.

The scroll register write can be done during the V blank period 
without waiting for SCL_DisplayFrame().

When building the VDP1 library, commenting out this define enables 
scroll screens and sprites to be synced during V blank.

SCL_VBLV.C was modified in this upgrade.

* SCL_SetColOffset Support for Backgrounds

The color offset function now supports backgrounds.

SCL_PRI12.C was modified by this upgrade.

[Revision History]

1. 2nd Step Library (Ver. 0.90)

* Basic compatibility exists at the source code level. Recompiling
  the code allows an application created with the 2nd Step library
  to run as-is.

Caution is, however, required in the following cases:

Problem:

The table initialization function is not used.

Solution:

Perform the appropriate initializations for the new table items.

Problem:

memcpyw() is used.

Solution:

Change the function name to SCL_Memcpyw(). If the affected code 
does not deal with byte transfer prohibited registers and memory 
areas such as those in Color RAM a standard C memcpy() function 
can also be substituted.

* 5 New Function Additions

- SCL_SetRotateCenterDisp()

	Sets the rotation center point for the rotational scroll
	plane.

- SCL_SetCoefficientData()

	Sets scale data in the rotation parameter coefficient table.

- SCL_DisableBlur()

	Disables blur calculations.

- SCL_DisableLineCol()

	Disables the line color screen.

- SCL_AbortAutoVe()

	Aborts auto VE.

* Spec Change for Moving the Rotation Plane along the Z-Axis

The Z coordinate value can now specified even if the rotation 
angle is 0. (Changing values when the rotation angle is 0 is 
visually equivalent to scaling the image.)

* Locating the Rotation Parameter Coefficient Table in Color RAM

An extra item was added to the VRAM configuration data structure 
to enable this feature. (A total of 3 item were added.)

* Rotation Parameter Coefficient Table Setup in 0x400 Increments

2 items have been added to the VRAM configuration data structure 
to enable setup of the rotation parameter coefficient table 
location in 0x400 increments. (A total of 3 items were added.)

* 1 Word Pattern Name Scroll Bug Fix

In the 2nd Step version of the library, a bug existed where 
character pattern data could not be placed in the last half of 
VRAM. This bug has been fixed.

An item has been added to the scroll configuration data structure.

* Enabling Optimization of Execution File Size

The library source code files have been broken down into smaller 
units to allow the creation of smaller executable files.

* Trig Function Bug Fix

A bug existed where the value 1.0 was not used internally in the 
library as the calculation result for sin(90) and cos(0). This 
problem has now been fixed.

2. 3rd Step Library (Ver. 1.00)

* SCL_SetAutoColMix() Bug Fix

A bug in the function was fixed.

* SCL_VblankEnd() Bug Fix

A bug in the function was fixed.

3. Differences from the 3rd Step Library (Ver. 1.02)

* SCL_SetConfig() Bug Fix

An incorrect setup of the rotational scroll plane related to off-
screen processing and plane size was fixed.

* Fix for Last Line Draw Glitch During X and Y Axis Rotation

A bug that created on-screen garbage in the last-drawn line during 
X-axis and Y-axis rotations was fixed.

4. 3rd Step Library (Ver. 1.03)

* Filename Case Change

Changed the compile-time filenames from uppercase to lowercase.

* SCL_SetFrameInterval() Erase-write Bug Fix

A bug that prevented the reliable erase-write settings from being 
made in SCL_SetFrameInterval() was fixed.


* SCL_AllocColRam() Allocation Bug Fix

SCL_AllocColRam() was limited to allocating enough memory for 256 
colors. This problem has now been fixed.


* Line Scroll Performance Degradation Bug Fix

A bug that degraded line scrolling performance was fixed.

5. Library Upgrades

In the 3rd Step library, the VDP2 library register buffer contents 
were documented in order to allow user customization and 
optimization of the library.

The following is a simple description of how to add user 
functions:

* Turn Screen Display ON/OFF (ON/OFF of entire screen display)

[Display ON]

void disp_on()
{
	Scl_s_reg.tvmode |= 0x8000;
	SclProcess = 1;
	SCL_DisplayFrame();/* when frame change is not auto */
}

[Display OFF]

void disp_off()
{
	Scl_s_reg.tvmode &= 0x7fff;
	SclProcess = 1;
	SCL_DisplayFrame();/* when frame change is not auto */
}

* Changing NBG0 X Coordinates Without Using Other Functions

[Code location not restricted]

	Scl_n_reg.n0_move_x=???; (set scroll coordinate)

[Within V blank]

(*(Uint16 *)(0x25f80070)) = Scl_n_reg.n0_move_x;

6. Documentation Errors

As described in the VDP2 hardware specs, the bit map start 
position can only be specified from the start of the bank. The 
VDP2 library documentation contains incorrect information that 
shows a map that starts from the middle of the bank. Please make a 
note of this error in your application design.

[Incorrect]

+---------+
| VRAM A0 | 00000h  RBG0 bit map data (256 color)
|         |
|         |
|         |
+---------+
| VRAM A1 | 20000h Rotation plane coefficient table
|         |
|         | 28000h Rotation parameter table
|         |
+---------+
| VRAM B0 | 40000h NBG0 bit map data (16 color)
|         |
|         | 50000h NBG1 bit map data (16 color)*
|         |
+---------+
| VRAM B1 | 60000h NBG2 character pattern (cell) data (16 color)
|         | 68000h NBG2 map data (16 color)
|         | 70000h NBG3 character pattern (cell) data (16 color)
|         | 78000h NBG3 map data (16 color)
+---------+

[Correct]

+---------+
| VRAM A0 | 00000h RBG0 bit map data (256 color)
|         |
|         |
|         |
+---------+
| VRAM A1 | 20000h Rotation plane coefficient table
|         |
|         | 28000h Rotation parameter table
|         |
+---------+
| VRAM B0 | 40000h NBG0 bit map data (16 color)
|         | 50000h NBG2 character pattern (cell) data (16 color)
|         |
|         | 58000h NBG2 map data (16 color)
+---------+
| VRAM B1 | 60000h NBG1 bit map data (16 color)*
|         |
|         | 70000h NBG3 character pattern (cell) data (16 color)
|         | 78000h NBG3 map data (16 color)
+---------+

****************************end of file***************************
