Japanese
SGL User's Manual
Function Reference | Structure Reference | SGL Supplementary Manual | SGL System Variable List
SGL REFERENCE

Structure reference


Introduced here are structures, variable types, and macros that are unique to SGL. These are required when programming with SGL, and the content of each definition is also important. Please read carefully along with the “ Function Reference ”.

general purpose constant

NULL
D.I.
E.I.
MAX_NEST
WORK_SIZE
EVENT_SIZE
M_PI
CD_Black
CD_DarkRed
CD_DarkGreen
CD_DarkYellow
CD_DarkBlue
CD_DarkPurple
CD_DarkMagenta
CD_DarkWhite
CD_MediumRed
CD_MediumGreen
CD_MediumYellow
CD_MediumBlue
CD_MediumPurple
CD_MediumMagenta
CD_MediumWhite
CD_SemiRed
CD_SemiGreen
CD_SemiYellow
CD_SemiBlue
CD_SemiPurple
CD_SemiMagenta
CD_SemiWhite
CD_Red
CD_Green
CD_Yellow
CD_Blue
CD_Purple
CD_Magenta
CD_White

DMA related constants

Sinc_Dinc_Byte
Sdec_Dinc_Byte
Sinc_Ddec_Byte
Sfix_Dinc_Byte
Sfix_Ddec_Byte
Sinc_Dfix_Byte
Sdec_Dfix_Byte
Sinc_Dinc_Word
Sdec_Dinc_Word
Sinc_Ddec_Word
Sfix_Dinc_Word
Sfix_Ddec_Word
Sinc_Dfix_Word
Sdec_Dfix_Word
Sinc_Dinc_Long
Sdec_Dinc_Long
Sinc_Ddec_Long
Sfix_Dinc_Long
Sfix_Ddec_Long
Sinc_Dfix_Long
Sdec_Dfix_Long
DMA_CHCR_DE
DMA_CHCR_TE
DMA_CHCR_IE
DMA_CHCR_TA
DMA_CHCR_TB
DMA_CHCR_DL
DMA_CHCR_DS
DMA_CHCR_AL
DMA_CHCR_AM
DMA_CHCR_AR
DMA_CHCR_TS
DMA_CHCR_SM
DMA_CHCR_DM
DMA_DMAOR_DME
DMA_DMAOR_NMIF
DMA_DMAOR_AE
DMA_DMAOR_PR
DMA_CPU_CH0
DMA_CPU_CH1
DMA_CPU_FIX
DMA_CPU_ROR
DMA_CPU_DIS
DMA_CPU_ENA
DMA_CPU_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22
M30
M31
M32
MTRX
mtrx
TV_320x224
TV_320x240
TV_320x256
TV_352x224
TV_352x240
TV_352x256
TV_640x224
TV_640x240
TV_640x256
TV_704x224
TV_704x240
TV_704x256
TV_320x448
TV_320x480
TV_320x512
TV_352x448
TV_352x480
TV_352x512
TV_640x448
TV_640x480
TV_640x512
TV_704x448
TV_704x480
TV_704x512
TV_dummy1
TV_dummy2
TV_dummy3
TV_dummy4
tvsz
SORT_BFR
SORT_MIN
SORT_MAX
SORT_CEN
Single_Plane
Dual_Plane
CLRate31_1
CLRate30_2
CLRate29_3
CLRate28_4
CLRate27_5
CLRate26_6
CLRate25_7
CLRate24_8
CLRate23_9
CLRate22_10
CLRate21_11
CLRate20_12
CLRate19_13
CLRate18_14
CLRate17_15
CLRate16_16
CLRate15_17
CLRate14_18
CLRate13_19
CLRate12_20
CLRate11_21
CLRate10_22
CLRate9_23
CLRate8_24
CLRate7_25
CLRate6_26
CLRate5_27
CLRate4_28
CLRate3_29
CLRate2_30
CLRate1_31
CLRate0_32
SMPC_SH2_DIRECT
SMPC_CONTROL
SMPC_EXL_ENA
SMPC_EXL_DIS
SMPC_RES_ON
SMPC_RES_OFF
SMPC_AREA_RSV_0
SMPC_AREA_JP
SMPC_AREA_AJ_NTSC
SMPC_AREA_RSV_3
SMPC_AREA_NA
SMPC_AREA_SA_NTSC
SMPC_AREA_KO
SMPC_AREA_RSV_7
SMPC_AREA_RSV_8
SMPC_AREA_RSV_9
SMPC_AREA_AJ_PAL
SMPC_AREA_RSV_B
SMPC_AREA_EU_PAL
SMPC_AREA_SA_PAL
SMPC_AREA_RSV_E
SMPC_AREA_RSV_F
SMPC_OPT_DIS
SMPC_OPT_ENA
SMPC_PORT_15
SMPC_PORT_255
SMPC_PORT_RSV
SMPC_PORT_ZERO
SMPC_ENGLISH
SMPC_DEUTSCH
SMPC_FRANCAIS
SMPC_ESPANOL
SMPC_ITALIANO
SMPC_JAPAN
SMPC_EFFECT_OFF
SMPC_EFFECT_ON
SMPC_SOUND_MONO
SMPC_SOUND_STEREO
SMPC_HELP_DIS
SMPC_HELP_ENA
SMPC_DMY
SMPC_JAN
SMPC_FEB
SMPC_MRA
SMPC_APR
SMPC_MAY
SMPC_JUN
SMPC_JUL
SMPC_AUG
SMPC_SEP
SMPC_OCT
SMPC_NOV
SMPC_DEC
SMPC_MSHON
SMPC_SSHON
SMPC_SSHOFF
SMPC_SNDON
SMPC_SNDOFF
SMPC_CDON
SMPC_CDOFF
SMPC_SYSRES
SMPC_CKC352
SMPC_CKC320
SMPC_NMIREQ
SMPC_RESENA
SMPC_RESDIS
SMPC_GETSTS
SMPC_GETPER
SMPC_SETMEM
SMPC_SETTIM
SMPC_CMDMAX
SMPC_NO_WAIT
SMPC_WAIT
winFar
winNear

Peripheral related constants

SMPC_MASK_STE
SMPC_MASK_RESD
SMPC_MASK_WEEK
SMPC_MASK_MONTH
SMPC_MASK_CTG1
SMPC_MASK_CTG0
SMPC_MASK_DOTSEL
SMPC_MASK_MSHNMI
SMPC_MASK_SYSRES
SMPC_MASK_SNDRES
SMPC_MASK_CDRES
SMPC_SUN
SMPC_MON
SMPC_TUE
SMPC_WED
SMPC_THU
SMPC_FRI
SMPC_SAT
PER_RESULT_MAX
PER_ID_StnPad
PER_ID_StnLacing
PER_ID_StnAnalog
PER_ID_3DPad
PER_ID_StnMouse
PER_ID_StnShooting
PER_ID_StnKeyBoard
PER_ID_MD3BtnPad
PER_ID_MD6BtnPad
PER_ID_ShuttleMouse
PER_ID_ExtDigital
PER_ID_ExtAnalog
PER_ID_ExtPointing
PER_ID_ExtKeyBoard
PER_ID_ExtMegaDrive
PER_ID_NotConnect
PER_DGT_KR
PER_DGT_KL
PER_DGT_KD
PER_DGT_KU
PER_DGT_ST
PER_DGT_TA
PER_DGT_TC
PER_DGT_TB
PER_DGT_TR
PER_DGT_TX
PER_DGT_TY
PER_DGT_TZ
PER_DGT_TL
PER_KBD_CL
PER_KBD_NL
PER_KBD_SL
PER_KBD_MK
PER_KBD_BR
Smpc_Status
Smpc_Peripheral
Per_Connect1
Per_Connect2

VDP2 related constants

VDP2_VRAM_A0
VDP2_VRAM_A1
VDP2_VRAM_B0
VDP2_VRAM_B1
CGN01_RAM
NBG0_MAP
NBG1_MAP
KTBL0_RAM
BACK_CRAM
RBG_PARA_ADR
RBG_PARB_ADR
CGR0_RAM
RBG0_MAP
VDP2_COLRAM
CG_Size
CG16Size
CG256Size
CG2048Size
CG32KSize
Line
Page
EXLTEN
EXSYEN
DASEL
EXBGEN
CRM16_1024
CRM16_2048
CRM32_1024
COL_TYPE_16
COL_TYPE_256
COL_TYPE_2048
COL_TYPE_32768
COL_TYPE_1M
CHAR_SIZE_1x1
CHAR_SIZE_2x2
PNB_2WORD
PNB_1WORD
CN_10BIT
CN_12BIT
PL_SIZE_1x1
PL_SIZE_2x1
PL_SIZE_2x2
NBG0ON
NBG1ON
NBG2ON
NBG3ON
RBG0ON
LNCLON
SPRON
BACKON
NBG0OFF
NBG1OFF
NBG2OFF
NBG3OFF
RBG0OFF
ZOOM_1
ZOOM_HALF
ZOOM_QUARTER
K_OFF
K_ON
K_2WORD
K_1WORD
K_MODE0
K_MODE1
K_MODE2
K_MODE3
K_LINECOL
K_DOT
K_LINE
K_FIX
R.A.
R.B.
K_CHANGE
W_CHANGE
LnRd_Xst
LnRd_Yst
LnRd_KAst
CC_RATE
CC_ADD
CC_TOP
CC_2ND
CC_EXT
grdNBG0
grdNBG1
grdNBG2
grdNBG3
grdRBG0
grdSPR
COL_R
COL_G
COL_B
CC_pr_CN
CC_PR_CN
CC_PR_cn
CC_MSB
SPR_PAL
SPR_PAL_RGB
scnNBG0
scnNBG1
scnNBG2
scnNBG3
scnRBG0
scnRBGA
scnRBGB
scnSPR
scnROT
scnCCAL
scnLNCL
scnBACK
scnSPR0
scnSPR1
scnSPR2
scnSPR3
scnSPR4
scnSPR5
scnSPR6
scnSPR7
bmNBG0
bmNBG1
bmRBG0
win_OR
win_AND
win0_IN
win0_OUT
win1_IN
win1_OUT
spw_IN
spw_OUT
lineSZ1
lineSZ2
lineSZ4
lineSZ8
lineZoom
lineVScroll
lineHScroll
VCellScroll
BM_512x256
BM_512x512
BM_1024x256
BM_1024x512
spPRI_Scrn
spPRI_Char
spPRI_Dot
spCCAL_Scrn
spCCAL_Char
spCCAL_Dot
spCCAL_MSB
sfCOL_01
sfCOL_23
sfCOL_45
sfCOL_67
sfCOL_89
sfCOL_ab
sfCOL_cd
sfCOL_ef
Div_A
Div_B

Sound related constants

_Stereo
_Mono
_PCM16Bit
_PCM8Bit
SND_SEQ_START
SND_SEQ_STOP
SND_SEQ_PAUSE
SND_SEQ_CONT
SND_SEQ_VOL
SND_TEMPO_CHG
SND_MAP_CHG
SND_MIDI_CTRL_DIR
SND_VOL_ANL_START
SND_VOL_ANL_STOP
SND_DSP_STOP
SND_ALL_OFF
SND_SEQ_PAN
SND_CDDA_LEV
SND_CDDA_PAN
SND_TTL_VOL
SND_EFCT_CHG
SND_PCM_START
SND_PCM_START
SND_MIX_CHG
SND_MIX_PRM_CHG
SND_HARD_CHK
SND_PCM_PRM_CHG
SoundRAM

VDP1 related constants

CURRENT
ORIGINAL
_SysPause
_SprPause
_ScrPause
FUNC_Sprite
FUNC_Texture
FUNC_Polygon
FUNC_PolyLine
FUNC_Line
FUNC_SystemClip
FUNC_UserClip
FUNC_BasePosition
FUNC_End
_ZmLT
_ZmLC
_ZmLB
_ZmCT
_ZmCC
_ZmCB
_ZmRT
_ZmRC
_ZmRB
MSBon
MSBoff
HSSon
HSSoff
No_Window
Window_In
Window_Out
MESHoff
MESHon
ECdis
ECenb
SPdis
SPenb
CL16Bnk
CL16Look
CL64Bnk
CL128Bnk
CL256Bnk
CL32KRGB
CL_Replace
CL_Shadow
CL_Half
CL_Trans
CL_Gouraud
Use Texture
UseLight
Use Palette
UseNearClip
UseGouraud
UseDepth
UseClip
sprHflip
sprVflip
sprHVflip
sprNoflip
sprPolygon
sprPolyLine
sprLine
No_Texture
No_Option
No_Gouraud
No_Palet
GouraudRAM
COL_16
COL_64
COL_128
COL_256
COL_32K
cgaddress
CGADDRESS
pal
Sprite VRAM
RGB_Flag

macro

MAX
MIN
ABS
toFIXED
POStoFIXED
ATTRIBUTE
SPR_ATTRIBUTE
DEGtoANG
RADtoANG
RGB
DGTtoRGB
SLocate
NORMAL
VERTICES
C_RGB
TEXDEF
PICDEF
AdjCG
TEXTBL
PICTBL
TRANSLATION
ROTATION
SCALING

type declaration

Uint8
Sint8
Uint16
Sint16
Uint32
Sint32
Float32
Float64
Int
Bool
ANGLE
FIXED
MATRIX
VECTOR
POINT
TEXDAT
GOURAUDTBL
CELL
DmaCpuStatus
WORK
EVENT
POLYGON
ATTR
SPR_ATTR
PDATA
XPDATA
OBJECT
TEXTURE
PICTURE
SPRITE
ROTSCROLL
P.C.M.
SmpcDateTime
SmpcStatus
PerDigital
PerAnalog
PerPoint
PerKeyBoard
Per3DPad
DmaCpuComPrm
DmaCpuPrm
DmaCpuComStatus
DmaScuPrm
DmaScuStatus
MasterStack
MaxVertices
MaxPolygons
EventSize
WorkSize
MaxEvents
MaxWorks
SortList
SortListSize
TransList
Zbuffer
SpriteBuf
SpriteBufSize
Pbuffer
CLOfstBuf
CommandBuf
PCM_Work
PCM_WkSize

Function Reference | Structure Reference | SGL Supplementary Manual | SGL System Variable List
SGL User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997