The Reconstruction of ZZT

Discuss how totally awesome Bang! is here.

Moderator: Terryn

Post Reply
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

The Reconstruction of ZZT

Post by asie »

An MIT-licensed recreation of the original ZZT source code.

GitHub repository
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: The Reconstruction of ZZT

Post 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.
*POW* *CLANK* *PING*
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

Re: The Reconstruction of ZZT

Post 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.
zzo38
newcomer
Posts: 22
Joined: Sun Dec 15, 2019 11:25 pm

Re: The Reconstruction of ZZT

Post 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.
I have set up a NNTP to discuss ZZT and other stuff.
zzo38
newcomer
Posts: 22
Joined: Sun Dec 15, 2019 11:25 pm

Re: The Reconstruction of ZZT

Post 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.
I have set up a NNTP to discuss ZZT and other stuff.
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

Re: The Reconstruction of ZZT

Post 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
zzo38
newcomer
Posts: 22
Joined: Sun Dec 15, 2019 11:25 pm

Re: The Reconstruction of ZZT

Post 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.
I have set up a NNTP to discuss ZZT and other stuff.
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

Re: The Reconstruction of ZZT

Post 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!
zzo38
newcomer
Posts: 22
Joined: Sun Dec 15, 2019 11:25 pm

Re: The Reconstruction of ZZT

Post 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.
I have set up a NNTP to discuss ZZT and other stuff.
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

Re: The Reconstruction of ZZT

Post by asie »

Super ZZT joins the party! Sort of.

This concludes my journey with regards to reconstructing ZZT. Thank you all!
zzo38
newcomer
Posts: 22
Joined: Sun Dec 15, 2019 11:25 pm

Re: The Reconstruction of ZZT

Post 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.
I have set up a NNTP to discuss ZZT and other stuff.
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

Re: The Reconstruction of ZZT

Post by asie »

I have made a write-up about the process of creating the Reconstruction: https://blog.asie.pl/2020/08/reconstructing-zzt/.
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

Re: The Reconstruction of ZZT

Post 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
Post Reply