★ INDEX ▲ | STN-5 | STN-6 | STN-9 | STN-18 | STN-19 | STN-21 | STN-22 ▼
STN-18
Usage restrictions on system programs
issue number: | STN-18 |
|---|
date of issue: | 95/01/20 |
|---|
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: | Restriction on use of SYS_SETSINT () function from slave CPU |
|---|
Contents
When the SYS_SETSINT () function is used from the slave SH, the correct default value is not written to the corresponding vector in the slave vector table indicated by the vector number Num.
Do not perform the default registration method of specifying the address with 0 in this way from the slave SH.
There is no problem in operating the master and slave vector tables from the master SH. If you need to restore the slave vector to the default registration for this, use the following method.
■ Operation method
- ● When the slave SH operates the slave vector independently
- In the case where the slave SH program resides in the work RAM, if the slave uses interrupt processing properly according to the situation, first (when the default can be obtained),
- func_org = SYS_GETSINT (Num);
- After saving in a variable and registering and updating the target processing routine,
- SYS_SETSINT (Num, func_1st);
::
SYS_SETSINT (Num, func_2nd);
::- To return to the default, register the first address.
- SYS_SETSINT (Num, func_org);
- ● When the master SH operates the slave vector
- If the slave SH program is read for each stage and the master frequently turns the slave on and off, the slave vector should be initialized before the master turns the slave on or after it is turned off. , From the master SH at the above timing,
- SYS_SETSINT (Num + 0x100, 0);
- To execute.
By adding 0x100 to the vector number, the method of operating the slave vector from the master SH can also be performed in the normal processing routine registration.
that's all
★ INDEX ▲ | STN-5 | STN-6 | STN-9 | STN-18 | STN-19 | STN-21 | STN-22 ▼
Copyright SEGA ENTERPRISES, LTD., 1997