-/*****************************************************************************
- * 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. **
+** **
+\*****************************************************************************/
#include <stdlib.h>
#include <time.h>
#include <conio.h>
+#include <cc65.h>
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]);
}
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;
gotoxy (0, 1); cprintf ("frames: %lu", f);
gotoxy (0, 2); cprintf ("fps : %lu.%u", fps, fps10);
- /* Wait for a key, then end */
- cputsxy (0, 4, "Press any key when done...");
- (void) cgetc ();
+ if (doesclrscrafterexit ()) {
+ cputsxy (0, 4, "Press any key when done...");
+ (void) cgetc ();
+ }
/* Done */
return EXIT_SUCCESS;
}
-
-