AY Crudentials: 8 Bit Samples

Probably the most technical forum around. It does not have to be coding related, or assembly code only. Just talk about how you can use the AY chip to do cool sounding things :)
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

AY Crudentials: 8 Bit Samples

Post by Twilighte »

The hardware of the Ay-3-8912 can only handle up to 4 bit resolution but may handle up to 8 bit through the mixing of the 3 available channels.

A phenomenon exists that means that when the volume of channel A is set to one value, and the volume of channel B is set to another, the effective single output will not be one or the other, but a fraction higher.

Using this phenomenon it is possible to build up a virtual 8 bit resolution register using a combination of volumes accross the 3 available channels.

However, though 8 bit the speed is greatly reduced because all three volume registers must be sent information for every sample Value.
This reduces the quality of the sample and in my experience, 4 bit played at 10khz is better than 8 bit played at 5Khz.
Last edited by Twilighte on Sat Jan 28, 2006 9:18 pm, edited 2 times in total.
User avatar
Euphoric
Game master
Posts: 99
Joined: Mon Jan 09, 2006 11:33 am
Location: France

Post by Euphoric »

Hello Jon, are you sure of that ? I would have imagined that two channels would produce a louder sound that a single one (more decibels)...
How have you get this value of "between 6 and 7" ? By hearing the two cases one after the other ? Or with an oscilloscope ? If you are right, I might have to change how Euphoric mixes the channels... :-)

Cheers,

Fabrice
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Apologies Fabrice, the values where very much guessed (They were given more as an example than proven values). Suffice to say i have corrected the passage at the top.
JamesD
Flight Lieutenant
Posts: 358
Joined: Tue Nov 07, 2006 7:38 am

Post by JamesD »

I think this provides a good explanation of the logarithmic nature of the AY PSG volume.

http://map.grauw.nl/articles/psg_sample.php#8bitsamples

I created a fully commented version of the Z80 assembly if anyone is interested.
JamesD
Flight Lieutenant
Posts: 358
Joined: Tue Nov 07, 2006 7:38 am

Post by JamesD »

Another MSX topic on PCM audio playback.

http://www.msx.org/forumtopic5686.html
Post Reply