Japanese
HARDWARE ManualSMPC User's Manual
BackForward
SMPC User's Manual/3.1 SMPC Control Mode

◆Optimization of peripheral data acquisition time


SMPC is designed to follow the application processing cycle.

  1. Prepare peripheral data by V-BLANK-IN
  2. Calculate parameters for sprites and scroll surfaces controlled by peripherals
  3. 3D calculation etc.
  4. Draw sprites and polygons
  5. display

The purpose of optimizing peripheral data collection time is to collect peripheral data as close to V-BLANK-IN as possible. In other words, start peripheral data collection as close as possible to V-BLANK-IN, and minimize the time from peripheral data collection until SH-2 acquires peripheral data. Figure 3.5 shows an overview of peripheral data collection time optimization.

Figure 3.5 Operation overview of peripheral data collection time optimization

●Operation when peripheral data collection time is not optimized

Issue the INTBACK command after 300μs after V-BLANK-IN and before V-BLANK-OUT. This allows you to start collecting peripheral data reliably with V-BLANK-OUT. When SMPC detects V-BLANK-OUT, it starts collecting peripheral data. Terminate the INTBACK command when peripheral data collection is complete.

●Notes on not optimizing peripheral data collection time

The timing at which peripheral data collection is completed varies depending on the type and number of connected peripherals. As an example, if we consider the configuration of two standard Saturn PADs, all peripheral data will be available in OREG much earlier than in V-BLANK-IN. At this time, using SMPC interrupts allows you to obtain peripheral data at a faster timing than V-BLANK-IN. In addition, if the configuration uses 32 or fewer OREGs as described above, peripheral data can be obtained at V-BLANK-IN timing without using SMPC interrupts.

●Operation when optimizing peripheral data collection time

Issue the INTBACK command after 300μs after V-BLANK-IN and before V-BLANK-OUT. This allows you to start collecting peripheral data reliably with V-BLANK-OUT. When optimizing peripheral data collection time, SMPC first collects peripheral data without optimizing it and measures the collection time. The peripheral data collection start timing is the same as when the peripheral data collection time is not optimized, when the SMPC detects V-BLANK-OUT.
From the next frame onwards, the peripheral data collection time is the measurement time plus a 1msec margin, and peripheral data is collected at that timing. See Figure 3.5 . After that, we constantly monitor the peripheral data collection time and optimize the data collection time. Also, if a time-over occurs after optimization, the above optimization is executed again with V-BLANK-OUT as the start timing.

●Points to note when optimizing peripheral data collection time

Peripheral data collection timing changes depending on the type and number of connected peripherals. When optimizing peripheral data collection time, clarify the type, number, and combination of supported peripherals, evaluate them thoroughly, and prevent time-overs.
In addition, if a continue is involved, the waiting time for the continue request is also measured as the peripheral data collection time. Therefore, please be careful to keep the time from SMPC interrupt occurrence to a continue request as short as possible, and to execute within a constant time.


BackForward
HARDWARE ManualSMPC User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997