From 28f26991ac66cc2e0aee4a222d8b2b8701fb3077 Mon Sep 17 00:00:00 2001 From: Marco van den Heuvel Date: Sat, 21 Apr 2018 09:52:50 -0700 Subject: [PATCH] Updated c128 accelerator code and documentation. --- doc/c64.sgml | 6 +-- doc/funcref.sgml | 86 ++++++++++++++++++------------------ libsrc/c64/acc_c128_speed.s | 3 +- libsrc/c64/acc_detect_c128.s | 7 ++- 4 files changed, 52 insertions(+), 50 deletions(-) diff --git a/doc/c64.sgml b/doc/c64.sgml index 03a03974c..c2c9551b4 100644 --- a/doc/c64.sgml +++ b/doc/c64.sgml @@ -175,14 +175,14 @@ The functions listed below are accelerator functions for the C64. See the for declaration and usage. -detect_c64dtv detect_c128 +detect_c64dtv detect_scpu -get_c64dtv_speed get_c128_speed +get_c64dtv_speed get_scpu_speed -set_c64dtv_speed set_c128_speed +set_c64dtv_speed set_scpu_speed diff --git a/doc/funcref.sgml b/doc/funcref.sgml index 17a42b103..75028b7b6 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -68,14 +68,14 @@ function.

- + - + + - @@ -2926,41 +2926,41 @@ used in presence of a prototype. -detect_c64dtv

+detect_c128

-/ - The function is specific to the C64. , -, +, +, -detect_c128

+detect_c64dtv

-/ - The function is specific to the C64. , -, +, +, @@ -3525,45 +3525,45 @@ header files define constants that can be used to check the return code. -get_c64dtv_speed

+get_c128_speed

-/ - The function is specific to the C64. -The function does not check for the presence of the C64DTV. +The function does not check for the presence of a C128 in C64 mode. See the accelerator.h header for the speed definitions. , -, +, +, -get_c128_speed

+get_c64dtv_speed

-/ - The function is specific to the C64. -The function does not check for the presence of a C128 in C64 mode. +The function does not check for the presence of the C64DTV. See the accelerator.h header for the speed definitions. , -, +, +, @@ -6142,45 +6142,45 @@ clean-up when exitting the program. -set_c64dtv_speed

+set_c128_speed

-/ - The function is specific to the C64. -The function does not check for the presence of the C64DTV. +The function does not check for the presence of a C128 in C64 mode. See the accelerator.h header for the speed definitions. , -, +, +, -set_c128_speed

+set_c64dtv_speed

-/ - The function is specific to the C64. -The function does not check for the presence of a C128 in C64 mode. +The function does not check for the presence of the C64DTV. See the accelerator.h header for the speed definitions. , -, +, +, diff --git a/libsrc/c64/acc_c128_speed.s b/libsrc/c64/acc_c128_speed.s index 4ec23b1da..4cb2630fa 100755 --- a/libsrc/c64/acc_c128_speed.s +++ b/libsrc/c64/acc_c128_speed.s @@ -38,13 +38,12 @@ _set_c128_speed: bcs high_speed store_speed: sta C128_VICIIE_CLK - jmp _get_c128_speed + .byte $2C ; skip over the lda #$01 high_speed: lda #$01 bne store_speed - _get_c128_speed: lda C128_VICIIE_CLK and #$01 diff --git a/libsrc/c64/acc_detect_c128.s b/libsrc/c64/acc_detect_c128.s index 591ff6c59..71996730e 100755 --- a/libsrc/c64/acc_detect_c128.s +++ b/libsrc/c64/acc_detect_c128.s @@ -21,13 +21,16 @@ _detect_c128: ; Make sure the CPU is a 8502 .byte $1A ; NOP on 8502, INA on 65(S)C(E)02, 4510 and 65816 - bne not_found + beq found + .byte $3A ; decrement A again, so a #$00 can be returned + rts + +found: ; Make sure a C128 VICIIe is present ldy C128_VICIIE_CLK cpy #$FF beq not_found -found: lda #$01 not_found: rts -- 2.39.5