How's your sound?

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
Chilly Willy
DC Developer
DC Developer
Posts: 414
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

How's your sound?

Post by Chilly Willy »

I mentioned this in another thread, but I thought I'd make a separate one just for this. Has anyone experimented with the volume levels on their DC? What range do you get for your setup?

I have my DC hooked to a VGA box which feeds a Sceptre 21" monitor. I'm using the monitor speakers, which aren't the best, granted. I turned the volume up to speaker breaking levels, and the sound from my DC disappears into the noise at about 130. There's no reason to turn the speakers up as the noise is greater than the sound. Is the audio out from the DC noisy, or is it my VGA box coupled with the Sceptre monitor?

EDIT: It's my Sceptre monitor. I swapped the cable over to my Logitech sound system, and at volume 128 I can crank the logitech way up and hear the music without noise. The DC output is pretty damn quiet, even through a VGA box! That said, at a reasonable volume, music at 128 is very quiet - probably too quiet to hear over normal room noise. If you were using headphones with the top end not set to ear damaging levels, I imagine you could probably go down to 96 or maybe even 64. For more normal usage, I'd still go with 128 as a good minimum volume.
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: How's your sound?

Post by PH3NOM »

Hmm I think that the DC's AICA master volume is a 4bit value so we only have the range of 0x0, 0xF?

At least that is how I managed master volume control in DCMC.
viewtopic.php?f=34&t=101213&hilit=dcmc

On the file aica_cmd.c you will see my code here:

Code: Select all

#define AICA_STEREO         0x00
#define AICA_MONO           0x80
#define AICA_MAX_VOLUME     0xF

volatile unsigned long *AICA_BASE_SH4       = (unsigned long*) 0xa0700000;
volatile unsigned long *AICA_MASTER_VOLUME  = (unsigned long*) 0xa0702800;

static   unsigned char  AICA_VOL = AICA_MAX_VOLUME;

/* Increase volume.
   Input value ch should be either AICA_STEREO or AICA_MONO.
   AICA_MONO should only be used if all streaming channels are mono */
void AICA_VolumeIncrease( unsigned char ch )
{
    if(AICA_VOL < AICA_MAX_VOLUME)
    {
        unsigned int CMD_VOL = 0x00000000;
        ++AICA_VOL;
        CMD_VOL |= AICA_VOL;
        CMD_VOL |= (ch<<8);
        *AICA_MASTER_VOLUME = CMD_VOL;
    }
}

/* Decrease volume.
   Input value ch should be either AICA_STEREO or AICA_MONO.
   AICA_MONO should only be used if all streaming channels are mono */
void AICA_VolumeDecrease( unsigned char ch )
{
    if(AICA_VOL > 0)
    {
        unsigned int CMD_VOL = 0x00000000;
        --AICA_VOL;
        CMD_VOL |= AICA_VOL;
        CMD_VOL |= (ch<<8);
        *AICA_MASTER_VOLUME = CMD_VOL;
    }
}
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: How's your sound?

Post by BlueCrab »

The master volume and the per-channel "volume" are two different things.

The per-channel "volume" isn't really a volume level so much as it is an attenuation level (look at the aica.c file -- the larger value you put in for volume, the smaller the value is that's written to the register). The drop-off is actually quite drastic in hardware -- a value of 0x00 produces output that is equivalent to the input, where as 0x10 produces output that is half the intensity of the output.

(Note: This is based on information from the Saturn's SCSP, which is VERY similar in a lot of ways to the AICA, but with half the channels)
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: How's your sound?

Post by Chilly Willy »

Yeah, should have made that clear. I was talking about the channel volume rather than the master volume. Which is really an attenuator as BlueCrab points out. Attenuators are almost always logarithmic rather than linear. The channel volume function tries to convert that to linear, and does a decent job. As I found, a GOOD amp will let most of that range come through clearly. I'm really amazed at how good the DC channel volume is.
Post Reply