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 process the application as follows:

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

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

Figure 3.5 Overview of peripheral data acquisition time optimization

● Operation when the peripheral data collection time is not optimized

Issue the INTBACK command after V-BLANK-IN, after 300 μS, and before V-BLANK-OUT. This makes it possible to reliably start peripheral data collection with V-BLANK-OUT. Peripheral data collection starts when SMPC detects V-BLANK-OUT. The INTBACK command ends when the peripheral data collection is complete.

● Precautions when not optimizing peripheral data collection time

Peripheral data collection completion timing varies depending on the type and number of connected peripherals. As an example, if you consider the configuration of two Saturn standard PADs, all peripheral data will be available in OREG at a much earlier timing than V-BLANK-IN. At this time, if SMPC interrupt is used, peripheral data can be acquired earlier than V-BLANK-IN. In addition, if the OREG used is 32 or less as described above, peripheral data can be acquired at V-BLANK-IN timing without using SMPC interrupts.

● Operation when optimizing the peripheral data collection time

Issue the INTBACK command after V-BLANK-IN, after 300 μS, and before V-BLANK-OUT. This makes it possible to reliably start peripheral data collection with V-BLANK-OUT. When optimizing the peripheral data collection time, SMPC first collects the peripheral data and measures the collection time without optimizing it. The peripheral data collection start timing is the timing when SMPC detects V-BLANK-OUT in the same way as when the peripheral data collection time is not optimized.
From the next frame, the peripheral data collection time is the time when a margin of 1 msec is added to the measurement time, and the 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. If a time over occurs after optimization, V-BLANK-OUT is set as the start timing again and the above optimization is executed.

● Precautions when optimizing peripheral data collection time

The peripheral data collection timing changes depending on the type and number of connected peripherals. When optimizing the peripheral data collection time, clarify the type, number, and combination of corresponding peripherals, evaluate them thoroughly, and prevent the occurrence of time over.
In addition, when accompanied by continue, the waiting time of the continue request is also measured as the peripheral data collection time. Therefore, make sure that the time from the occurrence of the SMPC interrupt to the continue request is as short as possible and that it is executed in a fixed time.


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