★ SGL User's Manual
Function reference | Structure reference | SGL supplementary manual | SGL system variable list
SGL REFERENCE List of SGL system variables
000: Event registered at the beginning of EventTop
004: Event registered at the end of EventLast
008: Event Now running event
00C: EventCount Remaining number of events
00E: WorkCount Number of remaining works
010: MainMode Main sequence mode
011: SubMode Subsequence mode
012: SynchConst video sync count
013: SynchCount Video sync count
014: UserFunction User function to be executed during blanking
018: Number of forwarded entries during TransCount blanking
01A: TransRequest Request for transfer during blanking
01B: PauseFlag Sprite, scroll pause flag
01C: mtptr current matrix pointer
020: MatrixCount Matrix nest count
021: PrintColor Color palette for text display
022: IntCount interrupt count
024: MsPbufPtr Vertex Coordinate Calculation Buffer Pointer (Master)
028: SlPbufPtr Vertex Coordinate Calculation Buffer Pointer (Slave)
02C: SpritePtr Sprite data transfer pointer
030: MsSdataPtr Sprite Dataset Pointer (Master)
034: SlSdataPtr Sprite Dataset Pointer (Master)
038: ZbufPtr Z buffer pointer
03C: FormTbl texture data table
040: SprbufBias Sprite data buffer switching
044: ComRdPtr command read pointer
048: ComWrPtr command set (write) pointer
04C: MsLightVector Light Source Vector (Master)
058: SlLightVector Light Source Vector (Master)
064: ColorOffset Color offset table pointer
068: MsScreenDist Screen position (Master)
06C: SlScreenDist Screen position (Slave)
070: MsZlimit Display limit Z position (Master)
072: WindowNumber Number of windows used
073: WinUseFlag Window usage flag
074: TotalPolygons Number of calculated polygons
076: TotalVertices Number of calculated vertices
078: MsScreenLeft Screen left position
07A: MsScreenTop Position on screen
07C: MsScreenRight Screen right position
07E: MsScreenBottom Bottom position on the screen
080: MsScreenSizeX Screen horizontal size (Master)
082: MsScreenSizeY Screen vertical size (Master)
084: MsWindowSizeX Window size (Master)
086: MsWindowSizeY Window size (Master)
088: MXPolygons Maximum number of polygons
08A: MXVertices maximum number of vertices
08C: FrameSizeX Framebuffer size
08E: FrameSizeY Frame buffer size
090: MsWinXAdder Addition data for window check (Master)
092: Addition data for MsWinYAdder window check (Master)
094: SlWinXAdder Addition data for window check (Slave)
096: SlWinYAdder Addition data for window check (Slave)
098: MsClipXAdder Addition data for clipping (horizontal) (Master)
09A: MsClipYAdder Addition data for clipping (vertical) (Master)
09C: SlClipXAdder Addition data for clipping (horizontal) (Slave)
09E: SlClipYAdder Addition data for clipping (vertical) (Slave)
0A0: SlZlimit Display limit Z position (Slave)
0A2: WinPtr window dataset offset
0A4: DispPolygons Number of display polygons
0A6: DMAEndFlag DMA transfer end flag
0A8: DMASetFlag DMA table set flag
0AA: PutCount slPutPolygon (), sl ... Sprite () Number of calls
0AC: MsZdpsftcnt Screen display limit shift counter (Master) (unused)
0AD: SlZdpsftcnt Screen display limit shift counter (Slave) (unused)
0B0: Resolution screen mode
0B1: Number of NbPCMBf PCM buffers (2000H unit)
0B2: PCMBufFlag PCM buffer availability flag
0B4: SoundRdCount Sound buffer read counter
0B5: SoundWrCount Sound buffer entry counter
0B6: FRT_Count FRT counter. Updated every slSynch
0B7: SCUMC_ID SCU memory copy channel number
0B8: DMASt_CPU0 CPU DMA status (CH0)
0BA: DMASt_CPU1 CPU DMA status (CH1)
0BB: DMASt_SCU0 SCU DMA status (CH0)
0BC: DMASt_SCU1 SCU DMA status (CH1)
0BD: DMASt_SCU2 SCU DMA status (CH2)
0BE: dummy1 system reservation
0C0: VDP2_TVMD TV screen mode
0C2: VDP2_EXTEN external signal enabled
0C4: VDP2_TVSTAT screen status
0C6: VDP2_VRSIZE VRAM size
0C8: VDP2_HCNT H counter
0CA: VDP2_VCNT V counter
0CE: VDP2_RAMCTL RAM control
0D0: VDP2_CYCA0L VRAM cycle pattern (banks A0, T0-3)
0D2: VDP2_CYCA0U VRAM cycle pattern (bank A0, T4-7)
0D4: VDP2_CYCA1L VRAM cycle pattern (banks A1, T0-3)
0D6: VDP2_CYCA1U VRAM cycle pattern (banks A1, T4-7)
0D8: VDP2_CYCB0L VRAM cycle pattern (bank B0, T0-3)
0DA: VDP2_CYCB0U VRAM cycle pattern (bank B0, T4-7)
0DC: VDP2_CYCB1L VRAM cycle pattern (banks B1, T0-3)
0DE: VDP2_CYCB1U VRAM cycle pattern (bank B1, T4-7)
0E0: VDP2_BGON screen display enabled
0E2: VDP2_MZCTL mosaic control
0E4: VDP2_SFSEL Special function code select
0E6: VDP2_SFCODE Special function code
0E8: VDP2_CHCTLA character control (NBG0, NBG1)
0EA: VDP2_CHCTLB character control (NBG2, NBG3, RBG0)
0EC: VDP2_BMPNA Bitmap palette number (NBG0, 1)
0EE: VDP2_BMPNB Bitmap palette number (RBG0)
0F0: VDP2_PNCN0 pattern name control (NBG0)
0F2: VDP2_PNCN1 pattern name control (NBG1)
0F4: VDP2_PNCN2 pattern name control (NBG2)
0F6: VDP2_PNCN3 pattern name control (NBG3)
0F8: VDP2_PNCR pattern name control (RBG0)
0FA: VDP2_PLSZ plane size
0FC: VDP2_MPOFN Map offset (NBG0-3)
0FE: VDP2_MPOFR Map offset (rotation parameters A, B)
100: VDP2_MPABN0 map (NBG0 planes A, B)
102: VDP2_MPCDN0 map (NBG0 planes C, D)
104: VDP2_MPABN1 map (NBG1 planes A, B)
106: VDP2_MPCDN1 map (NBG1 planes C, D)
108: VDP2_MPABN2 map (NBG2 planes A, B)
10A: VDP2_MPCDN2 map (NBG2 planes C, D)
10C: VDP2_MPABN3 map (NBG3 planes A, B)
10E: VDP2_MPCDN3 map (NBG3 planes C, D)
110: VDP2_MPABRA map (rotation parameters A plane A, B)
112: VDP2_MPCDRA map (rotation parameters A plane C, D)
114: VDP2_MPEFRA map (rotation parameters A plane E, F)
116: VDP2_MPGHRA map (rotation parameters A plane G, H)
118: VDP2_MPIJRA map (rotation parameters A plane I, J)
11A: VDP2_MPKLRA map (rotation parameter A plane K, L)
11C: VDP2_MPMNRA map (rotation parameters A plane M, N)
11E: VDP2_MPOPRA map (rotation parameter A plane O, P)
120: VDP2_MPABRB map (rotation parameter B planes A, B)
122: VDP2_MPCDRB map (rotation parameter B plane C, D)
124: VDP2_MPEFRB map (rotation parameter B plane E, F)
126: VDP2_MPGHRB map (rotation parameter B plane G, H)
128: VDP2_MPIJRB map (rotation parameter B plane I, J)
12A: VDP2_MPKLRB map (rotation parameter B plane K, L)
12C: VDP2_MPMNRB map (rotation parameter B plane M, N)
12E: VDP2_MPOPRB map (rotation parameter B plane O, P)
130: VDP2_SCXN0 Screen scroll value (NBG0, horizontal fixed decimal)
130: VDP2_SCXIN0 Screen scroll value (NBG0, horizontal integer part)
130: Nbg0_PosX NBG0 display position (X)
132: VDP2_SCXDN0 Screen scroll value (NBG0, horizontal decimal part)
134: VDP2_SCYN0 Screen scroll value (NBG0, vertical fixed decimal)
134: VDP2_SCYIN0 Screen scroll value (NBG0, vertical integer part)
134: Nbg0_PosY NBG0 Display position (Y)
136: VDP2_SCYDN0 Screen scroll value (NBG0, vertical decimal part)
138: VDP2_ZMXN0 coordinate increment (NBG0, horizontal fixed decimal)
138: VDP2_ZMXIN0 coordinate increment (NBG0, horizontal integer part)
138: Nbg1_PosX NBG1 display position (X)
13A: VDP2_ZMXDN0 coordinate increment (NBG0, horizontal decimal part)
13C: VDP2_ZMYN0 coordinate increment (NBG0, vertical fixed decimal)
13C: VDP2_ZMYIN0 coordinate increment (NBG0, vertical integer part)
13C: Nbg1_PosY NBG1 display position (Y)
13E: VDP2_ZMYDN0 coordinate increment (NBG0, vertical decimal part)
140: VDP2_SCXN1 Screen scroll value (NBG1, horizontal fixed decimal)
140: VDP2_SCXIN1 Screen scroll value (NBG1, horizontal integer part)
142: VDP2_SCXDN1 screen scroll value (NBG1, horizontal decimal part)
144: VDP2_SCYN1 screen scroll value (NBG1, vertical fixed decimal)
144: VDP2_SCYIN1 Screen scroll value (NBG1, vertical integer part)
146: VDP2_SCYDN1 screen scroll value (NBG1, vertical decimal part)
148: VDP2_ZMXN1 coordinate increment (NBG1, horizontal fixed decimal)
148: VDP2_ZMXIN1 coordinate increment (NBG1, horizontal integer part)
14A: VDP2_ZMXDN1 coordinate increment (NBG1, horizontal decimal part)
14C: VDP2_ZMYN1 coordinate increment (NBG1, vertical fixed decimal)
14C: VDP2_ZMYIN1 coordinate increment (NBG1, vertical integer part)
14E: VDP2_ZMYDN1 coordinate increment (NBG1, vertical decimal part)
150: VDP2_SCXN2 screen scroll value (NBG2, horizontal direction)
152: VDP2_SCYN2 screen scroll value (NBG2, vertical direction)
154: VDP2_SCXN3 screen scroll value (NBG3, horizontal direction)
156: VDP2_SCYN3 screen scroll value (NBG3, vertical direction)
158: VDP2_ZMCTL reduction enabled
15A: VDP2_SCRCTL line & vertical cell scroll control
15C: VDP2_VCSTA Vertical cell scroll table address
160: Line scroll table address for VDP2_LSTA0 NBG0
164: Line scroll table address for VDP2_LSTA1 NBG1
168: VDP2_LCTA line color screen table address
16C: VDP2_BKTA Back screen table address
170: VDP2_RPMD rotation parameter mode
172: VDP2_RPRCTL Rotation parameter read control
174: VDP2_KTCTL coefficient table control
176: VDP2_KTAOF coefficient table address offset
178: VDP2_OVPNRA screen over pattern name
17A: VDP2_OVPNRB screen over pattern name
17C: VDP2_RPTA rotation parameter table address
180: VDP2_WPSX0 Window position (H start)
182: VDP2_WPSY0 Window position (V start)
184: VDP2_WPEX0 Window position (H stop)
186: VDP2_WPEY0 Window position (V stop)
188: VDP2_WPSX1 window position (H start)
18A: VDP2_WPSY1 Window position (V start)
18C: VDP2_WPEX1 Window position (H stop)
18E: VDP2_WPEY1 Window position (V stop)
190: VDP2_WCTLA window control
192: VDP2_WCTLB window control
194: VDP2_WCTLC window control
196: VDP2_WCTLD window control
198: VDP2_LWTA0 Line window table address
19C: VDP2_LWTA1 line window table address
1A0: VDP2_SPCTL sprite control
1A2: VDP2_SDCTL Shadow Control
1A4: VDP2_CRAOFA color RAM address offset (NBG0-3)
1A6: VDP2_CRAOFB color RAM address offset (RBG0, sprite)
1A8: VDP2_LNCLEN line color screen enabled
1AA: VDP2_SFPRMD Special priority mode
1AC: VDP2_CCCTL color arithmetic control
1AE: VDP2_SFCCMD Special color calculation mode
1B0: VDP2_PRISA priority number
1B2: VDP2_PRISB priority number
1B4: VDP2_PRISC priority number
1B6: VDP2_PRISD priority number
1B8: VDP2_PRINA priority number
1BA: VDP2_PRINB Priority number
1BC: VDP2_PRIR priority number
1BE: dummy2 system reservation
1C0: VDP2_CCRSA Color calculation ratio (sprites 0, 1)
1C2: VDP2_CCRSB color calculation ratio (sprites 2, 3)
1C4: VDP2_CCRSC color calculation ratio (sprites 4, 5)
1C6: VDP2_CCRSD color calculation ratio (sprites 6, 7)
1C8: VDP2_CCRNA color calculation ratio (NBG0, 1)
1CA: VDP2_CCRNB Color calculation ratio (NBG2, 3)
1CC: VDP2_CCRR Color calculation ratio (RGB0)
1CE: VDP2_CCRLB color calculation ratio (line color screen, back screen)
1D0: VDP2_CLOFEN color offset enabled
1D2: VDP2_CLOFSL Color Offset Select
1D4: VDP2_COAR Color Offset A (Red)
1D6: VDP2_COAG Color offset A (Green)
1D8: VDP2_COAB Color offset A (Blue)
1DA: VDP2_COBR Color Offset B (Red)
1DC: VDP2_COBG Color offset B (Green)
1DE: VDP2_COBB Color Offset B (Blue)
1E0: ScrRotPtr Address of rotation parameter to operate
1E4: CG address for nbg0_char_adr NBG0
1E8: CG address for nbg1_char_adr NBG1
1EC: CG address for nbg2_char_adr NBG2
1F0: nbg3_char_adr CG address for NBG3
1F4: CG address for ra_char_adr RBG0 (parameter A)
1F8: CG address for rb_char_adr RBG0 (parameter B)
1FC: pattern name address for nbg0_page_adr NBG0
200: pattern name address for nbg1_page_adr NBG1
204: pattern name address for nbg2_page_adr NBG2
208: pattern name address for nbg3_page_adr NBG3
20C: Pattern name address for ra_page_adr RBG0 (parameter A)
210: Pattern name address for rb_page_adr RBG0 (parameter B)
214: rpara_vram_adr rotation parameter set address
218: k_table_adr Coefficient table set address
21C: RotScrParA Rotation parameter A
284: RotScrParB Rotation parameter B
2EC: Nbg2_PosX NBG2 display position (X)
2F0: Nbg2_PosY NBG2 display position (Y)
2F4: Nbg3_PosX NBG3 display position (X)
2F8: Nbg3_PosY NBG3 display position (Y)
2FC: Window_data Window control data buffer (for 2)
328: Center_data window center control data buffer (2)
33C: RandWork Random number generation work
340: CDReadExec CD read server function
344: DMA_TRANS CPU DMA parameter
36C: SOUND sound buffer pointer
378: PERIPERAL control data
Function reference | Structure reference | SGL supplementary manual | SGL system variable list
★ SGL User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997