2 ; Marco van den Heuvel, 2018-04-30
5 ; unsigned char __fastcall__ set_turbomaster_speed (unsigned char speed);
7 ;/* Set the speed of the Turbo Master cartridge, using SPEED_SLOW will switch to
8 ; * 1 Mhz mode, SPEED_4X or SPEED_FAST will switch to 4 Mhz mode.
10 ; * Note that any value higher or equal to SPEED_4X will switch to 4 Mhz mode,
11 ; * any value lower than SPEED_4X will switch to 1 Mhz mode.
13 ; * This function will return the actual speed the CPU is at after trying
14 ; * to set the requested speed, if the speed is different it might indicate
15 ; * that the hardware switch has locked the speed.
17 ; * This function does not check for the presence of a Turbo Master cartridge,
18 ; * make sure you use 'detect_turbomaster();' before using.
21 ; unsigned char get_turbomaster_speed (void);
23 ;/* Get the speed of the Turbo Master cartridge.
25 ; * Possible return values:
26 ; * SPEED_SLOW : 1 Mhz mode
27 ; * SPEED_4X : 4 Mhz mode
29 ; * This function does not check for the presence of a Turbo Master cartridge,
30 ; * make sure you use 'detect_turbomaster();' before using.
33 .export _set_turbomaster_speed
34 .export _get_turbomaster_speed
36 .include "accelerator.inc"
38 _set_turbomaster_speed:
40 lda TURBOMASTER_SPEED_REG
45 sta TURBOMASTER_SPEED_REG
47 _get_turbomaster_speed:
49 lda TURBOMASTER_SPEED_REG