mirror of
https://github.com/cc65/cc65.git
synced 2025-02-09 02:30:42 +00:00
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:
parent
7a1f5358df
commit
4aa19494f5
@ -184,8 +184,6 @@ function.
|
|||||||
<!-- <item><ref id="cbm_write" name="cbm_write"> -->
|
<!-- <item><ref id="cbm_write" name="cbm_write"> -->
|
||||||
<!-- <item><ref id="get_tv" name="get_tv"> -->
|
<!-- <item><ref id="get_tv" name="get_tv"> -->
|
||||||
<item><ref id="kbrepeat" name="kbrepeat">
|
<item><ref id="kbrepeat" name="kbrepeat">
|
||||||
<item><ref id="kbrepeatdelay" name="kbrepeatdelay">
|
|
||||||
<item><ref id="kbrepeatrate" name="kbrepeatrate">
|
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
(incomplete)
|
(incomplete)
|
||||||
@ -2174,64 +2172,17 @@ to get off the serial bus so it can be used for other purposes.
|
|||||||
<descrip>
|
<descrip>
|
||||||
<tag/Function/Set keyboard repeat mode
|
<tag/Function/Set keyboard repeat mode
|
||||||
<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
|
<tag/Header/<tt/<ref id="cbm.h" name="cbm.h">/
|
||||||
<tag/Declaration/<tt/unsigned char kbrepeat (unsigned char);/
|
<tag/Declaration/<tt/unsigned char __fastcall__ kbrepeat (unsigned char mode);/
|
||||||
<tag/Description/This function changes what keys will have automatic repeat when
|
<tag/Description/This function changes which keys have automatic repeat when
|
||||||
being hold down for a certain time. Possible values are KBDREPEAT_CURSOR (repeat
|
being hold down for a certain time. Possible values are KBREPEAT_CURSOR (repeat
|
||||||
only cursor-related keys), KBDREPEAT_NONE (no repeat for any keys) and
|
only cursor-related keys), KBREPEAT_NONE (no repeat for any keys) and
|
||||||
KBDREPEAT_ALL (repeat all keys).
|
KBREPEAT_ALL (repeat all keys). The old mode is returned so it can be restored
|
||||||
The old mode is returned so it can be restored later.
|
later.
|
||||||
<tag/Notes/<itemize>
|
<tag/Notes/<itemize>
|
||||||
<item>The function is available only as a fastcall function; so, it may be used
|
<item>The function is available only as a fastcall function; so, it may be used
|
||||||
only in the presence of a prototype.
|
only in the presence of a prototype.
|
||||||
</itemize>
|
</itemize>
|
||||||
<tag/Availability/cc65
|
<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.
|
<tag/Example/None.
|
||||||
</descrip>
|
</descrip>
|
||||||
</quote>
|
</quote>
|
||||||
|
@ -158,17 +158,16 @@ struct cbm_dirent {
|
|||||||
unsigned char get_tv (void);
|
unsigned char get_tv (void);
|
||||||
/* Return the video mode the machine is using. */
|
/* Return the video mode the machine is using. */
|
||||||
|
|
||||||
#define KBDREPEAT_CURSOR 0x00
|
#define KBREPEAT_CURSOR 0x00
|
||||||
#define KBDREPEAT_NONE 0x40
|
#define KBREPEAT_NONE 0x40
|
||||||
#define KBDREPEAT_ALL 0x80
|
#define KBREPEAT_ALL 0x80
|
||||||
|
|
||||||
unsigned char __fastcall__ kbrepeat(unsigned char);
|
unsigned char __fastcall__ kbrepeat (unsigned char mode);
|
||||||
unsigned char __fastcall__ kbrepeatdelay(unsigned char);
|
/* Changes which keys have automatic repeat. */
|
||||||
unsigned char __fastcall__ kbrepeatrate(unsigned char);
|
|
||||||
|
|
||||||
#if !defined(__CBM610__) && !defined(__PET__)
|
#if !defined(__CBM610__) && !defined(__PET__)
|
||||||
void waitvsync (void);
|
void waitvsync (void);
|
||||||
/* wait for the start of the next frame */
|
/* Wait for the start of the next frame */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
;
|
||||||
|
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
|
||||||
|
;
|
||||||
|
|
||||||
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
|
.export _kbrepeat
|
||||||
|
|
||||||
.include "c128.inc"
|
.include "c128.inc"
|
||||||
|
|
||||||
@ -7,16 +10,5 @@ _kbrepeat:
|
|||||||
ldx KBDREPEAT ; get old value
|
ldx KBDREPEAT ; get old value
|
||||||
sta KBDREPEAT ; store new value
|
sta KBDREPEAT ; store new value
|
||||||
txa ; return old value
|
txa ; return old value
|
||||||
rts
|
ldx #0
|
||||||
|
|
||||||
_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
|
|
||||||
rts
|
rts
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
;
|
||||||
|
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
|
||||||
|
;
|
||||||
|
|
||||||
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
|
.export _kbrepeat
|
||||||
|
|
||||||
.include "c64.inc"
|
.include "c64.inc"
|
||||||
|
|
||||||
@ -7,16 +10,5 @@ _kbrepeat:
|
|||||||
ldx KBDREPEAT ; get old value
|
ldx KBDREPEAT ; get old value
|
||||||
sta KBDREPEAT ; store new value
|
sta KBDREPEAT ; store new value
|
||||||
txa ; return old value
|
txa ; return old value
|
||||||
rts
|
ldx #0
|
||||||
|
|
||||||
_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
|
|
||||||
rts
|
rts
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
;
|
||||||
|
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
|
||||||
|
;
|
||||||
|
|
||||||
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
|
.export _kbrepeat
|
||||||
|
|
||||||
.include "pet.inc"
|
.include "pet.inc"
|
||||||
|
|
||||||
@ -7,16 +10,5 @@ _kbrepeat:
|
|||||||
ldx KBDREPEAT ; get old value
|
ldx KBDREPEAT ; get old value
|
||||||
sta KBDREPEAT ; store new value
|
sta KBDREPEAT ; store new value
|
||||||
txa ; return old value
|
txa ; return old value
|
||||||
rts
|
ldx #0
|
||||||
|
|
||||||
_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
|
|
||||||
rts
|
rts
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
;
|
||||||
|
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
|
||||||
|
;
|
||||||
|
|
||||||
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
|
.export _kbrepeat
|
||||||
|
|
||||||
.include "plus4.inc"
|
.include "plus4.inc"
|
||||||
|
|
||||||
@ -7,16 +10,5 @@ _kbrepeat:
|
|||||||
ldx KBDREPEAT ; get old value
|
ldx KBDREPEAT ; get old value
|
||||||
sta KBDREPEAT ; store new value
|
sta KBDREPEAT ; store new value
|
||||||
txa ; return old value
|
txa ; return old value
|
||||||
rts
|
ldx #0
|
||||||
|
|
||||||
_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
|
|
||||||
rts
|
rts
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
;
|
||||||
|
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
|
||||||
|
;
|
||||||
|
|
||||||
.export _kbrepeat, _kbrepeatdelay, _kbrepeatrate
|
.export _kbrepeat
|
||||||
|
|
||||||
.include "vic20.inc"
|
.include "vic20.inc"
|
||||||
|
|
||||||
@ -7,16 +10,5 @@ _kbrepeat:
|
|||||||
ldx KBDREPEAT ; get old value
|
ldx KBDREPEAT ; get old value
|
||||||
sta KBDREPEAT ; store new value
|
sta KBDREPEAT ; store new value
|
||||||
txa ; return old value
|
txa ; return old value
|
||||||
rts
|
ldx #0
|
||||||
|
|
||||||
_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
|
|
||||||
rts
|
rts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user