From a78d1f24e55a3aec186ebfa8c002b242676211ae Mon Sep 17 00:00:00 2001 From: Lucas Scharenbroich Date: Thu, 30 Jun 2022 07:58:42 -0500 Subject: [PATCH] Document GTEReadControl, GTESetScreenMode and GTESetTile --- docs/assets/css/toolref.css | 27 +++++- docs/toolboxref.html | 183 +++++++++++++++++++++++++++++++++++- 2 files changed, 208 insertions(+), 2 deletions(-) diff --git a/docs/assets/css/toolref.css b/docs/assets/css/toolref.css index 04221aa..7db65b0 100644 --- a/docs/assets/css/toolref.css +++ b/docs/assets/css/toolref.css @@ -1,4 +1,14 @@ /* Style for the fancy API documentation */ +div.example { + border-top: 1px solid red; +} + +div.example > h5 { + font-weight: bold; + font-size: larger; + color: #111; +} + div.api_intro h1, h2, h3, h4, h5 { font-family: helvetica, sans-serif; } @@ -24,6 +34,14 @@ div.api_intro h1, h2, h3, h4, h5 { margin: 1em 0; } + div.api:before { + border-bottom: 1px solid red; + content:""; + height: 1px; + width: 100%; + float: left; + } + div.api > p { margin-left: 100px; @@ -79,6 +97,11 @@ div.api_intro h1, h2, h3, h4, h5 { border-collapse: collapse; } + table.bitfield-definitions tr > td:first-child + { + white-space: nowrap; + } + table.bits td { padding: 5px; @@ -114,7 +137,9 @@ div.api_intro h1, h2, h3, h4, h5 { border-bottom: 1px solid black; font-family: helvetica; font-size: small; - margin-top: 2em; + /* margin-top: 2em; */ + margin-left: 100px; + margin-bottom: 15px; } div.warning:before diff --git a/docs/toolboxref.html b/docs/toolboxref.html index 39743df..173b615 100644 --- a/docs/toolboxref.html +++ b/docs/toolboxref.html @@ -326,7 +326,7 @@ style: toolref

$02XX

-

GTEStartUp

+

GTEStartUp

Starts up the GTE Tool Set for use by an application.

@@ -733,9 +733,36 @@ style: toolref
Errors
+

None

C
+

extern pascal Word GTEReadControl()

+
+
+
Returned value
+

+ The value returned in userInput bitfield are show below. +

+ + + + + + + + +
1514131211109876543210
+ + + + + + + + + +
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.
Bits 12-15ReservedMust be zero.
@@ -758,6 +785,16 @@ style: toolref previous contents + + width + + Word—Width of the playfield in pixels. Must be even. + + + height + + Word—Height of the playfield in pixels. + @@ -792,6 +829,103 @@ style: toolref
C
+

extern pascal void GTESetScreenMode(width, height)

+

Word width;

+

Word height;

+
+
+
Predefined Screen Sizes
+

+ If the width value is set to a small number, then one of the pre-defined screen sizes will be selected. Set + the width to the index number of the screen sizes in the table below to set the screen size to + those dimension. The height value must still be passed, but is ignored. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Play Field IdWidthHeightSize (bytes)Percent of Full Screen
0320200Full Screen32,000100%
1272192Sword of Sodan26,11281.6%
2256200NES (approx.)25,60080.0%
3256176Task Force22,52870.4%
4280160Defender of the World22,40070.0%
5256160Rastan20,48064.0%
6240160Game Boy Advanced19,20060.0%
7288128Ancient Land of Y's18,43257.6%
8160144Game Boy Color11,52036.0%
@@ -814,6 +948,21 @@ style: toolref previous contents + + x + + Word—Horizontal index of the TileStore tile to set. Must be in the range of 0 to 40. + + + y + + Word—Vertical index of the TileStore tile to set. Must be in the range of 0 to 25. + + + tileID + + Word—Tile ID to place in the TileStore. + @@ -848,6 +997,38 @@ style: toolref
C
+

extern pascal void GTESetTile(x, y, tileID)

+

Word width;

+

Word height;

+

Word tileID;

+
+
+
Tile Identifiers
+

+ The tile ID word is defined as follows +

+ + + + + + + + + +
1514131211109876543210
+ + + + + + + + + + + +
Bits 0-8tileIndexThe index of the tile in the current Tile Set. A Tile Set can be defined by calling the GTELoadTileSet function
Bit 9fTileHFlipFlips the tile horizontally when set.
Bit 10fTileVFlipFlips the tile vertically when set.
Bit 11fTileDynamicIdentifies this tile as a dynamic tile. The tileIndex is used to identify the dynamic tile data slow and must be in the range 0 to 31.
Bit 12fTileSolidHint bit that marks a tile as having no mask. Can improve performance when ENGINE_MODE_TWO_LAYER is set.
Bit 13fTileFringeUnused. Must be zero.
Bit 14fTilePrioritySets the tile to high priority. Sprites will render under this tile, if supported.
Bit 15ReservedMust be zero.