This commit is contained in:
Lucas Scharenbroich 2023-05-03 07:49:51 -05:00
commit 3a4169cce4
9 changed files with 387 additions and 163 deletions

View File

@ -1,34 +1,35 @@
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]
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.3.2"
gem "github-pages", "~> 223", 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]

View File

@ -7,8 +7,8 @@ GEM
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
coffee-script (2.4.1)
coffee-script-source
execjs
@ -16,107 +16,88 @@ GEM
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.2.0)
dnsruby (1.61.9)
simpleidn (~> 0.1)
concurrent-ruby (1.2.2)
dnsruby (1.70.0)
simpleidn (~> 0.2.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.15.0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
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)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
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)
faraday-net_http (3.0.2)
ffi (1.15.5)
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)
github-pages (223)
github-pages-health-check (= 1.17.9)
jekyll (= 3.9.0)
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-feed (= 0.15.1)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.12.1)
jekyll-mentions (= 1.5.1)
jekyll-github-metadata (= 2.13.0)
jekyll-include-cache (= 0.2.1)
jekyll-mentions (= 1.6.0)
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-redirect-from (= 0.16.0)
jekyll-relative-links (= 0.6.1)
jekyll-remote-theme (= 0.4.1)
jekyll-remote-theme (= 0.4.3)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.6.1)
jekyll-seo-tag (= 2.7.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-theme-architect (= 0.2.0)
jekyll-theme-cayman (= 0.2.0)
jekyll-theme-dinky (= 0.2.0)
jekyll-theme-hacker (= 0.2.0)
jekyll-theme-leap-day (= 0.2.0)
jekyll-theme-merlot (= 0.2.0)
jekyll-theme-midnight (= 0.2.0)
jekyll-theme-minimal (= 0.2.0)
jekyll-theme-modernist (= 0.2.0)
jekyll-theme-primer (= 0.6.0)
jekyll-theme-slate (= 0.2.0)
jekyll-theme-tactile (= 0.2.0)
jekyll-theme-time-machine (= 0.2.0)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.11.1)
kramdown (= 1.17.0)
jemoji (= 0.12.0)
kramdown (= 2.3.1)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.10.4, < 2.0)
rouge (= 3.13.0)
nokogiri (>= 1.12.5, < 2.0)
rouge (= 3.26.0)
terminal-table (~> 1.4)
github-pages-health-check (1.16.1)
github-pages-health-check (1.17.9)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (~> 3.0)
public_suffix (>= 3.0, < 5.0)
typhoeus (~> 1.3)
html-pipeline (2.14.1)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
jekyll (3.9.0)
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)
kramdown (>= 1.17, < 3)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
@ -136,14 +117,16 @@ GEM
rouge (>= 2.0, < 4.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.13.0)
jekyll-feed (0.15.1)
jekyll (>= 3.7, < 5.0)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.12.1)
jekyll (~> 3.4)
jekyll-github-metadata (2.13.0)
jekyll (>= 3.4, < 5.0)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.5.1)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-mentions (1.6.0)
html-pipeline (~> 2.3)
jekyll (>= 3.7, < 5.0)
jekyll-optional-front-matter (0.3.2)
@ -151,72 +134,76 @@ GEM
jekyll-paginate (1.1.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
jekyll-redirect-from (0.15.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-relative-links (0.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-remote-theme (0.4.1)
jekyll-remote-theme (0.4.3)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
rubyzip (>= 1.3.0)
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-seo-tag (2.7.1)
jekyll (>= 3.8, < 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-theme-architect (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-cayman (0.1.1)
jekyll (~> 3.5)
jekyll-theme-cayman (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-dinky (0.1.1)
jekyll (~> 3.5)
jekyll-theme-dinky (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.1.1)
jekyll (~> 3.5)
jekyll-theme-hacker (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.1.1)
jekyll (~> 3.5)
jekyll-theme-leap-day (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-merlot (0.1.1)
jekyll (~> 3.5)
jekyll-theme-merlot (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-midnight (0.1.1)
jekyll (~> 3.5)
jekyll-theme-midnight (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-minimal (0.1.1)
jekyll (~> 3.5)
jekyll-theme-minimal (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-modernist (0.1.1)
jekyll (~> 3.5)
jekyll-theme-modernist (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.5.4)
jekyll-theme-primer (0.6.0)
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-theme-slate (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-tactile (0.1.1)
jekyll (~> 3.5)
jekyll-theme-tactile (0.2.0)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-time-machine (0.1.1)
jekyll (~> 3.5)
jekyll-theme-time-machine (0.2.0)
jekyll (> 3.5, < 5.0)
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)
jemoji (0.12.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (1.17.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
@ -225,22 +212,21 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.17.0)
multipart-post (2.2.0)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
minitest (5.18.0)
nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
octokit (4.24.0)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.1.1)
public_suffix (4.0.7)
racc (1.6.2)
rb-fsevent (0.11.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.13.0)
rexml (3.2.5)
rouge (3.26.0)
ruby-enum (0.9.0)
i18n
ruby2_keywords (0.0.5)
@ -261,24 +247,19 @@ GEM
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.10)
tzinfo (1.2.11)
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)
unf_ext (0.0.8.2-x64-mingw32)
unicode-display_width (1.8.0)
wdm (0.1.1)
zeitwerk (2.6.6)
zeitwerk (2.6.7)
PLATFORMS
x64-mingw32
x86_64-linux
DEPENDENCIES
github-pages (~> 203)
github-pages (~> 223)
http_parser.rb (~> 0.6.0)
jekyll-feed (~> 0.12)
minima (~> 2.5)
@ -287,4 +268,4 @@ DEPENDENCIES
wdm (~> 0.1.1)
BUNDLED WITH
2.3.15
2.4.12

View File

@ -30,8 +30,12 @@ github_username: lscharen
# Build settings
theme: minima
plugins:
- jekyll-feed
#plugins:
# - jekyll-feed
markdown: kramdown
highlighter: rogue
input: GFM
# Exclude from processing.
# The following items will not be processed, by default.

View File

@ -3,15 +3,4 @@ layout: page
title: 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
This is the main documentation page for the Generic Tile Engine project for the Apple IIgs.

View File

@ -0,0 +1,107 @@
---
permalink: /getting-started
layout: page
---
# Getting Started
* Set Up
* Windows
* Linux
* Native
This tutorial page will walk through the process of setting up your computer to build Apple IIgs applications
that leverage the GTE toolset.
## Set Up
### Windows
### Linux
### Native
If you are developing directly on an Apple IIgs machine, dowload the GTE-1.0.shk archive into your GS/OS environment. There
are several ways of getting the file onto your system.
1. Use the [NetDisk](https://sheumann.github.io/NetDisk/) utility to mount to the remote disk image directly from GS/OS and copy the Tool160 file
1. Use [ADTPro](https://adtpro.com/index.html) to transfer the disk image to the apple IIgs and write it onto a physical floppy disk
## Your First Program
```c
#include <loader.h>
#include <locator.h>
#include <memory.h>
#include <misctool.h>
#include <gte.h>
/* tile data stored in tiles.c */
extern Byte tiles[];
/* define a couple of key codes for the arrow keys */
#define LEFT_ARROW 0x08
#define RIGHT_ARROW 0x15
#define UP_ARROW 0x0B
#define DOWN_ARROW 0x0A
Word userId;
Handle dpHandle;
void startUp(void) {
TLStartUp();
userId = MMStartUp();
MTStartUp();
LoadOneTool(160, 0x0100);
dpHandle = NewHandle(0x200L, userId, attrBank + attrPage + attrFixed + attrLocked + attrNoCross, 0);
GTEStartUp((Word) *dpHandle, (Word) 0, userId);
}
void shutDown(void) {
GTEShutDown();
DisposeHandle(dpHandle);
UnloadOneTool(160);
MTShutDown();
MMShutDown(userId);
TLShutDown();
}
void main(void) {
Word keyPress;
int x, y;
/* Start up GTE and its dependencies */
startUp();
/* Create a 256x160 playfield (128 bytes x 160 lines) */
GTESetScreenMode(128, 160);
/* Load in two tiles */
GTELoadTileSet(0, 2, tiles);
/* Fill the tile store with a checkerboard pattern */
for (y = 0; y < GTE_TILE_STORE_HEIGHT; y++) {
for (x = 0; x < GTE_TILE_STORE_WIDTH; x++) {
GTESetTile(x, y, (x + y) & 1);
}
}
/* Enter into the main loop */
x = y = 0;
do {
keyPress = GTEReadControl() & PAD_KEY_CODE;
if (keyPress == LEFT_ARROW && x > 0) x--;
if (keyPress == RIGHT_ARROW && x < 1000) x++;
if (keyPress == UP_ARROW && y > 0) y--;
if (keyPress == DOWN_ARROW && y < 1000) y++;
/* Position the screen and render */
GTESetBG0Origin(x, y);
GTERender(0);
}
while (keyPress != 'Q' && keyPress != 'q');
shutDown();
}
```

View File

@ -4,3 +4,5 @@
layout: home
---
* [Getting Started]({{ site.baseurl }}/getting-started.html)

17
docs/live.markdown Normal file
View File

@ -0,0 +1,17 @@
---
layout: page
---
<script>
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new MAMELoader(MAMELoader.driver("1943"),
MAMELoader.nativeResolution(224, 256),
MAMELoader.scale(3),
MAMELoader.emulatorJS("emulators/mess1943.js"),
MAMELoader.mountFile("1943.zip",
MAMELoader.fetchFile("Game File",
"examples/1943.zip"))))
emulator.start({ waitAfterDownloading: true });
</script>
<canvas id="canvas" width="800" height="600"></canvas>

View File

@ -0,0 +1,118 @@
---
layout: page
style: sample
---
```c
#include <loader.h>
#include <locator.h>
#include <memory.h>
#include <misctool.h>
#include <types.h>
#include "gte.h"
#include "demo_data.h"
#define TOOLFAIL(string) if (toolerror()) SysFailMgr(toolerror(), "\p" string "\n\r Error Code -> $");
#define SPRITE_START_TILE 2
#define SPRITE_SLOT 0
#define SPRITE_VBUFF (GTE_VBUFF_SPRITE_START+0*GTE_VBUFF_SPRITE_STEP)
int main (void) {
Word controlMask;
Word keyPress;
Word userId;
Handle dpHndl;
Word dpWord;
Word x = 0, y = 0;
Word px = 0, py = 0;
Word sec;
TLStartUp();
TOOLFAIL("Unable to start tool locator");
userId = MMStartUp();
TOOLFAIL("Unable to start memory manager");
MTStartUp();
TOOLFAIL("Unable to start misc tools");
LoadGTEToolSet(userId);
dpHndl = NewHandle(0x0200, userId, 0x4015, 0);
if (dpHndl == NULL) {
TOOLFAIL("Unable to allocate page 0 memory");
}
dpWord = (Word)(*dpHndl);
if ((dpWord & 0x00FF) != 0x0000) {
TOOLFAIL("Allocated page 0 memory is not aligned");
}
GTEStartUp(dpWord, 0x0000, userId);
TOOLFAIL("Unable to start GTE");
GTESetScreenMode(160, 200);
GTELoadTileSet(tiles);
GTESetPalette(0, (Pointer)palette);
GTEFillTileStore(1);
GTECreateSpriteStamp(GTE_SPRITE_8X8 | SPRITE_START_TILE, SPRITE_VBUFF);
GTEAddSprite(SPRITE_SLOT, 0, SPRITE_VBUFF, px, py);
do {
controlMask = GTEReadControl();
keyPress = controlMask & 0x007F;
switch (keyPress) {
case ' ': // Toggle background
sec = GTEGetSeconds();
GTEFillTileStore(1 + (sec & 1));
break;
case 'a': if (x > 0) { x--; }
break;
case 'd': if (x < 1000) { x++; }
break;
case 'w': if (y > 0) { y--; }
break;
case 's': if (y < 1000) { y++; }
break;
case 'j': if (px > 0) { px--; }
break;
case 'l': if (px < 154) { px++; }
break;
case 'i': if (py > 0) { py--; }
break;
case 'k': if (py < 192) { py++; }
break;
}
GTESetBG0Origin(x, y);
GTEMoveSprite(SPRITE_SLOT, px, py);
GTERender(0);
} while (keyPress != 'q' && keyPress != 'Q');
GTEShutDown();
DisposeHandle(dpHndl);
MTShutDown();
TOOLFAIL("Unable to shutdown misc tool");
MMShutDown(userId);
TOOLFAIL("Unable to shutdown memory manager");
TLShutDown();
TOOLFAIL("Unable to shutdown tool locator");
}
```

5
docs/tutorials.markdown Normal file
View File

@ -0,0 +1,5 @@
---
layout: page
title: Examples
---