Added the plasma sample to the README file.

Added a comment about loop unrolling to the plasma source.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1016 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-10-09 09:34:21 +00:00
parent fc253be753
commit 58da15412c
2 changed files with 18 additions and 8 deletions

View File

@@ -1,10 +1,10 @@
This directory contains sample programs for the cc65 compiler. This directory contains sample programs for the cc65 compiler.
Below is a short description for each of the programs together with a list of Below is a short description for each of the programs together with a list of
the supported platforms. the supported platforms.
Please note: Please note:
* The supplied makefile needs with GNU make. It works out of the box on * The supplied makefile needs with GNU make. It works out of the box on
Linux and similar systems. If you're using Windows, you will have to Linux and similar systems. If you're using Windows, you will have to
@@ -18,27 +18,33 @@ Please note:
List of supplied sample programs: List of supplied sample programs:
--------------------------------------------------------------------------- -----------------------------------------------------------------------------
Name: hello Name: hello
Description: A fancy "Hello world" type program that uses the conio Description: A fancy "Hello world" type program that uses the conio
console I/O library for output. console I/O library for output.
Platforms: Runs on all platforms that support conio, which means: Platforms: Runs on all platforms that support conio, which means:
Apple ][, Atari, C64, C128, CBM510, CBM610, PET, Plus/4 Apple ][, Atari, C64, C128, CBM510, CBM610, PET, Plus/4
--------------------------------------------------------------------------- -----------------------------------------------------------------------------
Name: mousedemo Name: mousedemo
Description: Shows how to use the mouse. Description: Shows how to use the mouse.
Platforms: All systems with mouse and conio support: Platforms: All systems with mouse and conio support:
Atari (untested), C64, C128 and CBM510 Atari (untested), C64, C128 and CBM510
--------------------------------------------------------------------------- -----------------------------------------------------------------------------
Name: nachtm Name: nachtm
Description: Plays "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart Description: Plays "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart
Platforms: All systems that have the Commodore SID (Sound Interface Platforms: All systems that have the Commodore SID (Sound Interface
Device): Device):
C64, C128, CBM510, CBM610 C64, C128, CBM510, CBM610
--------------------------------------------------------------------------- -----------------------------------------------------------------------------
Name: plasma
Description: A fancy graphics demo written by groepaz/hitmen.
Platforms: The program needs a VIC but has not been ported to / tested
on the C128, so it does currently run on the CBM510 and C64.
-----------------------------------------------------------------------------
Name: sieve Name: sieve
Description: Implements the "Sieve of Eratosthenes" as a way to find all Description: Implements the "Sieve of Eratosthenes" as a way to find all
prime numbers in a specific number interval. Often used as prime numbers in a specific number interval. Often used as
@@ -46,4 +52,4 @@ Description: Implements the "Sieve of Eratosthenes" as a way to find all
Platforms: All systems with conio and clock support: Platforms: All systems with conio and clock support:
Atari, C64, C128, CBM510, CBM610, PET, Plus/4 Atari, C64, C128, CBM510, CBM610, PET, Plus/4

View File

@@ -112,6 +112,10 @@ static void doplasma (void)
c2A += 2; c2A += 2;
c2B -= 3; c2B -= 3;
for (ii = 0; ii < 25; ++ii) { for (ii = 0; ii < 25; ++ii) {
/* Unrolling the following loop will give a speed increase of
* nearly 100% (~24fps), but it will also increase the code
* size a lot.
*/
for (i = 0; i < 40; ++i, ++scrn) { for (i = 0; i < 40; ++i, ++scrn) {
*scrn = (xbuf[i] + ybuf[ii]); *scrn = (xbuf[i] + ybuf[ii]);
} }