• Stars
    star
    322
  • Rank 130,398 (Top 3 %)
  • Language Pascal
  • License
    Other
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Reconstruction of ZZT

The Reconstruction of ZZT

The Reconstruction of ZZT is a reverse-engineered recreation of the source code to the last official release of ZZT, ZZT 3.2. The output executable is byte-for-byte identical with said release, which means that the source code accurately represents the original engine's behavior.

The intent behind this project is to facilitate improved preservation and accessibility of ZZT's worlds and community, as well as facilitate new, exciting developments.

Frequently Asked Questions

What is ZZT?

ZZT is an adventure game created by Tim Sweeney and released in January 1991 for DOS computers. What set it apart was the inclusion of a fully-featured world editor in the shareware release. Since then, ZZT has gone on to inspire thousands of players and game creators all around the world.

You can learn more about ZZT through the Museum of ZZT.

How can I run the original ZZT on a modern computer?

There are many ways to run ZZT on a modern PC. While pretty much anything capable of running DOS will do the trick, the recommended ones are:

  • Zeta, an emulator dedicated to running ZZT's original engine (Windows, Linux, macOS, HTML5),
  • DOSBox, a general DOS software emulator.

Where can I find ZZT worlds to play?

The official ZZT worlds originally released with the game can be found here.

Beyond that, I highly recommend checking out the Museum of ZZT, particularly its Featured Games section, to find amazing worlds created by the ZZT community over the past three decades.

How can I create ZZT worlds of my own?

ZZT comes with a built-in editor and documentation - just press "E"!

However, please note that the community has since created more powerful editors, the most popular of which is KevEdit. This is currently the recommended solution. Dr. Dos has created a live stream series on YouTube detailing how to use Zeta and KevEdit to create your own ZZT worlds.

How was the source code reconstructed?

Very patiently! I wrote an article on my blog in an attempt to describe the journey, as well as the tools and techniques I utilized in the process.

What is part of this open-source release?

This release's binary distribution includes:

  • ZZT.EXE - the ZZT engine executable,
  • ZZT.DAT - the documentation originally included with ZZT,
  • DEMO.ZZT - the official demonstration world, part of ZZT's bundled documentation,
  • ZZT.CFG - the ZZT configuration file (set to open DEMO.ZZT by default).

The source code includes the source format for both ZZT.EXE and ZZT.DAT, as well as relevant tools.

Why did the source code have to be reconstructed?

This is because the original source code to ZZT was lost a long time ago.

I'm a ZZTer from back in the day and I have some backups from that period. Are they still useful?

Yes! There are many ZZT worlds, utilities, and other documents which have not yet been preserved. If you'd like to share them and see them be adequately catalogued and preserved, please contact me at (kontakt at asie dot pl) - or get in touch with the Museum of ZZT community.

Directory structure

  • BIN - output directory for EXE and TPU files,
  • DIST - output directory for the binary distribution,
  • DOC - documentation files used for building ZZT.DAT:
    • ABOUT.HLP - about text,
    • GAME.HLP - help text (play),
    • EDITOR.HLP - help text (editor):
      • CREATURE.HLP, TERRAIN.HLP, ITEM.HLP, LANG.HLP, LANGREF.HLP, LANGTUT.HLP, INFO.HLP - additional help text,
    • LICENSE.HLP - licensing terms for the source code release, formatted for in-game view,
    • END1.MSG, END2.MSG, END3.MSG, END4.MSG - registration messages for the shareware version of ZZT; not present,
  • MISC - miscellaneous files which are not part of the build process:
    • relocfix.py - Python 3 script for fixing relocation table segments in EXE binaries after LZEXE decompression,
  • RES - resource files which are not otherwise recompiled:
    • DEMO.ZZT - the official ZZT demonstration world,
    • ZZT.CFG - the ZZT configuration file used for the binary distribution,
  • SRC - the reconstructed ZZT source code,
    • ZZT.PAS - main source file,
  • TOOLS - tools used when building:
    • DATPACK.PAS - DATPACK, a tool for creating and extracting the ZZT.DAT file (source code),
    • LZEXE.EXE - LZEXE, a .EXE compression tool by Fabrice Bellard,
  • BUILD.BAT - source code build script,
  • LICENSE.TXT - licensing terms for the source code release.

License

The Reconstruction of ZZT is licensed under the terms of the MIT license as described in LICENSE.TXT, with the exception of certain files included with this release:

  • TOOLS/LZEXE.DOC, TOOLS/LZEXE.EXE:
    LZEXE.EXE v0.91    (c) 1989 Fabrice BELLARD

    Ce programme fait parti du domaine public (FREEWARE),  donc vous pouvez
  l'utiliser, le copier et le distribuer sans problΓ¨me. Et vous pouvez mΓͺme
  en faire un usage commercial, c'est Γ  dire compacter des fichiers EXE que
  vous allez vendre. Mais la vente de LZEXE.EXE est interdite.
  • MISC/relocfix.py: Copyright (c) 2020 Adrian Siekierka, licensed under "zero-clause" BSD

Compiling

Requirements

  • DOS-compatible environment (f.e. DOSBox),
  • Turbo Pascal 5.5 (if you don't have it, it's officially available for free via Embarcadero's Antique Software website).

Instructions

  1. Ensure that TPC.EXE from Turbo Pascal is available on your PATH (f.e. SET PATH=C:\TP;%PATH%).
  2. From the source code directory, run BUILD.BAT.
  3. The DIST directory will contain files comprising the release as outlined in the FAQ.

If the source code has not been modified, the resulting ZZT.EXE file should be byte-for-byte identical with the ZZT.EXE bundled with ZZT 3.2.

Compilation FAQ

Can the Reconstruction be compiled with Free Pascal instead?

If you'd rather stick to an entirely free software stack for building ZZT, that is also possible, albeit not without modifications:

  • Ideally, the latest SVN trunk version of Free Pascal should be used.
  • Free Pascal must be compiled as a DOS/i8086 cross-compiler in the Large memory model (more information).
  • The compilation flags "-Mtp" and "-WmLarge" must be used.
  • The methods in VIDEO.PAS using inline(...) must be rewritten, as Free Pascal does not support this form of inline ASM code.
  • SOUNDS.PAS must be patched, as Free Pascal does not support overlapping CASE statements.
  • As LZEXE is not free software (source unavailable), you may want to consider removing it from your build process or replacing it with another compressor, such as UPX (with the --8086 flag).

Please note that, as Free Pascal's RTL is significantly larger, the resulting binary is likewise about 40KB larger - leaving less memory space for game worlds.

What are all the "unk"-prefixed variables?

These are variables which are not used at all anywhere in the source code, but are assumed to exist in the stack or data segments, affecting relevant variable offsets and stack checks. They are required for byte-level equivalence, but you are free to remove them and get a functionally equivalent version of the engine - with the exception of some structures, like TStat, which are serialized to disk.

Recipe for five better friends

  1. Fix 5 annoying bugs in ZZT.
  2. Give a copy of each bugfix to a friend, neighbor or business associate.
  3. You now have five better friends.

Greetings

I'd like to thank everyone who has spent the last few years contributing to the rebirth of the small ZZT community. It is thanks to your passion and dedication that this project has been made possible.

More Repositories

1

FoamFix

Minecraft memory usage optimization mod. Please note that code contained herein is not a suggestion for Minecraft unless explicitly declared elsewhere, in writing, by the rightsholder(s).
Java
150
star
2

uxnds

NDS/3DS fork/port of the uxn/Varvara virtual machine
C
117
star
3

almost-of-zzt

(Almost) development backup of ZZT's original source code.
Pascal
84
star
4

gbsenpai

GB Studio Extended Nominal Player Adaptation/Interface
C
75
star
5

zeta

ZZT/Super ZZT emulator for Windows/Linux/HTML5
C
50
star
6

ibnjs

ibniz in JavaScript.
HTML
41
star
7

reconstruction-of-super-zzt

The Reconstruction of Super ZZT
Pascal
31
star
8

yuyulinux

Yuyulinux, a quite experimental lightweight Linux distribution based on pacman. Also stands as proof for the fact Linux *is* about choice (but it is not about laziness and expecting other people to do things for you). - also idling in #yuyulinux on irc.rizon.net
Shell
21
star
9

voirc

Prototype implementation of basic voice chat over IRC text messages. Meant as a joke, probably doesn't work on latest Nim.
Nim
21
star
10

modalyzer

A tool for analyzing Minecraft mod JARs.
Java
21
star
11

64pixels

64pixels is a 2D logic gate melodic ASCII infinite multiplayer sandbox, for short.
Java
18
star
12

MinecraftDramaGenerator

PHP
16
star
13

lunatic86

Lua-based IBM PC-ish emulator for the OpenComputers mod
Lua
16
star
14

free-game-levels

Free levels for easily reimplementable video games.
15
star
15

wasm4-aot

Ahead-of-time compiled WASM-4 runtime
C
14
star
16

libzoo

Portable C re-implementation of the ZZT engine
C
13
star
17

boorushy2

Boorushy^2 engine
JavaScript
10
star
18

awesome-dsdev

Resources for homebrew NDS development
10
star
19

bad-apple-for-wswan

Bad Apple!! for WSwan
Java
9
star
20

Statues

the Statues Minecraft mod for 1.7.2
Java
9
star
21

ClassCacheTweakerMC

Because deobfuscation takes a century. (Thanks for the idea, nallar!)
Java
9
star
22

SplashAnimationMC

Java
9
star
23

UnlimitedChiselWorks

Unlimited Chisel Works
Java
8
star
24

pixmess

A rewrite of 64pixels in C. For real.
C
8
star
25

BuildForgeCraft

BuildForgeCraft issue tracker
7
star
26

greyboard

Greyboard is an HTML5 multiplayer whiteboard.
JavaScript
7
star
27

littleMaidMobX

DO NOT USE THIS -- BROKEN
Java
7
star
28

MageMC

FLOSS graphics extension mod
Java
6
star
29

go-flipnotetools

Tools for reading Flipnote Studio files
Go
6
star
30

StackUp

Minecraft mod to increase maximum stack sizes beyond 64.
Java
5
star
31

endernet

Inter-server communications mod.
Java
5
star
32

EnvironmentCheckerMC

Environment modification checker for Minecraft Forge
Java
5
star
33

MagnumOpus

5
star
34

nrio-usb-examples

DS-Writer USB examples
C
5
star
35

AsieTweaks2

Java
5
star
36

pppkg

a package manager, the Portable Perl PacKaGist
Perl
5
star
37

strive

prototype NDS/3DS Atari ST emulator
C
5
star
38

AngunaDS

BlocksDS port/update of AngunaDS
C
5
star
39

InventoryNeko

tamagotchi for your minecraft
Java
4
star
40

fossil

The Fossil open modpack.
JavaScript
4
star
41

twili

Twili Linux refurbished dev repository.
C
4
star
42

WireWorld-DS

Perhaps my very first "usable" computer program - a WireWorld cellular automata simulator/editor for the DS. The code is from 2008 and absolutely horrendous.
C
4
star
43

mesegates

Mesecons gates with toggleable sides!
Lua
4
star
44

zeta-z2

The Museum of ZZT build of the "Zeta" specialized emulation core
JavaScript
4
star
45

ftb-pyramid-reborn-oc

OpenComputers source code for FTB's "Pyramid Reborn" quest map.
Lua
4
star
46

atari800-3ds-old

Outdated atari800 port for the Nintendo 3DS. Please use https://github.com/asiekierka/atari800 - port-3ds branch
C
4
star
47

chips1

CHIP-8 emulator for WonderSwan
Roff
3
star
48

YNot

Compatibility add-on for XNet? YNot!
Java
3
star
49

atari800-nds

Atari 8-bit computer and 5200 console emulator - NDS port
C
3
star
50

UBChisel

Java
3
star
51

moducomp

Modular Computing (v2) repository.
Java
3
star
52

ConveyorBelts

An unfinished (but semi-functional) Minecraft mod adding conveyor belts.
Java
3
star
53

64pixels2

A final attempt at a 64pixels rewrite.
Java
3
star
54

RedLogic-asie

asie's RedLogic fork
Java
3
star
55

vnds

Updated VNDS fork.
C++
3
star
56

TinkeredHegemony

Replacing vanilla tools with TCon's in style!
Java
3
star
57

snowflakes

Snowflakes is the first blogoplane engine, written in Node.js
JavaScript
3
star
58

RedLogic

Immibis' RedLogic mod - a replacement for RP2 - ported to 1.7.2
Java
3
star
59

SmoothWaterMC

Smooth lighting, now for water! (Repository abandoned; mod merged into http://github.com/asiekierka/MageMC)
Java
3
star
60

ImmibisPeripherals

Java
2
star
61

PonySocks2

The horsiest fashion mod in all of Ponyville!
Java
2
star
62

2D-Sandbox

A currently unnamed 2D sandbox.
2
star
63

zzt-toolbox

Various scripts and tools developed by me for usage with ZZT and Super ZZT.
Python
2
star
64

epiksels

Temporary repository for the new version of 64pixels.
Java
2
star
65

LagssieMC

Lagssie from Factorization, now as a separate mod
Java
2
star
66

Wistone

asie's wireless redstone Minecraft mod
Java
2
star
67

PrestonMC

The worst Minecraft block compression mod
Java
2
star
68

Chisel-1.7.2

Chisel is an AUTOMATIC_MAIDEN decoration mod ported to 1.7.2.
Java
2
star
69

UnlimitedChiselWorks-Botany

Botany compatibility for Unlimited Chisel Works
Java
2
star
70

pce

PCE emulator, mostly mirrored here for the 3DS port
C
2
star
71

FoamFix-Fabric

Mirror of https://git.asie.pl/asie-minecraft/FoamFix-Fabric
Java
2
star
72

partycannon

MintyFresh IRC bot
JavaScript
2
star
73

meselamps

RP2-like cube and flat lamps for Minetest.
Lua
2
star
74

ws-test-suite

WonderSwan emulator test suite
C
2
star
75

LiquidXP

Immibis' Liquid XP for 1.7.2
Java
2
star
76

rpcc

RedPower C-ish Compiler. Definitely won't support even a subset of C, lol
Perl
2
star
77

modularcomputing-old

OUTDATED - GO TO http://github.com/asiekierka/moducomp
Java
2
star
78

FaithlessMC

Losing faith in automatic texture scaling
Java
2
star
79

UnlimitedChiselWorks-TFC1

TFC1 compatibility for Unlimited Chisel Works
Java
2
star
80

MinetestBridgeMC

Proof of concept for a 1.12.2 Forge mod which runs Minetest mods. Far from completion.
Java
2
star
81

zzt-pc98

Port of ZZT to the NEC PC-98.
Pascal
2
star
82

type-in-tools

Family BASIC tape utility
Go
2
star
83

ws-ieepview

Internal EEPROM viewer/editor for WonderSwan
C
2
star
84

nrio-usb-disk

USB mass storage application for NRIO/DS-Writer
C
2
star
85

opencomputers-hires-video-prototype

OpenComputers high-resolution video prototype encoder.
Java
1
star
86

michcioperz

cloning @michcioperz made easy
1
star
87

UnlimitedChiselWorks-TFC2

TFC2 compatibility for Unlimited Chisel Works
Java
1
star
88

BalancedClayTools

Simple mod with tools made out of clay. Developed for FTB's "Pyramid Reborn" quest pack.
Java
1
star
89

Debark

Commissioned mod which lets you debark logs.
Java
1
star
90

ws-backup-tool

WS Backup Tool for BootFriend
C
1
star
91

aports-desktop

Desktop-centric repository "overlay" for Alpine Linux
1
star
92

vgmswan

Prototype VGM player for WonderSwan
C
1
star
93

twili-installer

Installer for Twili Linux
Perl
1
star
94

reimagined-disco

An old experimental 3D voxel engine in Go.
Go
1
star
95

FrodoDS

C64 emulator for DS/DSi
C++
1
star
96

anipyke

We can rebuild the Turnpike, we have the technology
Python
1
star
97

64pixels-droid

64pixels for our lovely Google Android! Yaaaay
Java
1
star
98

InventoryBuoyancy

have memes gone too far
Java
1
star
99

FZAddons

wha-ha-ha's Factorization Addons for 1.7.x
Java
1
star
100

twili-packages

Twili Linux packages.
C
1
star