Menu

Tree [c2db3c] master /
 History

HTTPS access


File Date Author Commit
 TextToHuff 2022-09-25 luny luny [0287ab] Added tree maker for outputting the tree nodes....
 adventure 2023-04-22 luny luny [dd1794] Fix bug in _MOVE that gives wrong next command
 lasc 2023-09-24 luny luny [c2db3c] To keep the lifetimes simple both a value and a...
 readme 2022-09-17 Kevan Kevan [c70d3f] Updated readme

Read Me

ZAPH
----

adventure
---------
For the 48k Spectrum.
This is the main adventure engine along with the initial game 'Island'.

requirements:
For building on Linux / *Nix command line:

	make
	pasmo v0.5.3 (at least) - See https://pasmo.speccy.org/
	An emulator for the 48k Spectrum.

	I'll try out some other popular assemblers when I get a chance. I know I need to add some colons (:) to labels for the more standard.

To build:
	
	> make

	This will create a .TZX file which can then be loaded into a ZX Spectrum emulator.


TextToHuff
----------
TextToHuff is a command line utility to convert a string source into huffman coding, compressing the strings down.

Requires: 
	dotnet 5.0
	MS SDK 5.0
	MS runtime Microsoft.AspNetCore.App 5.0.17

To build:

	> dotnet build

Details:

The output is in a Z80 assembler format. The utlity understands 
comments and assembly labels and if used will compile pointer tables holding the address of each string. Strings can also be grouped into different tables using special '[]' commands.

For example:

	; This is a comment
	; The following is a string. It starts with a label, so it will be included in the table of pointers.
	label1:
	This is a simple sentence which will be compress into Huffman coding.
	This is another line on the same string.
	This line marks the end of the string by using the character ~
	label2:
	This is a new string.

	; The following tells the utility that all the above string belong to the same table and it will create a table of labels found in each string.
	[table]

The above example will compile into the following output:

	; This is a comment
	; The following is a string. It starts with a label, so it will be included in the table of pointers.
	label1:
		DEFB 43, 116, 222, 155, 191, 106, 62, 26, 14, 193, 100, 46, 35, 155, 186, 199, 124, 218, 68, 250, 143, 141, 207, 135, 16, 205, 233, 102, 252, 193, 4, 178, 206, 235, 241, 189, 170, 91, 52, 57
		DEFB 43, 116, 222, 155, 186, 222, 118, 35, 210, 148, 123, 175, 157, 142, 206, 113, 218, 99, 75, 102, 156, 1
		DEFB 43, 116, 221, 41, 71, 59, 196, 196, 222, 118, 56, 91, 94, 229, 249, 216, 237, 49, 165, 179, 234, 103, 224, 181, 45, 158, 118, 62, 59, 120, 190, 50, 35, 244, 25
	label2:
		DEFB 43, 116, 222, 155, 191, 80, 111, 105, 141, 45, 154, 57
		DEFB 25
	; The following tells the utility that all the above string belong to the same table and it will create a table of labels found in each string.

	table:
	DEFW label1,label2


To summerise, the rules are:

	Any line starting with a semi-colon ';' will be treated as a comment and included in the output.

	Any line ending with a colon ':' will be treated as a label and stored to be used in the next table command.

	Any line starting with '[' and ending with ']' will generate a table, using the name within as it's own label. The table will consist of all the labels found prior.

	Anything will be treated as a string to be encoded. this includes any empty lines ending in a return.