Removed dysfunctional kbrepeatdelay() and kbrepeatrate().

As discussed in https://github.com/cc65/cc65/pull/452 after my premature merge the two functions in question don't work as expected.

Additionally I adjusted several style deviations in the pull request in question.
This commit is contained in:
Oliver Schmidt 2017-08-30 16:37:31 +02:00
parent 7a1f5358df
commit 4aa19494f5
7 changed files with 37 additions and 127 deletions

View File

@ -184,8 +184,6 @@ function.
<!-- <item><ref id="cbm_write" name="cbm_write"> -->
<!-- <item><ref id="get_tv" name="get_tv"> -->
<item><ref id="kbrepeat" name="kbrepeat">
<item><ref id="kbrepeatdelay" name="kbrepeatdelay">
<item><ref id="kbrepeatrate" name="kbrepeatrate">
</itemize>
(incomplete)
@ -2174,64 +2172,17 @@ to get off the serial bus so it can be used for other purposes.
<descrip>
<tag/Function/Set keyboard repeat mode
<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
<tag/Declaration/<tt/unsigned char kbrepeat (unsigned char);/
<tag/Description/This function changes what keys will have automatic repeat when
being hold down for a certain time. Possible values are KBDREPEAT_CURSOR (repeat
only cursor-related keys), KBDREPEAT_NONE (no repeat for any keys) and
KBDREPEAT_ALL (repeat all keys).
The old mode is returned so it can be restored later.
<tag/Declaration/<tt/unsigned char __fastcall__ kbrepeat (unsigned char mode);/
<tag/Description/This function changes which keys have automatic repeat when
being hold down for a certain time. Possible values are KBREPEAT_CURSOR (repeat
only cursor-related keys), KBREPEAT_NONE (no repeat for any keys) and
KBREPEAT_ALL (repeat all keys). The old mode is returned so it can be restored
later.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="kbrepeatdelay" name="kbrepeatdelay">
<ref id="kbrepeatrate" name="kbrepeatrate">
<tag/Example/None.
</descrip>
</quote>
<sect1>kbrepeatdelay<label id="kbrepeatdelay"><p>
<quote>
<descrip>
<tag/Function/Set keyboard repeat delay
<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
<tag/Declaration/<tt/unsigned char kbrepeatdelay (unsigned char);/
<tag/Description/This function changes the delay until a keypress is being
repeated automatically.
The old value is returned so it can be restored later.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="kbrepeat" name="kbrepeat">
<ref id="kbrepeatrate" name="kbrepeatrate">
<tag/Example/None.
</descrip>
</quote>
<sect1>kbrepeatrate<label id="kbrepeatrate"><p>
<quote>
<descrip>
<tag/Function/Set keyboard repeat rate
<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
<tag/Declaration/<tt/unsigned char kbrepeatrate (unsigned char);/
<tag/Description/This function changes the keyboard repeat rate (the time between
repeated keypresses).
The old value is returned so it can be restored later.
<tag/Notes/<itemize>
<item>The function is available only as a fastcall function; so, it may be used
only in the presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="kbrepeat" name="kbrepeat">
<ref id="kbrepeatdelay" name="kbrepeatdelay">
<tag/Example/None.
</descrip>
</quote>

View File

@ -158,17 +158,16 @@ struct cbm_dirent {
unsigned char get_tv (void);
/* Return the video mode the machine is using. */
#define KBDREPEAT_CURSOR 0x00
#define KBDREPEAT_NONE 0x40
#define KBDREPEAT_ALL 0x80
#define KBREPEAT_CURSOR 0x00
#define KBREPEAT_NONE 0x40
#define KBREPEAT_ALL 0x80
unsigned char __fastcall__ kbrepeat(unsigned char);
unsigned char __fastcall__ kbrepeatdelay(unsigned char);
unsigned char __fastcall__ kbrepeatrate(unsigned char);
unsigned char __fastcall__ kbrepeat (unsigned char mode);
/* Changes which keys have automatic repeat. */
#if !defined(__CBM610__) && !defined(__PET__)
void waitvsync (void);
/* wait for the start of the next frame */
/* Wait for the start of the next frame */
#endif
/*****************************************************************************/

View File

@ -1,5 +1,8 @@
;
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
;
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
.export _kbrepeat
.include "c128.inc"
@ -7,16 +10,5 @@ _kbrepeat:
ldx KBDREPEAT ; get old value
sta KBDREPEAT ; store new value
txa ; return old value
rts
_kbrepeatdelay:
ldx KBDREPEATDELAY ; get old value
sta KBDREPEATDELAY ; store new value
txa ; return old value
rts
_kbrepeatrate:
ldx KBDREPEATRATE ; get old value
sta KBDREPEATRATE ; store new value
txa ; return old value
ldx #0
rts

View File

@ -1,5 +1,8 @@
;
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
;
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
.export _kbrepeat
.include "c64.inc"
@ -7,16 +10,5 @@ _kbrepeat:
ldx KBDREPEAT ; get old value
sta KBDREPEAT ; store new value
txa ; return old value
rts
_kbrepeatdelay:
ldx KBDREPEATDELAY ; get old value
sta KBDREPEATDELAY ; store new value
txa ; return old value
rts
_kbrepeatrate:
ldx KBDREPEATRATE ; get old value
sta KBDREPEATRATE ; store new value
txa ; return old value
ldx #0
rts

View File

@ -1,5 +1,8 @@
;
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
;
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
.export _kbrepeat
.include "pet.inc"
@ -7,16 +10,5 @@ _kbrepeat:
ldx KBDREPEAT ; get old value
sta KBDREPEAT ; store new value
txa ; return old value
rts
_kbrepeatdelay:
ldx KBDREPEATDELAY ; get old value
sta KBDREPEATDELAY ; store new value
txa ; return old value
rts
_kbrepeatrate:
ldx KBDREPEATRATE ; get old value
sta KBDREPEATRATE ; store new value
txa ; return old value
ldx #0
rts

View File

@ -1,5 +1,8 @@
;
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
;
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
.export _kbrepeat
.include "plus4.inc"
@ -7,16 +10,5 @@ _kbrepeat:
ldx KBDREPEAT ; get old value
sta KBDREPEAT ; store new value
txa ; return old value
rts
_kbrepeatdelay:
ldx KBDREPEATDELAY ; get old value
sta KBDREPEATDELAY ; store new value
txa ; return old value
rts
_kbrepeatrate:
ldx KBDREPEATRATE ; get old value
sta KBDREPEATRATE ; store new value
txa ; return old value
ldx #0
rts

View File

@ -1,5 +1,8 @@
;
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
;
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
.export _kbrepeat
.include "vic20.inc"
@ -7,16 +10,5 @@ _kbrepeat:
ldx KBDREPEAT ; get old value
sta KBDREPEAT ; store new value
txa ; return old value
rts
_kbrepeatdelay:
ldx KBDREPEATDELAY ; get old value
sta KBDREPEATDELAY ; store new value
txa ; return old value
rts
_kbrepeatrate:
ldx KBDREPEATRATE ; get old value
sta KBDREPEATRATE ; store new value
txa ; return old value
ldx #0
rts