mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Updated c128 accelerator code and documentation.
This commit is contained in:
parent
3f5683b391
commit
28f26991ac
@ -175,14 +175,14 @@ The functions listed below are accelerator functions for the C64. See the <url
|
||||
url="funcref.html" name="function reference"> for declaration and usage.
|
||||
|
||||
<itemize>
|
||||
<item>detect_c64dtv
|
||||
<item>detect_c128
|
||||
<item>detect_c64dtv
|
||||
<item>detect_scpu
|
||||
<item>get_c64dtv_speed
|
||||
<item>get_c128_speed
|
||||
<item>get_c64dtv_speed
|
||||
<item>get_scpu_speed
|
||||
<item>set_c64dtv_speed
|
||||
<item>set_c128_speed
|
||||
<item>set_c64dtv_speed
|
||||
<item>set_scpu_speed
|
||||
</itemize>
|
||||
|
||||
|
134
doc/funcref.sgml
134
doc/funcref.sgml
@ -68,14 +68,14 @@ function.
|
||||
<sect1><tt/accelerator.h/<label id="accelerator.h"><p>
|
||||
|
||||
<itemize>
|
||||
<item><ref id="detect_c64dtv" name="detect_c64dtv">
|
||||
<item><ref id="detect_c128" name="detect_c128">
|
||||
<item><ref id="detect_c64dtv" name="detect_c64dtv">
|
||||
<item><ref id="detect_scpu" name="detect_scpu">
|
||||
<item><ref id="get_c64dtv_speed" name="get_c64dtv_speed">
|
||||
<item><ref id="get_c128_speed" name="get_c128_speed">
|
||||
<item><ref id="get_c64dtv_speed" name="get_c64dtv_speed">
|
||||
<item><ref id="get_scpu_speed" name="get_scpu_speed">
|
||||
<item><ref id="set_c128_speed" name="set_c128_speed">
|
||||
<item><ref id="set_c64dtv_speed" name="set_c64dtv_speed">
|
||||
<item><ref id="set_c128_speed" name="set_c64dtv_speed">
|
||||
<item><ref id="set_scpu_speed" name="set_scpu_speed">
|
||||
</itemize>
|
||||
|
||||
@ -2926,26 +2926,6 @@ used in presence of a prototype.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>detect_c64dtv<label id="detect_c64dtv"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Check for the presence of the C64DTV.
|
||||
<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
|
||||
<tag/Declaration/<tt/unsigned char detect_c64dtv (void);/
|
||||
<tag/Description/The function returns a 1 if a C64DTV has been detected.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the C64.
|
||||
</itemize>
|
||||
<tag/Availability/cc65 (not all platforms)
|
||||
<tag/See also/
|
||||
<ref id="get_c64dtv_speed" name="get_c64dtv_speed">,
|
||||
<ref id="set_c64dtv_speed" name="set_c64dtv_speed">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>detect_c128<label id="detect_c128"><p>
|
||||
|
||||
<quote>
|
||||
@ -2966,6 +2946,26 @@ used in presence of a prototype.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>detect_c64dtv<label id="detect_c64dtv"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Check for the presence of the C64DTV.
|
||||
<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
|
||||
<tag/Declaration/<tt/unsigned char detect_c64dtv (void);/
|
||||
<tag/Description/The function returns a 1 if a C64DTV has been detected.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the C64.
|
||||
</itemize>
|
||||
<tag/Availability/cc65 (not all platforms)
|
||||
<tag/See also/
|
||||
<ref id="get_c64dtv_speed" name="get_c64dtv_speed">,
|
||||
<ref id="set_c64dtv_speed" name="set_c64dtv_speed">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>detect_scpu<label id="detect_scpu"><p>
|
||||
|
||||
<quote>
|
||||
@ -3525,28 +3525,6 @@ header files define constants that can be used to check the return code.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>get_c64dtv_speed<label id="get_c64dtv_speed"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Get the current speed of the C64DTV.
|
||||
<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
|
||||
<tag/Declaration/<tt/unsigned char get_c64dtv_speed (void);/
|
||||
<tag/Description/The function returns the current speed of the C64DTV.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the C64.
|
||||
<item>The function does not check for the presence of the C64DTV.
|
||||
<item>See the accelerator.h header for the speed definitions.
|
||||
</itemize>
|
||||
<tag/Availability/cc65 (not all platforms)
|
||||
<tag/See also/
|
||||
<ref id="detect_c64dtv" name="detect_c64dtv">,
|
||||
<ref id="set_c64dtv_speed" name="set_c64dtv_speed">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>get_c128_speed<label id="get_c128_speed"><p>
|
||||
|
||||
<quote>
|
||||
@ -3569,6 +3547,28 @@ header files define constants that can be used to check the return code.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>get_c64dtv_speed<label id="get_c64dtv_speed"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Get the current speed of the C64DTV.
|
||||
<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
|
||||
<tag/Declaration/<tt/unsigned char get_c64dtv_speed (void);/
|
||||
<tag/Description/The function returns the current speed of the C64DTV.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the C64.
|
||||
<item>The function does not check for the presence of the C64DTV.
|
||||
<item>See the accelerator.h header for the speed definitions.
|
||||
</itemize>
|
||||
<tag/Availability/cc65 (not all platforms)
|
||||
<tag/See also/
|
||||
<ref id="detect_c64dtv" name="detect_c64dtv">,
|
||||
<ref id="set_c64dtv_speed" name="set_c64dtv_speed">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>get_scpu_speed<label id="get_scpu_speed"><p>
|
||||
|
||||
<quote>
|
||||
@ -6142,28 +6142,6 @@ clean-up when exitting the program.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>set_c64dtv_speed<label id="set_c64dtv_speed"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Set the current speed of the C64DTV.
|
||||
<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ set_c64dtv_speed (unsigned char speed);/
|
||||
<tag/Description/The function returns the speed after trying to set the speed of the C64DTV.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the C64.
|
||||
<item>The function does not check for the presence of the C64DTV.
|
||||
<item>See the accelerator.h header for the speed definitions.
|
||||
</itemize>
|
||||
<tag/Availability/cc65 (not all platforms)
|
||||
<tag/See also/
|
||||
<ref id="detect_c64dtv" name="detect_c64dtv">,
|
||||
<ref id="get_c64dtv_speed" name="get_c64dtv_speed">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>set_c128_speed<label id="set_c128_speed"><p>
|
||||
|
||||
<quote>
|
||||
@ -6186,6 +6164,28 @@ clean-up when exitting the program.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>set_c64dtv_speed<label id="set_c64dtv_speed"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Set the current speed of the C64DTV.
|
||||
<tag/Header/<tt/<ref id="accelerator.h" name="accelerator.h">/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ set_c64dtv_speed (unsigned char speed);/
|
||||
<tag/Description/The function returns the speed after trying to set the speed of the C64DTV.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the C64.
|
||||
<item>The function does not check for the presence of the C64DTV.
|
||||
<item>See the accelerator.h header for the speed definitions.
|
||||
</itemize>
|
||||
<tag/Availability/cc65 (not all platforms)
|
||||
<tag/See also/
|
||||
<ref id="detect_c64dtv" name="detect_c64dtv">,
|
||||
<ref id="get_c64dtv_speed" name="get_c64dtv_speed">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>set_scpu_speed<label id="set_scpu_speed"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user