mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-26 12:49:21 +00:00
Nuw using #include<> in test files where possible.
This commit is contained in:
parent
5ff8fce61d
commit
8c5500822c
@ -151,7 +151,7 @@ fragment NAME_START : [a-zA-Z_];
|
|||||||
fragment NAME_CHAR : [a-zA-Z0-9_];
|
fragment NAME_CHAR : [a-zA-Z0-9_];
|
||||||
|
|
||||||
// Strings and chars - with special handling of imports
|
// Strings and chars - with special handling of imports
|
||||||
SYSTEMFILE : '<' [a-zA-Z0-9_./\\]+ '>' { if(importEnter) { importEnter=false; cParser.loadCFile(getText(), true); } } ;
|
SYSTEMFILE : '<' [a-zA-Z0-9_./\\\-]+ '>' { if(importEnter) { importEnter=false; cParser.loadCFile(getText(), true); } } ;
|
||||||
STRING : '"' ('\\"' | ~'"')* '"' [z]?([ps][mu]?)?[z]? { if(importEnter) { importEnter=false; cParser.loadCFile(getText(), false); } } ;
|
STRING : '"' ('\\"' | ~'"')* '"' [z]?([ps][mu]?)?[z]? { if(importEnter) { importEnter=false; cParser.loadCFile(getText(), false); } } ;
|
||||||
CHAR : '\'' ('\\'['"rfn] | ~'\'' ) '\'';
|
CHAR : '\'' ('\\'['"rfn] | ~'\'' ) '\'';
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -429,8 +429,8 @@ public class KickCLexer extends Lexer {
|
|||||||
"\u0096\u0134\2\u0136\2\u0138\2\u013a\u0097\u013c\u0098\u013e\u0099\u0140"+
|
"\u0096\u0134\2\u0136\2\u0138\2\u013a\u0097\u013c\u0098\u013e\u0099\u0140"+
|
||||||
"\u009a\u0142\2\u0144\2\u0146\u009b\u0148\u009c\u014a\u009d\4\2\3\24\4"+
|
"\u009a\u0142\2\u0144\2\u0146\u009b\u0148\u009c\u014a\u009d\4\2\3\24\4"+
|
||||||
"\2uuww\7\2dfkknnuuyy\4\2DDdd\3\2\62\63\3\2\62;\5\2\62;CHch\5\2C\\aac|"+
|
"\2uuww\7\2dfkknnuuyy\4\2DDdd\3\2\62\63\3\2\62;\5\2\62;CHch\5\2C\\aac|"+
|
||||||
"\6\2\62;C\\aac|\7\2\60;C\\^^aac|\3\2$$\3\2||\4\2rruu\4\2ooww\7\2$$))h"+
|
"\6\2\62;C\\aac|\7\2/;C\\^^aac|\3\2$$\3\2||\4\2rruu\4\2ooww\7\2$$))hhp"+
|
||||||
"hpptt\3\2))\6\2\13\f\17\17\"\"\u00a2\u00a2\4\2\f\f\17\17\4\2--//\2\u06a3"+
|
"ptt\3\2))\6\2\13\f\17\17\"\"\u00a2\u00a2\4\2\f\f\17\17\4\2--//\2\u06a3"+
|
||||||
"\2\4\3\2\2\2\2\6\3\2\2\2\2\b\3\2\2\2\2\n\3\2\2\2\2\f\3\2\2\2\2\16\3\2"+
|
"\2\4\3\2\2\2\2\6\3\2\2\2\2\b\3\2\2\2\2\n\3\2\2\2\2\f\3\2\2\2\2\16\3\2"+
|
||||||
"\2\2\2\20\3\2\2\2\2\22\3\2\2\2\2\24\3\2\2\2\2\26\3\2\2\2\2\30\3\2\2\2"+
|
"\2\2\2\20\3\2\2\2\2\22\3\2\2\2\2\24\3\2\2\2\2\26\3\2\2\2\2\30\3\2\2\2"+
|
||||||
"\2\32\3\2\2\2\2\34\3\2\2\2\2\36\3\2\2\2\2 \3\2\2\2\2\"\3\2\2\2\2$\3\2"+
|
"\2\32\3\2\2\2\2\34\3\2\2\2\2\36\3\2\2\2\2 \3\2\2\2\2\"\3\2\2\2\2$\3\2"+
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Simple single-color (320x200) bitmap routines
|
// Simple single-color (320x200) bitmap routines
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
// The adddress of the bitmap screen (used for colors)
|
// The adddress of the bitmap screen (used for colors)
|
||||||
byte* bitmap_screen;
|
byte* bitmap_screen;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// (J) https://www.c64-wiki.com/wiki/C64DTV_Programming_Guide
|
// (J) https://www.c64-wiki.com/wiki/C64DTV_Programming_Guide
|
||||||
// (H) http://dtvhacking.cbm8bit.com/dtv_wiki/images/d/d9/Dtv_registers_full.txt
|
// (H) http://dtvhacking.cbm8bit.com/dtv_wiki/images/d/d9/Dtv_registers_full.txt
|
||||||
|
|
||||||
#include "c64.kc"
|
#include <c64.kc>
|
||||||
|
|
||||||
// Feature enables or disables the extra C64 DTV features
|
// Feature enables or disables the extra C64 DTV features
|
||||||
byte* const DTV_FEATURE = $d03f;
|
byte* const DTV_FEATURE = $d03f;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// |7. | #%01111111 (127/$7f) | STOP ($ )| q ($11)|COMMODR($ )| SPACE ($20)| 2 ($32)|CONTROL($ )| <- ($1f)| 1 ($31)|
|
// |7. | #%01111111 (127/$7f) | STOP ($ )| q ($11)|COMMODR($ )| SPACE ($20)| 2 ($32)|CONTROL($ )| <- ($1f)| 1 ($31)|
|
||||||
// +----+----------------------+------------+------------+------------+------------+------------+------------+------------+------------+
|
// +----+----------------------+------------+------------+------------+------------+------------+------------+------------+------------+
|
||||||
|
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
|
|
||||||
// Keyboard Codes for all 63 keys.
|
// Keyboard Codes for all 63 keys.
|
||||||
// Keyboard Codes are %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7).
|
// Keyboard Codes are %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7).
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// In practice a good method is to wait until the raster is beyond plexFreeNextYpos() and then call plexShowSprite(). Repeat until all 32 sprites have been shown.
|
// In practice a good method is to wait until the raster is beyond plexFreeNextYpos() and then call plexShowSprite(). Repeat until all 32 sprites have been shown.
|
||||||
// TODO: Let the caller specify the number of sprites to use (or add PLEX_ENABLE[PLEX_COUNT])
|
// TODO: Let the caller specify the number of sprites to use (or add PLEX_ENABLE[PLEX_COUNT])
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
// The number of sprites in the multiplexer
|
// The number of sprites in the multiplexer
|
||||||
const char PLEX_COUNT = 32;
|
const char PLEX_COUNT = 32;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
byte* print_screen = $0400;
|
byte* print_screen = $0400;
|
||||||
byte* print_line_cursor = print_screen;
|
byte* print_line_cursor = print_screen;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
// Uses the approximation sin(x) = x - x^/6 + x^/128
|
// Uses the approximation sin(x) = x - x^/6 + x^/128
|
||||||
// Optimization possibility: Use symmetries when generating sinustables. wavelength%2==0 -> mirror symmetry over PI, wavelength%4==0 -> mirror symmetry over PI/2.
|
// Optimization possibility: Use symmetries when generating sinustables. wavelength%2==0 -> mirror symmetry over PI, wavelength%4==0 -> mirror symmetry over PI/2.
|
||||||
|
|
||||||
#include "division.kc"
|
#include <division>
|
||||||
#include "multiply.kc"
|
#include <multiply>
|
||||||
|
|
||||||
// PI*2 in u[4.28] format
|
// PI*2 in u[4.28] format
|
||||||
const dword PI2_u4f28 = $6487ed51;
|
const dword PI2_u4f28 = $6487ed51;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Table-based implementation of integer square sqr() and square root sqrt()
|
// Table-based implementation of integer square sqr() and square root sqrt()
|
||||||
|
|
||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
|
|
||||||
// The number of squares to pre-calculate. Limits what values sqr() can calculate and the result of sqrt()
|
// The number of squares to pre-calculate. Limits what values sqr() can calculate and the result of sqrt()
|
||||||
byte NUM_SQUARES = 0xff;
|
byte NUM_SQUARES = 0xff;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// C standard library stdlib.h
|
// C standard library stdlib.h
|
||||||
// Implementation of functions found int C stdlib.h / stdlib.c
|
// Implementation of functions found int C stdlib.h / stdlib.c
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
// Top of the heap used by malloc()
|
// Top of the heap used by malloc()
|
||||||
unsigned char* HEAP_TOP = 0xa000;
|
unsigned char* HEAP_TOP = 0xa000;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// C standard library time.h
|
// C standard library time.h
|
||||||
// Functions to get and manipulate date and time information.
|
// Functions to get and manipulate date and time information.
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
// Type suitable for storing the processor time.
|
// Type suitable for storing the processor time.
|
||||||
typedef unsigned long clock_t;
|
typedef unsigned long clock_t;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
byte* const SCREEN = $400;
|
byte* const SCREEN = $400;
|
||||||
byte* const BITMAP = $2000;
|
byte* const BITMAP = $2000;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Coded by Richard-William Loerakker
|
// Coded by Richard-William Loerakker
|
||||||
// Original Source https://bcaorganizer.blogspot.com/p/c-program-for_21.html?fbclid=IwAR0iL8pYcCqhCPa6LmtQ9qej-YonYVepY2cBegYRIWO0l8RPeOnTVniMAac
|
// Original Source https://bcaorganizer.blogspot.com/p/c-program-for_21.html?fbclid=IwAR0iL8pYcCqhCPa6LmtQ9qej-YonYVepY2cBegYRIWO0l8RPeOnTVniMAac
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
byte* const SCREEN = $400;
|
byte* const SCREEN = $400;
|
||||||
byte* const BITMAP = $2000;
|
byte* const BITMAP = $2000;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Illustrates problem with bitmap-draw.kc line()
|
// Illustrates problem with bitmap-draw.kc line()
|
||||||
// Reported by Janne Johansson
|
// Reported by Janne Johansson
|
||||||
|
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "bitmap-draw.kc"
|
#include <bitmap-draw>
|
||||||
|
|
||||||
byte* const SCREEN = $400;
|
byte* const SCREEN = $400;
|
||||||
byte* const BITMAP = $2000;
|
byte* const BITMAP = $2000;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Shows that bitmap2.kc line() does not have the same problem as bitmap-draw.kc
|
// Shows that bitmap2.kc line() does not have the same problem as bitmap-draw.kc
|
||||||
// See bitmap-line-anim-1.kc
|
// See bitmap-line-anim-1.kc
|
||||||
|
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "bitmap2.kc"
|
#include <bitmap2>
|
||||||
|
|
||||||
byte* const SCREEN = $400;
|
byte* const SCREEN = $400;
|
||||||
byte* const BITMAP = $2000;
|
byte* const BITMAP = $2000;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
|
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
|
||||||
// Plots simple plots
|
// Plots simple plots
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "bitmap2"
|
#include <bitmap2>
|
||||||
|
|
||||||
byte* BITMAP = 0x2000;
|
byte* BITMAP = 0x2000;
|
||||||
byte* SCREEN = 0x0400;
|
byte* SCREEN = 0x0400;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
|
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
|
||||||
// Plots a fullscreen elipsis
|
// Plots a fullscreen elipsis
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "sinus"
|
#include <sinus>
|
||||||
#include "multiply"
|
#include <multiply>
|
||||||
#include "bitmap2"
|
#include <bitmap2>
|
||||||
|
|
||||||
byte* BITMAP = 0x2000;
|
byte* BITMAP = 0x2000;
|
||||||
byte* SCREEN = 0x0400;
|
byte* SCREEN = 0x0400;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
|
// Tests the simple bitmap plotter - and counts plots per frame in an IRQ
|
||||||
// Plots a spiral
|
// Plots a spiral
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "sinus"
|
#include <sinus>
|
||||||
#include "multiply"
|
#include <multiply>
|
||||||
#include "bitmap2"
|
#include <bitmap2>
|
||||||
|
|
||||||
byte* BITMAP = 0x2000;
|
byte* BITMAP = 0x2000;
|
||||||
byte* SCREEN = 0x0400;
|
byte* SCREEN = 0x0400;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Tests the simple bitmap plotter
|
// Tests the simple bitmap plotter
|
||||||
// Plots a few lines using the bresenham line algorithm
|
// Plots a few lines using the bresenham line algorithm
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "bitmap2"
|
#include <bitmap2>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte* BITMAP = 0x2000;
|
byte* BITMAP = 0x2000;
|
||||||
byte* SCREEN = 0x0400;
|
byte* SCREEN = 0x0400;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Tests the different standard C types
|
// Tests the different standard C types
|
||||||
|
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
print_cls();
|
print_cls();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// C64DTV 8bpp charmode stretcher
|
// C64DTV 8bpp charmode stretcher
|
||||||
#include "c64dtv.kc"
|
#include <c64dtv>
|
||||||
|
|
||||||
// Plane with the screen
|
// Plane with the screen
|
||||||
byte* const SCREEN = $7c00;
|
byte* const SCREEN = $7c00;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// C64DTV 8bpp charmode stretcher
|
// C64DTV 8bpp charmode stretcher
|
||||||
#include "c64dtv.kc"
|
#include <c64dtv>
|
||||||
|
|
||||||
// Plane with all pixels
|
// Plane with all pixels
|
||||||
byte* const CHUNKY = $8000;
|
byte* const CHUNKY = $8000;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Fill a box on the screen using the blitter
|
// Fill a box on the screen using the blitter
|
||||||
|
|
||||||
#include "c64dtv.kc"
|
#include <c64dtv>
|
||||||
|
|
||||||
byte* const SCREEN = $400;
|
byte* const SCREEN = $400;
|
||||||
const byte SRCA[] = "camelot rules!";
|
const byte SRCA[] = "camelot rules!";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "c64dtv.kc"
|
#include <c64dtv>
|
||||||
|
|
||||||
byte* const SCREEN = $400;
|
byte* const SCREEN = $400;
|
||||||
const byte SRCA[] = { 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '};
|
const byte SRCA[] = { 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Test C64DTV v2 256-colors and the 16-color redefinable palette
|
// Test C64DTV v2 256-colors and the 16-color redefinable palette
|
||||||
|
|
||||||
#include "c64dtv.kc"
|
#include <c64dtv>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
asm { sei }
|
asm { sei }
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Interactive Explorer for C64DTV Screen Modes
|
// Interactive Explorer for C64DTV Screen Modes
|
||||||
#include "c64dtv.kc"
|
#include <c64dtv>
|
||||||
#include "print.kc"
|
#include <print>
|
||||||
#include "keyboard.kc"
|
#include <keyboard>
|
||||||
#include "bitmap-draw.kc"
|
#include <bitmap-draw>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
asm { sei } // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
asm { sei } // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Exploring C64DTV Screen Modes
|
// Exploring C64DTV Screen Modes
|
||||||
#include "c64dtv.kc"
|
#include <c64dtv>
|
||||||
#include "print.kc"
|
#include <print>
|
||||||
#include "keyboard.kc"
|
#include <keyboard>
|
||||||
#include "bitmap-draw.kc"
|
#include <bitmap-draw>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
asm { sei } // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
asm { sei } // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Counting cycles using a CIA timer
|
// Counting cycles using a CIA timer
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "time"
|
#include <time>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte* const SCREEN = 0x0400;
|
byte* const SCREEN = 0x0400;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Setup and run a simple CIA-timer
|
// Setup and run a simple CIA-timer
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "time"
|
#include <time>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte* const SCREEN = 0x0400;
|
byte* const SCREEN = 0x0400;
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// Clears start screen throwing around the letters (by turning them into sprites)
|
// Clears start screen throwing around the letters (by turning them into sprites)
|
||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
#include "sqr"
|
#include <sqr>
|
||||||
#include "atan2"
|
#include <atan2>
|
||||||
#include "multiply"
|
#include <multiply>
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
// Generate debug code (raster time usage etc.)
|
// Generate debug code (raster time usage etc.)
|
||||||
const bool DEBUG = false;
|
const bool DEBUG = false;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Display MEDUSA PETSCII by Buzz_clik
|
// Display MEDUSA PETSCII by Buzz_clik
|
||||||
// https://csdb.dk/release/?id=178673
|
// https://csdb.dk/release/?id=178673
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
char MEDUSA_SCREEN[1000] = kickasm(resource "medusas.prg" ) {{
|
char MEDUSA_SCREEN[1000] = kickasm(resource "medusas.prg" ) {{
|
||||||
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
.var fileScreen = LoadBinary("medusas.prg", BF_C64FILE)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
// Pre-calculated bobs inside a charset (pre-moved to all x/y-combinations)
|
// Pre-calculated bobs inside a charset (pre-moved to all x/y-combinations)
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "string"
|
#include <string>
|
||||||
#include "keyboard"
|
#include <keyboard>
|
||||||
#include "time"
|
#include <time>
|
||||||
#include "print"
|
#include <print>
|
||||||
#include "fastmultiply"
|
#include <fastmultiply>
|
||||||
|
|
||||||
// The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars)
|
// The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars)
|
||||||
// The chars are layout as follows with data in chars 0, 1, 3, 4 initially
|
// The chars are layout as follows with data in chars 0, 1, 3, 4 initially
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
// Pre-calculated bobs inside a charset (pre-moved to all x/y-combinations)
|
// Pre-calculated bobs inside a charset (pre-moved to all x/y-combinations)
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "string"
|
#include <string>
|
||||||
#include "keyboard"
|
#include <keyboard>
|
||||||
#include "time"
|
#include <time>
|
||||||
#include "print"
|
#include <print>
|
||||||
#include "fastmultiply"
|
#include <fastmultiply>
|
||||||
|
|
||||||
// The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars)
|
// The prototype BOB (a 3x3 char image with a bob image in the upper 2x2 chars)
|
||||||
// The chars are layout as follows with data in chars 0, 1, 3, 4 initially
|
// The chars are layout as follows with data in chars 0, 1, 3, 4 initially
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// Same animation using a multiplexer
|
// Same animation using a multiplexer
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "multiplexer"
|
#include <multiplexer>
|
||||||
#include "fastmultiply"
|
#include <fastmultiply>
|
||||||
#include "string"
|
#include <string>
|
||||||
#include "keyboard"
|
#include <keyboard>
|
||||||
|
|
||||||
// The BOB sprite
|
// The BOB sprite
|
||||||
align(0x1000) char SPRITE[] = kickasm(resource "smiley.png") {{
|
align(0x1000) char SPRITE[] = kickasm(resource "smiley.png") {{
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// Show a few simple splines using the splines library
|
// Show a few simple splines using the splines library
|
||||||
|
|
||||||
#include "splines"
|
#include "splines"
|
||||||
#include "bitmap2"
|
#include <bitmap2>
|
||||||
#include "time"
|
#include <time>
|
||||||
#include "print"
|
#include <print>
|
||||||
#include "fastmultiply"
|
#include <fastmultiply>
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
char* const PRINT_SCREEN = 0x0400;
|
char* const PRINT_SCREEN = 0x0400;
|
||||||
char* const BITMAP_SCREEN = 0x5c00;
|
char* const BITMAP_SCREEN = 0x5c00;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Put a 2x2 font into sprites and show it on screen
|
// Put a 2x2 font into sprites and show it on screen
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "multiplexer"
|
#include <multiplexer>
|
||||||
|
|
||||||
char * const CHARSET_DEFAULT = 0x1000;
|
char * const CHARSET_DEFAULT = 0x1000;
|
||||||
char * const SPRITES = 0x3000;
|
char * const SPRITES = 0x3000;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Tetris Game for the Commodore 64
|
// Tetris Game for the Commodore 64
|
||||||
// A sprite multiplexer covering the playfield with a black layer to allow for 3 single-pixel colors
|
// A sprite multiplexer covering the playfield with a black layer to allow for 3 single-pixel colors
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "tetris-data"
|
#include "tetris-data"
|
||||||
|
|
||||||
kickasm(pc PLAYFIELD_SPRITES, resource "playfield-sprites.png") {{
|
kickasm(pc PLAYFIELD_SPRITES, resource "playfield-sprites.png") {{
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// The tetris game tries to match NES tetris gameplay pretty closely
|
// The tetris game tries to match NES tetris gameplay pretty closely
|
||||||
// Source: https://meatfighter.com/nintendotetrisai/
|
// Source: https://meatfighter.com/nintendotetrisai/
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "keyboard"
|
#include <keyboard>
|
||||||
#include "sid"
|
#include "sid"
|
||||||
#include "tetris-data"
|
#include "tetris-data"
|
||||||
#include "tetris-render"
|
#include "tetris-render"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte* SCREEN = $0400;
|
byte* SCREEN = $0400;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Each function of the kernal is a no-args function
|
// Each function of the kernal is a no-args function
|
||||||
// The functions are placed in the SYSCALLS table surrounded by JMP and NOP
|
// The functions are placed in the SYSCALLS table surrounded by JMP and NOP
|
||||||
|
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
#pragma link("xmega65.ld")
|
#pragma link("xmega65.ld")
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "print.kc"
|
#include <print>
|
||||||
byte* const BGCOL = $d021;
|
byte* const BGCOL = $d021;
|
||||||
const byte GREEN = 5;
|
const byte GREEN = 5;
|
||||||
const byte RED = 2 ;
|
const byte RED = 2 ;
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
||||||
|
|
||||||
#include "font-hex"
|
#include "font-hex"
|
||||||
#include "atan2"
|
#include <atan2>
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte* const CHARSET = 0x2000;
|
byte* const CHARSET = 0x2000;
|
||||||
byte* const SCREEN = 0x2800;
|
byte* const SCREEN = 0x2800;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
||||||
|
|
||||||
#include "font-hex"
|
#include "font-hex"
|
||||||
#include "atan2"
|
#include <atan2>
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
byte* const CHARSET = 0x2000;
|
byte* const CHARSET = 0x2000;
|
||||||
byte* const SCREEN = 0x2800;
|
byte* const SCREEN = 0x2800;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Find atan2(x, y) using the CORDIC method
|
// Find atan2(x, y) using the CORDIC method
|
||||||
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
||||||
#include "font-hex"
|
#include "font-hex"
|
||||||
#include "atan2"
|
#include <atan2>
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
byte* const CHARSET = 0x2000;
|
byte* const CHARSET = 0x2000;
|
||||||
byte* const SCREEN = 0x2800;
|
byte* const SCREEN = 0x2800;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
// See http://bsvi.ru/uploads/CORDIC--_10EBA/cordic.pdf
|
||||||
|
|
||||||
#include "font-hex"
|
#include "font-hex"
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "atan2"
|
#include <atan2>
|
||||||
|
|
||||||
|
|
||||||
byte* const CHARSET = 0x2000;
|
byte* const CHARSET = 0x2000;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Tests problem writing/reading joystick encountered by Danny Spijksma
|
// Tests problem writing/reading joystick encountered by Danny Spijksma
|
||||||
// https://www.protovision.games/hardw/build4player.php?language=en&fbclid=IwAR1MJLgQjOU0zVa0ax2aNeGa-xVbE9IGY9zC6b6eInTV4HQzoUAoCPoXu14
|
// https://www.protovision.games/hardw/build4player.php?language=en&fbclid=IwAR1MJLgQjOU0zVa0ax2aNeGa-xVbE9IGY9zC6b6eInTV4HQzoUAoCPoXu14
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
char* const SCREEN = 0x0400;
|
char* const SCREEN = 0x0400;
|
||||||
void main() {
|
void main() {
|
||||||
(*CIA2_PORT_B) &= 0x7f;
|
(*CIA2_PORT_B) &= 0x7f;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Show default font on screen
|
// Show default font on screen
|
||||||
|
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
byte* SCREEN = 0x0400;
|
byte* SCREEN = 0x0400;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Based on facebook post from
|
* Based on facebook post from
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
void main () {
|
void main () {
|
||||||
print_cls();
|
print_cls();
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// Based on:
|
// Based on:
|
||||||
// - C= Hacking Magazine Issue 8. http://www.ffd2.com/fridge/chacking/c=hacking8.txt
|
// - C= Hacking Magazine Issue 8. http://www.ffd2.com/fridge/chacking/c=hacking8.txt
|
||||||
// - Codebase64 Article http://codebase64.org/doku.php?id=base:3d_rotation
|
// - Codebase64 Article http://codebase64.org/doku.php?id=base:3d_rotation
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
// The rotated point - updated by calling rotate_matrix()
|
// The rotated point - updated by calling rotate_matrix()
|
||||||
signed char* xr = $f0;
|
signed char* xr = $f0;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// Based on:
|
// Based on:
|
||||||
// - C= Hacking Magazine Issue 8. http://www.ffd2.com/fridge/chacking/c=hacking8.txt
|
// - C= Hacking Magazine Issue 8. http://www.ffd2.com/fridge/chacking/c=hacking8.txt
|
||||||
// - Codebase64 Article http://codebase64.org/doku.php?id=base:3d_rotation
|
// - Codebase64 Article http://codebase64.org/doku.php?id=base:3d_rotation
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
// The rotated point - updated by calling rotate()
|
// The rotated point - updated by calling rotate()
|
||||||
signed char* xr = $f0;
|
signed char* xr = $f0;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "bitmap-draw.kc"
|
#include <bitmap-draw>
|
||||||
|
|
||||||
char* const SCREEN = $400;
|
char* const SCREEN = $400;
|
||||||
char* const BITMAP = $2000;
|
char* const BITMAP = $2000;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Allows analysis of the CHARGEN ROM font
|
// Allows analysis of the CHARGEN ROM font
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "keyboard.kc"
|
#include <keyboard>
|
||||||
|
|
||||||
char* SCREEN = $400;
|
char* SCREEN = $400;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
// - http://codebase64.org/doku.php?id=base:seriously_fast_multiplication
|
// - http://codebase64.org/doku.php?id=base:seriously_fast_multiplication
|
||||||
// - http://codebase64.org/doku.php?id=magazines:chacking16
|
// - http://codebase64.org/doku.php?id=magazines:chacking16
|
||||||
|
|
||||||
#include "print.kc"
|
#include <print>
|
||||||
|
|
||||||
signed char vals[] = {-95, -64, -32, -16, 0, 16, 32, 64, 95};
|
signed char vals[] = {-95, -64, -32, -16, 0, 16, 32, 64, 95};
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// Ported to KickC by Jesper Gravgaard.
|
// Ported to KickC by Jesper Gravgaard.
|
||||||
// Original source https://github.com/cc65/cc65/blob/master/samples/fire.c
|
// Original source https://github.com/cc65/cc65/blob/master/samples/fire.c
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "sid"
|
#include "sid"
|
||||||
|
|
||||||
unsigned char* SCREEN1 = 0x3800;
|
unsigned char* SCREEN1 = 0x3800;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Creates a 2x2 font from the system CHARGEN font and compress it by identifying identical chars
|
// Creates a 2x2 font from the system CHARGEN font and compress it by identifying identical chars
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
char* const SCREEN = 0x0400;
|
char* const SCREEN = 0x0400;
|
||||||
char* const FONT_ORIGINAL = 0x2000;
|
char* const FONT_ORIGINAL = 0x2000;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "print"
|
#include <print>
|
||||||
void main() {
|
void main() {
|
||||||
print_str("hello world!");
|
print_str("hello world!");
|
||||||
print_ln();
|
print_ln();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// A raster IRQ that opens the top/bottom border.
|
// A raster IRQ that opens the top/bottom border.
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
|
|
||||||
char* const GHOST_BYTE = $3fff;
|
char* const GHOST_BYTE = $3fff;
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
// To execute the program succesfully you must mount the D64 disk image and execute the kernalload.PRG program
|
// To execute the program succesfully you must mount the D64 disk image and execute the kernalload.PRG program
|
||||||
#pragma link("kernalload.ld")
|
#pragma link("kernalload.ld")
|
||||||
|
|
||||||
#include "string"
|
#include <string>
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
// Sprite file
|
// Sprite file
|
||||||
#pragma data_seg(Sprite)
|
#pragma data_seg(Sprite)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// A simple usage of the flexible sprite multiplexer routine
|
// A simple usage of the flexible sprite multiplexer routine
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "multiplexer"
|
#include <multiplexer>
|
||||||
|
|
||||||
// Location of screen & sprites
|
// Location of screen & sprites
|
||||||
char* SCREEN = $400;
|
char* SCREEN = $400;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// A simple SID music player playing music in the main loop.
|
// A simple SID music player playing music in the main loop.
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
|
|
||||||
char* const MUSIC = $1000;
|
char* const MUSIC = $1000;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// A simple SID music player using RASTER IRQ
|
// A simple SID music player using RASTER IRQ
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
|
|
||||||
char* const MUSIC = $1000;
|
char* const MUSIC = $1000;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Code by Scan of Desire (Richard-William Loerakker)
|
// Code by Scan of Desire (Richard-William Loerakker)
|
||||||
// Sample from ART OF NOISE: MOMENTS IN LOVE
|
// Sample from ART OF NOISE: MOMENTS IN LOVE
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
const unsigned int SAMPLE_SIZE = 0x6100;
|
const unsigned int SAMPLE_SIZE = 0x6100;
|
||||||
char SAMPLE[SAMPLE_SIZE] = kickasm(resource "moments_sample.bin") {{ .import binary "moments_sample.bin" }};
|
char SAMPLE[SAMPLE_SIZE] = kickasm(resource "moments_sample.bin") {{ .import binary "moments_sample.bin" }};
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
// Ported to KickC by Jesper Gravgaard.
|
// Ported to KickC by Jesper Gravgaard.
|
||||||
// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c
|
// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
#include "sid"
|
#include "sid"
|
||||||
|
|
||||||
unsigned char* const SCREEN1 = $2800;
|
unsigned char* const SCREEN1 = $2800;
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
// Ported to KickC by Jesper Gravgaard.
|
// Ported to KickC by Jesper Gravgaard.
|
||||||
// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c
|
// Original source https://github.com/cc65/cc65/blob/master/samples/plasma.c
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
#include "sid"
|
#include "sid"
|
||||||
|
|
||||||
char* const SCREEN1 = 0x2800;
|
char* const SCREEN1 = 0x2800;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "c64.kc"
|
#include <c64>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
asm {
|
asm {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// 2D rotattion of 8 sprites
|
// 2D rotattion of 8 sprites
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "fastmultiply"
|
#include <fastmultiply>
|
||||||
#include "time"
|
#include <time>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
char* SCREEN = $0400;
|
char* SCREEN = $0400;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "sinus.kc"
|
#include <sinus>
|
||||||
#include "string.kc"
|
#include <string>
|
||||||
|
|
||||||
char* SCREEN = $400;
|
char* SCREEN = $400;
|
||||||
char* LOGO = $2000;
|
char* LOGO = $2000;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
char* SCREEN = $400;
|
char* SCREEN = $400;
|
||||||
char* LOGO = $2000;
|
char* LOGO = $2000;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
// Generate a big sinus and plot it on a bitmap
|
// Generate a big sinus and plot it on a bitmap
|
||||||
|
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "sinus.kc"
|
#include <sinus>
|
||||||
#include "string.kc"
|
#include <string>
|
||||||
#include "bitmap2.kc"
|
#include <bitmap2>
|
||||||
|
|
||||||
char* SCREEN = $400;
|
char* SCREEN = $400;
|
||||||
char* BITMAP = $2000;
|
char* BITMAP = $2000;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "c64"
|
#include <c64>
|
||||||
#include "basic-floats"
|
#include "basic-floats"
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
const char sinlen_x = 221;
|
const char sinlen_x = 221;
|
||||||
const char sintab_x[221];
|
const char sintab_x[221];
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// Uses principles from C=Hacking #16 https://codebase64.org/doku.php?id=magazines:chacking16
|
// Uses principles from C=Hacking #16 https://codebase64.org/doku.php?id=magazines:chacking16
|
||||||
// Utilizes the fact that a*b = ((a+b)/2)^2 - ((a-b)/2)^2
|
// Utilizes the fact that a*b = ((a+b)/2)^2 - ((a-b)/2)^2
|
||||||
|
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
print_cls();
|
print_cls();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Shows a font where each char contains the number of the char (00-ff)
|
// Shows a font where each char contains the number of the char (00-ff)
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "string"
|
#include <string>
|
||||||
#include "font-hex"
|
#include "font-hex"
|
||||||
|
|
||||||
byte* SCREEN = 0x0400;
|
byte* SCREEN = 0x0400;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Test minimization of constants
|
// Test minimization of constants
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
byte* const PLAYFIELD_CHARSET = $2800;
|
byte* const PLAYFIELD_CHARSET = $2800;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "print.kc"
|
#include <print>
|
||||||
|
|
||||||
byte txt[] = "camelot";
|
byte txt[] = "camelot";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// A minimal working raster hardware IRQ with clobber-based register savings
|
// A minimal working raster hardware IRQ with clobber-based register savings
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
asm { sei }
|
asm { sei }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Test interrupt routine using a variable between calls (irq_idx)
|
// Test interrupt routine using a variable between calls (irq_idx)
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
byte* const SCREEN = $0400;
|
byte* const SCREEN = $0400;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// A minimal working IRQ
|
// A minimal working IRQ
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
// Setup the IRQ routine
|
// Setup the IRQ routine
|
||||||
void main() {
|
void main() {
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again.
|
// Press "C" to enter pressed state (increaded bgcol) - and "SPACE" to leave presssed state again.
|
||||||
// Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border)
|
// Holding SPACE will sometimes trigger the pressed state when normal interrupts are enabled (green border)
|
||||||
// but never when they are disabled (red border)
|
// but never when they are disabled (red border)
|
||||||
#include "keyboard.kc"
|
#include <keyboard>
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
*BORDERCOL = GREEN;
|
*BORDERCOL = GREEN;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Animated lines drawn on a single color bitmap
|
// Animated lines drawn on a single color bitmap
|
||||||
#include "c64.kc"
|
#include <c64>
|
||||||
#include "division.kc"
|
#include <division>
|
||||||
|
|
||||||
byte* BITMAP = $a000;
|
byte* BITMAP = $a000;
|
||||||
byte* SCREEN = $8800;
|
byte* SCREEN = $8800;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Linear table generator
|
// Linear table generator
|
||||||
// Work in progress towards a sinus generator
|
// Work in progress towards a sinus generator
|
||||||
#include "division.kc"
|
#include <division>
|
||||||
#include "print.kc"
|
#include <print>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
word lintab1[20];
|
word lintab1[20];
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// 2.8212026 23111.2917 23111
|
// 2.8212026 23111.2917 23111
|
||||||
// -1.7417939 -14268.77563 -14269
|
// -1.7417939 -14268.77563 -14269
|
||||||
|
|
||||||
#include "multiply"
|
#include <multiply>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Program where loop-head optimization produces wrong return value
|
// Program where loop-head optimization produces wrong return value
|
||||||
// Reported by Richard-William Loerakker
|
// Reported by Richard-William Loerakker
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "multiply"
|
#include <multiply>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
dword result = mul16u(4,123);
|
dword result = mul16u(4,123);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Experiments with malloc() - a byte array
|
// Experiments with malloc() - a byte array
|
||||||
|
|
||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
|
|
||||||
byte* BYTES = malloc(0x100);
|
byte* BYTES = malloc(0x100);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Experiments with malloc() - a word array
|
// Experiments with malloc() - a word array
|
||||||
|
|
||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
|
|
||||||
word* WORDS = malloc(0x200);
|
word* WORDS = malloc(0x200);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Test memcpy - copy charset and screen using memcpy() from stdlib string
|
// Test memcpy - copy charset and screen using memcpy() from stdlib string
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
byte* const CHARSET = 0x2000;
|
byte* const CHARSET = 0x2000;
|
||||||
byte* const SCREEN = 0x0400;
|
byte* const SCREEN = 0x0400;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Test memcpy on strings (
|
// Test memcpy on strings (
|
||||||
|
|
||||||
#include "string"
|
#include <string>
|
||||||
|
|
||||||
char* const SCREEN = 0x0400;
|
char* const SCREEN = 0x0400;
|
||||||
const char CAMELOT[] = "camelot";
|
const char CAMELOT[] = "camelot";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Experiments with malloc()
|
// Experiments with malloc()
|
||||||
|
|
||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
unsigned char* buf1 = malloc(100);
|
unsigned char* buf1 = malloc(100);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "print"
|
#include <print>
|
||||||
#include "time"
|
#include <time>
|
||||||
|
|
||||||
|
|
||||||
unsigned int last_time;
|
unsigned int last_time;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "benchcommon"
|
#include "benchcommon"
|
||||||
#include "c64"
|
#include <c64>
|
||||||
|
|
||||||
char* const SCREEN1 = 0xE000;
|
char* const SCREEN1 = 0xE000;
|
||||||
char* const SCREEN2 = 0xE400;
|
char* const SCREEN2 = 0xE400;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "benchcommon"
|
#include "benchcommon"
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte* const rom = (byte*)0xe000;
|
byte* const rom = (byte*)0xe000;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "print"
|
#include <print>
|
||||||
#include "benchcommon"
|
#include "benchcommon"
|
||||||
|
|
||||||
const unsigned int COUNT = 16384;
|
const unsigned int COUNT = 16384;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte* RASTER = $d012;
|
byte* RASTER = $d012;
|
||||||
byte* BORDERCOL = $d020;
|
byte* BORDERCOL = $d020;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Minimal test of mul8u
|
// Minimal test of mul8u
|
||||||
|
|
||||||
#include "multiply"
|
#include <multiply>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// A simple usage of the flexible sprite multiplexer routine
|
// A simple usage of the flexible sprite multiplexer routine
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "multiplexer"
|
#include <multiplexer>
|
||||||
// Location of screen & sprites
|
// Location of screen & sprites
|
||||||
char* SCREEN = 0x0400;
|
char* SCREEN = 0x0400;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Failing number type resolving in ternary operator
|
// Failing number type resolving in ternary operator
|
||||||
// Currently fails in the ternary operator with number-issues if integer literal is not specified!
|
// Currently fails in the ternary operator with number-issues if integer literal is not specified!
|
||||||
|
|
||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
|
|
||||||
void SolveMaze(char *maze, word width, word height) {
|
void SolveMaze(char *maze, word width, word height) {
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// Plasma based on the distance/angle to the screen center
|
// Plasma based on the distance/angle to the screen center
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "stdlib"
|
#include <stdlib>
|
||||||
#include "string"
|
#include <string>
|
||||||
#include "sqr"
|
#include <sqr>
|
||||||
#include "atan2"
|
#include <atan2>
|
||||||
#include "print"
|
#include <print>
|
||||||
#include "sid"
|
#include "sid"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
byte msg[] = "hello world! ";
|
byte msg[] = "hello world! ";
|
||||||
byte msg2[] = "hello c64! ";
|
byte msg2[] = "hello c64! ";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Test the write through to RAM when writing to VIC/CIA/colorram
|
// Test the write through to RAM when writing to VIC/CIA/colorram
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// Avoid interrupts
|
// Avoid interrupts
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Test the functionality of the C64 processor port ($00/$01)
|
// Test the functionality of the C64 processor port ($00/$01)
|
||||||
// Tests by setting the value of the processor port - and then printing out values of $00/$01/$a000/$d000/$e000
|
// Tests by setting the value of the processor port - and then printing out values of $00/$01/$a000/$d000/$e000
|
||||||
|
|
||||||
#include "c64"
|
#include <c64>
|
||||||
#include "print"
|
#include <print>
|
||||||
|
|
||||||
char* const BASIC_ROM = $a000;
|
char* const BASIC_ROM = $a000;
|
||||||
char* const KERNAL_ROM = $e000;
|
char* const KERNAL_ROM = $e000;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user