Hi guys,
A fairly simple question. I cannot recall if the VIC-20 will repeat the key pressed if I keep my finger on it My VIC20 does not do that and wondering if this is normal.
If not then what could be the problem? All keys are working perfectly when pressing them.
Thanks
Rick
VIC-20 and key repeat function ??
Moderator: Moderators
Re: VIC-20 and key repeat function ??
There's a simple poke that turns key repeat on and off. I don't have time at the moment but I'll try to look it up later tonight.repetto74 wrote:Hi guys,
A fairly simple question. I cannot recall if the VIC-20 will repeat the key pressed if I keep my finger on it My VIC20 does not do that and wondering if this is normal.
If not then what could be the problem? All keys are working perfectly when pressing them.
Thanks
Rick
R'zo
I do not believe in obsolete...
I do not believe in obsolete...
Re: VIC-20 and key repeat function ??
Ok so by default this was not set up on a VIC-20? I do recall of course this working on a C64 but had a doubt for the VIC20
EDIT : I found! Actually the keystroke repeat works for the spacebar only for both C64 and VIC . My memory is failing
EDIT : I found! Actually the keystroke repeat works for the spacebar only for both C64 and VIC . My memory is failing
- Stormcrow
- Vic 20 Enthusiast
- Posts: 177
- Joined: Mon Dec 24, 2012 9:46 pm
- Website: http://trimboli.name
- Location: Ronkonkoma, NY
Re: VIC-20 and key repeat function ??
Address 650 (decimal) is "Key repeat (128 = repeat all keys)."
Address 651 is "Repeat speed counter."
Address 652 is "Repeat delay counter."
Poke 128 into address 650 to enable repeating keys. It seems any value from 0 to 127 disables key repeats and any value from 128 to 255 enables them. I'm not sure if there's anything else that happens with values other than 0 and 128. The values in 651 and 652 seem to change on their own, though I have managed to temporarily increase the delay before the repeating starts by changing address 651 (it changes back though after one repeat).
My copy of Vice seems to like to start with repeating keys disabled. I seem to remember the keys on my real VIC (not hooked up, alas) repeating by default, but I'm not completely sure.
Address 651 is "Repeat speed counter."
Address 652 is "Repeat delay counter."
Poke 128 into address 650 to enable repeating keys. It seems any value from 0 to 127 disables key repeats and any value from 128 to 255 enables them. I'm not sure if there's anything else that happens with values other than 0 and 128. The values in 651 and 652 seem to change on their own, though I have managed to temporarily increase the delay before the repeating starts by changing address 651 (it changes back though after one repeat).
My copy of Vice seems to like to start with repeating keys disabled. I seem to remember the keys on my real VIC (not hooked up, alas) repeating by default, but I'm not completely sure.
- Stormcrow
- Vic 20 Enthusiast
- Posts: 177
- Joined: Mon Dec 24, 2012 9:46 pm
- Website: http://trimboli.name
- Location: Ronkonkoma, NY
Re: VIC-20 and key repeat function ??
The cursor keys probably repeat by default as well.repetto74 wrote:Actually the keystroke repeat works for the spacebar only for both C64 and VIC .
Re: VIC-20 and key repeat function ??
Hi Stormcrow,
Many thanks for this little tutorial on how to enable repeated keystrokes for all keys! I will for sure test it
And yes of course the cursor keys have also the repeat function enabled. My memory is failing again and again
Thanks!
Rick
Many thanks for this little tutorial on how to enable repeated keystrokes for all keys! I will for sure test it
And yes of course the cursor keys have also the repeat function enabled. My memory is failing again and again
Thanks!
Rick
- Mike
- Herr VC
- Posts: 4845
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: VIC-20 and key repeat function ??
For address 650, only the top two bits are relevant (the keyboard decode routine checks the address with a BIT instruction and uses BMI and BVS to branch upon bits 6 and 7). If bit 7 (value 128) is set, all keys repeat, this also takes precedence over bit 6. If bit 6 is set (but not bit 7), no keys repeat. If both bits are 0, the CRSR keys, DELete (and INSerT) and the Space bar repeat; this is the default.
The check is located in the KERNAL at address $EB86.
The check is located in the KERNAL at address $EB86.
These two addresses keep the running values of the delay (~1/4 second) and repeat (every 1/15 second) timers, and their init values are hardcoded in the keyboard decode routine (as immediate operands of the two instructions at addresses $EB7D and $EBB0, respectively). Thankfully enough, this routine is vectored over $028F, and it is possible to replace the routine with an own version, and define other init values.Stormcrow wrote:The values in 651 and 652 seem to change on their own, [...]