WUT  0.1
Wii U Toolchain
registers.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 typedef enum GX2CompareFunction
15 {
25 
26 typedef enum GX2AlphaToMaskMode
27 {
34 
35 typedef enum GX2BlendMode
36 {
56 } GX2BlendMode;
57 
58 typedef enum GX2BlendCombineMode
59 {
66 
67 typedef enum GX2LogicOp
68 {
85 } GX2LogicOp;
86 
87 typedef enum GX2StencilFunction
88 {
98 
99 typedef enum GX2PolygonMode
100 {
105 
106 
107 typedef enum GX2ChannelMask
108 {
125 
127 {
128  uint32_t regs[1];
129 };
130 CHECK_SIZE(GX2AAMaskReg, 4);
131 
133 {
134  uint32_t regs[2];
135 };
136 CHECK_SIZE(GX2AlphaTestReg, 8);
137 
139 {
140  uint32_t regs[1];
141 };
142 CHECK_SIZE(GX2AlphaToMaskReg, 4);
143 
145 {
146  uint32_t regs[2];
147 };
148 CHECK_SIZE(GX2BlendControlReg, 8);
149 
151 {
152  uint32_t regs[4];
153 };
154 CHECK_SIZE(GX2BlendConstantColorReg, 16);
155 
157 {
158  uint32_t regs[1];
159 };
160 CHECK_SIZE(GX2ColorControlReg, 4);
161 
163 {
164  uint32_t regs[1];
165 };
166 CHECK_SIZE(GX2DepthStencilControlReg, 4);
167 
169 {
170  uint32_t regs[2];
171 };
172 CHECK_SIZE(GX2StencilMaskReg, 8);
173 
175 {
176  uint32_t regs[1];
177 };
178 CHECK_SIZE(GX2LineWidthReg, 4);
179 
181 {
182  uint32_t regs[1];
183 };
184 CHECK_SIZE(GX2PointSizeReg, 4);
185 
187 {
188  uint32_t regs[1];
189 };
190 CHECK_SIZE(GX2PointLimitsReg, 4);
191 
193 {
194  uint32_t regs[1];
195 };
196 CHECK_SIZE(GX2PolygonControlReg, 4);
197 
199 {
200  uint32_t regs[5];
201 };
202 CHECK_SIZE(GX2PolygonOffsetReg, 20);
203 
205 {
206  uint32_t regs[2];
207 };
208 CHECK_SIZE(GX2ScissorReg, 8);
209 
211 {
212  uint32_t regs[1];
213 };
214 CHECK_SIZE(GX2TargetChannelMaskReg, 4);
215 
217 {
218  uint32_t regs[12];
219 };
220 CHECK_SIZE(GX2ViewportReg, 48);
221 
222 #pragma pack(pop)
223 
224 void
225 GX2SetAAMask(uint8_t upperLeft,
226  uint8_t upperRight,
227  uint8_t lowerLeft,
228  uint8_t lowerRight);
229 
230 void
232  uint8_t upperLeft,
233  uint8_t upperRight,
234  uint8_t lowerLeft,
235  uint8_t lowerRight);
236 
237 void
239  uint8_t *upperLeft,
240  uint8_t *upperRight,
241  uint8_t *lowerLeft,
242  uint8_t *lowerRight);
243 
244 void
246 
247 void
248 GX2SetAlphaTest(BOOL alphaTest,
249  GX2CompareFunction func,
250  float ref);
251 
252 void
254  BOOL alphaTest,
255  GX2CompareFunction func,
256  float ref);
257 
258 void
260  BOOL *alphaTest,
261  GX2CompareFunction *func,
262  float *ref);
263 
264 void
266 
267 void
268 GX2SetAlphaToMask(BOOL alphaToMask,
269  GX2AlphaToMaskMode mode);
270 
271 void
273  BOOL alphaToMask,
274  GX2AlphaToMaskMode mode);
275 
276 void
278  BOOL *alphaToMask,
279  GX2AlphaToMaskMode *mode);
280 
281 void
283 
284 void
285 GX2SetBlendConstantColor(float red,
286  float green,
287  float blue,
288  float alpha);
289 
290 void
292  float red,
293  float green,
294  float blue,
295  float alpha);
296 
297 void
299  float *red,
300  float *green,
301  float *blue,
302  float *alpha);
303 
304 void
306 
307 void
308 GX2SetBlendControl(GX2RenderTarget target,
309  GX2BlendMode colorSrcBlend,
310  GX2BlendMode colorDstBlend,
311  GX2BlendCombineMode colorCombine,
312  BOOL useAlphaBlend,
313  GX2BlendMode alphaSrcBlend,
314  GX2BlendMode alphaDstBlend,
315  GX2BlendCombineMode alphaCombine);
316 
317 void
319  GX2RenderTarget target,
320  GX2BlendMode colorSrcBlend,
321  GX2BlendMode colorDstBlend,
322  GX2BlendCombineMode colorCombine,
323  BOOL useAlphaBlend,
324  GX2BlendMode alphaSrcBlend,
325  GX2BlendMode alphaDstBlend,
326  GX2BlendCombineMode alphaCombine);
327 
328 void
330  GX2RenderTarget *target,
331  GX2BlendMode *colorSrcBlend,
332  GX2BlendMode *colorDstBlend,
333  GX2BlendCombineMode *colorCombine,
334  BOOL *useAlphaBlend,
335  GX2BlendMode *alphaSrcBlend,
336  GX2BlendMode *alphaDstBlend,
337  GX2BlendCombineMode *alphaCombine);
338 
339 void
341 
342 void
344  uint8_t targetBlendEnable,
345  BOOL multiWriteEnable,
346  BOOL colorWriteEnable);
347 
348 void
350  GX2LogicOp rop3,
351  uint8_t targetBlendEnable,
352  BOOL multiWriteEnable,
353  BOOL colorWriteEnable);
354 
355 void
357  GX2LogicOp *rop3,
358  uint8_t *targetBlendEnable,
359  BOOL *multiWriteEnable,
360  BOOL *colorWriteEnable);
361 
362 void
364 
365 void
366 GX2SetDepthOnlyControl(BOOL depthTest,
367  BOOL depthWrite,
368  GX2CompareFunction depthCompare);
369 
370 void
372  BOOL depthWrite,
373  GX2CompareFunction depthCompare,
374  BOOL stencilTest,
375  BOOL backfaceStencil,
376  GX2CompareFunction frontStencilFunc,
377  GX2StencilFunction frontStencilZPass,
378  GX2StencilFunction frontStencilZFail,
379  GX2StencilFunction frontStencilFail,
380  GX2CompareFunction backStencilFunc,
381  GX2StencilFunction backStencilZPass,
382  GX2StencilFunction backStencilZFail,
383  GX2StencilFunction backStencilFail);
384 
385 void
387  BOOL depthTest,
388  BOOL depthWrite,
389  GX2CompareFunction depthCompare,
390  BOOL stencilTest,
391  BOOL backfaceStencil,
392  GX2CompareFunction frontStencilFunc,
393  GX2StencilFunction frontStencilZPass,
394  GX2StencilFunction frontStencilZFail,
395  GX2StencilFunction frontStencilFail,
396  GX2CompareFunction backStencilFunc,
397  GX2StencilFunction backStencilZPass,
398  GX2StencilFunction backStencilZFail,
399  GX2StencilFunction backStencilFail);
400 
401 void
403  BOOL *depthTest,
404  BOOL *depthWrite,
405  GX2CompareFunction *depthCompare,
406  BOOL *stencilTest,
407  BOOL *backfaceStencil,
408  GX2CompareFunction *frontStencilFunc,
409  GX2StencilFunction *frontStencilZPass,
410  GX2StencilFunction *frontStencilZFail,
411  GX2StencilFunction *frontStencilFail,
412  GX2CompareFunction *backStencilFunc,
413  GX2StencilFunction *backStencilZPass,
414  GX2StencilFunction *backStencilZFail,
415  GX2StencilFunction *backStencilFail);
416 
417 void
419 
420 void
421 GX2SetStencilMask(uint8_t frontMask,
422  uint8_t frontWriteMask,
423  uint8_t frontRef,
424  uint8_t backMask,
425  uint8_t backWriteMask,
426  uint8_t backRef);
427 
428 void
430  uint8_t frontMask,
431  uint8_t frontWriteMask,
432  uint8_t frontRef,
433  uint8_t backMask,
434  uint8_t backWriteMask,
435  uint8_t backRef);
436 
437 void
439  uint8_t *frontMask,
440  uint8_t *frontWriteMask,
441  uint8_t *frontRef,
442  uint8_t *backMask,
443  uint8_t *backWriteMask,
444  uint8_t *backRef);
445 
446 void
448 
449 void
450 GX2SetLineWidth(float width);
451 
452 void
454  float width);
455 
456 void
458  float *width);
459 
460 void
462 
463 void
464 GX2SetPointSize(float width,
465  float height);
466 
467 void
469  float width,
470  float height);
471 
472 void
474  float *width,
475  float *height);
476 
477 void
479 
480 void
481 GX2SetPointLimits(float min,
482  float max);
483 
484 void
486  float min,
487  float max);
488 
489 void
491  float *min,
492  float *max);
493 
494 void
496 
497 void
498 GX2SetCullOnlyControl(GX2FrontFace frontFace,
499  BOOL cullFront,
500  BOOL cullBack);
501 
502 void
503 GX2SetPolygonControl(GX2FrontFace frontFace,
504  BOOL cullFront,
505  BOOL cullBack,
506  BOOL polyMode,
507  GX2PolygonMode polyModeFront,
508  GX2PolygonMode polyModeBack,
509  BOOL polyOffsetFrontEnable,
510  BOOL polyOffsetBackEnable,
511  BOOL polyOffsetParaEnable);
512 
513 void
515  GX2FrontFace frontFace,
516  BOOL cullFront,
517  BOOL cullBack,
518  BOOL polyMode,
519  GX2PolygonMode polyModeFront,
520  GX2PolygonMode polyModeBack,
521  BOOL polyOffsetFrontEnable,
522  BOOL polyOffsetBackEnable,
523  BOOL polyOffsetParaEnable);
524 
525 void
527  GX2FrontFace *frontFace,
528  BOOL *cullFront,
529  BOOL *cullBack,
530  BOOL *polyMode,
531  GX2PolygonMode *polyModeFront,
532  GX2PolygonMode *polyModeBack,
533  BOOL *polyOffsetFrontEnable,
534  BOOL *polyOffsetBackEnable,
535  BOOL *polyOffsetParaEnable);
536 
537 void
539 
540 void
541 GX2SetPolygonOffset(float frontOffset,
542  float frontScale,
543  float backOffset,
544  float backScale,
545  float clamp);
546 
547 void
549  float frontOffset,
550  float frontScale,
551  float backOffset,
552  float backScale,
553  float clamp);
554 
555 void
557  float *frontOffset,
558  float *frontScale,
559  float *backOffset,
560  float *backScale,
561  float *clamp);
562 
563 void
565 
566 void
567 GX2SetScissor(uint32_t x,
568  uint32_t y,
569  uint32_t width,
570  uint32_t height);
571 
572 void
574  uint32_t x,
575  uint32_t y,
576  uint32_t width,
577  uint32_t height);
578 
579 void
581  uint32_t *x,
582  uint32_t *y,
583  uint32_t *width,
584  uint32_t *height);
585 
586 void
588 
589 void
591  GX2ChannelMask mask1,
592  GX2ChannelMask mask2,
593  GX2ChannelMask mask3,
594  GX2ChannelMask mask4,
595  GX2ChannelMask mask5,
596  GX2ChannelMask mask6,
597  GX2ChannelMask mask7);
598 
599 void
601  GX2ChannelMask mask0,
602  GX2ChannelMask mask1,
603  GX2ChannelMask mask2,
604  GX2ChannelMask mask3,
605  GX2ChannelMask mask4,
606  GX2ChannelMask mask5,
607  GX2ChannelMask mask6,
608  GX2ChannelMask mask7);
609 
610 void
612  GX2ChannelMask *mask0,
613  GX2ChannelMask *mask1,
614  GX2ChannelMask *mask2,
615  GX2ChannelMask *mask3,
616  GX2ChannelMask *mask4,
617  GX2ChannelMask *mask5,
618  GX2ChannelMask *mask6,
619  GX2ChannelMask *mask7);
620 
621 void
623 
624 void
625 GX2SetViewport(float x,
626  float y,
627  float width,
628  float height,
629  float nearZ,
630  float farZ);
631 
632 void
634  float x,
635  float y,
636  float width,
637  float height,
638  float nearZ,
639  float farZ);
640 
641 void
643  float *x,
644  float *y,
645  float *width,
646  float *height,
647  float *nearZ,
648  float *farZ);
649 
650 void
652 
653 #ifdef __cplusplus
654 }
655 #endif
656 
uint32_t regs[1]
Definition: registers.h:182
void GX2GetDepthStencilControlReg(GX2DepthStencilControlReg *reg, BOOL *depthTest, BOOL *depthWrite, GX2CompareFunction *depthCompare, BOOL *stencilTest, BOOL *backfaceStencil, GX2CompareFunction *frontStencilFunc, GX2StencilFunction *frontStencilZPass, GX2StencilFunction *frontStencilZFail, GX2StencilFunction *frontStencilFail, GX2CompareFunction *backStencilFunc, GX2StencilFunction *backStencilZPass, GX2StencilFunction *backStencilZFail, GX2StencilFunction *backStencilFail)
void GX2SetStencilMaskReg(GX2StencilMaskReg *reg)
void GX2InitBlendControlReg(GX2BlendControlReg *reg, GX2RenderTarget target, GX2BlendMode colorSrcBlend, GX2BlendMode colorDstBlend, GX2BlendCombineMode colorCombine, BOOL useAlphaBlend, GX2BlendMode alphaSrcBlend, GX2BlendMode alphaDstBlend, GX2BlendCombineMode alphaCombine)
void GX2SetScissor(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
void GX2InitTargetChannelMasksReg(GX2TargetChannelMaskReg *reg, GX2ChannelMask mask0, GX2ChannelMask mask1, GX2ChannelMask mask2, GX2ChannelMask mask3, GX2ChannelMask mask4, GX2ChannelMask mask5, GX2ChannelMask mask6, GX2ChannelMask mask7)
void GX2SetBlendConstantColorReg(GX2BlendConstantColorReg *reg)
void GX2InitBlendConstantColorReg(GX2BlendConstantColorReg *reg, float red, float green, float blue, float alpha)
void GX2SetCullOnlyControl(GX2FrontFace frontFace, BOOL cullFront, BOOL cullBack)
void GX2SetLineWidth(float width)
GX2AlphaToMaskMode
Definition: registers.h:26
void GX2GetPolygonControlReg(GX2PolygonControlReg *reg, GX2FrontFace *frontFace, BOOL *cullFront, BOOL *cullBack, BOOL *polyMode, GX2PolygonMode *polyModeFront, GX2PolygonMode *polyModeBack, BOOL *polyOffsetFrontEnable, BOOL *polyOffsetBackEnable, BOOL *polyOffsetParaEnable)
void GX2InitPointSizeReg(GX2PointSizeReg *reg, float width, float height)
void GX2InitScissorReg(GX2ScissorReg *reg, uint32_t x, uint32_t y, uint32_t width, uint32_t height)
uint32_t regs[2]
Definition: registers.h:170
void GX2GetBlendControlReg(GX2BlendControlReg *reg, GX2RenderTarget *target, GX2BlendMode *colorSrcBlend, GX2BlendMode *colorDstBlend, GX2BlendCombineMode *colorCombine, BOOL *useAlphaBlend, GX2BlendMode *alphaSrcBlend, GX2BlendMode *alphaDstBlend, GX2BlendCombineMode *alphaCombine)
uint32_t regs[5]
Definition: registers.h:200
void GX2InitViewportReg(GX2ViewportReg *reg, float x, float y, float width, float height, float nearZ, float farZ)
uint32_t regs[1]
Definition: registers.h:188
void GX2SetAlphaTestReg(GX2AlphaTestReg *reg)
GX2ChannelMask
Definition: registers.h:107
void GX2InitAlphaTestReg(GX2AlphaTestReg *reg, BOOL alphaTest, GX2CompareFunction func, float ref)
void GX2SetColorControl(GX2LogicOp rop3, uint8_t targetBlendEnable, BOOL multiWriteEnable, BOOL colorWriteEnable)
GX2PolygonMode
Definition: registers.h:99
void GX2SetColorControlReg(GX2ColorControlReg *reg)
void GX2SetPolygonControlReg(GX2PolygonControlReg *reg)
void GX2InitColorControlReg(GX2ColorControlReg *reg, GX2LogicOp rop3, uint8_t targetBlendEnable, BOOL multiWriteEnable, BOOL colorWriteEnable)
void GX2SetPolygonOffset(float frontOffset, float frontScale, float backOffset, float backScale, float clamp)
void GX2GetPolygonOffsetReg(GX2PolygonOffsetReg *reg, float *frontOffset, float *frontScale, float *backOffset, float *backScale, float *clamp)
GX2CompareFunction
Definition: registers.h:14
void GX2SetPointSize(float width, float height)
void GX2SetDepthOnlyControl(BOOL depthTest, BOOL depthWrite, GX2CompareFunction depthCompare)
uint32_t regs[1]
Definition: registers.h:176
void GX2SetAAMaskReg(GX2AAMaskReg *reg)
GX2BlendMode
Definition: registers.h:35
void GX2SetStencilMask(uint8_t frontMask, uint8_t frontWriteMask, uint8_t frontRef, uint8_t backMask, uint8_t backWriteMask, uint8_t backRef)
void GX2InitPolygonControlReg(GX2PolygonControlReg *reg, GX2FrontFace frontFace, BOOL cullFront, BOOL cullBack, BOOL polyMode, GX2PolygonMode polyModeFront, GX2PolygonMode polyModeBack, BOOL polyOffsetFrontEnable, BOOL polyOffsetBackEnable, BOOL polyOffsetParaEnable)
void GX2GetLineWidthReg(GX2LineWidthReg *reg, float *width)
void GX2GetAAMaskReg(GX2AAMaskReg *reg, uint8_t *upperLeft, uint8_t *upperRight, uint8_t *lowerLeft, uint8_t *lowerRight)
uint32_t regs[2]
Definition: registers.h:206
void GX2SetPointSizeReg(GX2PointSizeReg *reg)
void GX2SetAlphaToMaskReg(GX2AlphaToMaskReg *reg)
void GX2SetPointLimits(float min, float max)
void GX2GetPointLimitsReg(GX2PointLimitsReg *reg, float *min, float *max)
uint32_t regs[1]
Definition: registers.h:194
void GX2GetTargetChannelMasksReg(GX2TargetChannelMaskReg *reg, GX2ChannelMask *mask0, GX2ChannelMask *mask1, GX2ChannelMask *mask2, GX2ChannelMask *mask3, GX2ChannelMask *mask4, GX2ChannelMask *mask5, GX2ChannelMask *mask6, GX2ChannelMask *mask7)
void GX2SetBlendConstantColor(float red, float green, float blue, float alpha)
void GX2SetPolygonControl(GX2FrontFace frontFace, BOOL cullFront, BOOL cullBack, BOOL polyMode, GX2PolygonMode polyModeFront, GX2PolygonMode polyModeBack, BOOL polyOffsetFrontEnable, BOOL polyOffsetBackEnable, BOOL polyOffsetParaEnable)
GX2StencilFunction
Definition: registers.h:87
void GX2InitPointLimitsReg(GX2PointLimitsReg *reg, float min, float max)
void GX2GetScissorReg(GX2ScissorReg *reg, uint32_t *x, uint32_t *y, uint32_t *width, uint32_t *height)
uint32_t regs[1]
Definition: registers.h:140
void GX2GetColorControlReg(GX2ColorControlReg *reg, GX2LogicOp *rop3, uint8_t *targetBlendEnable, BOOL *multiWriteEnable, BOOL *colorWriteEnable)
void GX2SetDepthStencilControlReg(GX2DepthStencilControlReg *reg)
void GX2InitPolygonOffsetReg(GX2PolygonOffsetReg *reg, float frontOffset, float frontScale, float backOffset, float backScale, float clamp)
void GX2InitAAMaskReg(GX2AAMaskReg *reg, uint8_t upperLeft, uint8_t upperRight, uint8_t lowerLeft, uint8_t lowerRight)
int BOOL
Definition: wut_types.h:4
void GX2InitAlphaToMaskReg(GX2AlphaToMaskReg *reg, BOOL alphaToMask, GX2AlphaToMaskMode mode)
void GX2SetAlphaToMask(BOOL alphaToMask, GX2AlphaToMaskMode mode)
void GX2InitLineWidthReg(GX2LineWidthReg *reg, float width)
void GX2SetViewportReg(GX2ViewportReg *reg)
void GX2GetStencilMaskReg(GX2StencilMaskReg *reg, uint8_t *frontMask, uint8_t *frontWriteMask, uint8_t *frontRef, uint8_t *backMask, uint8_t *backWriteMask, uint8_t *backRef)
void GX2GetBlendConstantColorReg(GX2BlendConstantColorReg *reg, float *red, float *green, float *blue, float *alpha)
void GX2InitStencilMaskReg(GX2StencilMaskReg *reg, uint8_t frontMask, uint8_t frontWriteMask, uint8_t frontRef, uint8_t backMask, uint8_t backWriteMask, uint8_t backRef)
void GX2SetDepthStencilControl(BOOL depthTest, BOOL depthWrite, GX2CompareFunction depthCompare, BOOL stencilTest, BOOL backfaceStencil, GX2CompareFunction frontStencilFunc, GX2StencilFunction frontStencilZPass, GX2StencilFunction frontStencilZFail, GX2StencilFunction frontStencilFail, GX2CompareFunction backStencilFunc, GX2StencilFunction backStencilZPass, GX2StencilFunction backStencilZFail, GX2StencilFunction backStencilFail)
uint32_t regs[1]
Definition: registers.h:128
void GX2SetLineWidthReg(GX2LineWidthReg *reg)
void GX2SetAAMask(uint8_t upperLeft, uint8_t upperRight, uint8_t lowerLeft, uint8_t lowerRight)
void GX2SetPointLimitsReg(GX2PointLimitsReg *reg)
void GX2SetTargetChannelMasksReg(GX2TargetChannelMaskReg *reg)
uint32_t regs[1]
Definition: registers.h:158
void GX2InitDepthStencilControlReg(GX2DepthStencilControlReg *reg, BOOL depthTest, BOOL depthWrite, GX2CompareFunction depthCompare, BOOL stencilTest, BOOL backfaceStencil, GX2CompareFunction frontStencilFunc, GX2StencilFunction frontStencilZPass, GX2StencilFunction frontStencilZFail, GX2StencilFunction frontStencilFail, GX2CompareFunction backStencilFunc, GX2StencilFunction backStencilZPass, GX2StencilFunction backStencilZFail, GX2StencilFunction backStencilFail)
void GX2SetViewport(float x, float y, float width, float height, float nearZ, float farZ)
void GX2SetTargetChannelMasks(GX2ChannelMask mask0, GX2ChannelMask mask1, GX2ChannelMask mask2, GX2ChannelMask mask3, GX2ChannelMask mask4, GX2ChannelMask mask5, GX2ChannelMask mask6, GX2ChannelMask mask7)
void GX2SetPolygonOffsetReg(GX2PolygonOffsetReg *reg)
void GX2GetPointSizeReg(GX2PointSizeReg *reg, float *width, float *height)
void GX2GetAlphaToMaskReg(const GX2AlphaToMaskReg *reg, BOOL *alphaToMask, GX2AlphaToMaskMode *mode)
GX2BlendCombineMode
Definition: registers.h:58
uint32_t regs[2]
Definition: registers.h:134
void GX2SetAlphaTest(BOOL alphaTest, GX2CompareFunction func, float ref)
uint32_t regs[12]
Definition: registers.h:218
void GX2SetBlendControl(GX2RenderTarget target, GX2BlendMode colorSrcBlend, GX2BlendMode colorDstBlend, GX2BlendCombineMode colorCombine, BOOL useAlphaBlend, GX2BlendMode alphaSrcBlend, GX2BlendMode alphaDstBlend, GX2BlendCombineMode alphaCombine)
uint32_t regs[2]
Definition: registers.h:146
void GX2SetBlendControlReg(GX2BlendControlReg *reg)
void GX2GetAlphaTestReg(const GX2AlphaTestReg *reg, BOOL *alphaTest, GX2CompareFunction *func, float *ref)
GX2LogicOp
Definition: registers.h:67
void GX2GetViewportReg(GX2ViewportReg *reg, float *x, float *y, float *width, float *height, float *nearZ, float *farZ)
void GX2SetScissorReg(GX2ScissorReg *reg)