diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..f40fbd8 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,5 @@ +_site +.sass-cache +.jekyll-cache +.jekyll-metadata +vendor diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..086a5c9 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,25 @@ +--- +permalink: /404.html +layout: default +--- + + + +
+

404

+ +

Page not found :(

+

The requested page could not be found.

+
diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000..2052726 --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,34 @@ +source "https://rubygems.org" +# Hello! This is where you manage which Jekyll version is used to run. +# When you want to use a different version, change it below, save the +# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: +# +# bundle exec jekyll serve +# +# This will help ensure the proper Jekyll version is running. +# Happy Jekylling! +# gem "jekyll", "~> 4.2.2" +gem "github-pages", "~> 203", group: :jekyll_plugins +# This is the default theme for new Jekyll sites. You may change this to anything you like. +gem "minima", "~> 2.5" +# If you want to use GitHub Pages, remove the "gem "jekyll"" above and +# uncomment the line below. To upgrade, run `bundle update github-pages`. +# gem "github-pages", group: :jekyll_plugins +# If you have any plugins, put them here! +group :jekyll_plugins do + gem "jekyll-feed", "~> 0.12" +end + +# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem +# and associated library. +platforms :mingw, :x64_mingw, :mswin, :jruby do + gem "tzinfo", "~> 1.2" + gem "tzinfo-data" +end + +# Performance-booster for watching directories on Windows +gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] + +# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem +# do not have a Java counterpart. +gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000..e4426be --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,284 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (6.0.5) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.11.1) + colorator (1.1.0) + commonmarker (0.17.13) + ruby-enum (~> 0.5) + concurrent-ruby (1.1.10) + dnsruby (1.61.9) + simpleidn (~> 0.1) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + ethon (0.15.0) + ffi (>= 1.15.0) + eventmachine (1.2.7-x64-mingw32) + execjs (2.8.1) + faraday (1.10.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + ffi (1.15.5-x64-mingw32) + forwardable-extended (2.6.0) + gemoji (3.0.1) + github-pages (203) + github-pages-health-check (= 1.16.1) + jekyll (= 3.8.5) + jekyll-avatar (= 0.7.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.1.6) + jekyll-default-layout (= 0.1.4) + jekyll-feed (= 0.13.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.12.1) + jekyll-mentions (= 1.5.1) + jekyll-optional-front-matter (= 0.3.2) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.15.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.1) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.6.1) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) + jekyll-theme-architect (= 0.1.1) + jekyll-theme-cayman (= 0.1.1) + jekyll-theme-dinky (= 0.1.1) + jekyll-theme-hacker (= 0.1.1) + jekyll-theme-leap-day (= 0.1.1) + jekyll-theme-merlot (= 0.1.1) + jekyll-theme-midnight (= 0.1.1) + jekyll-theme-minimal (= 0.1.1) + jekyll-theme-modernist (= 0.1.1) + jekyll-theme-primer (= 0.5.4) + jekyll-theme-slate (= 0.1.1) + jekyll-theme-tactile (= 0.1.1) + jekyll-theme-time-machine (= 0.1.1) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.11.1) + kramdown (= 1.17.0) + liquid (= 4.0.3) + mercenary (~> 0.3) + minima (= 2.5.1) + nokogiri (>= 1.10.4, < 2.0) + rouge (= 3.13.0) + terminal-table (~> 1.4) + github-pages-health-check (1.16.1) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (~> 4.0) + public_suffix (~> 3.0) + typhoeus (~> 1.3) + html-pipeline (2.14.1) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.8.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.8.5) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-avatar (0.7.0) + jekyll (>= 3.0, < 5.0) + jekyll-coffeescript (1.1.1) + coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-commonmark (1.3.1) + commonmarker (~> 0.14) + jekyll (>= 3.7, < 5.0) + jekyll-commonmark-ghpages (0.1.6) + commonmarker (~> 0.17.6) + jekyll-commonmark (~> 1.2) + rouge (>= 2.0, < 4.0) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) + jekyll-feed (0.13.0) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.12.1) + jekyll (~> 3.4) + octokit (~> 4.0, != 4.4.0) + jekyll-mentions (1.5.1) + html-pipeline (~> 2.3) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.15.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.1) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + rubyzip (>= 1.3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) + jekyll-theme-architect (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.5.4) + jekyll (> 3.5, < 5.0) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.1.1) + jekyll (~> 3.5) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.11.1) + gemoji (~> 3.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) + kramdown (1.17.0) + liquid (4.0.3) + listen (3.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.3.6) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.15.0) + multipart-post (2.2.0) + nokogiri (1.12.5-x64-mingw32) + racc (~> 1.4) + octokit (4.24.0) + faraday (>= 1, < 3) + sawyer (~> 0.9) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (3.1.1) + racc (1.6.0) + rb-fsevent (0.11.1) + rb-inotify (0.10.1) + ffi (~> 1.0) + rouge (3.13.0) + ruby-enum (0.9.0) + i18n + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + safe_yaml (1.0.5) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + simpleidn (0.2.1) + unf (~> 0.1.4) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (1.2.9) + thread_safe (~> 0.1) + tzinfo-data (1.2022.1) + tzinfo (>= 1.0.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (1.8.0) + wdm (0.1.1) + zeitwerk (2.5.4) + +PLATFORMS + x64-mingw32 + +DEPENDENCIES + github-pages (~> 203) + http_parser.rb (~> 0.6.0) + jekyll-feed (~> 0.12) + minima (~> 2.5) + tzinfo (~> 1.2) + tzinfo-data + wdm (~> 0.1.1) + +BUNDLED WITH + 2.3.15 diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..47f4509 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,53 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely edit after that. If you find +# yourself editing this file very often, consider using Jekyll's data files +# feature for the data you need to update frequently. +# +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'bundle exec jekyll serve'. If you change this file, please restart the server process. +# +# If you need help with YAML syntax, here are some quick references for you: +# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml +# https://learnxinyminutes.com/docs/yaml/ +# +# Site settings +# These are used to personalize your new site. If you look in the HTML files, +# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. +# You can create any custom variable you would like, and they will be accessible +# in the templates via {{ site.myvariable }}. + +title: Generic Tile Engine for the Apple IIgs +email: lscharen@gmail.com +description: >- # this means to ignore newlines until "baseurl:" + high-performance library for writing tile-based games for the Apple IIgs personal computer in 65816 assembly langugage. Unlock the full, 16-bit potential of the last machine of the Apple ][ line. +baseurl: "" # the subpath of your site, e.g. /blog +url: "" # the base hostname & protocol for your site, e.g. http://example.com +twitter_username: jekyllrb +github_username: jekyll + +# Build settings +theme: minima +plugins: + - jekyll-feed + +# Exclude from processing. +# The following items will not be processed, by default. +# Any item listed under the `exclude:` key here will be automatically added to +# the internal "default list". +# +# Excluded items can be processed by explicitly listing the directories or +# their entries' file path in the `include:` list. +# +# exclude: +# - .sass-cache/ +# - .jekyll-cache/ +# - gemfiles/ +# - Gemfile +# - Gemfile.lock +# - node_modules/ +# - vendor/bundle/ +# - vendor/cache/ +# - vendor/gems/ +# - vendor/ruby/ diff --git a/docs/about.markdown b/docs/about.markdown new file mode 100644 index 0000000..8b4e0b2 --- /dev/null +++ b/docs/about.markdown @@ -0,0 +1,18 @@ +--- +layout: page +title: About +permalink: /about/ +--- + +This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) + +You can find the source code for Minima at GitHub: +[jekyll][jekyll-organization] / +[minima](https://github.com/jekyll/minima) + +You can find the source code for Jekyll at GitHub: +[jekyll][jekyll-organization] / +[jekyll](https://github.com/jekyll/jekyll) + + +[jekyll-organization]: https://github.com/jekyll diff --git a/docs/assets/css/toolref.css b/docs/assets/css/toolref.css new file mode 100644 index 0000000..12c519a --- /dev/null +++ b/docs/assets/css/toolref.css @@ -0,0 +1,205 @@ +/* Style for the fancy API documentation */ +div.api_intro h1, h2, h3, h4, h5 { + font-family: helvetica, sans-serif; + } + + div.api_intro h1 { + text-align: center; + } + + div.api_intro h2 { + border-top: 3px double red; + margin: 1em 0; + padding-top: 5px; + } + + div.api h1, h2, h3, h4, h5 { + font-family: helvetica, sans-serif; + } + + div.api + { + padding-left: 100px; + border-top: 3px double red; + margin: 1em 0; + } + + div.api h4 + { + margin: 0.5em 0px 0px 0px; + } + + div.api .tn + { + clear: both; + float: left; + margin-left: -100px; + } + + div.section + { + margin-top: 2em; + } + + div.transition { + width: 90%; + height:2em; + text: black; + font-weight: bold; + background-color: red; + padding-left: 100px; + font-size: smaller; + font-family: helvetica; + padding-top:1em; + } + + div.api div.section h5 + { + clear: both; + float: left; + margin: 0px 0px 0px -100px; + color: red; + font-size: 0.9em; + } + + table.bits + { + text-align: center; + border-spacing: 0; + border-collapse: collapse; + } + + table.bits td + { + padding: 5px; + width: 1em; + border: 1px solid black; + } + + .intro { + font-size: smaller; + border-spacing: 0; + } + + .intro th { + font-family: helvetica, sans-serif; + text-align: left; + padding-top: 1em; + } + + .intro_header th { + border-top: 1px solid black; + border-bottom: 1px solid black; + padding-top: 0.5em; + padding-bottom: 0.5em; + } + + .intro td { + padding-right: 1em; + } + + div.warning, div.important + { + border-top: 1px solid black; + border-bottom: 1px solid black; + font-family: helvetica; + font-size: small; + margin-top: 2em; + } + + div.warning:before + { + display: block; + content: "Warning"; + font-weight: bold; + margin-top: 1em; + color: red; + } + + div.important:before + { + display: block; + content: "Important"; + font-weight: bold; + margin-top: 1em; + } + + .parameters h5 { + font-family: helvetica; + color: red; + } + + table.errors + { + border-spacing: 0; + } + + table.errors th { + font-family: helvetica; + font-size: smaller; + color: red; + text-align: left; + width: 100px; + height: 4em; + } + + table.stack + { + border: none; + background-color: none; + border-spacing: 0; + margin: 1em 0; + } + + table.stack tr + { + background-color: transparent; + } + + table.stack th + { + background-color: transparent; + border: none; + text-align: left; + height: 2em; + } + + table.stack th:first-child, + table.stack td:first-child + { + white-space: nowrap; + width: 12em; + } + + table.stack td + { + border: none; + background-color: transparent; + padding: 0.25em 1em; + } + + table.stack em + { + font-weight: bold; + font-style: normal; + margin-left: .5em; + } + + .stack .top { + border-left: 2px solid black; + border-right: 2px solid black; + font-style: italic; + text-align: center; + padding-left: 1em; + padding-right: 1em; + } + + .stack .bot { + border-top: 1px solid black; + border-left: 2px solid black; + border-right: 2px solid black; + font-style: italic; + text-align: center; + padding-left: 1em; + padding-right: 1em; + } \ No newline at end of file diff --git a/docs/index.markdown b/docs/index.markdown new file mode 100644 index 0000000..0671507 --- /dev/null +++ b/docs/index.markdown @@ -0,0 +1,6 @@ +--- +# Feel free to add content and custom Front Matter to this file. +# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults + +layout: home +--- diff --git a/docs/toolboxref.markdown b/docs/toolboxref.markdown new file mode 100644 index 0000000..6a02f46 --- /dev/null +++ b/docs/toolboxref.markdown @@ -0,0 +1,1059 @@ +--- +layout: page +title: Toolbox Reference +style: toolref +permalink: /tool-ref/ +--- + + +
+ + + +
+

GTE Tool Set

+ +

+ The Generic Tile Engine (GTE) Tool Set enables tile-based games to be implemented in an efficient manner. The tool set provides support for sprites, animations, large scrolling backgrounds and special effects. +

+ +

+ To effectively use this tool set, a user should be familiar with the following +

+

+ +

A preview of the GTE Tool Set routines

+ +

+ To introduce you to the capabilities of the GTE Tool Set the routines are grouped by function and briefly described in Table 1. These routines are descibed in detail later where they are separated into housekeeping routines (discussed in routine number order) and the rest of the GTE Tool Set routines (discussed in alphabetical order). +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1
GTE Tool Set routines and their functions
RoutineDescription
Housekeeping Routines
GTEBootInitInitializes the GTE Tool Set; called only by the Tool Locator — must not be called by an application
GTEStartUpStarts up the GTE Tool Set for use by an application
GTEShutDownShuts down the GTE Tool Set when an application quits
GTEVersionReturns the version number of the GTE Tool Set
GTEResetResets the GTE Tool Set; called only when the system is reset — must not be called by an application
GTEStatusIndicates whether the GTE Tool Set is active
Sprite Routines
GTECreateSpriteStamp Creates a sprite stamp from the tile set
GTEAddSpriteAdd a active sprite to the scene
GTEMoveSpriteChanges a sprite's location
GTEUpdateSpriteChanges a sprite's tile set reference and display flags
GTERemoveSprite Removes a sprite from the scene
Tile Routines
GTELoadTileSetCopies a tileset into the GTE tileset memory
GTESetTileAssigns a tile to a tile map index
Primary Background Routines
GTESetBG0OriginSets the upper-left origin point in the primary background
GTERenderDraws the current scene to the graphics screen
Functions affecting the global state
GTESetScreenModeSets the playing field's port rectangle to a pre-defined size, or a specified width and height
Misc. Functions
GTEReadControlReads the keyboard and returns key events in a gamepad structure
GTEGetSecondsReturns the number of seconds elapsed since the toolset was started
+ +

Using the GTE Tool Set

+

+ This section discusses how the GTE Tool Set routines fit into the general flow of an application and gives you an idea of which routines you'll need to use under normal circumstances. Each routine is described in detail later in this chapter. + +The GTE Tool Set depends on the presence of the tool sets shown in Table 2 and requires at least the indicated version of each tool set be present. + +

+ + + + + + + + +
Table 2
GTE Tool Set — other tool sets required
Tool set numberTool set nameMinimal version needed
$01#01Tool Locator3.x
$02#02Memory Manager3.x
$03#03Miscellaneous Tool Set3.2
$06#06Event Manager3.1
+ +

+To use the GTE Tool Set routines, your application must call the GTEStartUp routine before making any other GTE calls. To save memory, the GTE Tool Set may be started up with some features disabled. See the section GTEStartUp in this chapter for further details. +

+

+Your application should also make the GTEShutDown call when the application quits. +

+
+ +
+

$01XX

+ +

GTEBootInit

+

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

+
+

+ An application must never make this call +

+
+ +
+
Parameters
+

+ The stack is not affected by this call. There are no input or output parameters. +

+
+ +
+
Errors
+

None

+
+ +
+
C
+

Call must not be made by an application.

+
+
+ +
+

$02XX

+

GTEStartUp

+

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

+ +
+

+ Your application must make this call before it makes any other GTE Tool Set calls. +

+
+ +

+ The GTE Tool Set uses two consecutive pages of bank zero for its direct page space starting at dPageAddr. If the ENGINE_MODE_DYN_TILES flag is set in the capFlags, the GTE will attempt to allocate an additional eight pages of bank zero space. If the ENGINE_MODE_BNK0_BUFF flag is set, then GTE will attempt to allocate an ~32KB buffer from $2000 to $9CFF in Bank 0. +

+ +
+
Parameters
+ + + + + + + + + + + + +
Stack before call
previous contents
dPageAddrWord16-bit address of two pages of page-aligned Bank 0 memory
capFlagsWordCapability flags to set the engine mode
userIDWordApplication word returned by the Memory Manager. All memory allocated by GTE will use this userId
SP
+ + + + + + + + + +
Stack after call
previous contents
SP
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
capFlags
ENGINE_MODE_TWO_LAYER$0001Enables the second background layer. This will have a moderate impact on rendering performance.
ENGINE_MODE_DYN_TILES$0002Enables the use of dynamic (animated) tiles. This will have a small impact on performance and requires allocating 8 pages of Bank 0 memory
ENGINE_MODE_BNK0_BUFF$0004Allocates a 32KB buffer in Bank 0 for advanced graphical effects and customizations.
+
+ + +
+
Errors
+ + + +
Memory Manager ErrorsReturned unchanged
+
+ +
+
C
+ + + + + +
extern pascal GTEStartUp(dPageAddr, capFlags, userID)
Word dPageAddr
Word capFlags
Word userID
+
+
+ +
+

$03XX

+

GTEShutDown

+ +
+
Parameters
+

+ The stack is not affected by this call. There are no input or output parameters. +

+
+ +
+
Errors
+

None

+
+ +
+
C
+

extern pascal void GTEShutDown()

+
+
+ +
+

$04XX

+

GTEVersion

+

+ Returns the version number of the GTE Tool Set. +

+ +
+
Parameters
+ + + + + + +
Stack before call
previous contents
wordspaceWord — Space for result
SP
+ + + + + + +
Stack after call
previous contents
versionInfoWord — Version number of the GTE Tool Set.
SP
+
+ +
+
Errors
+

None

+
+ +
+
C
+

extern pascal Word GTEVersion()

+
+
+ +
+

$05XX

+

GTEReset

+

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

+ +
+

+ An application must never make this call +

+
+ +
+
Parameters
+

The stack is not affected by this call. There are no input or output parameters

+
+ +
+
Errors
+

None

+
+ +
+
C
+

Call must not be made by an application.

+
+
+ +
+

$06XX

+

GTEStatus

+ +

+ Indicates whether the GTE Tool Set is active. +

+ +
+
Parameters
+ + + + + + +
Stack before call
previous contents
wordspaceWord — Space for result
SP
+ + + + + + +
Stack after call
previous contents
activeFlagWord — BOOLEAN; TRUE if GTE Tool Set active, FALSE if inactive
SP
+
+ +
+
Errors
+

None

+
+ +
+
C
+

extern pascal Boolean GTEStatus()

+
+
+ +
+GTE Tool Set routines +
+ +
+

$09XX

+

GTEGetAddress

+ +

+ Returns the address of an internal GTE Tool Set array. +

+ +
+ + + + + + +
Stack before call
previous contents
addrIdWORD — INTEGER id
longspaceLong — Space for result
SP
+ + + + + + +
Stack after call
previous contents
addressLong — POINTER to data structure
SP
+
+ +
+
Errors
+ + +
$XX04gteBadAddressThe id is invalid
+
+ +
+
C
+
extern pascal Pointer GTEGetAddress(id)
+Word         id
+  
+
+
+ +
+

$0CXX

+

GTENewSprite

+ +

+ Allocates space for a new sprite and compiles it based on the pixel data in the locInfoPtr arguement. The sprite flags word is used to enable or disable certain capabilities. If an application does not need the all the features enabled, features may be disabled to save memory and slightly increase performance. +

+ + + +
+
Parameters
+ + + + + + + + + + + +
Stack before call
previous contents
ptrToDataLocInfoLong — POINTER to data location information.
ptrToDataRectLong — POINTER to a Rect that defines the sprite bounds.
ptrToMaskLocInfoLong — POINTER to mask location information; may be nil.
ptrToMaskRectLong — POINTER to a Rect that defines the sprite bounds; may be nil.
spriteFlagsWord — INTEGER; sprite flags
longspaceLong — Space for result
SP
+ + + + + + +
Stack after call
previous contents
spriteHandleLong — HANDLE to new sprite
SP
+
+ +
+
Errors
+

None

+
+ +
+
C
+
extern pascal SpriteHandle GTENewSprite(data, mask, spriteFlags)
+locInfoPtr   data
+locInfoPtr   mask
+Word         spriteFlags
+  
+
+
+ +
+

Sprite Flags

+ +

+

+

+ The values available for spriteFlags are shown in Figure ??-??. +

+ + + + + + +
1514131211109876543210
+ +

+ + + + + + + + + +
Bits 0spriteTypeReserved; must be zero
Bit 1fNoHFlipDo not create a horizontally flipped version of the sprite. Setting the horizontal flip bit in the Object Attribute Memory will have no effect.
Bit 2fNoVFlipDo not create a vertically flipped version of the sprite. Setting the vertical flip bit in the Object Attribute Memory will have no effect.
Bit 3fNoPriorityDo not generate code to honor the field mask. Seting the priority bit in the Object Attribute Memory will have no effect.
Bit 4fNoMask This sprite will not clip itself to the playing fields. This is potentially dangerous since, if the sprite move off screen, it may corrupt system memory. Only use this bit if the sprite will never leave the playing field.
Bits 5-15Reservedmust be zero.
+
+ +
+

$0DXX

+

GTEDisposeSprite

+ +
+
Parameters
+ + + + + + +
Stack before call
previous contents
spriteHandleLong — Handle to a sprite returned by GTENewSprite.
SP
+ + + + + +
Stack after call
previous contents
SP
+
+ +
+
Error
+

None

+
+ +
+
C
+
extern pascal void GTEDisposeSprite(spriteHndl)
+Handle       spriteHndl
+
+
+
+ + + +
+

$0FXX

+

GTENewTile

+ +

+ Allocates space for a new tile and compiles it based on the pixel data referenced by the locInfoPtr arguements. If the mask infoRecPtr is nil, then the mask is computed using the current backgound color. The mask is only used when the tile map specifies the tile to be drawn at high priority. +

+ +
+
Parameters
+ + + + + + + + + +
Stack before call
previous contents
ptrToDataLocInfoLong — POINTER to data location information.
ptrToDataOriginLong — POINTER to Point that marks the top-left corner.
ptrToMaskLocInfoLong — POINTER to mask location information; may be nil.
ptrToMaskOriginLong — POINTER to Point that marks the top-left corner; may be nil.
longspaceLong — Space for result
SP
+ + + + + + +
Stack after call
previous contents
tileHandleLong — HANDLE to new tile
SP
+
+ +
+
Erros
+

None

+
+ +
+
C
+
extern pascal TileHandle GTENewTile(ptrToDataLocInfo, ptrToDataOrigin, ptrToMaskLocInfo, ptrToMaskOrigin)
+locInfoPtr   ptrToDataLocInfo
+Point*       ptrToDataOrigin
+locInfoPtr   ptrToMaskLocInfo
+Point*       ptrToMaskOrigin
+  
+
+
+ +
+

$10XX

+

GTEDisposeTile

+ +
+
Parameters
+ + + + + + +
Stack before call
previous contents
tileHandleLong — Handle to a tile returned by GTENewTile.
SP
+ + + + + +
Stack after call
previous contents
SP
+
+ +
+
Error
+

None

+
+ +
+
C
+
extern pascal void GTEDisposeTile(tileHandle)
+Handle       tileHandle
+
+
+
+ +
+

$11XX

+

GTESetTile

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

$12XX

+

GTEGetTile

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +

Buffer Functions

+ +
+

GTESetBG0Fringe

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTESetBG0Mask

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTESetBG0Dynamic

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTESetBG0Palettes

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTESetBG0Origin

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTESetBG1Tiles

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTESetBG1Origin

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTERefreshAll

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTERefreshBG0

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTERefreshBG1

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +

I/O Functions

+ +
+

GTELoadAPF

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTELoadBMP

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTELoadSHR

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+ +
+

GTELoadFile

+
+
Parameters
+ + + + +
Stack before call
previous contents
SP
+ + + + + +
Stack after call
previous contents
SP
+ + + + +
Errors

None

C
extern
+
+
+