code:
Counters:
name                      r/w      g/n/f/b    i
"ABSn"                    r           f       *
"ACOS"                    r           f       *
"AMMO"                    r w         n       *
"ARCTANdy,dx"             r w         f       *
"ASIN"                    r           f       *
"ATAN"                    r           f       *
"BCHn,n"                  r           b       *
"BCOn,n"                  r           b       *
"BIDn,n"                  r w         b       *
"BPRn,n"                  r w         b       *
"BIMESG"                    w         f       *
"BIT_PLACE"               r w         n       *
"BLUE_VALUE"              r w         f       *
"BOARD_CHAR"              r           b       *
"BOARD_COLOR"             r           b       *
"BOARD_H"                 r           b       *
"BOARD_ID"                  w         b       *
"BOARD_PARAM"               w         b       *
"BOARD_W"                 r           b       *
"BOARD_X"                 r           n       *
"BOARD_Y"                 r           n       *
"BULLETTYPE"              r w         b       *
"BUTTONS"                 r           b       *
"BYTE"                    r w         n       *
"CHAR"                    r w         n       *
"CHAR_BYTE"                           f       *
"CHAR_X"                  r w         b       *
"CHAR_Y"                  r w         b       *
"COINS"                   r w         n       *
"COMMANDS"                  w         b       *
"COS"                     r           f       *
"CURRENT_COLOR"           r w         n       *
"CURSORSTATE"             r w         n       *
"C_DIVISIONS"             r w         b       *
"DATE_DAY"                r           f       *
"DATE_MONTH"              r           f       *
"DATE_YEAR"               r           f       *
"DIVIDER"                 r w         b       *
"ENTER_MENU"              r w         n       *
"F2_MENU"                 r w         n       *
"FIRSTXPOS"               r w         n       *
"FIRSTYPOS"               r w         n       *
"FREAD"                   r           f       *
"FREAD_COUNTER"           r           f       *
"FREAD_DELIMITER"         r w         b       *
"FREAD_OPEN"              r           f       *
"FREAD_POS"               r w         b       *
"FWRITE"                    w         f       *
"FWRITE_APPEND"           r           f       *
"FWRITE_COUNTER"          r w         f       *
"FWRITE_DELIMITER"        r w         b       *
"FWRITE_MODIFY"           r           f       *
"FWRITE_OPEN"             r           f       *
"FWRITE_POS"              r w         b       *
"GEMS"                    r w         n       *
"GREEN_VALUE"             r w         f       *
"HEALTH"                    w         g       *
"HELP_MENU"               r w         n       *
"HIBOMBS"                 r w         n       *
"HORIZPLD"                r           b       *
"INPUT"                   r w         b       *
"INPUTSIZE"               r w         b       *
"INT"                     r w         n       *
"INT2BIN"                 r w         f       *
"INVINCO"                   w         g       *
"KEY"                     r           b       *
"KEY_CODE"                r           b       *
"KEY_PRESSED"             r           b       *
"KEY_RELEASE"             r           b       *
"KEYn"                    r           b       *
"LASTXPOS"                r w         n       *
"LASTYPOS"                r w         n       *
"LAVA_WALK"               r w         g       *
"LIVES"                   r w         g       *
"LOAD_BC"                 r           f       *
"LOAD_GAME"               r           f       *
"LOAD_MENU"               r w         b       *
"LOAD_ROBOT"              r           f       *
"LOBOMBS"                 r w         n       *
"LOCALn"                  r w         b       *
"LOOPCOUNT"               r w         b       *
"MAXn,n"                  r w         f       *
"MBOARDX"                 r           b       *
"MBOARDY"                 r           b       *
"MINn,n"                  r w         f       *
"MOD_FREQUENCY"           r w         b       *
"MOD_ORDER"               r w         b       *
"MOD_POSITION"            r w         b       *
"MOUSEPX"                 r w         b       *
"MOUSEPY"                 r w         b       *
"MOUSEX"                  r w         b       *
"MOUSEY"                  r w         b       *
"MULTIPLIER"              r w         b       *
"MZX_SPEED"               r w         b       *
"OCHn,n"                  r           b       *
"OCOn,n"                  r           b       *
"OVERLAY_CHAR"            r           b       *
"OVERLAY_COLOR"           r           b       *
"OVERLAY_MODE"            r           b       *
"OVERLAY_X"               r           n       *
"OVERLAY_Y"               r           n       *
"PIXEL"                   r w         f       *
"PLAYERDIST"              r           b       *
"PLAYERFACEDIR"           r w         b       *
"PLAYERLASTDIR"           r w         b       *
"PLAYERX"                 r           b       *
"PLAYERY"                 r           b       *
"RED_VALUE"               r w         b       *
"RID<robot name>"         r           b       *
"ROBOT_ID"                r           b       *
"ROBOT_ID_<robot name>"   r           b       *
"Rn.<counter>             r           b       *
"SAVE_BC"                 r           f       *
"SAVE_GAME"               r           f       *
"SAVE_ROBOT"              r           f       *
"SAVE_WORLD"              r           f       *
"SCORE"                   r w         b       *
"SCROLLEDX"               r           b       *
"SCROLLEDY"               r           b       *
"SIN"                     r           f       *
"SMZX_Bn"                 r w         b       *
"SMZX_Gn"                 r w         b       *
"SMZX_MODE"               r w         f       *
"SMZX_PALETTE"            r           f       *
"SMZX_Rn"                 r w         b       *
"SPACELOCK"                 w         f       *
"SPR_CLISTn"              r           b       *
"SPR_COLLISIONS"          r           b       *
"SPR_NUM"                 r w         b       *
"SPR_YORDER"                w         f       *
"SPRn_CCHECK"               w         f       *
"SPRn_CHEIGHT"            r w         b       *
"SPRn_CLIST"                w         f       *
"SPRn_CWIDTH"             r w         b       *
"SPRn_CX"                 r w         b       *
"SPRn_CY"                 r w         b       *
"SPRn_HEIGHT"             r w         b       *
"SPRn_OFF"                  w         f       *
"SPRn_OVERLAID"             w         f       *
"SPRn_OVERLAY"              w         f       *
"SPRn_REFX"               r w         b       *
"SPRn_REFY"               r w         b       *
"SPRn_SETVIEW"              w         f       *
"SPRn_STATIC"               w         b       *
"SPRn_SWAP"                 w         f       *
"SPRn_VLAYER"               w         f       *
"SPRn_WIDTH"              r w         b       *
"SPRn_X"                  r w         b       *
"SPRn_Y"                  r w         b       *
"SQRTn"                   r           f       *
"TAN"                     r           f       *
"THISX"                   r           b       *
"THISY"                   r           b       *
"THIS_CHAR"               r           b       *
"THIS_COLOR"              r           b       *
"TIME"                    r w         n       *
"TIMERESET"               r w         b       *
"TIME_HOURS"              r           f       *
"TIME_MINUTES"            r           f       *
"TIME_SECONDS"            r           f       *
"UCHn,n"                  r           b       *
"UCOn,n"                  r           b       *
"UIDn,n"                  r w         b       *
"UPRn,n"                  r w         b       *
"VCHn,n"                  r w         b       *
"VCOn,n"                  r w         b       *
"VERTPLD"                 r           b       *
"VLAYER_HEIGHT"           r w         b       *
"VLAYER_SIZE"             r w         b       *
"VLAYER_WIDTH"            r w         b       *
"XPOS"                    r w         n       *
"YPOS"                    r w         n       *

Strings:
name                      r/w      g/n/f/b    i
"BOARD_NAME"              r           b       *
"BOARD_SCAN"              r           b       *
"INPUT"                   r           b       *
"MOD_NAME"                r           b       *
"ROBOT_NAME"              r           b       *
"FREAD"                   r           f       *
"FWRITE"                    w         f       *

Legend:

g - Normal counter with side-effects
n - Normal counter
f - Function counter
b - Points to a C variable


code:
                     COMMAND NAME                       | CYCLE ENDED |
                                                        |             |
% "string"                                              |    YES(1)   |
& "string"                                              |    YES(1)   |
* "string"                                              |     NO      |
. "string"                                              |     NO      |
. "@string"                                             |     NO      |
/ "string"                                              |    YES(2)   |
: "label"                                               |    NO(3)    |
? "counter" "label" "string"                            |    YES(1)   |
? "label" "string"                                      |    YES(1)   |
[ "string"                                              |    YES(1)   |
| "label"                                               |     NO      |
ABORT LOOP                                              |     YES     |
ASK "string"                                            |    YES(1)   |
AVALANCHE                                               |     NO      |
BECOME [color] [thing] [param]                          |     NO      |
BECOME NONLAVAWALKER                                    |     NO      |
BECOME NONPUSHABLE                                      |     NO      |
BECOME LAVAWALKER                                       |     NO      |
BECOME PUSHABLE                                         |     NO      |
BLIND #                                                 |     NO      |
BOARD [dir] "string"                                    |     NO      |
BOARD [dir] NONE                                        |     NO      |
BULLETCOLOR [color]                                     |     NO      |
BULLETE [char]                                          |     NO      |
BULLETN [char]                                          |     NO      |
BULLETS [char]                                          |     NO      |
BULLETW [char]                                          |     NO      |
CENTER MESG                                             |     NO      |
CHANGE [color] [thing] [param] [color] [thing] [param]  |     NO      |
CHANGE CHAR ID # [char]                                 |     NO      |
CHANGE OVERLAY [color] [char] [color] [char]            |     NO      |
CHANGE OVERLAY [color] [color]                          |     NO      |
CHANGE SFX # "string"                                   |     NO      |
CHANGE THICK ARROW CHAR [dir] [char]                    |     NO      |
CHANGE THIN ARROW CHAR [dir] [char]                     |     NO      |
CHAR [char]                                             |     NO      |
CHAR EDIT [char] # # # # # # # # # # # # # #            |     NO      |
CLEAR MESG                                              |     NO      |
CLIP INPUT                                              |     NO      |
COLOR [color]                                           |     NO      |
COLOR FADE OUT                                          |     NO      |
COLOR FADE IN                                           |     NO      |
COLOR INTENSITY # PERCENT                               |     NO      |
COLOR INTENSITY # # PERCENT                             |     NO      |
COPY # # # #                                            |     NO      |
COPY [dir] [dir]                                        |     NO      |
COPY BLOCK # # # # # #                                  |     NO      |
COPY CHAR [char] [char]                                 |     NO      |
COPY OVERLAY BLOCK # # # # # #                          |     NO      |
COPY BLOCK # # # # "@filename" #                        |     NO      |
COPY OVERLAY BLOCK # # # # "@filename" #                |     NO      |
COPY (OVERLAY) BLOCK "#x" "#y" # # "@filename" #        |     NO      |
COPY BLOCK # # # # "$string" #                          |     NO      |
COPY OVERLAY BLOCK # # # # "$string" #                  |     NO      |
COPY (OVERLAY) BLOCK "#x" "#y" # # "$string" #          |     NO      |
COPY BLOCK # # # # "#x" "#y"                            |     NO      |
COPY OVERLAY BLOCK # # # # "#x" "#y"                    |     NO      |
COPY BLOCK "#x" "#y" # # # #                            |     NO      |
COPY OVERLAY BLOCK "#x" "#y" # # # #                    |     NO      |
COPY (OVERLAY) BLOCK "#x1" "#y1" # # "#x2" "#y2"        |     NO      |
COPYROBOT "Robot"                                       |    YES(4)   |
COPYROBOT # #                                           |    YES(4)   |
COPYROBOT [dir]                                         |    YES(4)   |
CYCLE #                                                 |     YES     |
DEC "counter" #                                         |     NO      |
DEC "counter" RANDOM # #                                |     NO      |
DEC "$string" #                                         |     NO      |
DIE                                                     |     NO      |
DIE ITEM                                                |     NO      |
DISABLE MESG EDGE                                       |     NO      |
DISABLE SAVING                                          |     NO      |
DIVIDE "counter" #                                      |     NO      |
DOUBLE "counter"                                        |     NO      |
DUPLICATE SELF # #                                      |     NO      |
DUPLICATE SELF [dir]                                    |     NO      |
END                                                     |     YES     |
END MOD                                                 |     NO      |
END PLAY                                                |     NO      |
END SAM                                                 |     NO      |
ENDGAME                                                 |     NO      |
ENDLIFE                                                 |     NO      |
ENABLE MESG EDGE                                        |     NO      |
ENABLE SAVING                                           |     NO      |
ENABLE SENSORONLY SAVING                                |     NO      |
ENEMY BULLETCOLOR [color]                               |     NO      |
ENEMY BULLETE [char]                                    |     NO      |
ENEMY BULLETN [char]                                    |     NO      |
ENEMY BULLETS [char]                                    |     NO      |
ENEMY BULLETW [char]                                    |     NO      |
EXCHANGE PLAYER POSITION                                |     YES     |
EXCHANGE PLAYER POSITION #                              |     YES     |
EXCHANGE PLAYER POSITION # DUPLICATE SELF               |     YES     |
EXPLODE #                                               |     NO      |
FIREWALKER #                                            |     NO      |
FILLHEALTH                                              |     NO      |
FLIP CHAR [char] [dir]                                  |     NO      |
FREEZETIME #                                            |     NO      |
GIVE # [item]                                           |     NO      |
GIVEKEY [color]                                         |     NO      |
GIVEKEY [color] "label"                                 |    NO(5)    |
GO [dir] #                                              |    YES(6)   |
GOTO "label"                                            |    NO(5)    |
GOTO "#return"                                          |     NO      |
GOTO "#top"                                             |     NO      |
GOTOXY # #                                              |     YES     |
HALF "counter"                                          |     NO      |
IF "counter" !<>_= # "label"                            |    NO(5)    |
IF [condition] "label"                                  |    NO(5)    |
IF # # "label"                                          |    NO(5)    |
IF [dir] PLAYER [color] [thing] [param] "label"         |    NO(5)    |
IF [color] [thing] [param] # # "label"                  |    NO(5)    |
IF [color] [thing] [param] [dir] "label"                |    NO(5)    |
IF ALIGNEDROBOT "Robot" "label"                         |    NO(5)    |
IF ANY [color] [thing] [param] "label"                  |    NO(5)    |
IF FIRST STRING "string" "label"                        |    NO(5)    |
IF NO [color] [thing] [param] "label"                   |    NO(5)    |
IF NOT [color] [thing] [param] [dir] "label"            |    NO(5)    |
IF NOT [condition] "label"                              |    NO(5)    |
IF PLAYER # # "label"                                   |    NO(5)    |
IF STRING "string" "label"                              |    NO(5)    |
IF STRING MATCHES "string" "label"                      |    NO(5)    |
IF STRING NOT "string" "label"                          |    NO(5)    |
IF "$string" (equality) # "label"                       |    NO(5)    |
IF "$string" (equality) "text" "label"                  |    NO(5)    |
IF "$string" (equality) "$string2" "label"              |    NO(5)    |
IF c?? Sprite_Colliding pNN # # "label"                 |    NO(5)    |
IF c?? Sprite p?? # # "label"                           |    NO(5)    |
INC "$string" "text"                                    |     NO      |
INC "$string" "$string2"                                |     NO      |
INC "counter" #                                         |     NO      |
INC "counter" RANDOM # #                                |     NO      |
INPUT STRING "string"                                   |    YES(1)   |
JUMP MOD ORDER #                                        |     NO      |
LAYBOMB [dir]                                           |     NO      |
LAYBOMB HIGH [dir]                                      |     NO      |
LAZERWALL [dir] #                                       |     NO      |
LOAD CHAR SET "file"                                    |     NO      |
LOAD PALETTE "file"                                     |     NO      |
LOCKPLAYER                                              |     NO      |
LOCKPLAYER ATTACK                                       |     NO      |
LOCKPLAYER EW                                           |     NO      |
LOCKPLAYER NS                                           |     NO      |
LOCKSCROLL                                              |     NO      |
LOCKSELF                                                |     NO      |
LOOP #                                                  |     NO      |
LOOP START                                              |     NO      |
MESSAGE ROW #                                           |     NO      |
MISSILECOLOR [color]                                    |     NO      |
MOD "file"                                              |     NO      |
MOD FADE # #                                            |     NO      |
MOD FADE IN "file"                                      |     NO      |
MOD FADE OUT                                            |     NO      |
MOD SAM # #                                             |     NO      |
MODULO "counter" #                                      |     NO      |
MOVE ALL [color] [thing] [param] [dir]                  |     YES     |
MOVE PLAYER [dir]                                       |     YES     |
MOVE PLAYER [dir] "label"                               |     YES     |
MULTIPLY "counter" #                                    |     NO      |
NEUTRAL BULLETCOLOR [color]                             |     NO      |
NEUTRAL BULLETE [char]                                  |     NO      |
NEUTRAL BULLETN [char]                                  |     NO      |
NEUTRAL BULLETS [char]                                  |     NO      |
NEUTRAL BULLETW [char]                                  |     NO      |
OPEN [dir]                                              |     NO      |
OVERLAY ON                                              |     NO      |
OVERLAY STATIC                                          |     NO      |
OVERLAY TRANSPARENT                                     |     NO      |
PERSISTENT GO "string"                                  |    YES(2)   |
PLAY "string"                                           |     NO      |
PLAY SFX "string"                                       |     NO      |
PLAYER BULLETCOLOR [color]                              |     NO      |
PLAYER BULLETE [char]                                   |     NO      |
PLAYER BULLETN [char]                                   |     NO      |
PLAYER BULLETS [char]                                   |     NO      |
PLAYER BULLETW [char]                                   |     NO      |
PLAYER CHAR [dir] [char]                                |     NO      |
PLAYER CHAR [char]                                      |     NO      |
PLAYERCOLOR [color]                                     |     NO      |
PUSH [dir]                                              |     NO      |
PUT [color] [thing] [param] # #                         |     NO      |
PUT [color] [thing] [param] [dir]                       |     NO      |
PUT [color] [char] OVERLAY # #                          |     NO      |
PUT [color] [thing] [param] [dir] PLAYER                |     NO      |
PUT PLAYER # #                                          |     NO      |
PUT PLAYER [dir]                                        |     NO      |
PUT "@FILENAME.XXX" Image_File [param] # #              |     NO      |
PUT [color] Sprite [param] # #                          |     NO      |
REL COUNTERS                                            |     NO      |
REL PLAYER                                              |     NO      |
REL SELF                                                |     NO      |
REL COUNTERS FIRST                                      |     NO      |
REL PLAYER FIRST                                        |     NO      |
REL SELF FIRST                                          |     NO      |
REL COUNTERS LAST                                       |     NO      |
REL PLAYER LAST                                         |     NO      |
REL SELF LAST                                           |     NO      |
RESETVIEW                                               |     NO      |
RESTORE "label" #                                       |     NO      |
RESTORE PLAYER POSITION                                 |     YES     |
RESTORE PLAYER POSITION #                               |     YES     |
RESTORE PLAYER POSITION # DUPLICATE SELF                |     YES     |
ROTATECW                                                |     NO      |
ROTATECCW                                               |     NO      |
SAM # "file"                                            |     NO      |
SAVE PLAYER POSITION                                    |     NO      |
SAVE PLAYER POSITION #                                  |     NO      |
SCROLL CHAR [char] [dir]                                |     NO      |
SCROLLARROW COLOR [color]                               |     NO      |
SCROLLBASE COLOR [color]                                |     NO      |
SCROLLCORNER COLOR [color]                              |     NO      |
SCROLLPOINTER COLOR [color]                             |     NO      |
SCROLLTITLE COLOR [color]                               |     NO      |
SCROLLVIEW [dir] #                                      |     NO      |
SCROLLVIEW POSITION # #                                 |     NO      |
SEND # # "label"                                        |     NO      |
SEND "Robot" "label"                                    |     NO      |
SEND [dir] "label"                                      |     NO      |
SEND [dir] PLAYER "label"                               |     NO      |
SET "counter" #                                         |    NO(8)    |
SET "counter" RANDOM # #                                |     NO      |
SET "$string" "text"                                    |     NO      |
SET "$string1" "$string2"                               |     NO      |
SET "$string" #                                         |     NO      |
SET COLOR # # # #                                       |     NO      |
SET EDGE COLOR [color]                                  |     NO      |
SET MAXHEALTH #                                         |     NO      |
SET MESG COLUMN #                                       |     NO      |
SFX #                                                   |     NO      |
SHOOT [dir]                                             |     NO      |
SHOOTMISSILE [dir]                                      |     NO      |
SHOOTSEEKER [dir]                                       |     NO      |
SLOWTIME #                                              |     NO      |
SPITFIRE [dir]                                          |     NO      |
STATUS COUNTER # "counter"                              |     NO      |
SWAP WORLD "file"                                       |     NO      |
SWITCH [dir] [dir]                                      |     NO      |
TAKE # [item]                                           |     NO      |
TAKE # [item] "label"                                   |    NO(5)    |
TAKEKEY [color]                                         |     NO      |
TAKEKEY [color] "label"                                 |    NO(5)    |
TELEPORT PLAYER "string" # #                            |    YES(2)   |
TRADE # [item] # [item] "label"                         |    NO(5)    |
TRY [dir] "label"                                       |    YES(5)   |
WAIT #                                                  |    YES(6)   |
WAIT MOD FADE                                           |     NO      |
WAIT PLAY                                               |     NO      |
WAIT PLAY "string"                                      |    YES(2)   |
WALK [dir]                                              |    NO(7)    |
WIND #                                                  |     NO      |
WRITE OVERLAY [color] "string" # #                      |     NO      |
UNLOCKPLAYER                                            |     NO      |
UNLOCKSCROLL                                            |     NO      |
UNLOCKSELF                                              |     NO      |
VIEWPORT # #                                            |     NO      |
VIEWPORT SIZE # #                                       |     NO      |
VOLUME #                                                |     NO      |
ZAP "label" #                                           |     NO      |

(1) = The act of opening default dialog boxes kills (almost) all other game action, including Robot processing. The only exceptions are the play of music/sound and the read/write actions of the various fread/fwrite counters during the loading of default "["/"%"/"&" boxes.
(2) = Does not end a cycle if the string is blank or a completely invalid/inapplicable string.
(3) = While it never ends the cycle in current MZX worlds, it can end the cycle in special cases in pre-port MZX worlds. If a loop consists of a label, a send to the same label, and none of the following commands: DEC, DIVIDE, DOUBLE, GIVE, HALF, INC, LOOP FOR #, MODULO, MULTIPLY, SET, TAKE, TRADE, then the label itself will end the cycle.
(4) = Considering "copyrobot" commands are executed always, even if no match is found, this may not be correct.
(5) = Attempting to jump to labels that do not exist does not consume a cycle.
(6) = Does not end a cycle if # is 0.
(7) = A special case exists where it currently executes a cycle end going through a transporter.
(8) = A special case exists for the SAVE_GAME and SAVE_WORLD "special" counters which do end the cycle if used.

repo_name: pgimeno/megazeux

license: mit


code:
Robotic revision ideas

After gauging the response to a modestly altered Robotic language, it is is now
my intention to include in a later version of MZX a language which is 100%
compatible with Robotic as we know it now. It will, however, have several
important extensions. Simplicity is a high priority. Syntax sensibility is
also important, but it is more necessary to retain familiar style than to
introduce new forms which may be deemed more writable for whatever reason. There
will be no major attempt to make Robotic resemble any one specific known language;
rather features will be added as a result of determined necessity.

It should be noted that I have every intention of changing the Robotic bytecode
dramatically. This has a few implications:

- Source code will no longer have a one to one relationship with bytecode. This
  means that bytecode cannot be disassembled into source code without losing
  quite a bit of information; no attempt will be made to provide such a
  disassembler as part of MZX itself. MZX currently stores bytecode alone in
  its world files and to edit the robots this bytecode is disassembled. To edit
  robots created with the new format (or indeed, converted from existing worlds)
  the source code will have to be present. Since it is not necessary to have the
  source code present to execute the game, there will likely exist world versions
  that have had the source code stripped. These versions will be playable but
  will not be editable. This is not necessarily an intentional form of protection,
  but a way to reduce the size of the games tremendously.

- The bytecode will be relatively simple to interpret. Most commands will be
  linked as function calls by the interpreter. The bytecode itself will most
  represent a relatively forth-like stack based machine. It will be lower level
  than the current bytecode, and thus lower level than the Robotic language itself
  (the current bytecode is merely a tokenization of Robotic code, and ensures
  correct syntax so that need not be checked at runtime).

- The bytecode will be done with efficiency in mind. I intend to provide as many
  compile time optimizations to make code faster. Mainly, references that would
  otherwise have to be deduced at runtime (such as the location of a counter with
  a given name) will be hard linked if they can be deduced at compile time. These
  will be considered "static" references and ones that cannot be deduced will be
  considered "dynamic" or "run-time" references.

With the last point in mind, I would like to point out that I intend to specifically
document optimization ideas at some point, but that this will not be considered
part of the language specification itself. However, since some language forms will
inevitably be far more conducive to efficient optimization, it will often be in the
programmer's best interest to code in a certain style.

I'd also like to note that I intend for the language to be very simple to parse and
compile (as it is now). This may add some extra overhead to writing the code, but I
believe it is highly important that code can be quickly compiled on the fly. This is
especially true for games that will import robots externally at run-time. Besides,
I'm hardly interested in writing a full blown LALR table traversing or
recursive-descent parser for MegaZeux at this time.

Now, onto actual language specifications...

A Robotic program will consist of several statements. A statement will be one of the
following:

A single command - this "does" something; as seen in Robotic currently.
A compiler directive - this describes the code in some way, limits names, etc. It
  may allow for macros and comments will certainly fall under this category.
A multi-command command - some commands may take, as a parameter, a command block.
  These will be clearly delimited in some way.

All commands take a fixed number of parameters. Each parameter can be one of multiple
types. For now it is best to consider a constant and a variable to be two different
types; there are many instances where one will not be usable as another. For Robotic
as we know it now, all types are basically analogous to either integers or strings.
Thus I'll skip the existing types (such as character, direction, parameter) and give
general types for variables. The type of a variable is denoted by its first character.

integer variable - currently known as a "counter." Has no specific first character
  (thus anything which doesn't fall under the other categories falls here). Integers
  will have a size that is at LEAST 32bits, but you shouldn't rely on a certain size.
string variable - contains a series of characters. Currently MZX has a form of
  slicing the string by using + and # operators in the name of the string (at the end).
  An individual character can be returned in integer form with the . operator.
  Denoted with a $ at the beginning of the name.
real variable - values with decimal portions. Guaranteed to have at leat double
  precision (64bits), may have more. Denoted with a % at the beginning of the name.

Now, using the name interpolation operators of MZX, it is possible to come to other
more complicated types. These can be considered aggregate types. Consider the following:

int&int2& - this is an integer indexed array of ints. Putting the subscript at the end
  will be preferable by convention and possibly for optimization issues.
int&$string& - this is a string indexed or associative array (may be considered a
  dictionary or set as well).
int&int2&,&int3& - multi-dimensional array of ints.
$str&int& - array of stringgs

etc.

These are just some examples. Actually, I would like to make functions appear to be
arrays! This is confusing, but a function is afterall a map from type a to type b,
although there may side-effects to calling one. Nonetheless, it is quite possible to
represent a function in exactly the same way a counter is represented. If you don't
believe me, look at the current builtin functions such as cos and vco. They are used
as counters but are actually functions! This is how I would like functions to be
defined:

: "<character denoting return type>name(parameter list)"

As you can see they're like labels. Let me give some examples.

: "#printme"
  * "~fhello!"
  goto #return

OR

: "#printme"
  * "~fhello!"
  return

Notice the new return command - this is used to return a value. The # indicates that
there is actually no return value at all. The consequences of such a thing have yet
to be determined, but this does cover existing subroutines nicely.

: "square(value)"
  return (value * value)

Returns the square of int value. Lack of special first char indicates a return type of
int.

: "$concat($str1, $str2)"
  return ($str1 + $str2)

Returns the concatenation of two strings. Pointless since this is a primitive
operation, but nicely demonstrates the use of functions.

There is a problem however - how to differentiate between functions and normal labels?
Well, parentheses inside the label name will indicate that it has a parameter list. If
there is no special type character (returns int) then it must have an empty parem list,
otherwise the compiler will think it's a label. The reason why the compiler needs to be
able to discern if it's a label or not is because a function is loaded into the counter
list. Note that () in label names do NOT act as expressions, so you can't interpolate
dynamic values into label names. This should come as no surprise because MZX 2.80 won't
allow such a thing to work as it is. They're simply not efficient, and I don't believe
anyone has ever required them, even though they were indeed possible in DOS MZX.

Multi command commands:

As noted earlier there will be some commands that take command blocks as parameters.
This will be useful for flow control constructs, such as:

if value
  ...
  ...

Where the following indented lines are the code block. Value is anything that can be
turned into an integer value (and as it stands now, anything can be). Most of the time
it will be a variable or an expression, and if it evaluates to non-zero the block is
done, otherwise if it evaluates to 0 it isn't. This should be clear to anyone who has
used just about any imperatively based programming language.

Some other constructs are loops:

loop for x
  ...
  ...

And for legacy's sake,

loopstart
...
loop for x

Note that indentation is not necessary if something else ends the block such as this.

while value
  ...
  ...

Does the block while the value is true.

dowhile value
  ...
  ...

Does the block once, then repeated times while the value is true.

for initial value increment
  ...

A for loop. It should be noted here that while initial and increment are values, what
they actually evaluate to isn't important! Actually, expressions will most likely be
able to have side-effects. Mainly, an assignment operator and combinations of assignment
and other operators. Since = is used for comparison, the assignment operator will
probably be :=. Look at this example:

for ((x := 0) a ($str := "")) (x < 10) (x++)
  set $str ($str + x + " ")
* ~f&$str&

This will print out..
0 1 2 3 4 5 6 7 8 9 10

This was done in a Robotic familiar form, but more concise forms will probably be
possible. Note that this allows string operations in expressions. This will probably be
allowed, but I'm not yet completely certain. Expressions MAY be limited to integers.

foreach pattern variable
  ...
  ...

This one is rather interesting. I'm not totally sure how to approach it, really, but I
think that pattern will be something of the form you would give in MZX (such as
a&b& where the type of b is known) and the variable will be a temporary variable that
the matching variables are stored in for each iteration. For now consider variable to
be a reference, although I haven't formally touched on references. That means that it
isn't a copy of the matching value but IS the value, just with a different name. So if
you change it, you change the value. This can only really be made clear with an example..

foreach str($strindex) $s
  set $s ($s + " blah")

This will put " blah" at the end of every string str followed by a string. So let's say
you have the string stra, strb, and str0.. those would all match. Note that this is a
good way of doing something with respect to every element of an array, but it can be
more powerful than that. The details are still up in the air, but I'd really like to
have something like this.

References

I should at least mention the possability of these. References are important because
otherwise it's tough to pass arrays and whatnot to functions. You can actually do
references already using string interpolation in variable names:

set $ref "name"
set ($ref) 10

Will set the variable named "name" to 10. $ref thus refers to name.
However I would like a way to do this that the compiler does more for you. I believe
that references will only be possible when calling functions. In case it wasn't clear,
be mindful of the fact that the above functions described were "pass by value."
Consider the following:

: 'set to 10(&value)'
  set value 10
  return

This will set something passed to it to 10:

set counter 1
do 'set to 10&counter&'
* "~f&counter&"

I should point out the "do" command which merely evaluates a supplied value, which
can thus call any functions. This is useful if you want to call a function merely for
its side-effect and not a return type. Also, if it wasn't clear before, note the
method of calling functions - the parameter is merely interpolated into the function
name itself. This may be changed, though. And then notice the parameter value with the
& before it. This indicates pass by reference (stolen from C++)

Anyway, this will print out 10. When you call the function "set to 10", it passes the
variable named counter by reference, and "value" is thus bound to what's passed to it.
Changing value changes whatever's passed to it. One note - you will not be able to
refer to references with the traditional && way. That is to say, they don't exist as
actual counters with names. Something that may be alarming - if you were to do, within
that function, the following:

set "value&index&" 10

(let's say index has the value 100)

This would actually set the counter named counter100 to 10! Thus the reference
"replaces" the name of the counter passed. This is useful in many cases, but care must
be taken not to accidentally use the name unintentionally within another name.


code:
File loading:

open file file_name (for) read (to) (number)
open file file_name (for) write (to) (number)
open file file_name (for) append (to) (number)
open file file_name (for) modify (to) (number)

File operations:

Partial charset loading:

load char set "filename.chr" offset

Copy block:

copy (board) block x1 y1 w h [overlay|vlayer] x2 y2
copy overlay block x1 y1 w h [board|vlayer] x2 y2
copy vlayer block x1 y1 w h [board|overlay] x2 y2

copy [(board)|overlay|vlayer] block x1 y1 w h mzm file_name
copy [(board)|overlay|vlayer] block x1 y1 w h string str

MZM loading:

load mzm [BOARD|OVERLAY|VLAYER] x y w h file_name

Sprite collision:

spr(number)_collides(x, y)
spr(number)_collides_absolute(x, y)
spr(number)_at(x, y)

 Examples:

 if (~spr0_collides1,0)
   inc spr0_x 1

 if spr(0)_collides(a, b)
   * "~fouch"

Trig:

sin(%value)
cos(%value)
tan(%value)
asin(%value)
acos(%value)
atan(%value)
atan2(%value)

 sin(val) * multiplier
 asin(val / divider)


code:
MZX save file format extensions

These all are stored after the counters in the save file.

Byte(s)

00-1023				Sprites (16 bytes each * 64)
1024				Total sprite count
1025				Sprite y_order flag
1026-1091			Sprite collision info (66 bytes)
1092-2115			Strings (16 bytes each * 64)
2116-2117			Math multiplier
2118-2119			Math divider
2120-2121			Circle divider
2122-2133			Input file name
2134-2137			Input file position
2138-2149			Output file name
2150-2153			Output file position


code:
Direction idiosyncracities:

IDLE counts as walking RANDB if the Robot is not blocked in any cardinal direction.
IDLE counts as walking RANDNB if the Robot is blocked in all cardinal directions.
IDLE Robots are moving CW IDLE, OPP IDLE, RANDP IDLE, and RANDNOT IDLE.
Walking FLOW works for IDLE Robots.
IDLE Robots are not moving CW BENEATH, OPP BENEATH, RANDP BENEATH, or RANDNOT BENEATH.


code:
** Codes for objects-

ID  Is              Char Param           Color Special
--- --------------- ---- --------------- ----- ----------------------------
0   Space           32                   Curr  UNDER
1   Normal          178                  Curr
2   Solid           219                  Curr
3   Tree            6                    10
4   Line            Var                  Curr
5   Custom Block    Par  Char            Curr
6   Breakaway       177                  Curr
7   Custom Break    Par  Char            Curr
8   Boulder         233                  7
9   Crate           254                  6
10  Custom Push     Par  Char            Curr
11  Box             254                  Curr
12  Custom Box      Par  Char            Curr
13  Fake            178                  Curr  UNDER
14  Carpet          177                  Curr  UNDER
15  Floor           176                  Curr  UNDER
16  Tiles           254                  Curr  UNDER
17  Custom Floor    Par  Char            Curr  UNDER
18  Web             Var                  7     UNDER
19  Thick Web       Var                  7     UNDER
20  Still Water     176                  25    UNDER
21  N Water         24                   25    UNDER
22  S Water         25                   25    UNDER
23  E Water         26                   25    UNDER
24  W Water         27                   25    UNDER
25  Ice             Var  Anim            59    UNDER
26  Lava            Var  Anim            76    UNDER
27  Chest           239  Contents        6     CHAR 160 IN v2.0+
28  Gem             4                    Curr
29  Magic Gem       4                    Curr
30  Health          3    Amount          12
31  Ring            9    Effect          14
32  Potion          173  Effect          11    CHAR 150 IN v2.0+
33  Energizer       7    Glow            15
34  Goop            176                  24    v2.0+ LIKE ZZT'S WATER
35  Ammo            Var  Amount          3
36  Bomb            11   High or Low     8
37  Lit Bomb        Var  Fuse            8
38  Explosion       177  Stage           239
39  Key             12                   Curr
40  Lock            10                   Curr
41  Door            Var  Dir/Lock        Curr
42  Open Door       Var  Dir/Stage       Curr  TREAT AS ABOVE FOR CHANGE CMD
43  Stairs          240  Destination     Curr  UNDER, CHAR 162 IN v2.0+
44  Cave ("Door")   239  Destination     Curr  UNDER, CHAR 161 IN v2.0+
45  CW Rotate       Var  Anim            Curr
46  CCW Rotate      Var  Anim            Curr
47  Gate            22   Lock            8
48  Open Gate       95   Delay           8     UNDER, CHAR 196 IN v2.0+
49  Transport       Var  Anim/Dir        Curr
50  Coin            7                    14
51  N Moving Wall   Par  Char            Curr
52  S Moving Wall   Par  Char            Curr
53  E Moving Wall   Par  Char            Curr
54  W Moving Wall   Par  Char            Curr
55  Pouch           229  Contents        7     CHAR 159 IN v2.0+
56  Pusher          Var  Direction       Curr
57  Slider NS       18                   Curr
58  Slider EW       29                   Curr
59  Lazer           Var  Anim/Dir/Stage  Curr
60  Lazer Gun       206  Dir/Timing      4
61  Bullet          Var  Dir/Type        15
62  Missile         Var  Dir             8
63  Fire            Var  Anim            12
64
65  Forest          178                  2
66  Life            Var  Anim            13
67  Whirlpool 1     54   Destination     31    UNDER, CHAR 151-154 IN v2.0+
68  Whirlpool 2     64   Destination     31    UNDER, TREAT AS 1 FOR CHANGE
69  Whirlpool 3     57   Destination     31    UNDER, TREAT AS 1 FOR CHANGE
70  Whirlpool 4     149  Destination     31    UNDER, TREAT AS 1 FOR CHANGE
71  Invis Wall      32                   Curr
72  Ricochet Panel  Var  Orientation     9
73  Ricochet        42                   10
74  Mine            Var  Anim/Radius     12
75  Spike           Var  Dir             8
76  Custom Hurt     Par  Char            Curr
77  Text            Par  Char            Curr
78  Shooting Fire   Var  Anim/Dir        14
79  Seeker          Var  Anim/Life       10
80  Snake           235  Int/Spd/Dir     2
81  Eye             236  Int/Spd/Radius  15
82  Thief           1    Int/Spd/Steal   12    CHAR 5 IN v2.0+
83  Slimeblob       42   Spd/Invnc/Hurts 10
84  Runner          2    Spd/Dir/HP      4
85  Ghost           234  Int/Spd/Invnc   7
86  Dragon          21   Fire/Move/HP    4
87  Fish            224  Int/Spd/Hurts   14    PARAM CONT- HP/CurrentAffects
88  Shark           94   Int/Fire/Rate   7     CHAR 127 IN v2.0+
89  Spider          15   Int/Spd/HP/Web  7     CHAR 149 IN v2.0+
90  Goblin          5    Int/Rest        2
91  Spitting Tiger  227  Int/Fire/Rate   11
92  Bullet Gun      Var  Dir/Rate/Int    15
93  Spinning Gun    Var  Dir/Rate/Int    15
94  Bear            153  Sens/Spd/HP     6     CHAR 172 IN v2.0+
95  Bear Cub        148  Int/Mode/Switch 6     CHAR 173 IN v2.0+
96
97  Missile Gun     Var  Int/Dir/Rate    8
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122 Sensor          Var  ID #            Curr
123 Robot Pushable  Var  ID #            Curr
124 Robot           Var  ID #            Curr
125 Sign            226  ID #            8
126 Scroll          232  ID #            15
127 Player          Var                  27

** Robot program storage format-

BYTE 1- Number of total bytes in this command, not including this one or
		  the final byte which is a repeat of this count.
		  A zero here signifies the end of the program.
		  A -1 (~0) (0FFh) here signifies the start of the program, and is
		  immediatly followed by BYTE 1 of the first command.
BYTE 2- Command identification code.
THEN  - Command paramters, if any, according to command. Parameters take
		  the minimum bytes required for ver 1.0?. For ver 2.00, they are
		  all min. 3 bytes- The first byte is a code of n for a string/counter
		  of n length or 0 for a numeral, the second/third bytes is the numeral
		  or the null-terminated counter/string. Conditions/etc are stored as
		  numerals. Even things like directions that fit in one byte take up
		  two bytes. Nothing except counters/strings requires more than these
		  two bytes, however. The length of a string INCLUDES THE NULL BYTE.
FINAL - Repeat of BYTE 1 for backwards searching.

A blank program is 2 bytes long- A -1 then a 0.

** Scroll storage format-

BYTE 1- A 01h. This marks the start of the text.
MIDDLE- Lines, all terminated with a '\n'. (0Ah) There must be at least
		  one line, even if it is just a '\n'.
LAST  - A 00h. This marks the end of the text.

A blank text is 3 bytes long- A 01h, a '\n', and a 00h.

** Command line options-

Version 1.0? and below-

-debug  : Begin with x/y pos, etc showing (Like Alt-Y within program)
-ms     : Music on SB
-mp     : Music on PC
-mo     : Music off
-sp     : PC speaker sound effects on
-so     : PC speaker sound effects off
-bios   : Use bios for certain functions
-nomouse: Don't activate mouse
-mouse  : Use mouse even if found
-prism  : Cheat keys
-ii!    : Pro mode
-keyboard2:Use another method of ending the keyboard handler

Version 2.0 and above-

-?      : Bring up command line help screen, also done on invalid option
			 along with a beep
-lblah  : Loads up blah.mzx at start up (.mzx is optional)
-nomouse: Don't activate mouse
-noems  : Don't use EMS
-ega    : Use EGA mode even on higher cards
-keyb2  : Use another method of ending the keyboard handler

** Transport destination search algorithim

1) Check space on other side of transport- if it is empty or can be pushed
	out of the way, transport to there.
2) Check starting at space on other side for a transport of opposite
	orientation or of anydir orientation. The first found that has empty
	on the other side or stuff that can be pushed out of the way on the
	other side is the destination.
3) No destination.

** Robot command codes-

Version 1.0?-

EOC=End-of-cycle (x=yes, Pre=prefix)
Params-
	[#] Number 0 to 255
	[##] Number 0 to 65535
	[-#] Number from -128 to 127
	[dir] NSEW plus modifiers
	[ch] Character
	[col] Color
	[color/thing/param] Color + Thing + Param
	[color/thing] Color + Thing (no Param)
	[thing] Thing (no Color or Param)
	[str] String
	[!<>=] Equality
	[cond] Condition (often with a direction)
	[item] Item (AMMOS, etc)

	Color can only have ?'s when coupled with a thing. In that case, if
	a ? is present, the high bit of the thing is set. (+128) See later
	section for color coding.

ID  EOC Command
--- --- -------
0    x  End
1    x  Die
2    x  Wait [#]
3       Cycle [#]
4    x  Go [dir] [#]
5       Walk [dir]
6    x  Become [color/thing/param]
7       Char [ch]
8       Color [col]
9    x  Gotoxy [-#] [-#]
10      Set [str] [##]
11      Inc [str] [##]
12      Dec [str] [##]
13      Set [str] [str]
14      Inc [str] [str]
15      Dec [str] [str]
16      If [str] [!<>=] [##] [str]
17      If [str] [!<>=] [str] [str]
18      If [cond] [str]
19      If not [cond] [str]
20      If any [color/thing] [str]
21      If not any [color/thing] [str]
22      If [color/thing] [dir] [str]
23      If not [color/thing] [dir] [str]
24      If [color/thing] [-#] -#] [str]
25      If [-#] [-#] [str]
26      If [dir] player [color/thing] [str]
27      Double [str]
28      Half [str]
29      Goto [str]
30      Send [str] [str]
31   x  Explode [#]
32      Put [color/thing/param] [dir]
33      Give [##] [item]
34      Take [##] [item]
35      Take [##] [item] [str]
36      Endgame
37      Endlife
38      Mod [str]
39      Sam [##] [str]
40      Volume [#]
41      End mod
42      End sam
43      Play [str]
44      End play
45      Wait play [str]
46      Wait play
47      (blank line)
48      Sfx [#]
49      Play sfx [str]
50      Open [dir]
51      Lockself
52      Unlockself
53      Send [dir] [label]
54      Zap [str] [#]
55      Restore [str] [#]
56      Lockplayer
57      Unlockplayer
58      Lockplayer ns
59      Lockplayer ew
60      Lockplayer attack
61   x  Move player [dir]
62   x  Move player [dir] [str]
63      Put player [-#] [-#]
64      If player [dir] [str]
65      If player not [dir] [str]
66      If player [-#] [-#] [str]
67      Put player [dir]
68   x  Go [dir] [str]
69      Rotatecw
70      Rotateccw
71      Switch [dir] [dir]
72      Shoot [dir]
73      Laybomb [dir]
74      Laybomb high [dir]
75      Shootmissile [dir]
76      Shootseeker [dir]
77      Spitfire [dir]
78      Lazerwall [dir] [#]
79      Put [color/thing/param] [-#] [-#]
80   x  Die item
81      Send [-#] [-#] [str]
82   x  Copyrobot [str]
83   x  Copyrobot [-#] [-#]
84   x  Copyrobot [dir]
85      Duplicate self [dir]
86      Duplicate self [-#] [-#]
87      Bulletn [ch] (In MZX 2.0, changes all bullet n pics)
88      Bullets [ch] (In MZX 2.0, changes all bullet s pics)
89      Bullete [ch] (In MZX 2.0, changes all bullet e pics)
90      Bulletw [ch] (In MZX 2.0, changes all bullet w pics)
91      Givekey [col]
92      Givekey [col] [str]
93      Takekey [col]
94      Takekey [col] [str]
95      Inc [str] random [##] [##]
96      Dec [str] random [##] [##]
97      Set [str] random [##] [##]
98      Trade [##] [item] [##] [item] [str]
99      Send [dir] player [str]
100     Put [color/thing/param] [dir] player
101  x  /[str]
102     *[str]
103     [[str]
104     ?[str];[str]
105     ?[str];[str];[str]
106     :[str]
107     .[str]
108     |[str]
109  x  Teleport player [str] [-#] [-#]
110     Scrollview [dir] [#]
111     Input string [str]
112     If string [str] [str]
113     If string not [str] [str]
114     If string matches [str] [str]
115     Player char [ch] (In MZX 2.0, sets the pic for all four directions)
116     %[str]
117     &[str]
118  x  Move all [color/thing] [dir]
119  x  Copy [-#] [-#] [-#] [-#]
120     Set edge color [col]
121     Board [dir] [str]
122     Board [dir] none
123     Char edit [ch] [#] [#] [#] [#] [#] [#] [#] [#] [#] [#] [#] [#] [#] [#]
124     Become pushable
125     Become nonpushable
126     Blind [#]
127     Firewalker [#]
128     Freezetime [#]
129     Slowtime [#]
130     Wind [#]
131     Avalance
132  x  Copy [dir] [dir]
133     Become lavawalker
134     Become nonlavawalker
135     Change [color/thing] [color/thing/param]
136     Playercolor [col]
137     Bulletcolor [col] (In MZX 2.0, changes all bullet colors)
138     Missilecolor [col]
139     Message row [#]
140 Pre Rel self
141 Pre Rel player
142 Pre Rel counters
143     Change char id [##] [ch] (Not param checked or doc'd until MZX 2.0)
144     Jump mod order [#]
145     Ask [str]
146     Fillhealth
147     Change thick arrow char [dir] [ch]
148     Change thin arrow char [dir] [ch]
149     Set maxhealth [##]
150     Save player position (In MZX 2.0, saves to position 1)
151     Restore player position (In MZX 2.0, uses position 1)
152     Exchange player position (In MZX 2.0, saves to position 1)
153     Set mesg column [#]
154     Center mesg
155     Clear mesg
156     Resetview
157     Sam [##] [#]
158     Volume [str]
159     Scrollbase color [col]
160     Scrollborder color [col]
161     Scrolltitle color [col]
162     Scrollpointer color [col]
163     Scrollarrow color [col]
164     Viewport [#] [#] (Not param checked until MZX 2.0)
165     Viewport size [#] [#] (Not param checked until MZX 2.0)
166     Set mesg column [str]
167     Message row [str]

Version 2.00-

EOC=End-of-cycle (x=yes, Pre=prefix, ODT=Outdated and NOT SUPPORTED since it
	can be translated into another command, *=would be nice to seperate into
	multiple words, g=works different/unpredictably for a global robot) The
	ODT's may be replaced with new commands at a later	date.
Params-
	[##] Number 0 to 65535 OR a counter (can be converted from a color, char,
		or param)
	[-#] Number from -32768 to 32768 OR a counter (can be converted)
	[ch] Character OR a counter (can be converted from a color, param, or num)
	[col] Color OR a counter (can be converted from a char, param, or num)
	[dir] NSEW plus modifiers
	[color/thing/param] Color + Thing + Param <- OR a counter/char/color/num
	[str] String (often a counter)
	[!<>=] Equality
	[cond] Condition (often with a direction)
	[item] Item (AMMOS/AMMO, GEMS/GEM, etc)

	Color can only have ?'s when coupled with a thing OR used in the overlay
	put command. In that case, if a ? is present, the +256 bit of the color
	is set. See later section for color coding.

	A param of 256 means "any param" or p??.

ID  EOC Command
--- --- -------
0    x  End
1    x  Die
2    x  Wait [##]
3       Cycle [##]
4   x g Go [dir] [##]
5    g  Walk [dir]
6   x g Become [color/thing/param]
7    g  Char [ch]
8    g  Color [col]
9   x g Gotoxy [-#] [-#]
10      Set [str] [##]
11      Inc [str] [##]
12      Dec [str] [##]
13  ODT Set [str] [str]
14  ODT Inc [str] [str]
15  ODT Dec [str] [str]
16      If [str] [!<>=] [##] [str]
17  ODT If [str] [!<>=] [str] [str]
18   g  If [cond] [str]
19   g  If not [cond] [str]
20      If any [color/thing/param] [str] (different)
21      If no [color/thing/param] [str] (different)
22      If [color/thing/param] [dir] [str] (different)
23      If not [color/thing/param] [dir] [str] (different)
24      If [color/thing/param] [-#] -#] [str] (different)
25   g  If [-#] [-#] [str]
26      If [dir] player [color/thing/param] [str] (different)
27      Double [str]
28      Half [str]
29      Goto [str]
30      Send [str] [str]
31  x g Explode [##]
32   g  Put [color/thing/param] [dir]
33      Give [##] [item]
34      Take [##] [item]
35      Take [##] [item] [str]
36   *  Endgame
37   *  Endlife
38      Mod [str]
39      Sam [##] [str]
40      Volume [##]
41      End mod
42      End sam
43      Play [str]
44      End play
45      Wait play [str]
46      Wait play
47      (blank line)
48      Sfx [##]
49      Play sfx [str]
50   g  Open [dir]
51   *  Lockself
52   *  Unlockself
53   g  Send [dir] [label]
54      Zap [str] [##]
55      Restore [str] [##]
56   *  Lockplayer
57   *  Unlockplayer
58   *  Lockplayer ns
59   *  Lockplayer ew
60   *  Lockplayer attack
61   x  Move player [dir]
62   x  Move player [dir] [str]
63      Put player [-#] [-#]
64  ODT If player [dir] [str] (Becomes If [cond=touching] [dir] [str])
65  ODT If player not [dir] [str] (Becomes If not [cond=touching] [dir] [str])
66      If player [-#] [-#] [str]
67   g  Put player [dir]
68  x g Try [dir] [str]
69  * g Rotatecw
70  * g Rotateccw
71   g  Switch [dir] [dir]
72   g  Shoot [dir]
73  * g Laybomb [dir]
74  * g Laybomb high [dir]
75  * g Shootmissile [dir]
76  * g Shootseeker [dir]
77  * g Spitfire [dir]
78  * g Lazerwall [dir] [##]
79      Put [color/thing/param] [-#] [-#]
80  x g Die item
81      Send [-#] [-#] [str]
82  x * Copyrobot [str]
83  x * Copyrobot [-#] [-#]
84  x*g Copyrobot [dir]
85   g  Duplicate self [dir]
86      Duplicate self [-#] [-#]
87      Bulletn [ch] (In MZX 2.0, changes ALL bullet n pics)
88      Bullets [ch] (In MZX 2.0, changes ALL bullet s pics)
89      Bullete [ch] (In MZX 2.0, changes ALL bullet e pics)
90      Bulletw [ch] (In MZX 2.0, changes ALL bullet w pics)
91   *  Givekey [col]
92   *  Givekey [col] [str]
93   *  Takekey [col]
94   *  Takekey [col] [str]
95      Inc [str] random [##] [##]
96      Dec [str] random [##] [##]
97      Set [str] random [##] [##]
98      Trade [##] [item] [##] [item] [str]
99      Send [dir] player [str]
100     Put [color/thing/param] [dir] player
101  x  /[str]
102     *[str]
103     [[str]
104     ?[str];[str]
105     ?[str];[str];[str]
106     :[str]
107     .[str]
108     |[str]
109  x  Teleport player [str] [-#] [-#]
110  *  Scrollview [dir] [##]
111     Input string [str]
112     If string [str] [str]
113     If string not [str] [str]
114     If string matches [str] [str]
115     Player char [ch] (In MZX 2.0, sets the pic for all four directions)
116     %[str]
117     &[str]
118  x  Move all [color/thing/param] [dir] (different)
119  x  Copy [-#] [-#] [-#] [-#]
120     Set edge color [col]
121     Board [dir] [str]
122     Board [dir] none
123     Char edit [ch] [##] [##] [##] [##] [##] [##] [##] [##] [##] [##] [##] [##] [##] [##]
124  g  Become pushable
125  g  Become nonpushable
126     Blind [##]
127     Firewalker [##]
128  *  Freezetime [##]
129  *  Slowtime [##]
130     Wind [##]
131     Avalance
132 x g Copy [dir] [dir]
133  g  Become lavawalker
134  g  Become nonlavawalker
135     Change [color/thing/param] [color/thing/param] (Diff. from ver 1.0?)
136  *  Playercolor [col]
137  *  Bulletcolor [col] (In MZX 2.0, changes all bullet colors)
138  *  Missilecolor [col]
139     Message row [##]
140 Pre Rel self (In MZX 2.0, unpredictable/useless for use w/global robot)
141 Pre Rel player
142 Pre Rel counters
143     Change char id [##] [ch] (Not param checked or doc'd until MZX 2.0)
144     Jump mod order [##]
145     Ask [str]
146  *  Fillhealth
147     Change thick arrow char [dir] [ch]
148     Change thin arrow char [dir] [ch]
149  *  Set maxhealth [##]
150     Save player position (In MZX 2.0, saves to position 1)
151     Restore player position (In MZX 2.0, uses position 1)
152     Exchange player position (In MZX 2.0, uses position 1)
153     Set mesg column [##]
154     Center mesg
155     Clear mesg
156  *  Resetview
157     Sam [##] [##]
158 ODT Volume [str]
159  *  Scrollbase color [col]
160  *  Scrollcorner color [col] (Diff. from MZX 1.03)
161  *  Scrolltitle color [col]
162  *  Scrollpointer color [col]
163  *  Scrollarrow color [col]
164     Viewport [##] [##] (Not param checked until MZX 2.0)
165     Viewport size [##] [##] (Not param checked until MZX 2.0)
166 ODT Set mesg column [str]
167 ODT Message row [str]
168     Save player position [##]
169     Restore player position [##]
170     Exchange player position [##]
171     Restore player position [##] duplicate self
172     Exchange player position [##] duplicate self
173     Player bulletn [ch]
174     Player bullets [ch]
175     Player bullete [ch]
176     Player bulletw [ch]
177     Neutral bulletn [ch]
178     Neutral bullets [ch]
179     Neutral bullete [ch]
180     Neutral bulletw [ch]
181     Enemy bulletn [ch]
182     Enemy bullets [ch]
183     Enemy bullete [ch]
184     Enemy bulletw [ch]
185  *  Player bulletcolor [col]
186  *  Neutral bulletcolor [col]
187  *  Enemy bulletcolor [col]
188
189
190
191
192
193 Pre Rel self first (Unpredictable/useless for use w/global robot)
194 Pre Rel self last (Unpredictable/useless for use w/global robot)
195 Pre Rel player first
196 Pre Rel player last
197 Pre Rel counters first
198 Pre Rel counters last
199     Mod fade out
200     Mod fade in [str]
201  x  Copy block [-#] [-#] [##] [##] [-#] [-#]
202     Clip input
203  g  Push [dir]
204     Scroll char [ch] [dir]
205     Flip char [ch] [dir]
206     Copy char [ch] [ch]
207
208
209
210     Change sfx [##] [str]
211     Color intensity [##] percent
212     Color intensity [##] [##] percent
213  x  Color fade out
214  x  Color fade in
215     Set color [##] [##] [##] [##]
216     Load char set [str]
217     Multiply [str] [##]
218     Divide [str] [##]
219     Modulo [str] [##]
220     Player char [dir] [ch]
221
222	  Load palette [str]
223
224     Mod fade [##] [##] (target/speed)
225  *  Scrollview [-#] [-#]
226  x  Swap world [str]
227  *  If alignedrobot [str] [str]
228
229  *  Lockscroll
230  *  Unlockscroll
231     If first string [str] [str]
232     Persistent go [str] (waits until it can move then moves)
233     Wait mod fade
234
235	  Enable saving
236	  Disable saving
237  *  Enable sensoronly saving
238     Status counter [##] [str]
239     Overlay on
240     Overlay static
241     Overlay transparent
242     Put [col] [ch] overlay [-#] [-#]
243  x  Copy overlay block [-#] [-#] [##] [##] [-#] [-#]
244
245     Change overlay [col] [ch] [col] [ch]
246     Change overlay [col] [col]
247     Write overlay [col] [str] [-#] [-#]
248
249     INTERNAL USE (temporary use for box messages)
250
251	  Loop start
252     Loop [##]
253     Abort loop
254     Disable mesg edge
255     Enable mesg edge

** Color words-

00 Black
01 Dark Blue
02 Dark Green
03 Dark Cyan
04 Dark Red
05 Dark Purple
06 Brown
07 Light Gray
08 Dark Gray
09 Blue
10 Green
11 Cyan
12 Red
13 Purple
14 Yellow
15 White

** Conditions-

Walking [dir]
Swimming
Firewalking
Touching [dir]
Blocked [dir]
Aligned
Alignedns
Alignedew
Lastshot [dir]
Lasttouch [dir]
Rightpressed
Leftpressed
Uppressed
Downpressed
Spacepressed
Delpressed
Musicon
Pcsfxon

** Auto labels-

THUD, TOUCH, BOMBED, KEYA-Z, INVINCO, PUSHED, EDGE, ENEMYSHOT, PLAYERSHOT,
NEUTRALSHOT, SHOT, PLAYERHIT, SENSORON, SENSORTHUD.

MZX 2.0- KEY1-9, SPITFIRE, JUSTLOADED, JUSTENTERED, SENSORPUSHED, LAZER,
	GOOPTOUCHED, PLAYERHURT.

** Auto counters- (* = Robot specific)

GEMS, AMMO, LOBOMBS, HIBOMBS, COINS, LIVES, HEALTH, TIME, INVINCO, INPUT,
INPUTSIZE, KEY, BULLETTYPE*, PLAYERDIST*, HORIZPLD*, VERTPLD*.

MZX 2.0- SCORE, THISX*, THISY*, TIMERESET, LOOPCOUNT*, PLAYERLASTDIR,
	PLAYERFACEDIR.

Special- XPOS, YPOS (for REL COUNTERS) These are still global.

** Directions-

IDLE (0)
NORTH, N, UP (1)
SOUTH, S, DOWN (2)
EAST, E, RIGHT (3)
WEST, W, LEFT (4)
RANDNS (5)
RANDEW (6)
RANDNE (7)
RANDNB (8)
SEEK (9)
RANDANY (10)
BENEATH, UNDER (11)
ANYDIR (12)
FLOW (13)
NODIR (14)
RANDB (15)
RANDP (+16)
CW (+32)
OPP (+64)
RANDNOT (+128)

** Equalitys-

= or ==        (equal to)
!= or <> or >< (not equal to)
>              (greater than)
<              (less than)
>= or =>       (greater than or equal to)
<= or =<       (less than or equal to)

** Color coding-

W/o ?-
	Low nybble foreground (0-15)
	High nybble background (0-15)

With ?-
	Check to see if bit for ? is set (In 1.0? robots, this is the high bit of
	the following thing code. Otherwise, it is +256.) If not, color is same as
	above. Otherwise- 0 through 15 stand for a specific foreground color with
	unknown background color. 16 through 31 stand for a specific background
	color (the number minus 16) with unknown foreground color. 32 stands for
	unknown background and unknown foreground both.

** Sound effects numbers and codings- (version 1.0?) (See v2.00 editor for
	changes to game over and death sfx)

Num String                                               Is
--- ---------------------------------------------------- ------------------
0   t5c-gec-gec														Gem
1   t5c-gec-gec														Magic Gem
2   tcge-zcge															Health
3	 t-c+c+c-g-g-g														Ammo
4   t6a#a#zx															Coin
5   t-cegeg+c-g+cecegeg+c											Life
6   t-cc#dd#e															Lo Bomb
7   tcc#dd#e															Hi Bomb
8   t4gec-g+ec-ge+c-gec												Key
9   t-gc#-a#a															Full Keys
10  tceg+c-eg+ce-g+ceg												Unlock
11  s1a#z+a#-a#x														Can't Unlock
12  t-a-a+e-e+c-c														Invis. Wall
13  zax																	Forest
14  t0a#+a#-a#b+b-b													Gate Locked
15  t0a+a-a+a-a														Opening Gate
16  t-g+g-g+g+g-g+g-g-g+g-g-tg+g									Invinco Start
17  sc-cqxsg-g+a#-a#xx+g-g+a#-a#									Invinco Beat
18  sc-cqxsg-g+f-f+d#-d#+c-ca#-a#2c-c							Invinco End
19  t0g+g-gd#+d#-d#													Door locked
20  t0g+gd#+d#															Door opening
21  tc-zgd#c-gd#c														Hurt
22  ta-a-a+a-a-a														AUGH!
23  t+c-gd#cgd#c-g+d#c-g+d#c-gd#+c-gd#cgd#c-g+d#c-gd#+c  Death
	  -gd#cgd#c-g+d#c-gc-gd#g+c
24  sc-cqxsa#-a#++c-c+q.xsd#-d#qxsa#-a#++c-cq.xs+c-cqxs  Game over
	  a#-a#++c-c+q.xsd#-d#qxs+f-f+c-cq.xs
25  t0c+c-c+c-c														Gate closing
26  t1d#x																Push
27  t2c+c+c2d#+d#+d#2g+g+g3cd#g									Transport
28  z+c-c																Shoot
29  t1a+a+a																Break
30  t-af#-f#a															Out of ammo
31  t+f#																	Ricochet
32  s-d-d-d																Out of bombs
33  tc-aec-a															Place bomb (lo)
34  t+c-aec-a															Place bomb (hi)
35  t+g-ege-ege														Switch bomb type
36  t1c+c0d#+d#-g+g-c#												Explosion
37  t2cg+e+c2c#g#+f+c#2da+f#+d2d#a#+g+d#						Entrance
38  tcge+c-g+ecge+c-g+ec											Pouch
39  zcd#gd#cd#gd#cd#gd#cd#gd#cfg#fcfg#fcfg#fcfg#fcga#gc  Ring/potion
	  ga#gcga#gcga#gs+c
40  z-a-a-aa-aa														Empty chest
41  t1c+c-c#+c#-d+d-d#+d#-e+e-ec									Chest
42  tc-gd#c-zd#gd#c													Out of time
43  zc-d#g-cd#															Fire ouch
44  tcd#g+cd#g															Stolen gem
45  z1d#+d#+d#															Enemy HP down
46  z0ca#f+d#cf#														Dragon fire
47  tcg+c-eda+d-f#eb+e-g#											Scroll/sign
48  See editor in v2.00                                  Goop touch (v2.0+)

** Codes for variables, etc-

Overlay off                   0
Overlay on                    1
Overlay static                2
Overlay transparent           3

Explosion leave space			0
Explosion leave ash				1
Explosion leave fire				2

Can save								0
Can't save							1
Can save only on a sensor		2

Forest becomes empty				0
Forest becomes floor				1

Fire burns limited				0
Fire burns forever				1

Code for no board					255
Code for no endgame board		128 (255 in MZX v2.0+)
Code for death to restart		128 (255 in MZX v2.0+)
Code for death to be same pos	129 (254 in MZX v2.0+)

Player bullet						0
Neutral bullet						1
Enemy bullet						2

Directions							SEE ABOVE
Colors								SEE ABOVE

Simple direction, N				0
Simple direction, S				1
Simple direction, E				2
Simple direction, W				3

Simple direction -> Complex   Add 1
Complex direction -> Simple	Subtract 1

Horizontal							0
Vertical								1

No key (key array)				127

No time limit						0

No protection						0
Protection from saving			1
Protection from editing			2
Protection from everything		3

Size of full pathname holders	129

Other variable codes are not important or are only internal and will not
carry over to MZX 2.0.


code:
Extended macros
Extended macros allows which takes parameters over several
lines in this file. Like single line macros, macro_1 through
macro_5 correspond to the F6 through F10 keys, but you can
name these anything, so long as you start it with macro_
(for instance, macro_sprite is valid). The first line is
the definition which states the macro's name and label,
and all proceeding lines which are indented by a single space
or tab character are part of the macro body.

Lines enclosed in parentheses denote parameters. The format
is as follows:
(type param1, param2, param3, ...)
Where type describes the kind of parameter and param1, 2, 3,
etc are parameters of that type. For instance, you may type

(string32 first_name, last_name, address)

Where the user is expected to supply three strings of up to
32 characters. These strings are referred to as first_name,
last_name, and address.

The following types are valid:

stringN - strings of N characters
Example: string100
The N is not optional.

numberA-B - an integer value in the range of A to B.
numberA - an integer value in the range of 0 to A.
Examples:
number20-30
number256

character - a single byte character.

color - an MZX style color (includes wildcard variants)

After defining all of your parameters, you can write the
contents of the actual macro. To insert the value of the
parameter, put inside the macro its name, enclosed in
exclamation points. For instance:

* "~fHello, !firstname! !lastname!."

Parameters may also have default values. For instance,

(string10 name=Bob, address=Nowhere)

Note that whitespace may not be placed before or after
the equals sign, otherwise it'd be considered part of the
variable name and the default value respectively.

The following are valid default values:

For string: Any sequence of characters.
For number: An integer number such as 1234
For character: An integer value or a character inside
 single quotes, for instance 200 or 'x'
For color: An MZX style color, such as c0F or c?3

If you don't supply defaults, default defaults are used:

For string: The empty string
For number: The lower boundary of the type
For character: 0
For color: c??

Once you write up an extended macro you can use it in the
robot editor. F6 through F10 will execute the macros named
macro_1 through macro_5 if they exist (even if single line
versions are defined). This will bring up a GUI window
where you can visually enter all paramter values.

For other macros, you can enter them via text. All lines
starting with  are considered macro invocations. The
format is
macro_name(param1, param2, param3, ...)
Note that the parameters can be supplied in one of two
ways, by order or by name. Supplying by order means
that the nth by order parameter you enter will
correspond to the nth parameter defined in the macro.
By name means that you give the name of the macro along
with its value in the following way:
name=value
Note that values here follow the same formatting that
default values do.

Here's an example of writing a simple macro then calling
it textually from the robot editor:

macro_test = A Test
 (number20 a, b)
 (string32 c)
 set "!c!" "(!a! + !b!)"

If the user then types..

#test(1, 2, counter)

The following code would be produced:

set "counter" "(1 + 2)"

You could also type something like:

#test(c=counter)

Which would output...

set "counter" "(0 + 0)"

Notice that you don't have to supply every paramter. If you
don't supply something for a value, its default will be used.

By pressing alt + m, you can bring up a text box that will
let you enter the name of a macro to be edited via GUI.


code:
.TH MEGAZEUX 1 "2007-05-05"
.SH NAME
MegaZeux - Simple Game Creation System (GCS)

.SH SYNOPSIS
.B megazeux
.SH DESCRIPTION
MegaZeux is a Game Creation System (GCS), inspired by Epic MegaGames' ZZT,
first released by Gregory Janson in 1994.  It was recently ported from 16bit
MSDOS C/ASM to portable SDL C/C++, improving its platform support and
hardware compatibility.

.SH FILES
.TP
.B /etc/megazeux-config
This file contains setting for \fBmegazeux\fP. All of the variables can
also be passed as options to the program which will override the settings
in this file, e.g. \fBmegazeux fullscreen=1\fP

.SH AUTHORS
.B MegaZeux
was written by Gregory Janson, Charles Goetzman,
Gilead Kutnick <exophase@gmail.com>,
Alistair John Strachan <alistair@devzero.co.uk> and
various other contributors during 1996-2007.


code:
MZM file format: MZX image

This file format is a simple format that describes graphically a
 rectangular area.

b = byte (8bit)
w = word (16bit)
d = dword (32bit)
sN = string of N size (ie N bytes)
bN = N bytes
wN = N words
dN = N dwords

header:

pos  size  description
0     s4    "MZMX" tag
4     b     width
5     b     height
6
.           reserved
f

data:

The data is composed of w * h (width * height) blocks, where each
 block is 6 bytes and contains the following:

pos  size  description
0     b     ID (5 for overlay)
1     b     param (char for overlay)
2     b     color
3     b     under ID (0 for overlay)
4     b     under param (0 for overlay)
5     b     under color (0 for overlay)

MZM2 file format:

This file format is a simple format that describes graphically a
 rectangular area.

b = byte (8bit)
w = word (16bit)
d = dword (32bit)
sN = string of N size (ie N bytes)

header:

pos  size  description
0     s4    "MZM2" tag
4     w     width
6     w     height
8			d			location in file of robot table (0 for no table)
c			b			number of robots
d			b			storage mode
e			b			robot storage mode
f           reserved

data:

Width * height cells are then stored.

In storage mode 0 the cells consist of the following 6 bytes:

pos  size  description
0     b     ID
1     b     param
2     b     color
3     b     under ID
4     b     under param
5     b     under color

All robots are stored with param 0.

In storage mode 1, the cells consist of the following 2 bytes:

pos  size  description
0     b		  character
1			b		  color

Then, an optional robot table may be stored. The table consists of n
robots listed in the same order that their representative ID's appear
in the cell table.

The robots comply to the MZX 2 world format in mode 0 and MZX 2.80
save format in mode 1. Reserved fields are in place to retain compatability
with the MZX 2 world format (and thus can be loaded by an MZX 2 compatabile
loader)

If the robot storage mode is 0, the robot data is as follows:

pos  size  description
 0    w     program length
 2          reserved
 4		s15		robot name
 13   b     robot character
 .
 .					reserved
 29
 . 				  robot program, stored in MZX2 Robotic bytecode format
 ??

If the robot storage mode is 1, the robot data is as follows:

pos  size  description
 0    w     program length
 2          reserved
 4		s15		robot name
 13   b     robot character
 14		w		  current line
 16		b		  current position in line
 17		b		  current cycle
 18		b			cycle total
 19		b			bullet type
 1A		b		  locked status
 1B		b		  lavawalk status
 1C		b			walking direction
 1D		b		  last touched direction
 1E		b		  last shot direction
 1F
 .				  reserved
 .
 23		b		  status
 24
 .				  reserved
 .
 27				  loop counter
 29   d32		local counters
 49   d			stack size
 4D		d			stack pointer
 51
 .					stack (stack size bytes)
 ??
 . 				  robot program, stored in MZX2 Robotic bytecode format
 ??


code:
MZX REQUESTS:

-Revised help system.[Exo skipped]
-Edit" button on world loader window (i.e. the one which MZX displays on open unless a default world is loaded as per config.txt) [Exo skipped]
-[+Exo, sort of]Methods to jump to a given location on the board (given MZX's boards can now be quite large).
-Mouse highlighting of code. Right-click on highlighted code to open block action menu. [Exo skipped]
-Demo format consisting of logged keypresses.
-Visible vlayer, able to be placed over or under the overlay.
-Extensive manipulation of MZX default text boxes (mutable size, mutable position, more powerful editing of border, images in textbox background, ability to similarly alter remove title bar or remove it entirely, lockable textbox scrolling, ability to change keys to view text/select options/exit textbox).
-Insertion of copy block params in Robotic Editor by visually selecting a block using a hotkey (Robotic editor jumps to a display of the current board, you select an area, and when done the copy block numbers resulting in this are placed in the line of Robotic code).
-Ability to add color codes relevant to message commands when pressing F2 (*, &, %, ?, and so on). [Exo skipped]
-Multiple temp slots for characters (currently there is one stored and placed with the char editor's "Copy to buffer" and "Copy from buffer" functions).
-Extended Undo functionality (add ability to undo actions on the board/overlay, increase depth of actions from one).
-Analog stick support with MZX (not full analog, just recognition).
-Ability to retain cursor/board positions after leaving the world.
-More sound-related control counters (sound/pcfx toggle, volume overall/sound/pcfx). [Exo skipped]
-Auto-hide mouse cursor in editor after a certain period of mouse disuse. [Exo skipped]
-Ability to reference sprites from the overlay.
-Ability to directly access the vlayer (i.e. through the Editor and not through Robotic commands).
-[+Exo]Ability to re-order boards.
-Re-addition of mouse editing functionality that the DOS versions had (palette editing, clicking on hotkey text makes hotkey action happen (e.g. clicking on "L:Load" acts as the L key has been pressed), etc.).
-SMZX mode with full resolution but where two characters act as a single character.
-Ability to enter the number lists from CHAR EDIT commands into the character editor to create a character.
-Ability to remove "edges" from characters.
-An installer.
-Ability to prompt default save/load menus via Robotic. [Exo skipped]
-Listing of number of commands executed last cycle in F11 debug.
-Looping sound effects independent of the MOD command. [Exo skipped]
-Read-only viewport height and viewport width characters. [Exo skipped]
-Hotkeys to instantly jump to the next and previous boards. [Exo skipped]
-[+Terryn]Board setting to toggle freezing the player when spacebar is held down (on by default).
-MOD_LENGTH counter (based on current mod row or PCM sample).
-Charsets/palettes bound to the current board via displaying in the editor.
-Editing of all bomb anim chars outside of #1 in global's "Edit Chars" menu. (CHAR ID values 169-175).
-Display of "key_pressed", "key_code", "key", "keyn" and "key_release" in the F11 menu, or the debug window.
-Mutable length of time message row is active (or even 0 for no expiration).
-Zoom.
-Per-pixel camera offset.
-Overhaul of recursion.
-Per-pixel sprite locations.
-A grid of variable size in the board editor.
-Splicing strings via offsetting by negative values. EX: SET "$word" "-ism" || SET "$word+-6" "atropin" || . "* &$word& yields \"atropinism\""
-Universal button layouts easily accessible in Robotic (e.g. "Joy1", "Joy2" or "JoyA", "JoyB" counters)
-IF command that takes no label (and skips the next line if false).
-Separate font characters from normal chars.
-Ability to set individual sound volumes to 0.
-"modname" and "samvolume" counters.
-Hardier F11 menu (stronger name seeks, ability to set new counters/strings, ability to see/manip local counters (in Rn.<counter> format)).
-Ability for Alt+F to display index # of SFX currently being edited.
-Ability for SFX # to take the long names of SFX lists (e.g. "SFX FullKeys", "SFX Ouch").
-Different built-in color for comments in the Robotic Editor.
-Send All command replaced with special parameter ALL to allow constructs like "send ALL" to send to all targets.
-Ability for resolutions to switch to a different number when SMZX modes are triggered.
-Making charcters 16x14 to allow ability to have 8x14 chars with 4 colors/char in SMZX modes. Uses 512-chars per charset, and all of the 256 colors set to a pre-defined palette rather than mathematically.
-Word wrap for the highlighted line.
-Program title bar listing current MZX world open and current board name.
-Copyrobot-esque command which appends to the end the code of the given Robot to the Robot executing the command instead of replacing the code of the executing Robot altogether.
-MOD END WAIT command.
-Expanded quicksave/load abilities. Quicksave in "slots" determined by going to a menu and picking the active slot. Interval-based quicksaving where one can step backwards through quicksaves.
-A platform-neutral onscreen keyboard (for handheld platforms).
-Pixel-accurate block copy with scaling.
-board_editor_hide_help to still display current item in buffer and editor mode.
-Ability to quickly restore a Robot's code to what it was before entering the Robot (to allow quick and sane recovery from major flaws like a "replace all" gone bad).
-Octave range in sound commands increased to 8th octave.
-Energizer state with customisable animations/colors.
-Ability to halt a loop which doesn't end a cycle.
-Extension of sound commands to allow loading of music/sound at given volumes.
-Support for more mouse buttons and the scrollwheel (forward-back button support minimum).
-Enforcement of old-style sound system limitations for pre-port games (i.e. four simultaneous sound effects maximum), to allow overdriven sounds in older games to play as intended. The drawbridge lowering sound sequence in Bernard the Bard is a good example. Version pegged + config file option? Version pegged + F2 menu option?
-Background color fading that ends at a given percentage.
-Functions.
-Ability to store >80 char board bottom messages and add an adjustable counter for altering the timeout, with 0 for infinite (clear with clear mesg) (version bump).
-MIDI.
-Changing sprite cx/cy values into signed ints as opposed to signed bytes.
-A subroutine send that stalls the sending Robot until the sent Robot returns.
-Removal of fade transitions when loading a game for testing.
-Loading of compressed files, most notably MZMs.
-String comparison wildcards or regex support.
-Online support in games, lozl
-A SMALLHACKER COUNTER


code:
MZX TODO:

~Provide cleaner exit implementation in file format loaders/filters
~Re-vamp the entirety of MZX's clipboard implementation
~Fix MIDI implementation, possibly
~Strip bad Robotic lines when exporting to text files (including notification noting which lines were not exported)
~AARGH MIKMOD)@#$(%^#$)^(#
~Increase portability to anything within reason (e.g. Wii, SPARC (64), DEC Alpha, PA-RISC, Dreamcast (SuperH))
~Make the UI unaltered when in SMZX mode
~Fix crashes with loading invalid Robotic/bytecode
~Get robo-ops fit and merged
~Fix GLSL
~Finish the archive browser


code:
MZX 2.50 (2.48g/2.49b) beta testers-

Name (Email) Computer::Sound card or "Compatible" -- Notes

Greg Beauchesne (zapyo@aol.com) Pentium P60::SB-16
Adam Parrish (myth@alinc.com) 486DX4-100::SB-32
"Adam Smith (Aldar)" (smitha@edmonds.wednet.edu) 386-33::"SB-Pro"
John Howard Davison (ohio1@imcnet.net) 486DX2-50::SB 1.x
"Geoff Paulson" (gpaulson@3-cities.com) 486DX::SB-16
Scott Hammack (shammack@goldinc.com) 486DX2-100::SB-16
"Ben Krause" (subzero@neont.com) 486::SB-16
Kevin Vance (kevvance@aol.com) 486DX-60::"SB 1.x"/"SB-Pro"
	  Pentium 75::"SB 1.x"
Kevin Rohleder (krohleder2@aol.com) Pentium 75::"SB 1.x"/"SB 2.x"
"Brad Faler" (falerb@ida.net) Pentium 133::SB-32
Mike Sambrone (mgs@indirect.com) 386DX-60:SB 2.x
Luke Drelick (duky@worldnet.att.net) Pentium 75::SB-16
Peter Holzaepfel (user377367@gnn.com) Pentium 90::"SB 1.x"
	  Pentium 75::SB-Pro
	  486-75::SB-16
	  Pentium 75::None
	  386-16::None
Jacob Page (jpages@srv.net) Pentium 60::"SB 1.x"
Evan Furchtgott (thecreator@pipeline.com) Pentium 166::SB-32
Dave Bishop (dnbishop@aol.com) 486DX2-50::SB-16
William Lovas (wlovas@pantek.com) 486DX4-100::"SB 1.x"
Matthew McGee (thedianoga@aol.com) 486SX-33::SB-16/SB-Pro
	  586-100::"SB-16"
Timothy Fernandez (fergie@sorcererisle.com) 486SX-25::SB-16
Dan Patalano (mogthe1st@aol.com) Pentium 100::SB-Pro
"Luc French" (lfrench106@aol.com) 486-??::"SB 1.x"
"DeadPhrog (J.W. Kaufmann)" (deadphrog@sinewave.com) 486DX-66::"SB-Pro"
"James "Raptor" Wong" (gwong@ozemail.com.au) 486DX-66::SB-16
"Jason E. Neufeld"(73267.3322@compuserve.com) 586-100::SB-32

(zapyo@aol.com)
(myth@alinc.com)
(smitha@edmonds.wednet.edu)
(ohio1@imcnet.net)
(gpaulson@3-cities.com)
(shammack@goldinc.com)
(subzero@neont.com)
(kevvance@aol.com)
(krohleder2@aol.com)
(falerb@ida.net)
(mgs@indirect.com)
(duky@worldnet.att.net)
(user377367@gnn.com)
(jpages@srv.net)
(thecreator@pipeline.com)
(dnbishop@aol.com)
(wlovas@pantek.com)
(thedianoga@aol.com)
(fergie@sorcererisle.com)
(mogthe1st@aol.com)
(lfrench106@aol.com)
(deadphrog@sinewave.com)
(gwong@ozemail.com.au)
(73267.3322@compuserve.com)