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:
● Communication ○ CD-ROM ○ Cartridge ○ Other
 connection:
● Program ○ Hard ○ Manual ○ Tools ○ Game ○ Bug ○ Other
 Information distinction:
● New regulations ○ Change ○ Addition
 importance:
● Strict adherence ○ Recommendation ○ Reference ○ Other
 Attachment:
● None ○ Yes
 Subject supplement:

Contents

■ Destruction of variable area

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

  1. When creating the maximum size data
  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) and the variable area used by the backup library is 120 bytes short, so the last 120 bytes (30 blocks) of the block access table is the other variable area. This is because it destroys.

    before after 
+ ---------- + ---------- + ---------- + ------
| Variable area | ↑ | Variable area | ↑ 
| = 120 bytes | | = 120 bytes | 
+ ---------- + + ---------- + 
| ↑ | Definition size | ↑ | 
| | | | 
| Block access | = 8192 bytes | Block access | Definition size | Table | | Table | 
| = 8192 bytes | ↓ | = 8192 bytes | = 8312 bytes + ----- + --------- + + 
| | ← This part is destroyed | | 
| ↓ | | ↓ | ↓ 
+ ---------- + ----- + ---------- + ------

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

■ Countermeasures

Reserve 8312 bytes for the work area used by the backup library.
Of these,

Is a total of 8312 bytes.

Since the block access table is performed by longword access (4 bytes), define it with Uint32.

■ Example

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