#include "sgl.h"
void slSynch (void);
void --Do not give anything.
void --Nothing is returned.
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.
slInitSystem ( TV_320x224 , NULL , 2);
::
while (-1) {
::
slSynch ();
}
slInitSynch | SynchConst | SynchCount | PauseFlag |
WinPtr | Resolution | NbPCMBf | PCMBufFlag |
FRT_Count | VDP2_TVSTAT | RandWork |
#include "sgl.h"
void slInitSynch (void);
void --Do not give anything.
void --Nothing is returned.
Initializes the interrupt wait counter and always waits for the next video display to begin before exiting.
slInitSystem ( TV_320x224 , NULL , -1);
::
while (-1) {
::
slInitSynch ();
}
If the process fails, be sure to wait until the next frame.
slSynch | SynchConst | SynchCount | PauseFlag |
WinPtr | Resolution | NbPCMBf | PCMBufFlag |
FRT_Count | VDP2_TVSTAT | RandWork |
#include "sgl.h"
void (* func (void));
void slIntFunction (func);
void (* func (void))-A pointer to a function to execute during blanking.
void --Nothing is returned.
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.
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. * /
It is not allowed to use a divider inside a function as it is executed during interrupt handling.
slSynchFunction | UserFunction |
#include "sgl.h"
void (* func (void));
void slSynchFunction (func);
void (* func (void))-A pointer to the function you want to execute while waiting for an interrupt.
void --Nothing is returned.
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.
void syncfunc () {
call1 ();
call2 ();
}
slSynchFunction (syncfunc);
slSynch | slInitSynch |
#include "sgl.h"
void * src;
void * dest;
Uint16 size;
Bool slTransferEntry (src, dest, size);
void * src --Transfer source address.
void * dest --Forwarding address.
Uint16 size --Transfer size.
Bool --Error code (see below).
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.
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. * /
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
TransCount | TransRequest |
#include "sgl.h"
void slNoOperation (void);
void --Do not give anything.
void --Nothing is returned.
Do nothing. Use this when canceling the interrupt registration function or when applying weights.
slIntFunction ( slNoOperation );
slIntFunction | slSynchFunction |