
////////////////////////////////////
// ORIGINAL README FILE FOLLOWS ////
////////////////////////////////////


The Potion
==========

Entry to the 4k minigame competition 2003
<URL:http://www.ffd2.com/minigame/>

Copyright  2002-2003 Peter Karlsson <peter@softwolves.pp.se>
A Softwolves Software Release in 2003
<URL:http://www.softwolves.pp.se/cbm/>

Game instructions
-----------------

Please see the file potion.txt for instructions.

Building
--------

The program has been compiled for three configurations:

* Linux

This should build on any sane Linux installation with GCC. It ought to build
on most platforms with GCC, but it has only been tested on Linux. Run "make
local" to build the Linux binary.

* Commodore 64
* Commodore 64 4K

These platforms require cc65 <URL:http://www.cc65.org/> to compile the
target binary, and pucrunch <URL:http://www.cs.tut.fi/~albert/Dev/pucrunch/>
to compress the resulting binary. The regular target uses the long
descriptions as in the Linux version, the small target uses shorter
descriptions and some optimized algorithms (mostly in-line assembly) to
reduce the size to fit in the 4K requirement for the 2003 Minigame
competition. Run "make c64" to build the regular C64 target and "make
c64small" to build the C64 4K target.


////////////////////////////////////
// Z80 VARIANTS ////////////////////
////////////////////////////////////

Z80 versions can be compiled using z88dk/sdcc:

http://www.z88dk.org/wiki/doku.php?id=temp:front

z88dk/sdcc means z88dk supplies the libraries and sdcc does the C translation.
In other words you need *both* z88dk and sdcc installed.  This is a curious
situation but the two combined deliver a high quality C compiler for z80 targets.

The page above includes instructions for installing both z88dk and sdcc.

POTION source code is available from this page:

http://www.softwolves.pp.se/cbm/skapelser/minigame2003#potion

The game can be built from the linux version.  The linux version is activated
by compiling without any command line defines.  Two places in the source
code must be edited prior to compilation:

1. "perform.c" is missing a '#include "room.h"'.  Add it.
2. "game.h" contains a SCREENWIDTH define.  Edit the number in the non-C64
    part of the define to indicate your target's screen width in chars.

Included in this zip are two compiles:

1. CP/M TARGET -- "POTION.COM"

SCREENWIDTH is set to 80.

zcc +cpm -vn -SO3 -clib=sdcc_iy --max-allocs-per-node200000 action.c game.c
input.c object.c perform.c room.c output.c -o potion

(I'm running on windows so I skipped the makefile :p )

The output binary will be called "potion_CODE.bin".  Rename that to "potion.com"
and you are done.

2. ZX SPECTRUM TARGET -- "POTION.SNA"

SCREENWIDTH is set to 40.  The compile line below uses a terminal with a
proportional font.  Forty proportional chars seems guaranteed to fit on a line.

zcc +zx -vn -SO3 -startup=8 -clib=sdcc_ix --reserve-regs-iy --max-allocs-per-node200000
action.c game.c input.c object.c perform.c room.c output.c -o potion

The output binary will be called "potion_CODE.bin".  This is a binary that must be
place in RAM at address 32768.  It is run with "RANDOMIZE USR 32768" from basic.

To make an emulator-ready snapshot load the binary into an emulator, start
the program with the RAND USR and then save a snapshot.
