Kamui2 Specifications

Version 0.08

Revision History


Flow control of Kamui2


Function Reference


Functions for getting version information

kmGetVersionInfo Obtains the Version Information.


Functions for initializing devices

kmInitDevice Initializes the hardware device.
kmUnloadDevice Unloads HW device.


Functions for controlling display

kmSetDisplayMode Sets the display mode of the frame buffer.
kmChangeDisplayDitherMode Sets up dither.
kmChangeDisplayAntialiasMode Sets the anti-aliasing filter.
kmBlankScreen Stops the screen display of the frame buffer, and performs blanking.
kmSetHSyncLine Specifies the display line on which an interrupt is caused.
kmGetCurrentScanline Reads the current H-Sync line.
kmAdjustDisplayCenter Adjusts the display position of the frame buffer on the screen.
kmGetGunTriggerPos Returns the position where the trigger of Gun Peripheral is pressed.
kmGetCurrentDisplaySurface Returns the pointer to the currently displayed surface.
kmGetDisplayInfo Returns information about the display.
kmGetDisplayFilterMode Returns the filter mode.
kmGetDisplayColorMode Returns the color mode.
kmGetDisplaySize Returns size of the screen.
kmWaitVBlank Waits for V-Blank.


Functions for controlling buffer

kmSetSystemConfiguration Controls buffers (Vertex/Frame/Native) used in Kamui2.


Functions for global setting (setting up one rendering parameter at a scene)

kmSetCullingRegister Specifies a threshold value for culling small polygons.
kmSetColorClampValue Sets the color clamp value.
kmSetColorClampMax Specifies the color clamp maximum value.
kmSetColorClampMin Specifies the minimum color clamp value.
kmSetFogTableColor Specifies a table fog color.
kmSetFogVertexColor Specifies a vertex fog color.
kmSetFogTable Sets the fog table.
kmSetFogDensity Specifies a coefficient to table fog.
kmGenerateFogTable Specifies a fog table and coefficient to table fog.
kmConvertFogDensity Converts fog coefficient.
kmSetPaletteMode Sets the on-chip palette mode.
kmSetPaletteData Sets the on-chip palette data.
kmSetPaletteBankData Rewrites part of the on-chip palette data.
kmSetPaletteBank Changes entry of palette, in banks.
kmSetBorderColor Sets the border (outside of the display screen) color.
kmSetBackGround Specifies the vertex and CONTEXT for use in the background.
kmSetPixelClipping Specifies pixel-unit clipping.
kmSetStrideWidth Specifies the stride size for stride texture.
kmSetCheapShadowMode Sets the cheap shadow mode.
kmSetGlobalClipping Sets global clipping.
kmResetRenderer Resets the rendering pipeline through software.
(For compatibility purpose)
kmSetBackGroundRenderState Registers the rendering parameter of the background plane.
kmSetBackGroundPlane Sets the background plane.


Vertex definition functions


Functions for controlling rendering parameter

kmInitStripContext Initializes StripContext (KMSTRIPCONTEXT/KMTWOVOLUMESTRIPCONTEXT).
kmRegisterStripContext Registers with the system KMSTRIPCONTEXT/KMTWOVOLUMESTRIPCONTEXT.(user-defined)
kmGenerateStripHead Generate and build Rendering Parameter (KMSTRIPHEAD).
kmGenerateStripHead00 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType00.
kmGenerateStripHead01 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType01.
kmGenerateStripHead02 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType02.
kmGenerateStripHead03 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType03.
kmGenerateStripHead04 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType04.
kmGenerateStripHead05 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType05.
kmGenerateStripHead06 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType06.
kmGenerateStripHead07 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType07.
kmGenerateStripHead08 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType08.
kmGenerateStripHead09 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType09.
kmGenerateStripHead10 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType10.
kmGenerateStripHead11 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType11.
kmGenerateStripHead12 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType12.
kmGenerateStripHead13 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType13.
kmGenerateStripHead14 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType14.
kmGenerateStripHead15 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType15.
kmGenerateStripHead16 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType16.
kmGenerateStripHead17 Generate and build Rendering Parameter(KMSTRIPHEAD) for VertexType17.
kmSetStripHead Registers with the system as parameters to be used for rendering.(KMSTRIPHEAD)
(For compatibility purpose)
kmProcessVertexRenderState Sets rendering parameters.
kmSetVertexRenderState Registers with the system as parameters to be used for rendering.
kmSetModifierRenderState Registers with the system as the second rendering parameter.
(Description of the structures to be used)
KMSTRIPCONTEXT/KMTWOVOLUMESTRIPCONTEXT KMSTRIPCONTEXT/KMTWOVOLUMESTRIPCONTEXT Structure
KMVERTEXCONTEXT KMVERTEXCONTEXT Structure (For compatibility purpose)


Functions for controlling vertex registration

kmBeginScene Starts the Scene.
kmEndScene Ends the Scene.
kmBeginPass Starts Pass.
kmEndPass Ends Pass.
kmContinuePass Continues Pass.
kmStartVertexStrip Starts Strip.
kmEndVertexStrip Ends Strip.
kmStartStrip Performs start of Strip (direct transfer).
kmEndStrip Ends Strip (direct transfer).
kmSetVertex Sends VertexParameter.
kmSetUserClipping Set UserClippingParameter.


Functions for update KMSTRIPCONTEXT/KMTWOVOLUMESTRIPCONTEXT

kmChangeStripListType Changes ListType.
kmChangeStripUserClipMode Changes UserClipMode.
kmChangeStripShadowMode Changes ShadowMode.
kmChangeStripIntensityMode Changes IntensityMode.
kmChangeStripOffset Changes Offset.
kmChangeStripGouraud Changes Gouraud.
kmChangeStripDepthCompareMode Changes DepthCompareMode.
kmChangeStripModifierInstruction Changes ModifierInstruction.
kmChangeStripCullingMode Changes CullingMode.
kmChangeStripZWriteDisable Changes ZWriteDisable.
kmChangeStripDCalcControl Changes DCalcControl.
kmChangeStripBlendingMode Changes BlendingMode.
kmChangeStripSRCSelect Changes SRCSelect.
kmChangeStripDSTSelect Changes DSTSelect.
kmChangeStripFogMode Changes FogMode.
kmChangeStripColorClamp Changes ColorClamp.
kmChangeStripUseAlpha Changes UseAlpha.
kmChangeStripIgnoreTextureAlpha Changes IgnoreTextureAlpha.
kmChangeStripFlipUV Changes FlipUV.
kmChangeStripClampUV Changes ClampUV.
kmChangeStripFilterMode Changes FilterMode.
kmChangeStripSuperSampleMode Changes SuperSampleMode.
kmChangeStripMipmapAdjust Changes MipmapAdjust.
kmChangeStripTextureShadingMode Changes TextureShadingMode.
kmChangeStripPaletteBank Changes PaletteBank.
kmChangeStripTextureSurface Changes TextureSurface.
kmChangeStripTextureAddress Changes TextureAddress.
kmChangeStripFaceColor Changes FaceColor.
kmChangeStripFaceOffsetColor Changes FaceOffsetColor.
kmChangeStripSpriteBaseColor Changes SpriteBaseColor.
kmChangeStripSpriteOffsetColor Changes SpriteOffsetColor.


Functions for update rendering parameter registration

kmChangeContextListType Changes ListType.
kmChangeContextUserClipMode Changes UserClipMode.
kmChangeContextShadowMode Changes ShadowMode.
kmChangeContextIntensityMode Changes IntensityMode.
kmChangeContextOffset Changes Offset.
kmChangeContextGouraud Changes Gouraud.
kmChangeContextDepthCompareMode Changes DepthCompareMode.
kmChangeContextModifierInstruction Changes ModifierInstruction.
kmChangeContextCullingMode Changes CullingMode.
kmChangeContextZWriteDisable Changes ZWriteDisable.
kmChangeContextDCalcControl Changes DCalcControl.
kmChangeContextBlendingMode Changes BlendingMode.
kmChangeContextSRCSelect Changes SRCSelect.
kmChangeContextDSTSelect Changes DSTSelect.
kmChangeContextFogMode Changes FogMode.
kmChangeContextColorClamp Changes ColorClamp.
kmChangeContextUseAlpha Changes UseAlpha.
kmChangeContextIgnoreTextureAlpha Changes IgnoreTextureAlpha.
kmChangeContextFlipUV Changes FlipUV.
kmChangeContextClampUV Changes ClampUV.
kmChangeContextFilterMode Changes FilterMode.
kmChangeContextSuperSampleMode Changes SuperSampleMode.
kmChangeContextMipmapAdjust Changes MipmapAdjust.
kmChangeContextTextureShadingMode Changes TextureShadingMode.
kmChangeContextPaletteBank Changes PaletteBank.
kmChangeContextTextureSurface Changes TextureSurface.
kmChangeContextTextureAddress Changes TextureAddress.
kmChangeContextFaceColor Changes FaceColor.
kmChangeContextFaceOffsetColor Changes FaceOffsetColor.
kmChangeContextSpriteBaseColor Changes SpriteBaseColor.
kmChangeContextSpriteOffsetColor Changes SpriteOffsetColor.


Functions for controlling rendering

kmRender Starts rendering.
kmRenderTexture Begins rendering for a texture mamory.
kmQueryFinishLastTextureDMA Checks for previous texture load DMA transfer end.
kmGetRenderStatus Gets status of rendering that has been executed.


Functions for controlling texture

kmCreateTextureSurface Secures a texture surface.
kmCreateCombinedTextureSurface Secures a VQ texture surface.
kmCreateContiguousTextureSurface Secures two or more texture surfaces simultaneously.
kmCreateFixedTextureArea Secures the fixed texture area.
kmFreeTexture Releases a texture surface.
kmFreeFixedTextureArea Releases a fixed texture area.
kmGetFreeTextureMem Obtains the available texture memory space.
kmGetTexture Reads the texture in texture memory.
kmGetCurrentTextureStatus Reads out information about the frame buffer memory management.
kmLoadTexture Loads texture data.
kmLoadTextureBlock Loads texture data blocks.
kmLoadTexturePart Loads part of texture data.
kmLoadRectangleTexturePart Writes the rectangular area (partial) of texture data in the main memory.
kmLoadYUVTexture Reads the YUV-format texture data.
kmLoadVQCodebook Re-reads the code book portion of VQ texture.
kmReLoadMipmap Overwrites the mipmap texture.
kmSetStrideWidth Specifies the stride size for stride texture.
kmGarbageCollectTexture Performs garbage collection of frame buffer memory.


Functions for controlling callback

kmSetEORCallback Specifies a rendering end callback function.
kmSetVSyncCallback Specifies the callback function to be called at an entry into the vertical flyback segment (Vsync).
kmSetHSyncCallback Specifies the callback function to be called at an entry into the horizontal flyback segment (Hsync).
kmSetTexOverflowCallback Registers the callback function to call when there is no texture memory left.
kmSetStripOverRunCallback Specifies the callback function to be called when the rendering of the next strip is not completed during the display period of the vertical dimension of a strip buffer.
kmSetEndOfVertexCallback Specifies the callback function to be called at the end of transfer of the data of one scene.
kmSetEndOfYUVCallback Registers a callback function to use for the YUV termination interrupt.
kmSetWaitVsyncCallback Specifies a callback function to be called during a Vsync wait state.
kmSetFatalErrorCallback Registers callback function for FatalError.


Functions for controlling utility-related tasks

kmuCalculateKamuiWorkareaSize Calculate KAMUI work area size.
kmuConvertFBtoBMP Converts rectangle format to Windows BMP format.
kmuCreateTwiddledTexture Converts KAMUI bit map format to Twiddled format.
kmuCreateTwiddledTextureEx Converts KAMUI bit map format to Twiddled format.
kmuCheckPassTable Checks VERTEXCONTEXT.
kmuGeneratePassTable Generates multipass VERTEXCONTEXT automatically.