Disable keyboard click sound on the SVI

Post Reply
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Disable keyboard click sound on the SVI

Post by RobertK »

How can we disable the keyboard click sound on the Spectravideo SVI?

On the MSX it goes like this (found here):

Code: Select all

#asm
ADDR_CLIKSW:   equ 0xf3db	;Key Press Click Switch 0:Off 1:On (1B/RW)
ld a, 0
ld (ADDR_CLIKSW), a     ; Key Press Click Switch 0:Off 1:On (1B/RW)
#endasm
I was hoping that the MSX and SVI are similar enough so that this would work on both systems, but it doesn't.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Disable keyboard click sound on the SVI

Post by RobertK »

P.S. The click sound is only present when the program has been loaded from a .cas tape file. Cartridges compiled with the --hardware-keyboard option are not affected.
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Re: Disable keyboard click sound on the SVI

Post by dom »

I'm hoping Stefano will be along soon with a ROM disassembly that he's been working on....

As a simple workaround, --hardware-keyboard can be used for .cas files of course.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Disable keyboard click sound on the SVI

Post by RobertK »

dom wrote: Mon Dec 27, 2021 4:54 pmAs a simple workaround, --hardware-keyboard can be used for .cas files of course.
Unfortunately, that does not seem to help. I've just tried it with my joytest.c program, and the click sound can still be heard.
Anyway, there will hopefully be a proper solution, as the --hardware-keyboard option would consume some extra memory.

Off-topic here, but I thought I should mention this: the created SVI .cas files contain some unnecessary (?) data after the actual program. For example, my created joytest .cas tape is 2:31 long, but the program itself is contained within only the first 26 seconds, and there are lots of beeps after that.
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Re: Disable keyboard click sound on the SVI

Post by dom »

Ah. So it’s the interrupt that’s gathering the keys that’s beeping, not the consumption of the keyboard queue.

I’ve got a vague memory of this in the past - I thought we came up with a solution.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Disable keyboard click sound on the SVI

Post by stefano »

msxbasic.def and svibasic.def have the definition for 'CLIKSW' (1: click sound on, 0: click sound off).

It sould be $FA02 on the SVI, $F3DB on the MSX
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Disable keyboard click sound on the SVI

Post by RobertK »

Using $FA02 the click sound is gone now, thanks!

Maybe you could add this information to the MSX and SVI wiki pages?
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Disable keyboard click sound on the SVI

Post by stefano »

We should rather extend the API :)
I'm on a time consuming activity for the mentioned disassembly, before it.

By the way, the mentioned 'def' files are a good cross-reference, and there's a lot of information for the MSX online. The SVI is quite specular.
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: Disable keyboard click sound on the SVI

Post by Timmy »

The keyboard click for the MSX is pretty much common knowledge for MSX developers.

I'm not sure how this should be handled here either. Not everything needs to have the keyboard click disabled.

For example, when I ported Any Treasure Day to the MSX (a text adventure) some time ago, I've intentionally left Keyboard Click on. It made sense to keep the keyboard click sound in that case.

By default it's on, if I remember correctly.
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Re: Disable keyboard click sound on the SVI

Post by dom »

I've just added the pragma: CLIB_FIRMWARE_KEYBOARD_CLICK to disable the click. Value 0 is disabled, 1 enabled, -1 leave as default.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Disable keyboard click sound on the SVI

Post by stefano »

Timmy, I was just suggesting how to solve similar SVI topics in the future. Comparing the DEF files helps to adapt the MSX solutions on the SVI.
Post Reply