2 ; Marco van den Heuvel, 2018-04-14
5 ; unsigned char __fastcall__ set_c64dtv_speed (unsigned char speed);
7 ;/* Set the speed of the C64DTV, using SPEED_SLOW will switch to
8 ; * slow mode, SPEED_2X or SPEED_FAST will switch to fast mode.
10 ; * Note that any value higher or equal to SPEED_2X will switch to fast mode.
12 ; * This function will return the actual speed the CPU is at after trying
13 ; * to set the requested speed, to my knowledge the switching should not fail.
15 ; * This function does not check for the presence of the C64DTV,
16 ; * make sure you use 'detect_c64dtv();' before using.
19 ; unsigned char get_c64dtv_speed (void);
21 ;/* Get the speed of the C64DTV.
23 ; * Possible return values:
24 ; * SPEED_1X : slow mode
25 ; * SPEED_2X : fast mode
27 ; * This function does not check for the presence of the C64DTV,
28 ; * make sure you use 'detect_c64dtv();' before using.
31 .export _set_c64dtv_speed
32 .export _get_c64dtv_speed
34 .include "accelerator.inc"
42 .byte $32,$99 ; SAC #$99 set accumulator to reg 9 (cpu control)
43 txa ; (re)set skip and burst bits
44 .byte $32,$00 ; SAC #$00 set accumulator back to reg 0
53 .byte $32,$99 ; SAC #$99 set accumulator to reg 9 (cpu control)
55 .byte $32,$00 ; SAC #$00 set accumulator back to reg 0