From f2e46f0fdf5d54b7e5de8a1be8dd95925c606b92 Mon Sep 17 00:00:00 2001 From: Marco van den Heuvel Date: Wed, 25 Apr 2018 12:53:29 -0700 Subject: [PATCH] Added C64 Chameleon accelerator code and documentation. --- asminc/accelerator.inc | 15 +++- doc/c64.sgml | 3 + doc/funcref.sgml | 67 +++++++++++++++ include/accelerator.h | 52 +++++++++++ libsrc/c64/acc_chameleon_speed.s | 100 ++++++++++++++++++++++ libsrc/c64/acc_detect_chameleon.s | 39 +++++++++ testcode/lib/accelerator/Makefile | 5 +- testcode/lib/accelerator/chameleon-test.c | 8 ++ 8 files changed, 287 insertions(+), 2 deletions(-) create mode 100755 libsrc/c64/acc_chameleon_speed.s create mode 100755 libsrc/c64/acc_detect_chameleon.s create mode 100755 testcode/lib/accelerator/chameleon-test.c diff --git a/asminc/accelerator.inc b/asminc/accelerator.inc index 86d27b3f2..0c687b2ad 100644 --- a/asminc/accelerator.inc +++ b/asminc/accelerator.inc @@ -43,7 +43,20 @@ C64DTV_Fast = $03 ; --------------------------------------------------------------------------- -; C128 in C64 mode +; C128 native and C128 in C64 mode C128_VICIIE_CLK := $D030 + +; --------------------------------------------------------------------------- +; C64 Chameleon cartridge + +CHAMELEON_CFGTUR := $D0F3 +CHAMELEON_CFGENA := $D0FE + +CHAMELEON_ENABLE_REGS = $2A +CHAMELEON_DISABLE_REGS = $FF + +CHAMELEON_CFGTUR_LIMIT_1MHZ = %00001100 +CHAMELEON_CFGTUR_LIMIT_NONE = %10000000 + diff --git a/doc/c64.sgml b/doc/c64.sgml index c2c9551b4..c037b1e0e 100644 --- a/doc/c64.sgml +++ b/doc/c64.sgml @@ -177,12 +177,15 @@ url="funcref.html" name="function reference"> for declaration and usage. detect_c128 detect_c64dtv +detect_chameleon detect_scpu get_c128_speed get_c64dtv_speed +get_chameleon_speed get_scpu_speed set_c128_speed set_c64dtv_speed +set_chameleon_speed set_scpu_speed diff --git a/doc/funcref.sgml b/doc/funcref.sgml index 55701cf55..09ee27e4a 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -70,12 +70,15 @@ function. + + + @@ -2966,6 +2969,26 @@ used in presence of a prototype. +detect_chameleon