ListReference

function

slSynch


Wait for the next video display

Form

    #include "sgl.h"

    void slSynch (void);

argument

    void --Do not give anything.

Number of returns

    void --Nothing is returned.

function

    Wait for the next video display to begin (or the first frame for 2 frames).
If there is a processing failure in the previous processing, it will end immediately.

Example

    slInitSystem ( TV_320x224 , NULL , 2);
                    ::
    while (-1) {
           ::
      slSynch ();
    }

reference

 slInitSynch
 SynchConst
 SynchCount
 PauseFlag
 WinPtr
 Resolution
 NbPCMBf
 PCMBufFlag
 FRT_Count
 VDP2_TVSTAT
 RandWork 



ListReference

function

slInitSynch


Wait for the next video display

Form

    #include "sgl.h"

    void slInitSynch (void);

argument

    void --Do not give anything.

Number of returns

    void --Nothing is returned.

function

    Initializes the interrupt wait counter and always waits for the next video display to begin before exiting.

Example

    slInitSystem ( TV_320x224 , NULL , -1);
                    ::
    while (-1) {
           ::
      slInitSynch ();
    }

caution


    If the process fails, be sure to wait until the next frame.

reference

 slSynch
 SynchConst
 SynchCount
 PauseFlag
 WinPtr
 Resolution
 NbPCMBf
 PCMBufFlag
 FRT_Count
 VDP2_TVSTAT
 RandWork 



ListReference

function

slIntFunction


Form

    #include "sgl.h"

    void (* func (void));

    void slIntFunction (func);

argument

    void (* func (void))-A pointer to a function to execute during blanking.

Number of returns

    void --Nothing is returned.

function

    Register the function to be executed in the blanking start interrupt processing.
The registered user function is executed after the scroll data transfer.
Specify NULL if you want to delete the registered function.

Example

    void intfunc () {
      call1 ();
      call2 ();
      call3 ();
    }
    slIntFunction (intfunc);

    void intfunc () {
      res = slDivFX (arg1, arg2);
              ::
    }
    slIntFunction (intfunc); / * NG !!! intfunc () uses a divider. * /
                              Think of the functions in the / * math package (fixed decimal and matrix operations) as basically using a divider. * /

caution


    It is not allowed to use a divider inside a function as it is executed during interrupt handling.

reference

 slSynchFunction
 UserFunction 



ListReference

function

slSynchFunction


Form

    #include "sgl.h"

    void (* func (void));

    void slSynchFunction (func);

argument

    void (* func (void))-A pointer to the function you want to execute while waiting for an interrupt.

Number of returns

    void --Nothing is returned.

function

    Register the function to be executed while waiting for the blanking interrupt with the slSynch function. Specify NULL if you want to delete the registered function.

Example

    void syncfunc () {
      call1 ();
      call2 ();
    }
    slSynchFunction (syncfunc);

reference

 slSynch
 slInitSynch 



ListReference

function

slTransferEntry


Form

    #include "sgl.h"

    void * src;
    void * dest;
    Uint16 size;

    Bool slTransferEntry (src, dest, size);

argument

    void * src --Transfer source address.
void * dest --Forwarding address.
Uint16 size --Transfer size.

Number of returns

    Bool --Error code (see below).

function

    Adds to the DMA transfer list that will be executed in the next blanking interrupt.
FALSE is returned when the transfer entry exceeds the buffer.

Example

    void * src = (void *) (0x6090000);
    void * dest = (void *) (0x25e00000);
    Uint16 size = 0x20000;
    slTransferEntry (src, dest, size);

    void * src = (void *) (0x25f00000);
    void * dest = (void *) (0x25e00000);
    Uint16 size = 0x1000;
    slTransferEntry (src, dest, size); / * NG Transfer between the same buses is not possible. * /

caution


    Because it uses the SCU's DMA indirect mode, the source and destination must be on different buses.
There are three buses, each connected via an SCU.
CPU-Bus: IPLROM, WORK RAM, Backup RAM, SMPC A-Bus: CD, Cartridge B-Bus: VDP1, VDP2, SCSP

reference

 TransCount
 TransRequest 



ListReference

function

slNoOperation


do nothing

Form

    #include "sgl.h"

    void slNoOperation (void);

argument

    void --Do not give anything.

Number of returns

    void --Nothing is returned.

function

    Do nothing. Use this when canceling the interrupt registration function or when applying weights.

Example

    slIntFunction ( slNoOperation );

reference

 slIntFunction
 slSynchFunction

return
Copyright SEGA ENTERPRISES, LTD., 1997