TI-89 高度图光线投射器
TI-89 Height-Mapped Raycaster

原始链接: https://github.com/dzoba/ti-89-raycasting-with-z

这个项目是一个功能齐全的地牢探索游戏,专为TI-89图形计算器开发,利用2002 FAT引擎进行3D渲染。尽管计算器只有10MHz的处理器和灰度屏幕,游戏仍然具有高度贴图光线投射、纹理墙壁和门、楼梯几何体以及带有遮挡的广告牌精灵。 游戏拥有程序生成的地下城、碰撞攻击战斗、生命值/等级追踪以及闪烁的迷你地图。除了主游戏之外,该项目还包括独立演示,展示了光线投射和楼梯渲染能力,以及康威生命游戏和实时等离子体效果的实现。 该项目提供了通过USB(SilverLink或钛金型号的直接USB)将文件传输到计算器的工具,并利用基于Docker的构建环境和GCC4TI交叉编译器。虽然完整的FAT引擎功能针对标准TI-89型号进行了优化,但钛金型号提供了一个平面着色的版本。源代码在MIT许可下可用,原始FAT引擎SDK保留其原始版权。

相关文章

原文

A custom height-mapped raycasting engine and dungeon crawler game for the TI-89 graphing calculator, built on top of the 2002 FAT Engine. Renders textured walls, stair geometry, billboard enemy sprites, and procedurally generated dungeons on a 10MHz Motorola 68000 with a 160x100 4-shade grayscale LCD.

Descend dungeon crawler Height-mapped stairs demo

Full videos: dungeon crawler | stairs demo

Descend (fatd_dungeon.c) is a procedural dungeon crawler with:

  • Height-mapped raycaster with per-tile floor elevations and stair-step rendering
  • Textured walls and doors using the FAT Engine's texture system
  • Billboard enemy sprites with mask-based transparency and per-column Z-buffer occlusion
  • Procedural level generation (rooms, L-shaped corridors, triangle-wave staircases)
  • Bump-to-attack combat, HP/level tracking, blinking minimap
  • Smooth Z interpolation when walking up and down stairs

Also included:

  • fatd_stairs.c -- standalone height-mapped raycaster demo with textured walls
  • fatd_hw4.c -- fully self-contained version that runs on HW4 Titanium (no FAT Engine dependency)
  • fatd_life.c -- Conway's Game of Life with bitwise parallel neighbor counting (50-100x faster than scalar)
  • fatd_plasma.c -- real-time grayscale plasma effect
  • ti_send.c / ti_dbus_send.c -- USB transfer tools for DUSB (Titanium) and DBUS (SilverLink) protocols
  • A TI-89 (standard HW2 recommended) or TI-89 Titanium
  • A USB cable: SilverLink (TI-GRAPH LINK) for standard TI-89, or direct USB for Titanium
  • libusb installed (brew install libusb on macOS)

Transfer prebuilt binaries

Prebuilt .89y and .89z files are in output/.

For a standard TI-89 with SilverLink cable:

# Build the transfer tool
cc -o ti_dbus_send tools/ti_dbus_send.c -lusb-1.0

# Send the FAT Engine runtime, textures, launcher, and dungeon game
./ti_dbus_send output/fatlib.89y output/fatdtx.89y output/fatload.89z output/fatddung.89y

For a TI-89 Titanium with direct USB:

cc -o ti_send tools/ti_send.c -lusb-1.0
./ti_send output/fatlib.89y output/fatdtx.89y output/fatload.89z output/fatddung.89y

On the calculator, run fatload() from the home screen.

Note: On the standard TI-89, archive fatlib and fatdtx to Flash ROM via VAR-LINK to free enough RAM for the engine to load.

Note: The full FAT Engine (textured walls, sprites) only works on standard TI-89 (HW1/HW2). The Titanium HW4 blocks heap code execution. Use descend.89z (the standalone flat-shaded version) on Titanium:

./ti_send output/descend.89z
# Then run descend() on the calculator
  • Arrow keys: move forward/backward, turn left/right
  • ESC: quit
  • Docker (for the GCC4TI cross-compiler)
  • Python 3 (for .89g packaging)

Build the Docker image (once)

docker build -t gcc4ti-builder .

Build the dungeon crawler

cd tools
DRY_RUN=1 bash build_dungeon.sh

This compiles src/fatd_dungeon.c with GCC4TI inside Docker, exePack compresses it, and packages a .89g group file in output/.

Drop DRY_RUN=1 to also launch TiEmu (requires a patched TiEmu build and a TI-89 ROM image).

src/              Source code for all demos and the dungeon crawler
src/includes/     FAT Engine header (fat.h)
tools/            Build scripts, packaging tools, USB transfer tools
output/           Prebuilt binaries ready to send to a calculator
fat-sdk/          Original 2002 FAT Engine SDK (engine, textures, examples)
Dockerfile        GCC4TI cross-compiler build environment

The FAT Engine ("Fixed Angle Texturing") is a Wolfenstein 3D-style raycasting engine for TI-89/TI-92+ calculators, written by Thomas Nussbaumer and released in 2002 by the TiCT team. It renders 3D environments at 560-825 frames per minute on the 10MHz Motorola 68000.

The FAT Engine SDK is included in fat-sdk/ for build purposes. The original SDK was distributed freely for TI calculator development but has no explicit open-source license. The SDK source, examples, and texture data are copyright Thomas Nussbaumer / TiCT. If you are the original author and have concerns, please open an issue.

The custom source code in src/ and tools/ is released under the MIT License. The FAT Engine SDK in fat-sdk/ retains its original copyright (see above).

联系我们 contact @ memedata.com