diff --git a/c64/basic/basic_commands_CD/cmd_fast.s b/c64/basic/basic_commands_CD/cmd_fast.s deleted file mode 100644 index 913ca187..00000000 --- a/c64/basic/basic_commands_CD/cmd_fast.s +++ /dev/null @@ -1,41 +0,0 @@ -// #LAYOUT# STD * #TAKE -// #LAYOUT# * BASIC_0 #TAKE -// #LAYOUT# * * #IGNORE - - -cmd_fast: - -#if CONFIG_MB_MEGA_65 - - // Command implementation for Mega65 - - lda #$41 - sta CPU_D6510 - - jmp execute_statements - -#elif CONFIG_MB_ULTIMATE_64 - - // Try to enable turbo in SuperCPU compatible way - sta SCPU_SPEED_TURBO - - jmp execute_statements - -#elif CONFIG_PLATFORM_COMMODORE_64 - - // Command implementation for generic C64 platform - - // Try to enable turbo mode in C128 compatible way - lda #$01 - sta VIC_CLKRATE - - // Try to enable turbo in SuperCPU compatible way - sta SCPU_SPEED_TURBO - - jmp execute_statements - -#else - - jmp do_NOT_IMPLEMENTED_error - -#endif diff --git a/c64/basic/basic_commands_CD/cmd_fast_slow.s b/c64/basic/basic_commands_CD/cmd_fast_slow.s new file mode 100644 index 00000000..79fcb6ae --- /dev/null +++ b/c64/basic/basic_commands_CD/cmd_fast_slow.s @@ -0,0 +1,78 @@ +// #LAYOUT# STD * #TAKE +// #LAYOUT# * BASIC_0 #TAKE +// #LAYOUT# * * #IGNORE + + +#if CONFIG_MB_MEGA_65 + + // Command implementation for Mega65 + + // XXX - I think there are some bit-set instructions in 65CE02... + +cmd_slow: + + lda #$40 + skip_2_bytes_trash_nvz + + // FALLTROUGH + +cmd_fast: + + lda #$41 + sta CPU_D6510 + + jmp execute_statements + +#elif CONFIG_MB_ULTIMATE_64 + + // Command implementation for Ultimate 64 - SuperCPU compatible way should be enough + +cmd_slow: + + sta SCPU_SPEED_NORMAL + jmp execute_statements + +cmd_fast: + + sta SCPU_SPEED_TURBO + jmp execute_statements + +#elif CONFIG_PLATFORM_COMMODORE_64 + + // Command implementation for generic C64 platform + +cmd_slow: + + // Try to disable turbo in SuperCPU compatible way + sta SCPU_SPEED_NORMAL + + // Try to disable turbo mode in C128 compatible way + + lda #$00 + beq !+ // branch always + +cmd_fast: + + // Try to enable turbo in SuperCPU compatible way + sta SCPU_SPEED_TURBO + + // Try to enable turbo mode in C128 compatible way + lda #$01 +!: + sta VIC_CLKRATE + + jmp execute_statements + +#else + +cmd_slow: + + nop // to prevent double label + + // FALLTROUGH + +cmd_fast: + + jmp do_NOT_IMPLEMENTED_error + +#endif diff --git a/c64/basic/basic_commands_CD/cmd_slow.s b/c64/basic/basic_commands_CD/cmd_slow.s deleted file mode 100644 index cae5e5d6..00000000 --- a/c64/basic/basic_commands_CD/cmd_slow.s +++ /dev/null @@ -1,44 +0,0 @@ -// #LAYOUT# STD * #TAKE -// #LAYOUT# * BASIC_0 #TAKE -// #LAYOUT# * * #IGNORE - - -cmd_slow: - -#if CONFIG_MB_MEGA_65 - - // Command implementation for Mega65 - - lda #$40 - sta CPU_D6510 - - jmp execute_statements - -#elif CONFIG_MB_ULTIMATE_64 - - // Command implementation for Ultimate 64 - - // Try to disable turbo in SuperCPU compatible way - sta SCPU_SPEED_NORMAL - - jmp execute_statements - -#elif CONFIG_PLATFORM_COMMODORE_64 - - // Command implementation for generic C64 platform - - // Try to disable turbo mode in C128 compatible way - - lda #$00 - sta VIC_CLKRATE - - // Try to disable turbo in SuperCPU compatible way - sta SCPU_SPEED_NORMAL - - jmp execute_statements - -#else - - jmp do_NOT_IMPLEMENTED_error - -#endif