2 ; Marco van den Heuvel, 2018-04-25
5 ; unsigned char __fastcall__ set_chameleon_speed (unsigned char speed);
7 ;/* Set the speed of the Chameleon cartridge, the following inputs
9 ; * SPEED_SLOW : 1 Mhz mode
10 ; * SPEED_1X : 1 Mhz mode
11 ; * SPEED_2X : 2 Mhz mode
12 ; * SPEED_3X : 3 Mhz mode
13 ; * SPEED_4X : 4 Mhz mode
14 ; * SPEED_5X : 5 Mhz mode
15 ; * SPEED_6X : 6 Mhz mode
16 ; * SPEED_FAST : Maximum speed mode
18 ; * Note that any value higher or equal to SPEED_7X will switch to maximum
21 ; * This function will return the actual speed the CPU is at after trying
22 ; * to set the requested speed, to my knowledge the switching should not fail.
24 ; * This function does not check for the presence of the Chameleon cartridge,
25 ; * make sure you use 'detect_chameleon();' before using.
28 ; unsigned char get_chameleon_speed (void);
30 ;/* Get the speed of the Chameleon cartridge.
32 ; * Possible return values:
33 ; * SPEED_SLOW : Slow mode
34 ; * SPEED_2X : 2Mhz mode
35 ; * SPEED_3X : 3Mhz mode
36 ; * SPEED_4X : 4Mhz mode
37 ; * SPEED_5X : 5Mhz mode
38 ; * SPEED_6X : 6Mhz mode
39 ; * SPEED_FAST : Maximum speed mode
41 ; * This function does not check for the presence of the Chameleon cartridge,
42 ; * make sure you use 'detect_chameleon();' before using.
45 .export _set_chameleon_speed
46 .export _get_chameleon_speed
48 .include "accelerator.inc"
62 lda #CHAMELEON_CFGTUR_LIMIT_1MHZ
66 lda #CHAMELEON_CFGTUR_LIMIT_NONE
84 ldy #CHAMELEON_DISABLE_REGS
97 ldy #CHAMELEON_ENABLE_REGS