Page 1 of 1

The Reconstruction of ZZT

Posted: Sun Mar 15, 2020 11:23 pm
by asie
An MIT-licensed recreation of the original ZZT source code.

GitHub repository

Re: The Reconstruction of ZZT

Posted: Mon Mar 16, 2020 10:51 pm
by Commodore
Very cool. Did you do this entirely by hand from the disassembly? It was Turbo Pascal right? Can you only compile it with DOS, or is there a compiler that might get us a 64bit arch executable? Sorry I can't look at the zip, phone internet for me ATM.

Re: The Reconstruction of ZZT

Posted: Mon Mar 16, 2020 11:29 pm
by asie
Most of this is answered in the README, but here goes:
Commodore wrote:It was Turbo Pascal right?
Turbo Pascal 5.5, to be exact.
Commondore wrote:Can you only compile it with DOS, or is there a compiler that might get us a 64bit arch executable?
The specific source code can only be compiled with Turbo Pascal 5.5 on DOS. It is easy to patch it to compile on latest builds of Free Pascal, cross-compiling to DOS/i8086. Patching it enough to run properly on a modern 64-bit machine will be a bit trickier.

Re: The Reconstruction of ZZT

Posted: Tue Mar 17, 2020 4:12 am
by zzo38
This is good, and can be helpful for many purposes (including: seeing its working, fixing some bugs (although some you probably want to keep for compatibility purpose), removing unused stuff in order to make more free memory, fixing documentation, etc).

I also posted a message on my NNTP server (which currently, nobody else uses, it seems, although occasionally a few people have posted test messages) about this.

Re: The Reconstruction of ZZT

Posted: Fri Mar 27, 2020 6:37 pm
by zzo38
I have downloaded it and have removed many unneeded things (including the editor), reducing memory requirements by more than 10K. I have also added a ?-KEYS command to get rid of all keys, and ?FLAGS to display flags, and fixed a few bugs (some will remain for compatibility purposes), and a few other things. I will release it later once it is done (together with the original code, both for comparison and to keep a backup of the original code). (It will remain a DOS program. I do not intend to port it to any other operating system.)

I will also mention something I changed in the BUILD.BAT file; after the "TPC" line, I added "IF ERRORLEVEL 1 PAUSE", and I recommend you fixing that too.

Re: The Reconstruction of ZZT

Posted: Fri Mar 27, 2020 7:25 pm
by asie
That's cool! You might want to contribute the patches to the OpenZoo collection. I will fix the ERRORLEVEL thing, too!

I guess I should list some of the projects made with the Reconstruction of ZZT to date:
  • OpenZoo, a loose collection of patches to ZZT 3.2,
  • zoo64, GreaseMonkey's attempt of porting ZZT 3.2's Pascal to Linux,
  • linux-reconstruction-of-zzt, separate attempt of porting ZZT 3.2's Pascal to Linux, seemingly more successful
  • libzoo, my own rewrite of the reconstructed Pascal source code into a portable C library

Re: The Reconstruction of ZZT

Posted: Fri Mar 27, 2020 10:49 pm
by zzo38
asie wrote:
  • OpenZoo, a loose collection of patches to ZZT 3.2,
Thank you for this; I will use some of these patches. Once I release my code, you may put some (or all) of my patches in there too if you want to. I will post a link once I make it available.

Re: The Reconstruction of ZZT

Posted: Fri Mar 27, 2020 11:03 pm
by asie
zzo38 wrote:Thank you for this; I will use some of these patches. Once I release my code, you may put some (or all) of my patches in there too if you want to. I will post a link once I make it available.
Make sure to check the pull requests too!

Re: The Reconstruction of ZZT

Posted: Sun Mar 29, 2020 5:46 am
by zzo38
I made a Fossil repository with my changes to ZZT at: http://zzo38computer.org/fossil/freezzt.ui

It is not yet complete, although it does work, and you may include some of my patches in OpenZoo if you want to. (Not all of the changes are in the timeline (sorry), because I did not set up the Fossil repository until after I had made many changes. However, the original code is in the ORIG directory, and the file called FREEZZT documents many of the changes.)

There are many new features, such as the restore game menu now displays the date/time of the files, you can now restore without going back to the title screen first, the home/end/tab keys now work in the popup scrolls, and many more changes (although some are untested and some are incomplete). But there are many more changes I intend to make in future, including bug fixes and other stuff (some of these are listed in the FREEZZT file; some aren't).

I have also used some of the patches from OpenZoo.

Re: The Reconstruction of ZZT

Posted: Sun Apr 19, 2020 10:30 pm
by asie
Super ZZT joins the party! Sort of.

This concludes my journey with regards to reconstructing ZZT. Thank you all!

Re: The Reconstruction of ZZT

Posted: Sun Apr 26, 2020 12:13 am
by zzo38
A note to those making/maintaining external editors for ZZT: My own FreeZZT has a /P switch, which causes it to skip the title screen, both when starting and when exiting ZZT. (The standard ZZT ignores this switch.) This may be useful for the test function in external editors.

Re: The Reconstruction of ZZT

Posted: Sat Aug 08, 2020 6:50 pm
by asie
I have made a write-up about the process of creating the Reconstruction: https://blog.asie.pl/2020/08/reconstructing-zzt/.

Re: The Reconstruction of ZZT

Posted: Sat Oct 10, 2020 11:55 am
by asie
I've started working on my own fork, called ChocolateZoo. Its goals are as follows:

- Preserving maximum accuracy and compatibility, while fixing bugs which can end in a soft-lock or crash.
- Improving the general user experience.
- Improving the developer/tester experience (editor, documentation, new cheats).
- Increasing performance of the ZZT executable.
- Fixing common annoyances (conventional memory allocation issues -> EMS/XMS support).

The first public release - ChocolateZoo 3.3 - is available here. (The full changelog is in-game.)

EDIT: I've gotten it to build under Free Pascal! Currently, the only noticeable differences are (a) a significantly larger EXE - but we have EMS/XMS, so it's no big deal; (b) a timing-reliable built-in Delay(). But hey, now it's 100% libre! Download here.

One of the most visible user-facing features right now is perhaps an editor improvement:

Image