2003-02-16 14:43:00 +00:00
|
|
|
|
2001-10-09 09:34:21 +00:00
|
|
|
This directory contains sample programs for the cc65 compiler.
|
2001-09-26 13:27:35 +00:00
|
|
|
|
2022-02-05 15:55:57 +00:00
|
|
|
The programs contained here are
|
|
|
|
- used as samples and referenced from within the documentation (this is their
|
|
|
|
main purpose)
|
|
|
|
- installed into the filesystem
|
|
|
|
- compiled (but NOT run) by the CI test
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
2019-10-11 14:48:56 +00:00
|
|
|
Below is a short description for each of the programs, together with a list
|
|
|
|
of the supported platforms.
|
2001-09-26 13:27:35 +00:00
|
|
|
|
2001-10-09 09:34:21 +00:00
|
|
|
Please note:
|
2001-09-26 13:27:35 +00:00
|
|
|
|
2019-10-11 14:48:56 +00:00
|
|
|
* The supplied makefile needs GNU make. It works out of the box on Linux and
|
|
|
|
similar systems. If you're using Windows, then consider installing Cygwin
|
|
|
|
or MSys2.
|
2016-06-18 23:39:27 +00:00
|
|
|
|
2021-10-22 23:18:17 +00:00
|
|
|
* The makefile specifies the C64 as the default target system because most
|
|
|
|
of the programs run on that platform. When compiling for another system,
|
|
|
|
you will have to change the line that specifies the target system at the
|
|
|
|
top of the makefile, specify the system with SYS=<target> on the make
|
|
|
|
command line, or set a SYS environment variable. For example:
|
|
|
|
|
|
|
|
make SYS=apple2
|
2001-09-26 13:27:35 +00:00
|
|
|
|
2020-03-29 20:09:57 +00:00
|
|
|
* Use "make disk" to build a disk image with all sample programs.
|
2001-09-26 13:27:35 +00:00
|
|
|
|
2020-09-23 22:18:28 +00:00
|
|
|
* All programs in the root of the "samples" directory have been written to
|
|
|
|
be portable and work on more than one target. Programs that are specific
|
|
|
|
to a certain target live in a subdirectory with the name of the target.
|
|
|
|
|
2001-09-26 13:27:35 +00:00
|
|
|
List of supplied sample programs:
|
|
|
|
|
2003-02-16 14:43:00 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: ascii
|
|
|
|
Description: Shows the ASCII (or ATASCII, PETSCII) codes of typed
|
|
|
|
characters. Written and contributed by Greg King
|
2019-10-11 14:48:56 +00:00
|
|
|
<greg.king5@verizon.com>.
|
2013-05-09 11:56:54 +00:00
|
|
|
Platforms: All platforms with conio or stdio (compile time configurable).
|
2002-12-06 02:18:37 +00:00
|
|
|
|
2005-09-02 19:47:46 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: diodemo
|
|
|
|
Description: A disc copy program written and contributed by Oliver
|
|
|
|
Schmidt, <ol.sc@web.de>. Supports single or dual disc copy.
|
|
|
|
Platforms: The program does depend on conio and dio (direct disk i/o),
|
2019-10-11 14:48:56 +00:00
|
|
|
so it currently does compile for only the Atari and Apple ][
|
2013-05-09 11:56:54 +00:00
|
|
|
machines.
|
2005-09-02 19:47:46 +00:00
|
|
|
|
2009-10-03 11:28:42 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: enumdevdir
|
2019-10-11 14:48:56 +00:00
|
|
|
Description: Enumerates all devices, directories, and files. Written and
|
2013-05-09 11:56:54 +00:00
|
|
|
contributed by Oliver Schmidt, <ol.sc@web.de>.
|
|
|
|
Platforms: All systems with device enumeration and directory access
|
2019-10-11 14:48:56 +00:00
|
|
|
(currently the Commodore machines, the Commander X16,
|
|
|
|
and the Apple ][).
|
2012-10-15 18:52:40 +00:00
|
|
|
|
2003-10-06 10:54:46 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: gunzip65
|
2019-10-11 14:48:56 +00:00
|
|
|
Description: A gunzip utility for 6502-based machines, written by Piotr
|
2013-05-09 11:56:54 +00:00
|
|
|
Fusik <fox@scene.pl>.
|
|
|
|
Platforms: Runs on all platforms with file I/O (currently the Atari, the
|
2019-10-11 14:48:56 +00:00
|
|
|
Apple ][, Commodore machines, and the Commander X16).
|
2003-10-06 10:54:46 +00:00
|
|
|
|
2001-10-09 09:34:21 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: hello
|
|
|
|
Description: A nice "Hello world" type program that uses the conio
|
|
|
|
console I/O library for output.
|
|
|
|
Platforms: Runs on all platforms that support conio, which means:
|
2019-10-11 14:48:56 +00:00
|
|
|
Apple ][, Atari, Commodore machines, Commander X16,
|
|
|
|
Creativision, Gamate, NES.
|
2001-09-26 13:27:35 +00:00
|
|
|
|
2004-10-08 20:10:58 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: mandelbrot
|
|
|
|
Description: A mandelbrot demo using integer arithmetic. The demo was
|
2021-10-22 23:18:17 +00:00
|
|
|
written by groepaz, and converted to cc65 using TGI graphics
|
2022-01-22 00:04:08 +00:00
|
|
|
by Stefan Haubenthal.
|
2013-05-09 11:56:54 +00:00
|
|
|
Platforms: Runs on all platforms that have TGI support:
|
2019-10-11 14:48:56 +00:00
|
|
|
Apple ][, Atari, C64, C128, Oric Atmos and Telestrat, GEOS,
|
2022-01-22 00:04:08 +00:00
|
|
|
and NES.
|
2004-10-08 20:10:58 +00:00
|
|
|
|
2001-10-09 09:34:21 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2017-02-13 21:43:26 +00:00
|
|
|
Name: mousedemo
|
|
|
|
Description: Shows how to use the mouse.
|
2013-05-09 11:56:54 +00:00
|
|
|
Platforms: All systems with mouse and conio support:
|
2019-10-11 14:48:56 +00:00
|
|
|
C64, C128, CBM510, Atari, Apple ][.
|
2002-12-06 02:18:37 +00:00
|
|
|
|
2012-08-16 19:20:53 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: multidemo
|
|
|
|
Description: Shows how to combine multiple cc65 features incl. overlays
|
|
|
|
and extended memory drivers. Written and contributed by
|
|
|
|
Oliver Schmidt, <ol.sc@web.de>.
|
2019-10-11 14:48:56 +00:00
|
|
|
Platforms: All systems with an overlay linker config., disk directory
|
|
|
|
access, and EMD support (currently the C64, the C128,
|
|
|
|
the Atari, and the Apple ][).
|
2012-08-16 19:20:53 +00:00
|
|
|
|
2012-07-03 19:55:03 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: overlaydemo
|
|
|
|
Description: Shows how to load overlay files from disk. Written and
|
|
|
|
contributed by Oliver Schmidt, <ol.sc@web.de>.
|
2019-10-11 14:48:56 +00:00
|
|
|
Platforms: All systems with an overlay linker config. (currently the C64,
|
|
|
|
the C128, the Atari, and the Apple ][).
|
2012-07-03 19:55:03 +00:00
|
|
|
|
2001-10-09 09:34:21 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: sieve
|
|
|
|
Description: Implements the "Sieve of Eratosthenes" as a way to find all
|
|
|
|
prime numbers in a specific number interval. Often used as
|
|
|
|
a benchmark program.
|
|
|
|
Platforms: All systems with conio and clock support:
|
2019-10-11 14:48:56 +00:00
|
|
|
Atari, Commodore machines (VIC-20 needs memory expansion),
|
|
|
|
Commander X16, Apple ][ (without timing due to missing clock
|
|
|
|
support).
|
|
|
|
|
2022-02-05 15:55:57 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
Name: tinyshell
|
|
|
|
Description: Simple ("tiny") shell to test filename and directory functions.
|
|
|
|
Platforms: Runs on all platforms that have stdio support
|
|
|
|
|
2002-10-03 17:36:18 +00:00
|
|
|
-----------------------------------------------------------------------------
|
2013-05-09 11:56:54 +00:00
|
|
|
Name: tgidemo
|
2019-10-11 14:48:56 +00:00
|
|
|
Description: Shows some of the graphics capabilities of the "Tiny Graphics
|
|
|
|
Interface".
|
2013-05-09 11:56:54 +00:00
|
|
|
Platforms: Runs on all platforms that have TGI support:
|
2019-10-11 14:48:56 +00:00
|
|
|
Apple ][, Atari, C64, C128, Oric Atmos and Telestrat, GEOS,
|
|
|
|
NES, and Lynx.
|
2021-10-22 23:18:17 +00:00
|
|
|
|
|
|
|
=============================================================================
|
|
|
|
|
|
|
|
Platform specific samples follow:
|
|
|
|
|
|
|
|
atari 2600:
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Name: hello
|
|
|
|
Description: A "Hello world" type program.
|
|
|
|
Platforms: Runs on only the Atari 2600 Video Console System.
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
2022-02-05 15:55:57 +00:00
|
|
|
atari 5200:
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Name: hello
|
|
|
|
Description: A "Hello world" type program.
|
|
|
|
Platforms: Runs on only the Atari 5200 Video Console System.
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
apple2:
|
|
|
|
-------
|
|
|
|
|
|
|
|
Name: hgrtest
|
|
|
|
Description: shows how to incorporate a hires screen right into the binary,
|
|
|
|
thus allowing to place content both below and above the hires
|
|
|
|
video ram without multiple files nor copying stuff around (plus
|
|
|
|
having a nice splash screen as bonus). It basically demos how to
|
|
|
|
make use of apple2-hgr.cfg.
|
|
|
|
|
|
|
|
Name: hgrshow
|
|
|
|
Description: is a (single) hires program showing how to load (single) hires
|
|
|
|
screens from files without support from TGI. TGI could be used
|
|
|
|
to "paint" on the loaded screens.
|
|
|
|
|
|
|
|
Name: dhgrshow
|
|
|
|
Description: is a double hires program showing how to load double hires
|
|
|
|
screens from files. TGI is used for most of the I/O address
|
|
|
|
manipulation, but (in contrast to hgrshow) is not actually
|
|
|
|
functional.
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
2021-10-22 23:18:17 +00:00
|
|
|
cbm:
|
|
|
|
----
|
|
|
|
|
|
|
|
Name: fire
|
|
|
|
Description: Another graphics demo written by groepaz.
|
|
|
|
Platforms: C64, C128, CBM510
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
Name: nachtm
|
|
|
|
Description: Plays "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart.
|
|
|
|
Platforms: All systems that have the Commodore SID (Sound Interface
|
|
|
|
Device):
|
|
|
|
C64, C128, CBM510, CBM610.
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
Name: plasma
|
|
|
|
Description: A fancy graphics demo written by groepaz.
|
|
|
|
Platforms: The program needs a VIC-II or a TED, so it runs on the following
|
|
|
|
systems:
|
|
|
|
C64, C128, CBM510, Plus/4.
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
2022-02-05 15:55:57 +00:00
|
|
|
gamate:
|
|
|
|
-------
|
|
|
|
|
|
|
|
Name: nachtm
|
|
|
|
Description: Plays "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart.
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
sym1:
|
|
|
|
-----
|
|
|
|
|
|
|
|
Name: symHello
|
|
|
|
Description: Hello World for Sym-1
|
|
|
|
|
|
|
|
Name: symTiny
|
|
|
|
Description: Hello World for Sym-1 (tiny version without printf)
|
|
|
|
|
|
|
|
Name: symDisplay
|
|
|
|
Description: Sym-1 front panel display example
|
|
|
|
|
|
|
|
Name: symIO
|
|
|
|
Description: Sym-1 digital I/O interface example
|
|
|
|
|
|
|
|
Name: symNotepad
|
|
|
|
Description: Sym-1 Notepad
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
2021-10-22 23:18:17 +00:00
|
|
|
|
|
|
|
supervision:
|
|
|
|
------------
|
|
|
|
|
|
|
|
Name: hello
|
|
|
|
Description: A "Hello world" type program.
|
|
|
|
Platforms: Runs on only the Watara Supervision game console.
|
|
|
|
----------------------------------------------------------------------------
|