From 0c7a6364b755c139c0d818276701f254ac07f4e6 Mon Sep 17 00:00:00 2001 From: Lucas Scharenbroich Date: Sat, 23 Jul 2022 09:57:03 -0500 Subject: [PATCH] Sync documentation with current KFest demo capabilities --- docs/toolboxref.html | 238 +++++++++++++++++++++++++------------------ 1 file changed, 141 insertions(+), 97 deletions(-) diff --git a/docs/toolboxref.html b/docs/toolboxref.html index 769d8cc..bc7ace7 100644 --- a/docs/toolboxref.html +++ b/docs/toolboxref.html @@ -6,11 +6,15 @@ style: toolref
@@ -52,189 +56,201 @@ style: toolref Description - Housekeeping Routines + Housekeeping Routines - GTEBootInit + GTEBootInit Initializes the GTE Tool Set; called only by the Tool Locator — must not be called by an application - GTEStartUp + GTEStartUp Starts up the GTE Tool Set for use by an application - GTEShutDown + GTEShutDown Shuts down the GTE Tool Set when an application quits - GTEVersion + GTEVersion Returns the version number of the GTE Tool Set - GTEReset + GTEReset Resets the GTE Tool Set; called only when the system is reset — must not be called by an application - GTEStatus + GTEStatus Indicates whether the GTE Tool Set is active - Sprite Routines + Sprite Routines - GTECreateSpriteStamp + GTECreateSpriteStamp Creates a sprite stamp from the tile set - GTEAddSprite + GTEAddSprite Add a active sprite to the scene - GTEMoveSprite + GTEMoveSprite Changes a sprite's location - GTEUpdateSprite + GTEUpdateSprite Changes a sprite's tile set reference and display flags - GTERemoveSprite + GTERemoveSprite Removes a sprite from the scene - Tile Routines + Tile Routines - GTELoadTileSet + GTELoadTileSet Copies a tileset into the GTE tileset memory - GTESetTile + GTESetTile Assigns a tile to a tile store - GTEGetTileAt + GTEGetTileAt Retrieves the tile ID stored in the tile store - GTECopyTileToDynamic + GTECopyTileToDynamic Copies a tile from the tileset memory into the managed dynamic tile memory. Changing the dynamic tile data will result in all of the tiles updating on the next call the GTERender() - GTEGetTileDataAddr + GTEGetTileDataAddr Returns the base address of the tiledata memory - GTEFillTileStore + GTEFillTileStore Fills the entire tile store with a tile ID. - Primary Background Routines + Primary Background Routines - GTESetBG0Origin + GTESetBG0Origin Sets the upper-left origin point in the primary background - GTERender + GTERender Draws the current scene to the graphics screen - GTEGetBG0TileMapInfo + GTEGetBG0TileMapInfo Returns a record describing the number of tiles in the primary tilemap and a pointer to the tilemap data. - GTESetBG0TileMapInfo + GTESetBG0TileMapInfo Defines a tile map for the primary background - GTERefresh + GTERefresh Forces all of the tiles in the tile store to be refreshed on the next render. - Secondary Background Routines + Secondary Background Routines - GTESetBG1Origin + GTESetBG1Origin Sets the upper-left origin point in the secondary background - GTECopyPicToBG1 + GTECopyPicToBG1 Copies an uncompressed pixel image into the secondard background buffer - GTESetBG1TileMapInfo + GTESetBG1TileMapInfo Defines a tile map for the secondary background + + GTESetBG1Displacement + Sets a displacement into the BG1 offset table. + + + GTESetBG1Rotation + Sets the rotation angle of the BG1 buffer. + + + GTEClearBG1Buffer + Clears the BG1 pixel buffer with a 16-bit value. + - Timer Routines + Timer Routines - GTEAddTimer + GTEAddTimer Add a timer callback that is fired after a designated number of VBL ticks - GTERemoveTimer + GTERemoveTimer Removes an active timer - GTEStartScript + GTEStartScript Registers a GTE script to be handled in the background - Overlay Routines + Overlay Routines - GTESetOverlay + GTESetOverlay Registers an overlay routine to be integrated into the renderer. Typically used for status bars or messages. - GTEClearOverlay + GTEClearOverlay Removes the current overlay from the renderer - Functions affecting the global state + Functions affecting the global state - GTESetScreenMode + GTESetScreenMode Sets the playing field's port rectangle to a pre-defined size, or a specified width and height - GTESetPalette + GTESetPalette Copies a palette to the Super HiRes palette memory - GTEBindSCBArray + GTEBindSCBArray Takes an array of SCB bytes and binds them to either the Primary or Secondary background's vertical position - GTEGetScreenInfo + GTEGetScreenInfo Returns a records describing the origin, width and height of the playfield on the physical graphics screen. - Misc. Functions + Misc. Functions - GTEReadControl + GTEReadControl Reads the keyboard and returns key events in a gamepad structure - GTEGetSeconds + GTEGetSeconds Returns the number of seconds elapsed since the toolset was started @@ -296,7 +312,7 @@ style: toolref

$01XX

-

GTEBootInit

+

GTEBootInit

Initializes the GTE Tool Set; called only by the Tool Locator.

@@ -456,7 +472,7 @@ style: toolref

$03XX

-

GTEShutDown

+

GTEShutDown

Shuts down the GTE Toolset when an application quits.

@@ -480,7 +496,7 @@ style: toolref

$04XX

-

GTEVersion

+

GTEVersion

Returns the version number of the GTE Tool Set.

@@ -554,7 +570,7 @@ style: toolref

$05XX

-

GTEReset

+

GTEReset

Resets the GTE Tool Set; called only when the system is reset.

@@ -583,7 +599,7 @@ style: toolref

$06XX

-

GTEStatus

+

GTEStatus

Indicates whether the GTE Tool Set is active.

@@ -662,7 +678,7 @@ style: toolref

$09XX

-

GTEReadControl

+

GTEReadControl

Parameters
@@ -745,9 +761,9 @@ style: toolref Bits 0-7keyCodeKeyboard code read from the Keyboard register. If no key is currently pressed, this value is zero. Bit 8ReservedMust be zero. - Bit 9fPadButtonBSet to 1 if the B button of the gamepad is pressed. Mapped to the option key by default. - Bit 10fPadButtonASet to 1 if the A button of the gamepad is pressed. Mapped to the command key by default. - Bit 11fKeyDownSet to 1 on the initial press of a key. If a key is held down, the keyCode will be set and this bit will be zero. + Bit 9PAD_BUTTON_BSet to 1 if the B button of the gamepad is pressed. Mapped to the option key by default. + Bit 10PAD_BUTTON_ASet to 1 if the A button of the gamepad is pressed. Mapped to the command key by default. + Bit 11PAD_KEY_DOWNSet to 1 on the initial press of a key. If a key is held down, the keyCode will be set and this bit will be zero. Bits 12-15ReservedMust be zero. @@ -756,7 +772,7 @@ style: toolref

$0AXX

-

GTESetScreenMode

+

GTESetScreenMode

Parameters
@@ -936,7 +952,7 @@ style: toolref

$0BXX

-

GTESetTile

+

GTESetTile

Parameters
@@ -1040,7 +1056,7 @@ style: toolref

$0CXX

-

GTESetBG0Origin

+

GTESetBG0Origin

Sets the coordinate of the upper-left corner of the playfield within the primary background buffer. The coordiate values are unsigned, so transitioning from 0 to -1 will result in a discontinuous jump in the background position. @@ -1113,7 +1129,7 @@ style: toolref

$0DXX

-

GTERender

+

GTERender

Renders the current playfield to the graphics screen.

Parameters
@@ -1209,7 +1225,7 @@ style: toolref

$0EXX

-

GTELoadTileSet

+

GTELoadTileSet

Loads a tileset into the internal GTE memory buffer. The pointer must point to tiles that are already in GTE tile format. @@ -1281,7 +1297,7 @@ style: toolref

$0FXX

-

GTECreateSpriteStamp

+

GTECreateSpriteStamp

Creates a sprite stamp (cache sprite pixel data copy) from a sprite identifier and the current tile set. The vBuffAddr points to a location in the internal virtual buffer area. In @@ -1387,7 +1403,7 @@ style: toolref

$10XX

-

GTEAddSprite

+

GTEAddSprite

Adds a new sprite to the current scene. If a sprite is already assigned to the sprite slot, then that sprite is removed and replaced with the new sprite. @@ -1495,10 +1511,10 @@ style: toolref - - - - + + + +
Bits 0-8tileIndexThe index of a tile in the current Tile Set that defines the top-left part of the sprite
Bit 9fSpriteHorzFlipFlips the sprite horizontally.
Bit 10fSpriteVertFlipFlips the sprite vertically.
Bits 11-12fSpriteSizeSets the size of the sprite
  • 00 - 8x8
  • 01 - 8x16
  • 10 - 16x8
  • 11 - 16x16
Bit 13fSpriteHideWhen set, does not render the sprite.
Bit 9SPRITE_HFLIPFlips the sprite horizontally.
Bit 10SPRITE_VFLIPFlips the sprite vertically.
Bits 11-12SPRITE_SIZESets the size of the sprite
  • 00 - 8x8
  • 01 - 8x16
  • 10 - 16x8
  • 11 - 16x16
Bit 13SPRITE_HIDEWhen set, does not render the sprite.
Bit 14-15ReservedMust be zero.
@@ -1507,7 +1523,7 @@ style: toolref

$11XX

-

GTEMoveSprite

+

GTEMoveSprite

Repositions a sprite on the play field.

Parameters
@@ -1583,7 +1599,7 @@ style: toolref

$12XX

-

GTEUpdateSprite

+

GTEUpdateSprite

Changes the stamp or the status flags of a sprite. The size of the sprite cannot be changed. Typically, an application will call GTEUpdateSprite immediately after GTEAddSprite to @@ -1663,7 +1679,7 @@ style: toolref

$13XX

-

GTERemoveSprite

+

GTERemoveSprite

Removes a sprite from the play field.

Parameters
@@ -1727,7 +1743,7 @@ style: toolref

$14XX

-

GTEGetSeconds

+

GTEGetSeconds

Returns the number of seconds that have elapsed since the engine was started. This is a 16-bit value and will wrap around after 65536 seconds (~18 hours)

Parameters
@@ -1795,7 +1811,7 @@ style: toolref

$15XX

-

GTECopyTileToDynamic

+

GTECopyTileToDynamic

Copies a tile by ID into one of the dynamic tile slots. If a dynamic tile associated with the slot is visible, it will show the new data after the next call to GETRender. @@ -1871,7 +1887,7 @@ style: toolref

$16XX

-

GTESetPalette

+

GTESetPalette

Sets one of the 16 palettes to the RGB values in the passed array. This is a convenience function that immediately updated the visible palette. The palette change is not deferred. @@ -1944,7 +1960,7 @@ style: toolref

$17XX

-

GTECopyPicToBG1

+

GTECopyPicToBG1

Copies an uncompressed SHR image into the secondard background pixel buffer. This is an easy way to load a background image into the secondary layer. SCB values and palettes are not copied. @@ -2029,7 +2045,7 @@ style: toolref

$18XX

-

GTEBindSCBArray

+

GTEBindSCBArray

Binds an array of SCB values to either the primary or secondard background layer. This will automatically update the SHR screen SCB values as the vertical offset of the designated background layer changes. @@ -2101,7 +2117,7 @@ style: toolref

$19XX

-

GTEGetBG0TileMapInfo

+

GTEGetBG0TileMapInfo

Returns information about the current BG0 tile map.

@@ -2192,7 +2208,7 @@ style: toolref

$1AXX

-

GTEGetScreenInfo

+

GTEGetScreenInfo

Returns information about the current position and size of the play field.

@@ -2293,7 +2309,7 @@ style: toolref

$1BXX

-

GTESetBG1Origin

+

GTESetBG1Origin

Sets the coordinate of the upper-left corner of the playfield within the secondary background buffer. The coordiate values are unsigned, so transitioning from 0 to -1 will result in a discontinuous jump in the background position. @@ -2368,7 +2384,7 @@ style: toolref

$1CXX

-

GTEGetTileAt

+

GTEGetTileAt

Returns the tile at a local coordinate poiint. The primary use of this function is to lookup a Tile ID using a sprite's coordinates. @@ -2451,7 +2467,7 @@ style: toolref

$1DXX

-

GTESetBG0TileMapInfo

+

GTESetBG0TileMapInfo

Sets a tile map that will be used to automatically populate the primary background layer based on the current origin. Behavior is undefined if the origin is set to a value that is outside the bounds of the tilemap. @@ -2526,11 +2542,41 @@ style: toolref

Word height;

Pointer tileMapPtr;

+ +
+
Tile Map Entries
+

+ The values in a tilemap are an array of 16-bit values. +

+ + + + + + + + + +
1514131211109876543210
+ + + + + + + + + + + +
Bits 0-8tileIndexThe index of a tile in the current Tile Set
Bit 9TILE_HFLIP_BITFlip the tile horizontally when rendering.
Bit 10TILE_VFLIP_BITFlip the tile vertically when rendering.
Bit 11TILE_DYN_BITMarks a tile to use the dynamic tile data. The tileIndex must be between 0 and 31 if this bit is set.
Bit 12TILE_SOLID_BITA hint bit that is used in ENGINE_MODE_TWO_LAYER to improve performance.
Bit 13TILE_FRINGE_BITUnused. Must be zero.
Bit 14TILE_PRIORITY_BITSets the tile to be high priority to render on top of sprites.
Bit 15ReservedMust be zero.
+
+

$1EXX

-

GTESetBG1TileMapInfo

+

GTESetBG1TileMapInfo

Sets a tile map that will be used to automatically populate the secondary background layer based on the current origin. Behavior is undefined if the origin is set to a value that is outside the bounds of the tilemap. @@ -2609,7 +2655,7 @@ style: toolref

$1FXX

-

GTEAddTimer

+

GTEAddTimer

Adds a timer with a callback function and a delay in VBL ticks. Timers may be repeated or one-shot timers. A one-shot timer will remove itself after firing. Timers are handled on a best-effort basis. It is possible that a timer @@ -2706,7 +2752,7 @@ style: toolref

$20XX

-

GTERemoveTimer

+

GTERemoveTimer

Removed a timer that had been added to the system.

Parameters
@@ -2770,7 +2816,7 @@ style: toolref

$21XX

-

GTEStartScript

+

GTEStartScript

This API is under active development at this time.

Parameters
@@ -2840,7 +2886,7 @@ style: toolref

$22XX

-

GTESetOverlay

+

GTESetOverlay

This API is under active development at this time.

Parameters
@@ -2916,7 +2962,7 @@ style: toolref

$23XX

-

GTEClearOverlay

+

GTEClearOverlay

Removes the active overlay. This API is under active development at this time.

Parameters
@@ -2974,7 +3020,7 @@ style: toolref

$24XX

-

GTEGetTileDataAddr

+

GTEGetTileDataAddr

This API is under active development at this time.

Parameters
@@ -3031,7 +3077,7 @@ style: toolref

$25XX

-

GTEFillTileStore

+

GTEFillTileStore

Fills the entire Tile Store with a specific Tile ID value.

@@ -3097,7 +3143,7 @@ style: toolref

$26XX

-

GTERefresh

+

GTERefresh

Forces a refresh of the play field. This is implemented by adding all of the visible tiles to the dirty tile queue which will force them to be redrawn on the next call to GTERender(). @@ -3121,7 +3167,7 @@ style: toolref

$27XX

-

GTESetBG1Displacement

+

GTESetBG1Displacement

Sets a displacement into the BG1 offset table. Must be a value between 0 and 31.

@@ -3187,7 +3233,7 @@ style: toolref

$28XX

-

GTESetBG1Rotation

+

GTESetBG1Rotation

Sets the rotation angle of the BG1 buffer. There are 64 sets in the angle tables, so the value must be between 0 and 63. @@ -3255,7 +3301,7 @@ style: toolref

$29XX

-

GTEClearBG1Buffer

+

GTEClearBG1Buffer

Clears the BG1 pixel buffer with a 16-bit value.

@@ -3318,6 +3364,4 @@ style: toolref

Word value;

- -