Changed multi-line C comments into another style.
The left side doesn't look unbalanced.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Enumerate devices, directories and files.
|
||||
*
|
||||
* 2012-10-15, Oliver Schmidt (ol.sc@web.de)
|
||||
*
|
||||
*/
|
||||
** Enumerate devices, directories and files.
|
||||
**
|
||||
** 2012-10-15, Oliver Schmidt (ol.sc@web.de)
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -30,21 +30,21 @@ void printdir (char *newdir)
|
||||
if (chdir (newdir)) {
|
||||
|
||||
/* If chdir() fails we just print the
|
||||
* directory name - as done for files.
|
||||
*/
|
||||
** directory name - as done for files.
|
||||
*/
|
||||
printf (" Dir %s\n", newdir);
|
||||
return;
|
||||
}
|
||||
|
||||
/* We call getcwd() in order to print the
|
||||
* absolute pathname for a subdirectory.
|
||||
*/
|
||||
** absolute pathname for a subdirectory.
|
||||
*/
|
||||
getcwd (curdir, sizeof (curdir));
|
||||
printf (" Dir %s:\n", curdir);
|
||||
|
||||
/* Calling opendir() always with "." avoids
|
||||
* fiddling around with pathname separators.
|
||||
*/
|
||||
** fiddling around with pathname separators.
|
||||
*/
|
||||
dir = opendir (".");
|
||||
while (ent = readdir (dir)) {
|
||||
|
||||
@@ -54,9 +54,9 @@ void printdir (char *newdir)
|
||||
}
|
||||
|
||||
/* We defer handling of subdirectories until we're done with the
|
||||
* current one as several targets don't support other disk i/o
|
||||
* while reading a directory (see cc65 readdir() doc for more).
|
||||
*/
|
||||
** current one as several targets don't support other disk i/o
|
||||
** while reading a directory (see cc65 readdir() doc for more).
|
||||
*/
|
||||
if (_DE_ISDIR (ent->d_type)) {
|
||||
subdirs = realloc (subdirs, FILENAME_MAX * (dirnum + 1));
|
||||
strcpy (subdirs + FILENAME_MAX * dirnum++, ent->d_name);
|
||||
@@ -79,15 +79,15 @@ void main (void)
|
||||
char devicedir[FILENAME_MAX];
|
||||
|
||||
/* Calling getfirstdevice()/getnextdevice() does _not_ turn on the motor
|
||||
* of a drive-type device and does _not_ check for a disk in the drive.
|
||||
*/
|
||||
** of a drive-type device and does _not_ check for a disk in the drive.
|
||||
*/
|
||||
device = getfirstdevice ();
|
||||
while (device != INVALID_DEVICE) {
|
||||
printf ("Device %d:\n", device);
|
||||
|
||||
/* Calling getdevicedir() _does_ check for a (formatted) disk in a
|
||||
* floppy-disk-type device and returns NULL if that check fails.
|
||||
*/
|
||||
** floppy-disk-type device and returns NULL if that check fails.
|
||||
*/
|
||||
if (getdevicedir (device, devicedir, sizeof (devicedir))) {
|
||||
printdir (devicedir);
|
||||
} else {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*****************************************************************************
|
||||
* fire test program for cc65. *
|
||||
* *
|
||||
* (w)2002 by groepaz/hitmen *
|
||||
* *
|
||||
* Cleanup and porting by Ullrich von Bassewitz. *
|
||||
* 2004-06-08, Greg King *
|
||||
* *
|
||||
*****************************************************************************/
|
||||
/*****************************************************************************\
|
||||
** fire test program for cc65. **
|
||||
** **
|
||||
** (w)2002 by groepaz/hitmen **
|
||||
** **
|
||||
** Cleanup and porting by Ullrich von Bassewitz. **
|
||||
** 2004-06-08, Greg King **
|
||||
** **
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
@@ -187,8 +187,8 @@ int main (void)
|
||||
#endif
|
||||
#if defined(__C128__)
|
||||
/* Save and change some flags, so that kernal/basic interrupt handler will
|
||||
* not interfere with our routine.
|
||||
*/
|
||||
** not interfere with our routine.
|
||||
*/
|
||||
initflag = *(unsigned char*) 0xA04;
|
||||
*(unsigned char*) 0xA04 &= 0xFE;
|
||||
graphflag = *(unsigned char*) 0xD8;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Minimalistic GEOSLib bitmap demo program
|
||||
*
|
||||
* 2012-06-10, Oliver Schmidt (ol.sc@web.de)
|
||||
*
|
||||
* To create bitmap.c use the sp65 sprite and bitmap utility:
|
||||
* sp65 -r logo.pcx -c geos-bitmap -w bitmap.c,ident=bitmap
|
||||
*
|
||||
*/
|
||||
** Minimalistic GEOSLib bitmap demo program
|
||||
**
|
||||
** 2012-06-10, Oliver Schmidt (ol.sc@web.de)
|
||||
**
|
||||
** To create bitmap.c use the sp65 sprite and bitmap utility:
|
||||
** sp65 -r logo.pcx -c geos-bitmap -w bitmap.c,ident=bitmap
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#include <conio.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Note:
|
||||
* This is just a sample piece of code that shows how to use some structs -
|
||||
* it may not even run.
|
||||
*/
|
||||
** This is just a sample piece of code that shows how to use some structs -
|
||||
** it may not even run.
|
||||
*/
|
||||
|
||||
|
||||
#include <geos.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Note:
|
||||
* This is just a sample piece of code that shows how to use some structs -
|
||||
* it may not even run.
|
||||
*/
|
||||
** This is just a sample piece of code that shows how to use some structs -
|
||||
** it may not even run.
|
||||
*/
|
||||
|
||||
|
||||
#include <geos.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Note:
|
||||
* This is just a sample piece of code that shows how to use some structs -
|
||||
* it may not even run.
|
||||
*/
|
||||
** This is just a sample piece of code that shows how to use some structs -
|
||||
** it may not even run.
|
||||
*/
|
||||
|
||||
|
||||
#include <geos.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Note:
|
||||
* This is just a sample piece of code that shows how to use some structs -
|
||||
* it may not even run.
|
||||
*/
|
||||
** This is just a sample piece of code that shows how to use some structs -
|
||||
** it may not even run.
|
||||
*/
|
||||
|
||||
|
||||
#include <geos.h>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Minimalistic GEOSLib overlay demo program
|
||||
*
|
||||
* 2012-01-01, Oliver Schmidt (ol.sc@web.de)
|
||||
*
|
||||
*/
|
||||
** Minimalistic GEOSLib overlay demo program
|
||||
**
|
||||
** 2012-01-01, Oliver Schmidt (ol.sc@web.de)
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
|
||||
/* Functions resident in an overlay can call back functions resident in the
|
||||
* main program at any time without any precautions. The function show() is
|
||||
* an example for such a function resident in the main program.
|
||||
*/
|
||||
** main program at any time without any precautions. The function show() is
|
||||
** an example for such a function resident in the main program.
|
||||
*/
|
||||
void show(char *name)
|
||||
{
|
||||
char line1[40];
|
||||
@@ -24,18 +24,18 @@ void show(char *name)
|
||||
}
|
||||
|
||||
/* In a real-world overlay program one would probably not use a #pragma but
|
||||
* rather place the all the code of certain source files into the overlay by
|
||||
* compiling them with --code-name OVERLAY1.
|
||||
*/
|
||||
** rather place the all the code of certain source files into the overlay by
|
||||
** compiling them with --code-name OVERLAY1.
|
||||
*/
|
||||
#pragma code-name(push, "OVERLAY1");
|
||||
|
||||
void foo(void)
|
||||
{
|
||||
/* Functions resident in an overlay can access all program variables and
|
||||
* constants at any time without any precautions because those are never
|
||||
* placed in overlays. The string constant "One" is an example for such
|
||||
* a constant resident in the main program.
|
||||
*/
|
||||
** constants at any time without any precautions because those are never
|
||||
** placed in overlays. The string constant "One" is an example for such
|
||||
** a constant resident in the main program.
|
||||
*/
|
||||
show("One");
|
||||
}
|
||||
|
||||
@@ -78,18 +78,18 @@ void main(int /*argc*/, char *argv[])
|
||||
}
|
||||
|
||||
/* The macro definitions OVERLAY_ADDR and OVERLAY_SIZE were generated in
|
||||
* overlay-demores.h by grc65. They contain the overlay area address and
|
||||
* size specific to a certain program.
|
||||
*/
|
||||
** overlay-demores.h by grc65. They contain the overlay area address and
|
||||
** size specific to a certain program.
|
||||
*/
|
||||
if (ReadRecord(OVERLAY_ADDR, OVERLAY_SIZE)) {
|
||||
_poserror("ReadRecord.1");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The linker makes sure that the call to foo() ends up at the right mem
|
||||
* addr. However it's up to user to make sure that the - right - overlay
|
||||
* is actually loaded before making the the call.
|
||||
*/
|
||||
** addr. However, it's up to user to make sure that the -- right -- overlay
|
||||
** actually is loaded before making the call.
|
||||
*/
|
||||
foo();
|
||||
|
||||
DlgBoxOk(CBOLDON "Overlay Demo - Main" CPLAINTEXT,
|
||||
@@ -101,8 +101,8 @@ void main(int /*argc*/, char *argv[])
|
||||
}
|
||||
|
||||
/* Replacing one overlay with another one can only happen from the main
|
||||
* program. This implies that an overlay can never load another overlay.
|
||||
*/
|
||||
** program. This implies that an overlay can never load another overlay.
|
||||
*/
|
||||
if (ReadRecord(OVERLAY_ADDR, OVERLAY_SIZE)) {
|
||||
_poserror("ReadRecord.2");
|
||||
return;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* gunzip65 - a gunzip utility for 6502-based machines.
|
||||
*
|
||||
* Piotr Fusik <fox@scene.pl>
|
||||
*
|
||||
* This should be considered as a test of my zlib-compatible library
|
||||
* rather than a real application.
|
||||
* It's not user-friendly, fault-tolerant, whatever.
|
||||
* However, it really works for real GZIP files, provided they are small
|
||||
* enough to fit in buffer[] (after decompression!).
|
||||
*/
|
||||
** gunzip65 - a gunzip utility for 6502-based machines.
|
||||
**
|
||||
** Piotr Fusik <fox@scene.pl>
|
||||
**
|
||||
** This should be considered as a test of my zlib-compatible library
|
||||
** rather than a real application.
|
||||
** It's not user-friendly, fault-tolerant, whatever.
|
||||
** However, it really works for real GZIP files, provided they are small
|
||||
** enough to fit in buffer[] (after decompression!).
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
#ifndef __CC65__
|
||||
/*
|
||||
* Emulate inflatemem() if using original zlib.
|
||||
* As you can see, this program is quite portable.
|
||||
*/
|
||||
** Emulate inflatemem() if using original zlib.
|
||||
** As you can see, this program is quite portable.
|
||||
*/
|
||||
unsigned inflatemem(char* dest, const char* source)
|
||||
{
|
||||
z_stream stream;
|
||||
@@ -41,26 +41,26 @@ unsigned inflatemem(char* dest, const char* source)
|
||||
#endif /* __CC65__ */
|
||||
|
||||
/*
|
||||
* Structure of a GZIP file:
|
||||
*
|
||||
* 1. GZIP header:
|
||||
* Offset 0: Signature (2 bytes: 0x1f, 0x8b)
|
||||
* Offset 2: Compression method (1 byte: 8 == "deflate")
|
||||
* Offset 3: Flags (1 byte: see below)
|
||||
* Offset 4: File date and time (4 bytes)
|
||||
* Offset 8: Extra flags (1 byte)
|
||||
* Offset 9: Target OS (1 byte: DOS, Amiga, Unix, etc.)
|
||||
* if (flags & FEXTRA) { 2 bytes of length, then length bytes }
|
||||
* if (flags & FNAME) { ASCIIZ filename }
|
||||
* if (flags & FCOMMENT) { ASCIIZ comment }
|
||||
* if (flags & FHCRC) { 2 bytes of CRC }
|
||||
*
|
||||
* 2. Deflate compressed data.
|
||||
*
|
||||
* 3. GZIP trailer:
|
||||
* Offset 0: CRC-32 (4 bytes)
|
||||
* Offset 4: uncompressed file length (4 bytes)
|
||||
*/
|
||||
** Structure of a GZIP file:
|
||||
**
|
||||
** 1. GZIP header:
|
||||
** Offset 0: Signature (2 bytes: 0x1f, 0x8b)
|
||||
** Offset 2: Compression method (1 byte: 8 == "deflate")
|
||||
** Offset 3: Flags (1 byte: see below)
|
||||
** Offset 4: File date and time (4 bytes)
|
||||
** Offset 8: Extra flags (1 byte)
|
||||
** Offset 9: Target OS (1 byte: DOS, Amiga, Unix, etc.)
|
||||
** if (flags & FEXTRA) { 2 bytes of length, then length bytes }
|
||||
** if (flags & FNAME) { ASCIIZ filename }
|
||||
** if (flags & FCOMMENT) { ASCIIZ comment }
|
||||
** if (flags & FHCRC) { 2 bytes of CRC }
|
||||
**
|
||||
** 2. Deflate compressed data.
|
||||
**
|
||||
** 3. GZIP trailer:
|
||||
** Offset 0: CRC-32 (4 bytes)
|
||||
** Offset 4: uncompressed file length (4 bytes)
|
||||
*/
|
||||
|
||||
/* Flags in the GZIP header. */
|
||||
#define FTEXT 1 /* Extra text */
|
||||
@@ -70,28 +70,28 @@ unsigned inflatemem(char* dest, const char* source)
|
||||
#define FCOMMENT 16 /* File comment */
|
||||
|
||||
/*
|
||||
* We read whole GZIP file into this buffer.
|
||||
* Then we use this buffer for the decompressed data.
|
||||
*/
|
||||
** We read whole GZIP file into this buffer.
|
||||
** Then we use this buffer for the decompressed data.
|
||||
*/
|
||||
static unsigned char buffer[26000];
|
||||
|
||||
/*
|
||||
* Get a 16-bit little-endian unsigned number, using unsigned char* p.
|
||||
* On many machines this could be (*(unsigned short*) p),
|
||||
* but I really like portability. :-)
|
||||
*/
|
||||
** Get a 16-bit little-endian unsigned number, using unsigned char* p.
|
||||
** On many machines this could be (*(unsigned short*) p),
|
||||
** but I really like portability. :-)
|
||||
*/
|
||||
#define GET_WORD(p) (*(p) + ((unsigned) (p)[1] << 8))
|
||||
|
||||
/* Likewise, for a 32-bit number. */
|
||||
#define GET_LONG(p) (GET_WORD(p) + ((unsigned long) GET_WORD(p + 2) << 16))
|
||||
|
||||
/*
|
||||
* Uncompress a GZIP file.
|
||||
* On entry, buffer[] should contain the whole GZIP file contents,
|
||||
* and the argument complen should be equal to the length of the GZIP file.
|
||||
* On return, buffer[] contains the uncompressed data, and the returned
|
||||
* value is the length of the uncompressed data.
|
||||
*/
|
||||
** Uncompress a GZIP file.
|
||||
** On entry, buffer[] should contain the whole GZIP file contents,
|
||||
** and the argument complen should be equal to the length of the GZIP file.
|
||||
** On return, buffer[] contains the uncompressed data, and the returned
|
||||
** value is the length of the uncompressed data.
|
||||
*/
|
||||
unsigned uncompress_buffer(unsigned complen)
|
||||
{
|
||||
unsigned char* ptr;
|
||||
@@ -134,19 +134,19 @@ unsigned uncompress_buffer(unsigned complen)
|
||||
ptr += 2;
|
||||
|
||||
/*
|
||||
* calculate length of raw "deflate" data
|
||||
* (without the GZIP header and 8-byte trailer)
|
||||
*/
|
||||
** calculate length of raw "deflate" data
|
||||
** (without the GZIP header and 8-byte trailer)
|
||||
*/
|
||||
complen -= (ptr - buffer) + 8;
|
||||
|
||||
/*
|
||||
* We will move the compressed data to the end of buffer[].
|
||||
* Thus the compressed data and the decompressed data (written from
|
||||
* the beginning of buffer[]) may overlap, as long as the decompressed
|
||||
* data doesn't go further than unread compressed data.
|
||||
* ptr2 points to the beginning of compressed data at the end
|
||||
* of buffer[].
|
||||
*/
|
||||
** We will move the compressed data to the end of buffer[].
|
||||
** Thus the compressed data and the decompressed data (written from
|
||||
** the beginning of buffer[]) may overlap, as long as the decompressed
|
||||
** data doesn't go further than unread compressed data.
|
||||
** ptr2 points to the beginning of compressed data at the end
|
||||
** of buffer[].
|
||||
*/
|
||||
ptr2 = buffer + sizeof(buffer) - complen;
|
||||
/* move the compressed data to end of buffer[] */
|
||||
memmove(ptr2, ptr, complen);
|
||||
@@ -173,8 +173,8 @@ unsigned uncompress_buffer(unsigned complen)
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a filename from standard input.
|
||||
*/
|
||||
** Get a filename from standard input.
|
||||
*/
|
||||
char* get_fname(void)
|
||||
{
|
||||
static char filename[100];
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Fancy hello world program using cc65.
|
||||
*
|
||||
* Ullrich von Bassewitz (ullrich@von-bassewitz.de)
|
||||
*
|
||||
*/
|
||||
** Fancy hello world program using cc65.
|
||||
**
|
||||
** Ullrich von Bassewitz (ullrich@von-bassewitz.de)
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*****************************************************************************
|
||||
* mandelbrot sample program for cc65. *
|
||||
* *
|
||||
* (w)2002 by groepaz/hitmen, TGI support by Stefan Haubenthal *
|
||||
*****************************************************************************/
|
||||
/*****************************************************************************\
|
||||
** mandelbrot sample program for cc65. **
|
||||
** **
|
||||
** (w) 2002 by groepaz/hitmen, TGI support by Stefan Haubenthal **
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Extended memory overlay demo program.
|
||||
*
|
||||
* Shows how to combine multiple cc65 features
|
||||
* incl. overlays and extended memory drivers.
|
||||
*
|
||||
* 2012-17-07, Oliver Schmidt (ol.sc@web.de)
|
||||
*
|
||||
*/
|
||||
** Extended memory overlay demo program.
|
||||
**
|
||||
** Shows how to combine multiple cc65 features
|
||||
** incl. overlays and extended memory drivers.
|
||||
**
|
||||
** 2012-17-07, Oliver Schmidt (ol.sc@web.de)
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
|
||||
/* The symbols _OVERLAY?_LOAD__ and _OVERLAY?_SIZE__ were generated by the
|
||||
* linker. They contain the overlay area address and size specific to a
|
||||
* certain program.
|
||||
*/
|
||||
** linker. They contain the overlay area address and size specific to a
|
||||
** certain program.
|
||||
*/
|
||||
extern void _OVERLAY1_LOAD__[], _OVERLAY1_SIZE__[];
|
||||
extern void _OVERLAY2_LOAD__[], _OVERLAY2_SIZE__[];
|
||||
extern void _OVERLAY3_LOAD__[], _OVERLAY3_SIZE__[];
|
||||
@@ -45,24 +45,24 @@ struct {
|
||||
|
||||
|
||||
/* Functions resident in an overlay can call back functions resident in the
|
||||
* main program at any time without any precautions. The function log() is
|
||||
* an example for such a function resident in the main program.
|
||||
*/
|
||||
** main program at any time without any precautions. The function log() is
|
||||
** an example for such a function resident in the main program.
|
||||
*/
|
||||
void log (char *msg)
|
||||
{
|
||||
/* Functions resident in an overlay can access all program variables and
|
||||
* constants at any time without any precautions because those are never
|
||||
* placed in overlays. The string constant below is an example for such
|
||||
* a constant resident in the main program.
|
||||
*/
|
||||
** constants at any time without any precautions because those are never
|
||||
** placed in overlays. The string constant below is an example for such
|
||||
** a constant resident in the main program.
|
||||
*/
|
||||
printf ("Log: %s\n", msg);
|
||||
}
|
||||
|
||||
|
||||
/* In a real-world overlay program one would probably not use a #pragma but
|
||||
* rather place all the code of certain source files into the overlay by
|
||||
* compiling them with --code-name OVERLAY1.
|
||||
*/
|
||||
** rather place all the code of certain source files into the overlay by
|
||||
** compiling them with --code-name OVERLAY1.
|
||||
*/
|
||||
#pragma code-name (push, "OVERLAY1");
|
||||
|
||||
void foo (void)
|
||||
@@ -235,15 +235,15 @@ void main (void)
|
||||
log ("Calling overlay 1 from main");
|
||||
|
||||
/* The linker makes sure that the call to foo() ends up at the right mem
|
||||
* addr. However it's up to user to make sure that the - right - overlay
|
||||
* is actually loaded before making the the call.
|
||||
*/
|
||||
** addr. However it's up to user to make sure that the - right - overlay
|
||||
** is actually loaded before making the the call.
|
||||
*/
|
||||
foo ();
|
||||
}
|
||||
|
||||
/* Replacing one overlay with another one can only happen from the main
|
||||
* program. This implies that an overlay can never load another overlay.
|
||||
*/
|
||||
** program. This implies that an overlay can never load another overlay.
|
||||
*/
|
||||
if (loadoverlay (2)) {
|
||||
log ("Calling overlay 2 from main");
|
||||
bar ();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart, KV 525
|
||||
*
|
||||
* First version in 1987 by
|
||||
* Joachim von Bassewitz (joachim@von-bassewitz.de) and
|
||||
* Ullrich von Bassewitz (ullrich@von-bassewitz.de).
|
||||
*
|
||||
* C conversion in 1998 by
|
||||
* Ullrich von Bassewitz (ullrich@von-bassewitz.de)
|
||||
*
|
||||
*/
|
||||
** "Eine kleine Nachtmusik" by Wolfgang Amadeus Mozart, KV 525
|
||||
**
|
||||
** First version in 1987 by
|
||||
** Joachim von Bassewitz (joachim@von-bassewitz.de) and
|
||||
** Ullrich von Bassewitz (ullrich@von-bassewitz.de).
|
||||
**
|
||||
** C conversion in 1998 by
|
||||
** Ullrich von Bassewitz (ullrich@von-bassewitz.de)
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -28,17 +28,17 @@
|
||||
|
||||
|
||||
/* Tables with voice data.
|
||||
*
|
||||
* Bit Description
|
||||
* -------------------------------------------
|
||||
* 15 Pause bit.
|
||||
* 12-14 Octave
|
||||
* 8-11 Tone (index into frequency table)
|
||||
* 7 Unused. Was thought as a control bit in the original version to
|
||||
* change SID parameters, but this was never implemented.
|
||||
* 0-6 Length of the tone in ticks.
|
||||
*
|
||||
*/
|
||||
**
|
||||
** Bit Description
|
||||
** -------------------------------------------
|
||||
** 15 Pause bit.
|
||||
** 12-14 Octave
|
||||
** 8-11 Tone (index into frequency table)
|
||||
** 7 Unused. Was thought as a control bit in the original version to
|
||||
** change SID parameters, but this was never implemented.
|
||||
** 0-6 Length of the tone in ticks.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -922,8 +922,8 @@ static clock_t StartTime;
|
||||
#define TICKS_PER_TONE 4
|
||||
|
||||
/* Done flag. Contains one bit for each voice. Will contain 0x07 if all
|
||||
* voices have finished playing.
|
||||
*/
|
||||
** voices have finished playing.
|
||||
*/
|
||||
static unsigned char Done;
|
||||
|
||||
|
||||
@@ -1038,8 +1038,8 @@ static void DisplayTime (void)
|
||||
|
||||
|
||||
/* On the 510/610, the SID is in another bank (the system bank), so we cannot
|
||||
* just write to the memory space.
|
||||
*/
|
||||
** just write to the memory space.
|
||||
*/
|
||||
#if defined(__CBM510__) || defined(__CBM610__)
|
||||
# define outb(addr,val) pokebsys ((unsigned)(addr), val)
|
||||
# define outw(addr,val) pokewsys ((unsigned)(addr), val)
|
||||
@@ -1149,9 +1149,9 @@ int main (void)
|
||||
}
|
||||
} else {
|
||||
/* Decrement the ticks. If this is the last tick of a tone,
|
||||
* reset bit 0 of the trigger value and write it back to the
|
||||
* SID to start the release phase.
|
||||
*/
|
||||
** reset bit 0 of the trigger value and write it back to the
|
||||
** SID to start the release phase.
|
||||
*/
|
||||
if (--(VC->Ticks) == 0) {
|
||||
outb (&Voice->ctrl, VC->Trigger & 0xFE);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Minimalistic overlay demo program.
|
||||
*
|
||||
* Shows how to load overlay files from disk.
|
||||
*
|
||||
* 2009-10-02, Oliver Schmidt (ol.sc@web.de)
|
||||
*
|
||||
*/
|
||||
** Minimalistic overlay demo program.
|
||||
**
|
||||
** Shows how to load overlay files from disk.
|
||||
**
|
||||
** 2009-10-02, Oliver Schmidt (ol.sc@web.de)
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ extern void _OVERLAY3_LOAD__[], _OVERLAY3_SIZE__[];
|
||||
|
||||
|
||||
/* Functions resident in an overlay can call back functions resident in the
|
||||
* main program at any time without any precautions. The function log() is
|
||||
* an example for such a function resident in the main program.
|
||||
*/
|
||||
** main program at any time without any precautions. The function log() is
|
||||
** an example for such a function resident in the main program.
|
||||
*/
|
||||
void log (char *msg)
|
||||
{
|
||||
printf ("Log: %s\n", msg);
|
||||
@@ -35,18 +35,18 @@ void log (char *msg)
|
||||
|
||||
|
||||
/* In a real-world overlay program one would probably not use a #pragma but
|
||||
* rather place all the code of certain source files into the overlay by
|
||||
* compiling them with --code-name OVERLAY1.
|
||||
*/
|
||||
** rather place all the code of certain source files into the overlay by
|
||||
** compiling them with --code-name OVERLAY1.
|
||||
*/
|
||||
#pragma code-name (push, "OVERLAY1");
|
||||
|
||||
void foo (void)
|
||||
{
|
||||
/* Functions resident in an overlay can access all program variables and
|
||||
* constants at any time without any precautions because those are never
|
||||
* placed in overlays. The string constant below is an example for such
|
||||
* a constant resident in the main program.
|
||||
*/
|
||||
** constants at any time without any precautions because those are never
|
||||
** placed in overlays. The string constant below is an example for such
|
||||
** a constant resident in the main program.
|
||||
*/
|
||||
log ("Calling main from overlay 1");
|
||||
}
|
||||
|
||||
@@ -104,23 +104,23 @@ void main (void)
|
||||
log ("Calling overlay 1 from main");
|
||||
|
||||
/* The symbols _OVERLAY1_LOAD__ and _OVERLAY1_SIZE__ were generated by the
|
||||
* linker. They contain the overlay area address and size specific to a
|
||||
* certain program.
|
||||
*/
|
||||
** linker. They contain the overlay area address and size specific to a
|
||||
** certain program.
|
||||
*/
|
||||
if (loadfile ("ovrldemo.1", _OVERLAY1_LOAD__, _OVERLAY1_SIZE__)) {
|
||||
|
||||
/* The linker makes sure that the call to foo() ends up at the right mem
|
||||
* addr. However it's up to user to make sure that the - right - overlay
|
||||
* is actually loaded before making the the call.
|
||||
*/
|
||||
** addr. However it's up to user to make sure that the - right - overlay
|
||||
** is actually loaded before making the the call.
|
||||
*/
|
||||
foo ();
|
||||
}
|
||||
|
||||
log ("Calling overlay 2 from main");
|
||||
|
||||
/* Replacing one overlay with another one can only happen from the main
|
||||
* program. This implies that an overlay can never load another overlay.
|
||||
*/
|
||||
** program. This implies that an overlay can never load another overlay.
|
||||
*/
|
||||
if (loadfile ("ovrldemo.2", _OVERLAY2_LOAD__, _OVERLAY2_SIZE__)) {
|
||||
bar ();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*****************************************************************************
|
||||
* plasma test program for cc65. *
|
||||
* *
|
||||
* (w)2001 by groepaz/hitmen *
|
||||
* *
|
||||
* Cleanup and porting by Ullrich von Bassewitz. *
|
||||
* *
|
||||
*****************************************************************************/
|
||||
/*****************************************************************************\
|
||||
** plasma test program for cc65. **
|
||||
** **
|
||||
** (w)2001 by groepaz/hitmen **
|
||||
** **
|
||||
** Cleanup and porting by Ullrich von Bassewitz. **
|
||||
** **
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
@@ -121,9 +121,9 @@ static void doplasma (register unsigned char* scrn)
|
||||
c2B -= 3;
|
||||
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.
|
||||
*/
|
||||
** nearly 100% (~24fps), but it will also increase the code
|
||||
** size a lot.
|
||||
*/
|
||||
for (i = 0; i < 40; ++i, ++scrn) {
|
||||
*scrn = (xbuf[i] + ybuf[ii]);
|
||||
}
|
||||
@@ -203,9 +203,9 @@ int main (void)
|
||||
outb (&CIA2.pra, (block & 0xFC) | ((SCREEN1 >> 14) ^ 0x03));
|
||||
#endif
|
||||
#if defined(__C128__)
|
||||
/* Save and change some flags, so that kernal/basic interupt handler will
|
||||
* not interfere with our routine.
|
||||
*/
|
||||
/* Save and change some flags, so that kernal/basic interrupt handler will
|
||||
** not interfere with our routine.
|
||||
*/
|
||||
initflag = *(unsigned char*) 0xA04;
|
||||
*(unsigned char*) 0xA04 &= 0xFE;
|
||||
graphflag = *(unsigned char*) 0xD8;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Calculate all primes up to a specific number.
|
||||
*/
|
||||
** Calculate all primes up to a specific number.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user