1 /*****************************************************************************/
5 /* Accelerator specific definitions */
9 /* (C) 2018 Marco van den Heuvel */
10 /* EMail: blackystardust68@yahoo.com */
13 /* This software is provided 'as-is', without any expressed or implied */
14 /* warranty. In no event will the authors be held liable for any damages */
15 /* arising from the use of this software. */
17 /* Permission is granted to anyone to use this software for any purpose, */
18 /* including commercial applications, and to alter it and redistribute it */
19 /* freely, subject to the following restrictions: */
21 /* 1. The origin of this software must not be misrepresented; you must not */
22 /* claim that you wrote the original software. If you use this software */
23 /* in a product, an acknowledgment in the product documentation would be */
24 /* appreciated but is not required. */
25 /* 2. Altered source versions must be plainly marked as such, and must not */
26 /* be misrepresented as being the original software. */
27 /* 3. This notice may not be removed or altered from any source */
30 /*****************************************************************************/
34 #ifndef _ACCELERATOR_H
35 #define _ACCELERATOR_H
41 #define SPEED_SLOW 0x00
42 #define SPEED_FAST 0xFF
44 #define SPEED_1X SPEED_SLOW
45 #define SPEED_2X 2 - 1 /* C64 Chameleon, C64DTV, C128, PET 65816, Apple2 Fast Chip, Apple2 TransWarp, Apple2 Zip Chip */
46 #define SPEED_3X 3 - 1 /* C64 Chameleon, C65, PET 65816, Apple2 Booster, Apple 2 Fast Chip, Apple2 Titan, Apple2 TransWarp, Apple2 Zip Chip */
47 #define SPEED_4X 4 - 1 /* C64 Chameleon, C64 TurboMaster, C64 TurboProcess, PET 65816, Apple2 Fast Chip, Apple2 Zip Chip */
48 #define SPEED_5X 5 - 1 /* C64 Chameleon, PET 65816, Apple2 Fast Chip */
49 #define SPEED_6X 6 - 1 /* C64 Chameleon, PET 65816, Apple2 Fast Chip */
50 #define SPEED_7X 7 - 1 /* PET 65816, Apple2 Fast Chip */
51 #define SPEED_8X 8 - 1 /* C64 Flash8, PET 65816, Apple 2 Fast Chip */
52 #define SPEED_10X 10 - 1 /* PET 65816, Apple2 Fast Chip */
53 #define SPEED_12X 12 - 1 /* Apple2 Fast Chip */
54 #define SPEED_16X 16 - 1 /* Apple2 Fast Chip */
55 #define SPEED_20X 20 - 1 /* C64/C128 SuperCPU */
57 /***********************************/
58 /* Accelerator function prototypes */
59 /***********************************/
61 /* C64/C128 SuperCPU cartridge */
63 extern unsigned char __fastcall__ set_scpu_speed (unsigned char speed);
65 /* Set the speed of the SuperCPU cartridge, using SPEED_SLOW will switch to
66 * 1 Mhz mode, SPEED_20X or SPEED_FAST will switch to 20 Mhz mode.
68 * Note that any value lower than SPEED_20X will switch to 1 Mhz mode, and
69 * any value higher or equal to SPEED_20X will switch to 20 Mhz mode.
71 * This function will return the actual speed the CPU is at after trying
72 * to set the requested speed, if this is not the speed that was requested
73 * then possibly the hardware speed switch prevented any software speed
76 * This function does not check for the presence of the SuperCPU cartridge,
77 * make sure you use 'detect_scpu();' before using.
80 extern unsigned char get_scpu_speed (void);
82 /* Get the speed of the SuperCPU cartridge.
84 * Possible return values:
85 * SPEED_1X : 1 Mhz mode
86 * SPEED_20X : 20 Mhz mode
88 * This function does not check for the presence of the SuperCPU cartridge,
89 * make sure you use 'detect_scpu();' before using.
92 extern unsigned char detect_scpu (void);
94 /* Check for the presence of the SuperCPU cartridge.
96 * Possible return values:
97 * 0x00 : SuperCPU cartridge not present
98 * 0x01 : SuperCPU cartridge present
101 /* End of accelerator.h */