Japanese
INDEX ▲ | STN-49 | STN-50 | STN-51 | STN-52

STN-52

Backup library work area size


 issue number:
STN-52
 date of issue:
96/11/07
 media:
●Common ○CD-ROM ○Cartridge ○Others
 connection:
●Program ○Hard ○Manual ○Tools ○Game ○ Bug ○Others
 Information distinction:
●New ○Change ○Addition
 importance:
●Strict observance ○Recommended ○Reference ○Others
 attached file:
●No ○ Yes
 Subject supplement:

Contents

■Destruction of variable area

If 8192 bytes of work area are secured for the backup library, other variable areas may be destroyed under the following conditions.

  1. When creating data of maximum size
  2. When using the last 30 blocks of the block access table (2048 blocks)

This is because the block access table uses 8192 bytes (2048 blocks), which leaves 120 bytes of the variable area used by the backup library, so the last 120 bytes (30 blocks) of the block access table are used by other variable areas. Because it will destroy it.

  Before change           After Change    
+−−−−−−−−−−+−−−−−−−−−− +−−−−−−−−−−+−−−−−−
| Variable |    ↑      | Variable |    ↑ 
| area     |           | area     |      
| 120 bytes|           | 120 bytes|      
+−−−−−−−−−−+           +−−−−−−−−−−+      
|     ↑    | Definition|     ↑    |      
| Block    | size      | Block    |      
| access   | 8192 bytes| access   |Definition 
| table    |           | table    |size
|8192 bytes|    ↓      |8192 bytes|8312 bytes
+ − − − − −+−−−−−−−−−− +          +      
|          |←This part |          |      
|          | will be   |          |      
|     ↓    | destroyed |     ↓    |    ↓ 
+−−−−−−−−−−+ − − − − − +−−−−−−−−−−+−−−−−−

Note: "Variable area = 120 bytes" is the variable area used by the backup library.

■Countermeasures

Please reserve 8312 bytes of work area for the backup library.
The reason for this is

The total is 8312 bytes.

The block access table uses longword access (4 bytes), so define it as Uint32.

■Example

Uint32 BackUpRamWork[2048+30];
that's all
INDEX ▲ | STN-49 | STN-50 | STN-51 | STN-52
Copyright SEGA ENTERPRISES, LTD., 1997