Chip8-1 1
Chip8-1 1
Chip8
    Reference Manual
           Peter Miller
    pmiller@opensource.org.au
.
This document describing the Chip8 program, and the Chip8 program itself, are
Copyright © 1990, 1991, 1998, 1999, 2012 Peter Miller
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If
not, see <http://www.gnu.org/licenses/>.
                                                                                            0
Read Me(Chip8)                                                                                      Read Me(Chip8)
NAME
       chip8 − project change supervisor
       Copyright © 1990, 1991, 1998, 1999, 2012 Peter Miller
       Chip8 is distributed under the terms of the GNU General Public License. See the LICENSE section, below,
       for more details.
DESCRIPTION
       Chip8 was an interpreter used in a number of home computers based on RCA’s CDP1802 processor in the
       late 1970’s. It implements a small machine designed specifically for simple video games. It has less than
       40 instructions, including arithmetic, control flow, graphics, and sound.
       This package includes an assembler for chip8, a disassembler, and an X client to run chip8 programs. This
       distribution includes 33 games: 15puzzle, alien, ant, blinky, blitz, brix, car, connect4, field, guess, hidden,
       hpiper, invaders, joust, kaleid, maze, merlin, missile, pong, puzzle, race, snake, spacefight, syzygy, tank,
       tetris, tictac, uboat, ufo, vbrix, vers, wipeoff, worm3.
       The assembler understood by this package differs from the assembler originaly documented for CHIP-8.
       This is for a number of reasons... (a) the original was unpleasant to write a lexer for, (b) the opcodes were
       not very orthogonal in appearance, (c) the format made arbitrary expression syntax have to tiptoe all around
       it, (d) if I changed it I could re-use code from another of my assemblers.
ARCHIVE SITE
       The latest version of Chip8 is available by HTTP from:
                 URL:      http://chip8.sourceforge.net/
                 File:     index.html               # the Chip8 page
                 File:     chip8−1.1.README         # Description, from tar file
                 File:     chip8−1.1.lsm            # Description, in LSM format
                 File:     chip8−1.1.spec           # RedHat package specification
                 File:     chip8−1.1.tar.gz         # the complete source
       This directory also contains a few other pieces of software written by me. Please have a look if you are
       interested.
BUILDING
       Instructions on how to build and test Chip8 are to be found in the BUILDING file included in this distribu-
       tion.
LICENSE
       Chip8 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
       License as published by the Free Software Foundation; either version 2 of the License, or (at your option)
       any later version.
       Chip8 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
       implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
       GNU General Public License for more details.
       You should have received a copy of the GNU General Public License along with this program. If not, see
       <http://www.gnu.org/licenses/>.
       It should be in the LICENSE file included in this distribution.
AUTHOR
       Peter Miller      E-Mail:   pmiller@opensource.org.au
       /\/\*             WWW:      http://miller.emu.id.au/pmiller/
RELEASE NOTES
       For excruciating detail, and also acknowledgments of those who generously sent me feedback, please see
       the aux/CHANGES.* files included in this distribution.
       A number of features have been added to Chip8 with this release. A few of them are detailed here:
NAME
        chip8 − X11 Chip8 interpreter
        Copyright © 1990, 1991, 1998, 1999, 2012 Peter Miller
        The Chip8 package is distributed under the terms of the GNU General Public License. See the LICENSE
        section, below, for more details.
SPACE REQUIREMENTS
        You may need up to 4MB of disk space to unpack and build the Chip8 package. (This is the worst case
        seen so far, most systems have binaries about 60% as big as this, 2MB is more typical.) Your mileage may
        vary.
SITE CONFIGURATION
        The Chip8 package is configured using the configure shell script included in this distribution.
        The configure shell script attempts to guess correct values for various system-dependent variables used dur-
        ing compilation, and creates the Makefile and common/config.h files. It also creates a shell script con-
        fig.status that you can run in the future to recreate the current configuration.
   Running Configure
      Normally, you just cd to the directory containing Chip8’s source code and type
               % ./configure
               ...lots of output...
               %
      If you’re using csh on an old version of System V, you might need to type
               % sh configure
               ...lots of output...
               %
      instead to prevent csh from trying to execute configure itself.
        Running configure takes a minute or two. While it is running, it prints some messages that tell what it is
        doing. If you don’t want to see the messages, run configure with the quiet option; for example,
                 % ./configure −−quiet
                 %
        By default, configure will arrange for the make install command to install the Chip8 package’s files in
        /usr/local/bin, /usr/local/man and /usr/local/share/chip8. There are a number of options which allow you
        to control the placement of these files.
        −−prefix=PATH
               This specifies the path prefix to be used in the installation. Defaults to /usr/local unless otherwise
               specified.
        −−exec−prefix=PATH
               You can specify separate installation prefixes for architecture-specific files and architecture-inde-
               pendent files. Defaults to ${prefix} unless otherwise specified.
        −−bindir=PATH
               This directory contains executable programs. On a network, this directory may be shared
               between machines with identical hardware and operating systems; it may be mounted read-only.
               Defaults to ${exec_prefix}/bin unless otherwise specified.
        −−datadir=PATH
               This directory contains installed data, such as the documentation, reports and shell scripts distrib-
               uted with Chip8. On a network, this directory may be shared between all machines; it may be
               mounted read-only. Defaults to ${prefix}/share/chip8 unless otherwise specified. A ‘‘chip8’’
               directory will be appended if there is none in the specified path.
        −−mandir=PATH
               This directory contains the on-line manual entries. On a network, this directory may be shared
               between all machines; it may be mounted read-only. Defaults to ${prefix}/man unless otherwise
               specified.
INSTALLING CHIP8
        As explained in the SITE CONFIGURATION section, above, the Chip8 package is installed under the
        /usr/local tree by default. Use the −−prefix=PATH option to configure if you want some other path.
        All that is required to install the Chip8 package is to use the
                  % make install
                  ...lots of output...
                  %
        command. Control of the directories used may be found in the first few lines of the Makefile file if you
        want to bypass the configure script. You must also edit the other files generated by configure; it is usually
        easier to re-run configure with the appropriate arguments.
        The above procedure assumes that the soelim(1) command is somewhere in the command search PATH.
        The soelim(1) command is available as part of the GNU Groff package, mentioned below in the PRINTED
        MANUALS section. If you don’t have it, but you do have the cook package, then a link from roffpp to soe-
        lim will also work.
PRINTED MANUALS
        This distribution contains the sources to all of the documentation for Chip8, however the simplest way to
        get the documentation is by anonymous FTP; a PostScript file of the Reference Manual is available from
        the FTP sites listed in the README file. The Reference Manual contains the README and BUILDING
        files, as well as all of the section 1 and section 5 manual pages.
GETTING HELP
        If you need assistance with Chip8, please do not hesitate to contact the author at
                 Peter Miller <pmiller@opensource.org.au>
        Any and all feedback is welcome.
        When reporting problems, please include the version number given by the
               % chip8run −version
               Chip8 version 1.1.D094
               ...
               %
        command. Please run this command to get the exact number, do not send the text of this example.
   Runtime Checking
       In the common/main.h file, the is a define of DEBUG in comments. If the comments are removed, exten-
       sive debugging is turned on. This causes some performance loss, but performs much run-time checking and
       adds the −TRAce command line option.
        When the −TRAce command line option is followed by one or more file names, it turns on execution traces
        in those source files. It is usually best to place this on the end of the command line so that names of the
        files to be traced are not confused with other file names or strings on the command line.
   Problem Reports
       If you send email to the author, please include the following information:
        1. The type of UNIX
                 The author will need to know the brand and version of UNIX you are using, or if it is not UNIX
                 but something else. The output of "uname −sr" is usually sufficient (but not all systems have it).
        2. The Version Number
                In any information you send, please include the version number reported in the common/patch-
                level.h file, or ‘chip8run −vers‘ if you can get it to compile.
        3. The Archive Site
                When and where you obtained this version of Chip8.
        4. Unpacking
                Did you have problems unpacking Chip8?
        5. Building
                 Did you have problems building Chip8? This could have been the instructions included, it could
                 have been the configure script, it could have been the Makefile, or anything else.
        6. Testing
                 Did you have problems with the tests? You could have had problems running them, or some of
                 them could have failed. If some tests fail but not others, please let me know which ones failed, and
                 include the fact that Chip8 was not set-uid-root at the time. The −k option to make can be useful
                 if some tests fail but not others.
        7. Installation
                  Did you have problems installing Chip8? This could have been the instructions, or anything else.
        At this point it would probably be a very good idea to print out the manual entries and read them carefully.
        You will also want to print a copy of the Reference Manual; if you don’t gave GNU Groff, there should be a
        PostScript copy at the archive site.
        8. Using Chip8
                 Did you have problems using Chip8? This is a whole can of worms. If possible, include a shell
                 script similar to the tests which accompany Chip8, which reproduces the bug. Exit code 1 on fail-
                 ure (bug), exit code 0 on success (for when bug is fixed).
        9. The Source Code
                Did you read the code? Did you write some code? If you read the code and found problems, fixed
                them, or extended Chip8, these contributions are most welcome.
        The above list is inclusive, not exclusive. Any and all feedback is greatly appreciated, as is the effort and
        interest required to produce it.
LICENSE
        The Chip8 package is free software; you can redistribute it and/or modify it under the terms of the GNU
        General Public License as published by the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
        The Chip8 package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
        without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-
        POSE. See the GNU General Public License for more details.
        It should be in the LICENSE file included in this distribution.
AUTHOR
        Peter Miller    E-Mail:    pmiller@opensource.org.au
        /\/\*           WWW:       http://miller.emu.id.au/pmiller/
NAME
        chip8as − assemble chip8 programs
SYNOPSIS
        chip8as [ option... ] source-file binary-file
        chip8as −Help
        chip8as −VERSion
DESCRIPTION
        The chip8as program is used to assemble chip8 programs for execution by the chip8run program.
OPTIONS
        The following options are understood.
        −Help     This option may be used to provide information about how to use the chip8as program.
        −VERSion
               This option may be used to provide inforation about the version on the chip8as program being
               executed.
        −Listing listing-file
                  This option may be used to specify a listing file. By default, no listing is produced. The word −
                  may be used to indicate stdout.
        −Hewlett_Packard_Header
                This option may be used to cause chip8as to emit a Hewlett-Packard 48 calculator header to the
                binary file. The default is to emit no header.
        −Unix_Header
               This option may be used to cause chip8as to emit a unix #! header to the binary file. he default is
               to emit no header.
        All options are case-insensitive. Abbreviations are indicated by the upper-case letters. Options and other
        command line arguments may be aribtrarily mixed on the command line.
EXIT STATUS
        The chip8as command will exit with a status of 1 on any error. The chip8as command will only exit with a
        status of 0 if there are no errors.
SEE ALSO
        chip8as(5)
                 The opcodes, as understood by the assmbler, and how they are interpreted by the interpreter.
        chip8run(1)
                 The interpreter, to run the assembled byte code.
        chip8run(5)
                 The file format, as output by the assembler and as understood by the interpreter.
        chip8dis(1)
                  A disassembler, so that you can turn assembled byte code into something more readable.
COPYRIGHT
        chip8as version 1.1
        Copyright (C) 1990, 1991, 1998, 1999, 2012 Peter Miller
        This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
        even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
        the GNU General Public License for more details.
AUTHOR
        Peter Miller    E-Mail:     pmiller@opensource.org.au
        /\/\*           WWW:        http://miller.emu.id.au/pmiller/
                                                                                                                      7
chip8dis(1)                                                                                              chip8dis(1)
NAME
        chip8dis − disassemble chip8 programs
SYNOPSIS
        chip8dis [ option... ] binary-file assembler-file
        chip8dis −Help
        chip8dis −VERSion
DESCRIPTION
        The chip8dis program is used to disassemble chip8 programs.
OPTIONS
        The following options are understood.
        −Help     This option may be used to provide information about how to use the chip8dis program.
        −VERSion
               This option may be used to provide inforation about the version on the chip8dis program being
               executed.
        All options are case-insensitive. Abbreviations are indicated by the upper-case letters. Options and other
        command line arguments may be aribtrarily mixed on the command line.
EXIT STATUS
        The chip8dis command will exit with a status of 1 on any error. The chip8dis command will only exit with
        a status of 0 if there are no errors.
SEE ALSO
        chip8as(1)
                 An assembler, for assembling chip8 programs into the byte-code to be interpreted.
        chip8as(5)
                 The opcodes, as understood by the assmbler, and how they are interpreted by the interpreter.
        chip8run(1)
                 The interpreter, to run the assembled byte code.
        chip8run(5)
                 The file format, as output by the assembler and as understood by the interpreter.
COPYRIGHT
        chip8dis version 1.1
        Copyright (C) 1990, 1991, 1998, 1999, 2012 Peter Miller
        This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
        even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
        the GNU General Public License for more details.
AUTHOR
        Peter Miller    E-Mail:     pmiller@opensource.org.au
        /\/\*           WWW:        http://miller.emu.id.au/pmiller/
                                                                                                                     8
GPL(GNU)                                    Free Software Foundation                                       GPL(GNU)
      Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
      02110-1301 USA
      Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is
      not allowed.
                                                         Preamble
      The licenses for most software are designed to take away your freedom to share and change it. By contrast,
      the GNU General Public License is intended to guarantee your freedom to share and change free software −
      to make sure the software is free for all its users. This General Public License applies to most of the Free
      Software Foundation’s software and to any other program whose authors commit to using it. (Some other
      Free Software Foundation software is covered by the GNU Library General Public License instead.) You
      can apply it to your programs, too.
      When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are
      designed to make sure that you have the freedom to distribute copies of free software (and charge for this
      service if you wish), that you receive source code or can get it if you want it, that you can change the
      software or use pieces of it in new free programs; and that you know you can do these things.
      To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask
      you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute
      copies of the software, or if you modify it.
      For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the
      recipients all the rights that you have. You must make sure that they, too, receive or can get the source
      code. And you must show them these terms so they know their rights.
      We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives
      you legal permission to copy, distribute and/or modify the software.
      Also, for each author’s protection and ours, we want to make certain that everyone understands that there is
      no warranty for this free software. If the software is modified by someone else and passed on, we want its
      recipients to know that what they have is not the original, so that any problems introduced by others will
      not reflect on the original authors’ reputations.
      Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that
      redistributors of a free program will individually obtain patent licenses, in effect making the program
      proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone’s free use
      or not licensed at all.
      The precise terms and conditions for copying, distribution and modification follow.
GNU                                                    GPL                                                              9
GPL(GNU)                                    Free Software Foundation                                       GPL(GNU)
GNU                                                    GPL                                                           10
GPL(GNU)                                    Free Software Foundation                                      GPL(GNU)
      3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or
      executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
      a)   Accompany it with the complete corresponding machine-readable source code, which must be
           distributed under the terms of Sections 1 and 2 above on a medium customarily used for software
           interchange; or,
      b)   Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no
           more than your cost of physically performing source distribution, a complete machine-readable copy
           of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a
           medium customarily used for software interchange; or,
      c)   Accompany it with the information you received as to the offer to distribute corresponding source
           code. (This alternative is allowed only for noncommercial distribution and only if you received the
           program in object code or executable form with such an offer, in accord with Subsection b above.)
      The source code for a work means the preferred form of the work for making modifications to it. For an
      executable work, complete source code means all the source code for all modules it contains, plus any
      associated interface definition files, plus the scripts used to control compilation and installation of the
      executable. However, as a special exception, the source code distributed need not include anything that is
      normally distributed (in either source or binary form) with the major components (compiler, kernel, and so
      on) of the operating system on which the executable runs, unless that component itself accompanies the
      executable.
      If distribution of executable or object code is made by offering access to copy from a designated place, then
      offering equivalent access to copy the source code from the same place counts as distribution of the source
      code, even though third parties are not compelled to copy the source along with the object code.
      4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this
      License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will
      automatically terminate your rights under this License. However, parties who have received copies, or
      rights, from you under this License will not have their licenses terminated so long as such parties remain in
      full compliance.
      5. You are not required to accept this License, since you have not signed it. However, nothing else grants
      you permission to modify or distribute the Program or its derivative works. These actions are prohibited by
      law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work
      based on the Program), you indicate your acceptance of this License to do so, and all its terms and
      conditions for copying, distributing or modifying the Program or works based on it.
      6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically
      receives a license from the original licensor to copy, distribute or modify the Program subject to these terms
      and conditions. You may not impose any further restrictions on the recipients’ exercise of the rights
      granted herein. You are not responsible for enforcing compliance by third parties to this License.
      7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not
      limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise)
      that contradict the conditions of this License, they do not excuse you from the conditions of this License. If
      you cannot distribute so as to satisfy simultaneously your obligations under this License and any other
      pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a
      patent license would not permit royalty-free redistribution of the Program by all those who receive copies
      directly or indirectly through you, then the only way you could satisfy both it and this License would be to
      refrain entirely from distribution of the Program.
      If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance
      of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
      It is not the purpose of this section to induce you to infringe any patents or other property right claims or to
      contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free
      software distribution system, which is implemented by public license practices. Many people have made
      generous contributions to the wide range of software distributed through that system in reliance on
GNU                                                    GPL                                                          11
GPL(GNU)                                    Free Software Foundation                                       GPL(GNU)
GNU                                                    GPL                                                         12
GPL(GNU)                                    Free Software Foundation                                       GPL(GNU)
GNU                                                    GPL                                                            13
chip8run(1)                                                                                            chip8run(1)
NAME
        chip8run − run a chip8 program
SYNOPSIS
        chip8run [ option... ] game
        chip8run [ option... ] −File binary-file
        chip8run −Help
        chip8run −VERSion
DESCRIPTION
        The chip8run program is used to run chip8 programs. It is an X11 client.
        The first form, where only the name of a game is given, constructs a filename of the form
        /usr/local/lib/chip8/game.chp and attempts to open it.
        The second form may be used to open a specific file.
        A great variety of file formats are understood, including some of the HP48 formats, and also the UNIX
        executable #! convention.
OPTIONS
        The following options are understood.
        −Help     This option may be used to provide information about how to use the chip8run program.
        −VERSion
               This option may be used to provide inforation about the version on the chip8run program being
               executed.
        −BackGround color
               This option may be used to set the backgound of the chip8run window to the color specified.
        −BorDer_color color
               This option may be used to set the border color of the chip8run window to the color specified.
        −Border_Width number
                This option may be used to set the border width of the chip8run window to the width specified.
        −DEbug
                  This option may be used to turn on debugging mode. Additional information is displayed as to
                  the chip8 machine’s internal state. Addition buttons are provided for additional control.
        −Display display-name
                 This option may be used to set which X display to use. The default is the $DISPLAY
                 environment variable, or :0 if not set.
        −FoNt font-name
                 This option may be used to set the font to be used in the chip8run window.
        −ForeGround color
                This option may be used to set the foregound of the chip8run window to the color specified.
        −Geometry geometry-spec
               This option may be used to specifiy the initial position and/or size of the chip8run window.
        −IConic This option may be used to specify that the chip8run window should initially be iconic. You
                need a cooperative window managaer.
        −Icon_Geometry geometry-spec
                This option may be used to specify the position and/or size of the chip8run window’s icon.
        −Name string
                This option may be used to set the name the chip8run window is referred to as.
                                                                                                                 14
chip8run(1)                                                                                              chip8run(1)
        −Test_Mode
               This option may be used to test the chip8 machine. It makes the "Quit" button generate and exit
               code of 1, rather than 0 (it is an error if the user quits out of a test). It makes screen placement
               forced. Run-time errors result in exit 1, rather than turning on debugging.
        −Title string
                   This option may be used to set the name the chip8run window is referred to as.
        −XRM string
               This option may be used to specify an X resource.
        All options are case-insensitive. Abbreviations are indicated by the upper-case letters. Options and other
        command line arguments may be aribtrarily mixed on the command line.
EXIT STATUS
        The chip8run command will exit with a status of 1 on any error. The chip8run command will only exit
        with a status of 0 if there are no errors.
FILES
        /usr/local/lib/chip8
                   This directory is where games are installed. A number of games are included in this distribution.
SEE ALSO
        chip8as(1)
                 An assembler, for assembling chip8 programs into the byte-code to be interpreted.
        chip8as(5)
                 The opcodes, as understood by the assmbler, and how they are interpreted by the interpreter.
        chip8run(5)
                 The file format, as output by the assembler and as understood by the interpreter.
        chip8dis(1)
                  A disassembler, so that you can turn assembled byte code into something more readable.
COPYRIGHT
        chip8run version 1.1
        Copyright (C) 1990, 1991, 1998, 1999, 2012 Peter Miller
        This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
        even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
        the GNU General Public License for more details.
AUTHOR
        Peter Miller   E-Mail:     pmiller@opensource.org.au
        /\/\*          WWW:        http://miller.emu.id.au/pmiller/
                                                                                                                     15
chip8as(5)                                                                                                        chip8as(5)
NAME
        chip8as − chip8 opcodes
DESCRIPTION
        This file documents the input format of the chip8as program. As a side-effect, it also documents the
        various opcodes the chip8run program understands. Input files are text files.
MACHINE
        This section describes the chip8 machine.
        Address Space
                The chip8 machine has an address space from 0x000 to 0xFFF. This address space contains both
                code and data. Addresses 0x000 to 0x1FF are reserved. Some implementations place the
                interpreter here. When the chip8 machine is reset, the PC is set to 0x200, thus chip8 programs
                start at 0x200.
        Opcodes
                    Opcodes are all 16 bits long. Opcodes must be aligned on even-byte boundaries (some
                    implementations do not require this). Opcodes are stored big-endian, high byte first then low
                    byte.
        Registers
                    The chip8 machine has a number of registers.
                    v0 to v15
                                These are general 8-bit unsigned arithmetic registers. Regsiters v10 to v15 may also be
                                referred to as vA to vF. Arithmetic is done in 2s compliment.
                    v15         In addition to being a general register, this register may sometimes be used as an
                                exception indicator by some opcodes.
                    time        The time register is a count-down timer. It is decrimented by 1 every 60th of a second
                                until it reaches 0.
                    tone        The time register is a count-down timer. It is decrimented by 1 every 60th of a second
                                until it reaches 0. If the register is not 0, a beeper will be beeping. (Some
                                implementations make the beeping optional.)
                    i           This register is a pointer register. It is 16-bits long, although the address space is only
                                12-bits. It is an error to attempt to reference memory above 0xFFF.
                    .           The dot register may be used to refer to the value of the program counter maintained by
                                the assembler. It refers to the value of the program counter before the opcode is
                                generated.
                    key         This isn’t really a register, even though the opcode treat it that way. There are 16 keys
                                available, labeled "0" − "F". Keys may be sampled or waited for.
        Display
                    The chip8 machine has a 64×32 display. It is 64 pixels wide and 32 pixels high. Row 0 is the top
                    of the screen, row 31 is the bottom of the screen. Column 0 is the left of the screen, column 63 is
                    rhe right of the screen. You may assume pixels are square. (See the high and low opcodes; there
                    is also a high resolution 128×64 display mode.)
EMULATOR DIFFERENCES
        There are a number of differences between the various emulators. No doubt this could all be resolved if
        anyone had the sources to the original (circa 1977) interpreter.
        Add Aligned Opcodes
                 Some emulators accept opcodes at odd addresses, and some don’t. Defensive programming
                should use even-aligned opcodes. (This distribution demands even-aligned opcodes on
                 emulation, and gives a fatal error for odd-aligned opcodes on assembly, but accepts odd-aligned
                                                                                                                          16
chip8as(5)                                                                                                   chip8as(5)
                                                                                                                     17
chip8as(5)                                                                                                   chip8as(5)
        compatibility
               Mangle the ‘‘save’’ and ‘‘restore’’ opcodes to leave the I register unchanged.
               Warning: This opcode is not a standard Chip 8 opcode. It is provided soley to allow testing and
               porting of Chip 8 games which rely on this behaviour.
               Code generated: 0x00FA
        scright
               Scroll the screen right 4 pixels. [Super-Chip]
               This opcode delays until the start of a 60Hz clock cycle before drawing in low resolution mode.
               (Use the delay timer to pace your games in high resolution mode.)
               Code generated: 0x00FB
        scleft
                  Scroll the screen left 4 pixels. [Super-Chip]
                  This opcode delays until the start of a 60Hz clock cycle before drawing in low resolution mode.
                  (Use the delay timer to pace your games in high resolution mode.)
                  Code generated: 0x00FC
        low
                  Low resolution (64×32) graphics mode (this is the default). [Super-Chip]
                  Code generated: 0x00FE
        high
                  High resolution (128×64) graphics mode. [Super-Chip]
                  Code generated: 0x00FF
        jump addr
                Jump to addr. The addr must be even. The addr must be in the range 0x200 to 0xFFE. The
                addr expression must be relative to some label.
                Code generated: 0x0NNN, where NNN is the low 12 bits of addr.
        jump addr, v0
                Jump to addr + v0. The addr must be even. The addr must be in the range 0x200 to 0xFFE. The
                addr expression must be relative to some label. It is a run-time error if the value of register v0 is
                odd. It is a run-time error if addr+v0 is not in the range 0x2000 to 0xFFE.
                Code generated: 0xBNNN, where NNN is the low 12 bits of addr.
        call addr
                Call subroutine at addr. The addr must be even. The addr must be in the range 0x200 to 0xFFE.
                The addr expression must be relative to a label. It is a run-time error if there are too many
                subroutine calls, although you may safely assume at least 32 levels.
                Code generated: 0x1NNN, where NNN is the low 12 bits of addr.
        skip.eq vX, value
               Skip the next instruction if the value of register vX is equal to value. The value must be in the
               range −128 to 255.
               Code generated: 0x3XYY, where YY is the low 8 bits of value.
        skip.eq vX, vY
               Skip the next instruction if the value of register vX is equal to the value of register vY.
               Code generated: 0x3XY0
        skip.eq vX, key
               Skip the next instruction if they key with the same number as the low 4 bits of the value of
               register vX is currently being pressed.
               Code Generated: 0xEX9E
        skip.ne vX, value
               Skip the next instruction if the value of register vX is not equal to value. The value must be in the
               range −128 to 255.
               Code generated: 0x4XKK, where KK is the low 8 bits of value.
                                                                                                                    18
chip8as(5)                                                                                                  chip8as(5)
        skip.ne vX, vY
               Skip the next instruction if the value of register vX is not equal to the value of register vY.
               Code generated: 0x9XY0
        skip.ne vX, key
               Skip the next instruction if the key with the same number as the the low 4 bits of the value of
               register vX currently not being pressed.
               Code generated: 0xEXA1
        load vX, value
                Load register vX with the value. The value must be in the range −128 to 255.
                Code generated: 0x6XKK, where KK is the low 8 bits of value.
        load vX, key
                If no key is currently being pressed, block until one is. Load register vX with lowest number of
                all keys currently being pressed. The beeper will sound while any key is being pressed. Block
                until the key is released (implementations need not block if they guarantee that the key will not be
                "seen" by any of the key opcodes until it is released and pressed again).
                Code generated: 0xFX0A
        load vX, vY
                Load register vX with the value of register vY. Some implementations may alter the value of
                register v15 (to what?).
                Code generated: 0x8XY0
        load vX, time
                Load register vX with the value of the time register.
                Code generated: 0xFX07
        load time, vX
               Load the time register with the value of register vX.
               Code generated: 0xFX15
        load tone, vX
               Load the tone register with the value of register vX.
               Code generated: 0xFX18
        load i, addr
                 Load register i with the addr. The addr must be in the range 0x200 to 0xFFF.
                Code generated: 0xANNN, where NNN is the low 12 bits of addr.
        add vX, value
                 Add value to register vX. The value must be in the rabge −128 to 255.
                 Code generated: 0x7XKK, where KK is the low 8 bits of value.
        add vX, vY
                 Add the value of register vY to register vX. The register v15 is set to 1 if the result overflows,
                 otherwise 0.
                 Code generated: 0x8XY4
        add i, vX
                 Add the value of register vX to register i.
                 Code generated: 0xFX1E
        or i, vX
                   Bitwise OR the value of register vY into register vX. Some implementations may change the
                   value of register v15 (to what?).
                   Code generated: 0x8XY1
        and vX, v
                 Bitwise AND the value of register vY into register vX. Some implementations may change the
                 value of register v15 (to what?).
                                                                                                                      19
chip8as(5)                                                                                                     chip8as(5)
                                                                                                                       20
chip8as(5)                                                                                                    chip8as(5)
                                                                                                                      21
chip8as(5)                                                                                                 chip8as(5)
                                                                                                                      22
chip8as(5)                                                                                      chip8as(5)
COPYRIGHT
        chip8 version 1.1
        Copyright (C) 1990, 1991, 1998, 1999, 2012 Peter Miller
        This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
        even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
        the GNU General Public License for more details.
AUTHOR
        Peter Miller   E-Mail:    pmiller@opensource.org.au
        /\/\*          WWW:       http://miller.emu.id.au/pmiller/
                                                                                                       23
chip8run(5)                                                                                                chip8run(5)
NAME
        chip8 file formats
DESCRIPTION
        The chip8run program understands 3 file formats: raw, HP and #!. The only difference is the headers. All
        3 formats have a header, followed by data. The data will be at most 3584 bytes long.
RAW FORMAT
        The raw format has no header. There is only the data section in the file.
HP FORMAT
        the HP format has a 13 byte header in the format
                 8-bytes            magic number "HPHP48-A"
                                    48,50,48,50,34,38 (hex)
                 2.5-bytes          type
                                    0x02C2A for "string"
                 2.5-bytes          length
                                    in nybbles, including length.
        The 2.5 byte fields are encodes as big-endian nybbles.
UNIX FORMAT
        The #! format discards all bytes upto the first newline (’\n’) character, this is useful to make chip8 programs
        self-executing, by making the first line
                 #! /usr/local/bin/chip8run −
        Which tells unix to invoke the chip8run(1) program and feed it the executing file on its standard input.
SEE ALSO
        chip8as(1)
                 An assembler, for assembling chip8 programs into the byte-code to be interpreted.
        chip8as(5)
                 The opcodes, as understood by the assmbler, and how they are interpreted by the interpreter.
        chip8run(1)
                 The interpreter, to run the assembled byte code.
        chip8dis(1)
                  A disassembler, so that you can turn assembled byte code into something more readable.
COPYRIGHT
        chip8 version 1.1
        Copyright (C) 1990, 1991, 1998, 1999, 2012 Peter Miller
        This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
        even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
        the GNU General Public License for more details.
AUTHOR
        Peter Miller    E-Mail:     pmiller@opensource.org.au
        /\/\*           WWW:        http://miller.emu.id.au/pmiller/
                                                                                                                    24
15puzzle(7)                                                                                              15puzzle(7)
NAME
        15puzzle − X11 Chip8 game
SYNOPSIS
        chip8run 15puzzle
DESCRIPTION
        Here is the infamous 15 puzzle for Chip8. The puzzle, as you doubtless recall, has 15 squares numbered 1
        through 15 (in this case, 1 through F) and one hole. You can move the hole about and must put the pieces
        in order.
        When you first run puzzle, it comes up solved. Thereafter, pressing IRestart causes the puzzle to have 32
        random moves made, effectively randomizing the puzzle. If 32’s not enough for you, just press IRestart
        again.
        The program does not check to see if you’ve solved the puzzle, and therefore nothing special happens when
        you do except for the warm, fuzzy feeling that you have beaten it.
   The Display
   The Keys
                                                         You enter moves by using the keys. The key’s
                      1     2     3     C                position in that 4×4 matrix corresponds to the square
                                                         in that position of the puzzle matrix. Pushing a key
                      4     5     6     D                causes the hole to migrate to that position. The
                                                         migration is performed in the order up, down, left,
                      7     8     9     E                right; it is not necessary to limit your moves to those
                                                         rows and columns containing the hole; you can
                     A      0     B      F               request that the hole move to any position.
COPYRIGHT
        15 Puzzle version 1.0
        Author Unknown
AUTHOR
        Author Unknown
NAME
           Alien − Shoot the alien invaders
SYNOPSIS
           chip8run alien
DESCRIPTION
           None.
   The Display
They Keys
                                              1   2     3     C   3:   Left
                                                                  C:   Right
                                              4   5     6     D
                                                                  A:   Fire
                                              7   8     9     E
A 0 B F
Copyright
           Jonas Lindstedt
Author
           Jonas Lindstedt
NAME
         ant − In search of Coke
SYNOPSIS
         chip8run ant
DESCRIPTION
         Rumours through the grape vine of the local ant community indicate that there is a partially empty Coke
         can in Zoom’s room. So far many brave ants have gone in search of the mystic can, yet none have returned.
         They are feared to be dead. It is your mission as Bink to find a safe path to the Coke can so that others may
         follow. Beware, however, for Zoom has set many treacherous obsticles to block you and booby traps to zap
         you. Bink has only his cool nerves and jumping ability (the only jumping ant in the world) to help him on
         this journey.
         Pressing the jump key and the right key simultaneously will help clearing large obsticles. Actually, press
         the jump key slightly ahead of the right key.
         Being of little mass, Bink can stop on a dime and change course in mid-air at will.
         This game has no randomization. Learn the terrain.
         I take full credit for the design and development of Ant. The game theme is original as far as I know.
         There are many tricks to getting around Ant. Be aware of spoilers when posting to the net.
   The Display
The Keys
                                              1      2     3     C       3:    Left
                                                                         C:    Right
                                              4      5     6     D
                                                                         A:    Jump
                                              7      8     9     E
A 0 B F
COPYRIGHT
         Ant version 1.0
         Copyright (C) 1991 Erin S Catto
         I take no blame for worn calculator keys.
AUTHOR
         Erin S Catto <catto@ecn.purdue.edu>
NAME
        Blinky − PacMan clone
SYNOPSIS
        chip8run blinky
DESCRIPTION
        Blinky is a PacMan game for the Chip8.
        As Blinky, you are chased around in an office environment by two bosses, Packlett and Heward. Packlett
        does management by walking around, but Heward believes in the American dream, and possesses quite a
        killer instinct. Anyway, don’t let them get to you, unless you are feeling very aspirant. This, of course,
        requires the recent fulfilment of one of four major contracts, found near the corners of the building.
        Otherwise, the office is filled with small tasks, just waiting for your attention. If you manage to take care of
        them all, your intray will overflow, just over weekend. This is the curse of any responsible and hard
        working employee. However, neither boss know of the emergency exit which leads from one part of the
        office to the other, so this may be one way to avoid them, if everything else fails. As in most decent
        companies, you are given a chance to clear up the mess of your first blunder. The second time on the rug...
        off you go. There is a small comfort in that the recommendation reflects how well you did.
        Recommendation points are awarded as follows:
                                   0 points         Make use of the emergency exit
                                   1 point          Take care of a minor task
                                   4 points         Negotiate a major contract
                                   25 points        Show Heward a recently fulfiled contract
                                   50 points        Show Packlett a recently fulfiled contract
                                   100 points       Clear the office environment from tasks
The Display
   The Keys
       Blinky control keys are:
                                                1      2      3     C      1:    reset
                                                                           3:    up
                                                                           6:    down
                                                4      5      6     D
                                                                           7:    left
                                                                           8:    right
                                                7      8      9     E
A 0 B F
COPYRIGHT
        Blinky version 2.0
        Copyright (C) 1990 Christian Egeberg
        Noncommercial distribution allowed, provided that copyright messages are preserved, and any modified
        versions are clearly marked as such.
        This software is provided "as is" and without any express or implied warranties, including, but not limited
        to, the implied warranties of merchantability and fitness for a particular purpose.
AUTHOR
        Christian Egeberg <egeberg@solan.unit.no>
NAME
           Blitz − bomb the bad guys
SYNOPSIS
           chip8run blitz
DESCRIPTION
           This game is a BOMBER clone. You are in a plane, and you must destroy the towers of a town. Your
           plane is flying left to right, and goes down. The game ends when you crash yourself on a tower...
   This Display
The Keys
1 2 3 C 5: Drop bomb
4 5 6 D
7 8 9 E
A 0 B F
COPYRIGHT
           Blitz version 1.0
           Copyright (C) David Winter
AUTHOR
           David Winter <winter@worldnet.net>
NAME
          Brix − Knock out the bricks
SYNOPSIS
          chi8run brix
DESCRIPTION
          This is a version of the classic game of knock out the bricks. Not particularly exciting, but I had to include
          something to show how the interpreter is used.
          Once you get all of the bricks, the game will freeze. Use the restart button to start the game again.
   The Display
          The dots at the top-left indicate the number of balls you have remaining.
          The number at the top-right is the number of bricks you have hit so far. You are aiming for a total of 96.
          The short line at the bollom of the screen is the paddle. The ball will bounce off the top, the sideas and the
          paddle. If it touches the bottom of the screen, you lose a ball.
   The Keys
7 8 9 E
A 0 B F
COPYRIGHT
          Brix version 1.0
          Copyright (C) 1990 Andreas Gustafsson
          Noncommercial distribution allowed, provided that this copyright message is preserved, and any modified
          versions are clearly marked as such.
          THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
          WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
          MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
AUTHOR
          Andreas Gustafsson <gson@niksula.hut.fi>
NAME
         Car − driving game
SYNOPSIS
         chip8run car
DESCRIPTION
         This game simulates a racing car.
         The other cars are a big dumb, though. They seem to have all stalled.
   The Display
The Keys
                                              1      2      3    C      7:       left
                                                                        8:       right
                                              4      5      6    D
7 8 9 E
A 0 B F
COPYRIGHT
         Car version
         Copyright (C) 1994 K. v. Sengbusch
AUTHOR
         K. v. Sengbusch
NAME
        Connect4 − two player join the dots
SYNOPSIS
        chip8run connect4
DESCRIPTION
        This game is for two players. The goal is to align 4 coins in the game area. Each player’s coins are
        colored. When you drop a coin, it is paced on the latest dropped coin in the same column, or at the bottom
        if the column is empty. Once the column is full, you cannot place any more coins in it. To select a column,
        use 4 and 6. To drop a coin, use 5. There is no winner detection yet. This will be soon avalaible (Hey! I
        don’t spend my life on CHIP8 !).
   The Display
The Keys
                                          1     2      3      C     4:    left
                                                                    5:    place piece
                                                                    6:    right
                                          4     5      6      D
7 8 9 E
A 0 B F
NAME
           Field − mavigate the asteroid field
SYNOPSIS
           chip8run field
DESCRIPTION
           A title screen will appear proclaiming the game name (and my name) with quite a bit of animation. The
           amount of title screen animation explains for its rather large size for a S-CHIP game of 700 some odd
           bytes. However, it is still amazing to me that a game as simple as this can be written in so few bytes!
           To play press the ‘‘0’’ key during the title sequence, you may have to hold it down for a second or to (since
           I don’t check keypresses between every single frame of animation.)
           The screen will then appear like:
                     _________________________
                   |#               #|
                   |                | .−−−−ASTEROIDS
                   |#                 | |
                   |               #<−−−’
                   |                |
                   |#_______________________#|
           The keys are now defined as:
           1 − Apply thrust to the left ( so you move right! ) 2 − Apply thrust to the right ( so you move left! ) / −
           Move up * − Move Down 7 − Abandon Game and return to the Title Screen
           Now once the game is going.(you must apply thrust to actually start.) The screen appears like this.
            _________________________ |#        #        #| | +−           # | |# ˆ         #     || # | #
           #| | |      #   | |#____|__________________#|
               |
               You
   The Display
   The Keys
                                                 1     2      3     C      7:    left
                                                                           8:    right
                                                 4     5      6     D
7 8 9 E
A 0 B F
COPYRIGHT
           Field version 1.0
           Copyright (C) 1991 Al Roland
           Oh yeah... I release this as FREEWARE, play it, and enjoy it. But don’t modify, mutilate, or spindle this
           program unless I know about (and approve) it.
AUTHOR
           Al Roland <droland@eng.auburn.edu>
NAME
       Guess − guess the number
SYNOPSIS
       chip8run guess
DESCRIPTION
       Think to a number between 1 and 63. CHIP8 shows you several boards and you have to tell if you see your
       number in them. Press 5 if so, or another key if not. CHIP8 gives you the number...
   The Display
The Keys
                                            1     2      3    C      5:   Yes
                                                                     4:   No
                                            4     5      6    D
7 8 9 E
A 0 B F
COPYRIGHT
       Guess version 1.0
       Copyright (C) 1991 David Winter
AUTHOR
       David Winter <winter@worldnet.net>
NAME
        Hidden − find pairs of cards
SYNOPSIS
        chip8run hidden
DESCRIPTION
        This is a version of the classic memory game. You are asked to find pairs of cards.
   The Display
       At the openning splash screen, press any key. You will then see the cards.
The Keys
                                             1      2      3    C      2:    up
                                                                       4:    left
                                                                       5:    pick
                                             4      5      6    D
                                                                       6:    right
                                                                       8:    down
                                             7      8      9    E
A 0 B F
COPYRIGHT
        Hidden version 1.0
        Copyright (C) 1991 David Winter
AUTHOR
        David Winter <winter@worldnet.net>
NAME
        hpiper − plumbing game
SYNOPSIS
        chip8run hpiper
DESCRIPTION
        This probably not the super game you were hoping for, Erik, but it has only been three days. The only
        SCHIP feature this game takes advantage of is the higher screen resolution.
   OBJECT
      You are presented with a 6 row, 10 column grid and a preview panel of 5 pipes. A starting pipe will be
      placed on the grid and will in a few seconds start leaking. The object is to lay pipes on the grid to contain
      the leak as long as you can. If the water flows onto a empty grid site, onto the side of another pipe or
      border, that plumbing job is finished. If you did well enough, you may get another job. Otherwise the
      game is over.
   HOW TO PLAY
      On the bottom and right borders of the grid are grid pointers. The bottom pointer can be moved left with
      the (7) key and right with the (8) key. The side pointer can be moved up with the (3) key and down with the
      (6) key. (Note: this is identical to the movement keys for Syzygy by Roy Trevino)
        Using the pointers, chose a grid site to place a pipe. The pipe to be placed is the one at the bottom of the
        preview column. Once a site is chosen, press the (1) key to place the pipe there. You can replace a pipe
        already at the grid site with a penalty of one point. You cannot replace a pipe that the water has already
        flown through. Trying to do this will make you lose the pipe you were trying to place and also penalize you
        one point.
        When you have placed all the pipe you wish to for a particular job, you can press the (F) key to make the
        water flow fast. You can still lay pipe if you realize you made a mistake, but hurry!
        There are ten levels with increasing water flow speed. Level 10’s speed is the same as that for fast. If you
        manage to get through level 10, it repeats at that level till you don’t.
   SCORING
      You receive 3 points for every pipe the water flows through. For the crossed pipes, flowing through them in
      both directions gives you 6 points. (Note: some adventuresome combinatorist might want to figure out
      what the maximum possible score is. If it is over 255, there could be a problem, but I doubt it.) You are
      penalized 1 point for replacing or trying to replace a pipe already on the grid.
        The current job score is shown in upper right corner up to 99. If the score goes over 99, the displayed score
        rolls over. However, up to 255, the full score is kept in memory.
        Once a job is over, the score earned is added to the grand total and displayed on the screen shown after
        (SPACE) is pressed. This total has two parts. The first part before the two periods is the total up to 255.
        The second part is the number of times the total rolled over. Therefore to get the real total, multiply the
        second part by 256 and add the first part. (Note: Sorry about this method, but I haven’t worked out the
        preferred way yet.)
        If the game is over, the word OVER will be displayed above the score and the (DEL) key must be pressed
        to exit. Else, press (SPACE) to go on to the next job. The points needed to go to the next job are obtained
        by the following formula:
                  Points needed = 100 − (41 − 4 * level)
        Happy plumbing!
   The Display
   The Keys
       The keys used are as follows:
                                          1      2     3     C     1:   place
                                                                   3:   up
                                                                   4:   uplace
                                          4      5     6     D
                                                                   6:   down
                                                                   7:   left
                                          7      8     9     E     8:   right
                                                                   F:   fast
                                          A      0     B     F
COPYRIGHT
        H. Piper version 2.0
        Copyright (C) 1991 Paul Raines
        Since CHIP makes use of undocumented features of the HP48SX, anything happen: loss of data, meltdown,
        etc. Therefore, I take no responsibility for any damage whatsoever that occurs.
AUTHOR
        Paul Raines <vapsppr@prism.gatech.edu>
NAME
        Invaders − a space invaders clone
SYNOPSIS
        chip8run invaders
DESCRIPTION
        The well known game. Destroy the invaders with your ship.
   The Display
The Keys
                                            1    2      3    C      4:   left
                                                                    5:   fire
                                                                    6:   right
                                            4    5      6    D
7 8 9 E
A 0 B F
COPYRIGHT
        Invaders version 0.9
        Copyright (C) 1991 David Winter
AUTHOR
        David Winter <winter@worldnet.net>
NAME
           Joust − arcade game
SYNOPSIS
           chip8run joust
DESCRIPTION
           Hoorah! Hoorah! Here it is, the latest CHIP48 game; my rendition of the arcade game Joust.
           The blank dots in the bottom left corner indicate the number of players left, not including the current
           player. Sorry, no bonus guys. Maybe in the future.
           At the score screen press A to replay.
           If you feel the game is slow, then wait until you get to level 7! The levels roll over at 15, I think. I haven’t
           gotten that far! Therefore there maybe unseen bugs.
           The game is novel. I’m not sure of its lasting qualities.
   The Display
The Keys
                                           1        2   3     C        3:    left
                                                                       C:    right
                                                                       A:    up
                                           4        5   6     D
                                                                       A:    At the score screen
                                           7        8   9     E              press A to replay.
A 0 B F
   Points
        1 point        per egg touched
        8 points       for clearing bonus round
        1 player       for clearing bonus round
COPYRIGHT
           Joust version 2.3
           Copyright (C) 1991 Erin S Catto
AUTHOR
           Erin S Catto <catto@ecn.perdue.edu>
NAME
        kaleid − draw pretty patterns
SYNOPSIS
        chip8run kaleid
DESCRIPTION
        A little program (not a game) to make funny graphics. Move around the screen with 2 4 6 8. To finish and
        make CHIP8 repeat your moves, press 0.
   The Display
The Keys
                                             1     2      3    C      0:    finish
                                                                      2:    up
                                                                      4:    left
                                             4     5      6    D
                                                                      6:    right
                                                                      8:    down
                                             7     8      9    E
A 0 B F
COPYRIGHT
        kaleid version 1.0
        Copyright (C) 1991 David Winter
AUTHOR
        David Winter <winter@worldnet.net>
NAME
          maze − draws random mazes
SYNOPSIS
          chip8run maze
DESCRIPTION
          This little program draws random mazes.
   The Display
   The Keys
       Press any key to cause a different maze to be drawn.
COPYRIGHT
          maze version 1.0
          Copyright (C) 1991 David Winter
AUTHOR
          David Winter <winter@worldnet.net>
NAME
        merlin − remember the order
SYNOPSIS
        chip8run merlin
DESCRIPTION
        This is the Simon game. The goal is to remember in which order the squares are lighted. The game begins
        by lighting 4 random squares, and then asks you to light the squares in the correct order. You win a level
        when you give the exact order, and each increasing level shows a additionnal square. The game ends when
        you light an incorrect square. Keys are 4 and 5 for the two upper squares, then 7 and 8 for the two lower
        ones.
   The Display
The Keys
                                             1     2      3     C      4:    left
                                                                       6:    right
                                             4     5      6     D
7 8 9 E
A 0 B F
COPYRIGHT
        merlin version 1.0
        Copyright (C) 1998 Unknown
AUTHOR
        Unknown <unknown@example.com>
NAME
         missile − shoot the targets
SYNOPSIS
         chip8run missile
DESCRIPTION
        You must shoot the 8 targets on the screen. Your shooter moves a little bit faster each time you shoot. You
        have 12 missiles to shoot all the targets, and you win 5 points per target shot.
   The Display
The Keys
1 2 3 C 8: fire
4 5 6 D
7 8 9 E
A 0 B F
COPYRIGHT
         missile version 1.0
         Copyright (C) 1991 David Winter
AUTHOR
         David Winter <winter@worldnet.net>
NAME
          pong − the original video game
SYNOPSIS
          chip8run pong
DESCRIPTION
          OK folks here it is! Pong for the Chip8.
          The game never ends. It keeps score, but only up to 9 for each player, then it will roll over to 0. Sorry, it’s
          the only way I could think of to do it. So, you have to play ‘‘whoever gets to a number first, wins.’’
          It is kind of slow, but then there are two paddles and ball moving around all at once.
          The player who got the last point gets the serve...
   The Display
The Keys
A 0 B F
COPYRIGHT
          Pong version 1.0
          Copyright (C) 1990 Paul Vervalin
AUTHOR
          Paul Vervalin <vervalin@austin.lockheed.com>
NAME
        puzzle − X11 Chip8 game
SYNOPSIS
        chip8run puzzle
DESCRIPTION
        Here is the infamous 15 puzzle for Chip8. The puzzle, as you doubtless recall, has 15 squares numbered 1
        through 15 (in this case, 1 through F) and one hole. You can move the hole about and must put the pieces
        in order.
        When you first run puzzle, it comes up solved. Thereafter, pressing IRestart causes the puzzle to have 32
        random moves made, effectively randomizing the puzzle. If 32’s not enough for you, just press IRestart
        again.
        The program does not check to see if you’ve solved the puzzle, and therefore nothing special happens when
        you do except for the warm, fuzzy feeling that you have beaten it.
   The Display
   The Keys
                                                         You enter moves by using the keys. The key’s
                      1     2     3     C                position in that 4×4 matrix corresponds to the square
                                                         in that position of the puzzle matrix. Pushing a key
                      4     5     6     D                causes the hole to migrate to that position. The
                                                         migration is performed in the order up, down, left,
                      7     8     9     E                right; it is not necessary to limit your moves to those
                                                         rows and columns containing the hole; you can
                     A      0     B      F               request that the hole move to any position.
COPYRIGHT
        Puzzle version 1.0
        Copyright (C) 1990 Roger Ivie
AUTHOR
        Roger Ivie <slsw2@cc.usu.edu>
NAME
          race − driving game
SYNOPSIS
          chip8run race
DESCRIPTION
          This game simulates a racing car.
   The Display
The Keys
                                              1   2      3    C   7:   left
                                                                  8:   right
                                              4   5      6    D
7 8 9 E
A 0 B F
COPYRIGHT
          race version 1.0
          Copyright (C) 1991 David Winter
AUTHOR
          David Winter <winter@worldnet.net>
NAME
           Snake − navigate the snake through the maze
SYNOPSIS
           chip8run snake
DESCRIPTION
           In this game, you a guiding the snake to eat apples as they appear. The snake gets longer as it eats the
           apples. Each level has 5 apples, and then a small exit will appear.
           If you bite the wall, or bite yourself, you lose a life.
           The number of lives you have left is displayed in the top left corner.
   The Display
The Keys
                                                 1      2      3      C    4:   turn left
                                                                           6:   turn right
                                                 4      5      6      D
7 8 9 E
A 0 B F
COPYRIGHT
           chip8 version 1.1
           Copyright (C) 1990, 1991, 1998, 1999, 2012 Peter Miller
           This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
           even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
           the GNU General Public License for more details.
AUTHOR
           Peter Miller     E-Mail:     pmiller@opensource.org.au
           /\/\*            WWW:        http://miller.emu.id.au/pmiller/
NAME
        space fight − space invaders clone
SYNOPSIS
        chip8run spacefight
DESCRIPTION
        Ok, here’s a little Super-Chip game for all you mad S-Chip-freaks out there!
   PURPOSE
      The purpose of the game is.... to win (say what?)
        In order to complete this quite difficult task your body (yes only your body and not your mind (this remark
        shows that I believe that the body merely serves as a tool for the brain)) have been warped through 87
        different time-warps due to some foolish scientists who didn’t know what they were doing. This resulted in
        a rather big waste of resources but that’s of course another story. When you finally arrive you can’t
        recognize anything and two weird-looking dudes tell you that this is the year 2091!!! Frightening eh?
        You are of course not very happy about your situation partly because you only have 25 dollars in your
        wallet and the prizes have gone up about 30000% but mainly because IBM and the fucking PC clones have
        completely taken over all of the computer-market resulting in CHIP8’s death!
        In a Holo-BiDirectional-FullDuplex-TV-store you see a newsflash concerning some evil aliens about to
        invade the good ol’ EARTH. Scientists think that they are being drawn towards the Earth due to the
        massive pollution the PC’s cause. However if people had bought CHIP8’s instead (which don’t pollute)
        they would have been no aliens now!
        This is your call! You sneak into a Warp-Transporter without a ticket and you end up at NASA where you
        get to talk to the boss and you tell him: "OK you listen to me you scumbag! I wanna get into a spacecraft,
        get up there and KICK SOME ALIEN BUTT!". "But why?" the boss says. "Personal motives" you
        answer. If you can save the CHIP8’s existence you’re ready to do anything!
        You get the newest spacecraft (CHIP8) and you take off!
        Battle you way through the 6 (increasingly harder) levels!
   The Display
The Keys
                                           1   2      3    C   3:   left
                                                               A:   fire
                                                               C:   right
                                           4   5      6    D
7 8 9 E
A 0 B F
COPYRIGHT
        spacefight version 1.0
        Copyright (C) 1992 Carsten Soerensen
AUTHOR
        Carsten Soerensen <u920659@daimi.aau.dk>
        Carsten Soerensen
        Kronhjortevej 4
        DK-8270 Hoejbjerg
        Denmark
NAME
        syzygy − navigate the little snake
SYNOPSIS
        chip8run syzygy
DESCRIPTION
        One of the first games I remember playing on a computer was called "syzygy" on a now ancient TRSH80
        Model 1. It has since appeared on other computers under various names. Why it was called syzygy, I have
        no idea (consult Websters). However, since the HP48SX has approximately the same memory, graphics
        and cpu power as my TRSH80 did (something like 16kB, 128x64, and a 1.2Mhz Z80), I thought it would
        be amusing to play it again. Now, approximately to my recollection, and with many apologies to the
        original author, here is a CHIP48 version of SYZYGY for the HP48. Enough drivel.
        The object of the game is to seek out "targets". You do this with your syzygy. Initially small, the syzygy
        will grow by some amount each time a target is hit. Eventually, your syzygy will be so long as to make
        tougher and tougher to get any points (and easier and easier to get killed). Confused? Just try it.
        Anyways, the syzygy is not allowed to run into anything except targets. It cannot run into the screen border
        (if present), or itself (this includes backing into itself). Fast and immediate death will result. Don’t worry
        if you die quickly a few times. The keys take a few minutes to get used to.
   The Display
The Keys
                                             1   2     3       C     3:    up
                                                                     6:    down
                                                                     7:    left
                                             4   5     6       D
                                                                     8:    right
                                                                     B:    Show Score
                                             7   8     9       E     E:    No Border
                                                                     F:    Border
                                             A   0     B       F
COPYRIGHT
        syzygy version 0.1
        Copyright (C) 1990 Roy Trevino
        Noncommercial distribution allowed, provided that this copyright message is preserved, and any modified
        versions are clearly marked as such.
        SYZYGY, via CHIP-48, makes use of undocumented low-level features of the HP48SX calculator, and may
        or may not cause loss of data, excessive battery drainage, and/or damage to the calcultor hardware. The
        Author takes no responsibility whatsoever for any damage caused by the use of this program.
        THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
NAME
          Tank − tank shoots bad guys
SYNOPSIS
          chip8run tank
DESCRIPTION
          You have 20 missiles to shoot ad the bad guys.
          This is one of the original Chip 8 games.
   The Display
The Keys
                                               1      2      3    C   2:   up
                                                                      4:   left
                                                                      5:   fire
                                               4      5      6    D
                                                                      6:   right
                                                                      8:   down
                                               7      8      9    E
A 0 B F
COPYRIGHT
          Unknown 1977
AUTHOR
          Unknown
NAME
            tetris − drop the block
SYNOPSIS
            chip8run tetris
DESCRIPTION
            Guess what this game is... I’m sure you don’t need the rules. If you do, please ask your friends.
    The Display
The Keys
                                               1     2      3     C      4:    rotate
                                                                         5:    left
                                                                         6:    right
                                               4     5      6     D
                                                                         7:    drop piece
                                               7     8      9     E
A 0 B F
COPYRIGHT
            Unknown
AUTHOR
            Unknown
NAME
            tictac − a tic-tac-toe game
SYNOPSIS
            chip8run tictac
DESCRIPTION
            A tic-tac-toe game. Play with [1] to [9] keys. Each key corresponds to a square in the grid. The game never
            ends, so at any time, the winner is the one who has the best score.
    The Display
The Keys
                                            1     2     3      C     1-9:    select
                                                                             corresponding
                                                                             square
                                            4     5     6      D
7 8 9 E
A 0 B F
COPYRIGHT
            tictac version 1.0
            Copyright (C) 1991 David Winter
AUTHOR
            David Winter <winter@worldnet.net>
NAME
        UBoat − Sink the submarines
SYNOPSIS
        chip8run uboat
DESCRIPTION
        This game is based on a game that I used to play back in the early 80’s on an Apple ][. I believe the name
        of the program was "Depth Charge." Unfortunately I don’t know who was responsible for programming it.
        The premise of the game is fairly simple. You are the Captain of a sub hunting destroyer, and your
        objective is to sink as many enemy U-Boats as you can. Your only weapon against the U-Boats is your
        ship’s supply of depth charges. You have an unlimited supply of charges but, due to the amount of time it
        takes your second rate crew to reload, you may only have four charges in the water at any given time.
        The subs that you are hunting appear at random depths and have one of three random velocities (stopped,
        ahead half, or ahead full). There are six enemy subs visible at any one time. When one of these subs is
        destroyed, another will appear at a different location.
   The Display
   The Keys
       The keys used are as follows:
A 0 B F
        Scoring for the game is based on the depth of the sub, multiplied by one plus it’s velocity. For example: If
        a sub is at a depth of 50, and he is stopped then he is worth 50 points. A sub at the same depth of 50, but
        moving at 1/2 speed is worth 100 points. A sub at a depth of 50, but moving at full speed is worth 150
        points.
        The time limit for the game is about 2.5 minutes. At about 1:45 into the game a warning buzzer goes off
        and an almost empty hourglass is displayed by your score to let you know that the game is about over.
        Once the game is over your score, the high score, the number of charges dropped, the number of subs hit,
        and your hit percentage are displayed.
        A good game is about 2800 or so, and a really good game is around 3500. I haven’t had a whole lot of time
        to play it, but my high is 3551.
COPYRIGHT
       U-Boat version 1.0 (8/8/94)
       Copyright (C) 1994 Michael D. Kemper
       This game is freeware, and may be distributed freely as long as this doc file remains with it, and both the
       doc and program remain unchanged.
       (Sorry. I lightly edited it to adapt it to my assembler, and cope with the fact that X11 doesn’t re-map the
       keys. Peter Miller)
AUTHOR
       Michael D. Kemper <mikek@access.mountain.net>
NAME
         UFO − space invaders clone
SYNOPSIS
         chip8run ufo
DESCRIPTION
         You have 15 missiles to shoot on the two types of invaders. The big one moves on the left and gives you 5
         points. The small one moves on the right at variant speeds. The game ends after having shot the 15
         missiles.
   The Display
The Keys
                                           1     2      3     C      4:   shoot left
                                                                     5:   shoot up
                                                                     6:   shoot right
                                           4     5      6     D
7 8 9 E
A 0 B F
COPYRIGHT
         Unknown 1977
AUTHOR
         Unknown
NAME
       VBrix − Knock out the bricks
SYNOPSIS
       chi8run vbrix
DESCRIPTION
       This is a version of the classic game of knock out the bricks.
   The Display
The Keys
                                      1      2     3     C       1:     move paddle up
                                                                 4:     move paddle down
                                                                 7:     start game
                                      4      5     6     D
7 8 9 E
A 0 B F
COPYRIGHT
       Vertical Brix version 1.0
       Copyright © 1996 Paul Robson
AUTHOR
       Paul Robson
NAME
          vers − two tenuous worms
SYNOPSIS
          chip8run vers
DESCRIPTION
          There are two players, each controls a worm. The idea is to have the longest worm. First to 8 points, wins.
   The Display
The Keys
                                          1     2      3     C      1:    Player 1 Left
                                                                    1:    Player 1 Right
                                                                    7:    Player 1 Up
                                          4     5      6     D
                                                                    A:    Player 1 Down
                                                                    B:    Player 2 Left
                                          7     8      9     E      C:    Player 2 Up
                                                                    D:    Player 2 Down
                                          A     0     B      F      F:    Player 2 Right
COPYRIGHT
          vers version 1.0
          Copyright (C) 1991 JMN
AUTHOR
          JMN
NAME
        Wipe Off − wipe off the bricks
SYNOPSIS
        chip8run wipeoff
DESCRIPTION
        Another BRIX variant, but quite hard to play. Your score is shown when you lose all your lives.
   The Display
The Keys
7 8 9 E
A 0 B F
COPYRIGHT
        Unknown
AUTHOR
        Unknown
NAME
       worm3 − navigate the worm to the apples
SYNOPSIS
       chip8run worm3
DESCRIPTION
       You control the worm. You need to guide it to each of the apples.
   The Display
The Keys
                                            1     2      3     C      8:   left
                                                                      9:   right
                                            4     5      6     D
7 8 9 E
A 0 B F
COPYRIGHT
       worm3 version 1.0
       Copyright (C) 1991 Unknown
AUTHOR
       Unknown
chip8run(5)     24                                      require_index
connect4(7)     33                                      require_index
field(7)        34                                      require_index
guess(7)        36                                      require_index
hidden(7)       37                                      require_index
hpiper(7)       38                                      require_index
invaders(7)     40                                      require_index
joust(7)        41                                      require_index
kaleid(7)       42                                      require_index
maze(7)         43                                      require_index
merlin(7)       44                                      require_index
missile(7)      45                                      require_index
pong(7)         46                                      require_index
puzzle(7)       47                                      require_index
race(7)         48                                      require_index
snake(7)        49                                      require_index
spacefight(7)   50                                      require_index
syzygy(7)       52                                      require_index
tank(7)         54                                      require_index
tetris(7)       55                                      require_index
tictac(7)       56                                      require_index
uboat(7)        57                                      require_index
ufo(7)          59                                      require_index
vbrix(7)        60                                      require_index
vers(7)         61                                      require_index
wipeoff(7)      62                                      require_index
worm3(7)        63                                      require_index
chip8run(1)     14                      chip8run -      run a chip8 program
chip8run(1)     14                           chip8      run - run a chip8 program
ant(7)          27                         ant - In     search of Coke
tank(7)         54                    Tank - tank       shoots bad guys
alien(7)        26                         Alien -      Shoot the alien invaders
missile(7)      45                        missile -     shoot the targets
uboat(7)        57                        UBoat -       Sink the submarines
syzygy(7)       52      syzygy - navigate the little    snake
snake(7)        49                                      Snake - navigate the snake through the maze
snake(7)        49            Snake - navigate the      snake through the maze
spacefight(7)   50                                      space fight - space invaders clone
invaders(7)     40                    Invaders - a      space invaders clone
spacefight(7)   50                   space fight -      space invaders clone
ufo(7)          59                          UFO -       space invaders clone
uboat(7)        57                UBoat - Sink the      submarines
syzygy(7)       52                                      syzygy - navigate the little snake
tictac(7)       56                 tictac - a tic[hy]   tac[hy]toe game
tank(7)         54                            Tank -    tank shoots bad guys
tank(7)         54                                      Tank - tank shoots bad guys
missile(7)      45              missile - shoot the     targets
vers(7)         61                       vers - two     tenuous worms
tetris(7)       55                                      tetris - drop the block
snake(7)        49      Snake - navigate the snake      through the maze
tictac(7)       56                        tictac - a    tic[hy]tac[hy]toe game
tictac(7)       56                                      tictac - a tic[hy]tac[hy]toe game
tictac(7)       56         tictac - a tic[hy]tac[hy]    toe game