Home Page ·Up 1 Level ·Site Map · Send Us Mail · ICDIA Main


script2disc Memory Caching

Preamble:
Script2disc allocates a portion of a CD-i player's memory for a preamble cache. This cache contains the branches and other control information contained in one script that the player will need to execute. Scripts with many Menu, Wait, Text, or Change_crsr commands may create especially large preambles. The size of the cache is usually about 3 times the size of the LARGEST script file in your CD-i application. There are instances, particularly when trying to use basecase 1mb players, where the size of the preamble may cause a particular title to run out of memory. The solution to this problem is to limit the size of the largest script.

Enormous scripts often occur when you try to use a single "include" script to contain branches to all of the scripts in your application. This technique is required for certain plugins whose subroutines use scripts as a parameter, especially if they allow variables in place of the actual script names. If you have a large number of scripts, however, this include script file can get very big, and the resulting preamble cache enormous. If the include script is split up into pieces, i.e. include1.scr, include2.scr, include3.scr, etc., the size of the preamble buffer is considerably reduced, freeing up memory.

Directory Cache:
The runtime directory cache is the memory space reserved by the title for the names of all the scripts on the CD-i disc. Its size is affected by the NUMBER of scripts in the title, and the name length of the script with the longest NAME. It's size in bytes can be calculated by the formula (s+4)*n, where s=the name length of the script with the longest name, and n=the number of scripts in the application. It can be reduced by having fewer, longer, & shorter-named scripts. Potential space savings are much less than the preamble issue above, however, on the order of 5-10K.

Subroutines and Fonts:
Subroutines are normally loaded into memory during use, and then unloaded. If you set the sticky bit on a subroutine module, however, the subroutine is always in memory taking up space. The upside is that it does not require reloading every time you use it, thus speeding up the title.

Fonts have memory preallocated for them, so the more fonts you use in your title, the more memory will be taken up.

QHY Images:
The high resolution FCT/LCT information for these images is stored in memory, so titles using QHY images use 36K more memory than those using lower resolution types.

Compacted Audio:
The use of compacted audio in a title requires the creation of a memory buffer, the size of which is determined by the highest level of audio quality used:


Home Page ·Up 1 Level ·Site Map · Send Us Mail · ICDIA Main