This project is read-only.

Audio drivers for Cosmos.

Jan 6, 2012 at 2:27 AM
Edited Jan 6, 2012 at 2:28 AM

Hey guys, here is some work I have done for two drivers, one a Sound Blaster 16, which is what VMWare emulates. And the other is a built in PC speaker.

If you guys wouldn't mind adding me as a dev, that would be great. 

 

 

namespace Cosmos.Hardware.Drivers
{
    public class BuiltInSpeaker
    {
        //Based off of Orvid, lol, driver by: Civilwarrock & Orvid.

        public Cosmos.Core.IOPort Card = new Cosmos.Core.IOPort(0x61);
        //Write a 1 to the Sound Card.
        public void Write1()
        {
            Card.Byte = 1;
        }
        //Write a 0 to the Sound Card.
        public void Write0()
        {
            Card.Byte = 1;
        }

        /*
         * Have someone test this, make sure that it actually works. :p
         */
    }
}



namespace Cosmos.Hardware.Drivers
{
    public class SoundBlasterCard
    {
        //Based off of the Sound Blaster 16, driver by: Civilwarrock

        /*
         * Docs: http://www.inversereality.org/tutorials/sound%20programming/examples/soundblaster16example2.html & http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html
         * This is experminetal and may not work right away.
         */

        /*
         * Port table:
         *                                                    |-Bit-Numbers-|
         * Index	 7	         6	          5	           4	         3	          2	              1	           0
         * 0x00	                                              |Reset Mixer
         * 0x04	     |Voice Volume (L)	                                 |Voice Volume (R)
         * 0x0A		                                                                  |Mic Volume
         * 0x22	     |Master Volume (L)	                                 |Master Volume (R)
         * 0x26	     |MIDI Volume (L)	                                 |MIDI Volume (R)
         * 0x28	     |CD Volume (L)	                                     |CD Volume (R)
         * 0x2E	     |Line Volume (L)	                                 |Line Volume (R)
         * 0x30	     |Master Volume (L)
         * 0x31	     |Master Volume (R)
         * 0x32	     |Voice Volume (L)
         * 0x33	     |Voice Volume (R)
         * 0x34	     |MIDI Volume (L)
         * 0x35	     |MIDI Volume (R)
         * 0x36	     |CD Volume (L)
         * 0x37	     |CD Volume (R)
         * 0x38	     |Line Volume (L)
         * 0x39	     |Line Volume (R)
         * 0x3A	     |Mic Volume
         * 0x3B	     |PC Speaker Volume
         * 0x3F	     |Input Gain (L)
         * 0x40	     |Input Gain (R)
         * 0x41	     |Output Gain (L)
         * 0x42	     |Output Gain (R)
         * 0x43                                                                                                     |AGC
         * 0x44	     |Treble (L)
         * 0x45	     |Treble (R)
         * 0x46	     |Bass (L)
         * 0x47	     |Bass (R)
         */

       /*
        * Todo add all the needed ports, theres alot but it needs to be done.
        */
    }
}

 

These are my very first drivers, and I need people to test them if at all possible. Thanks - Matt

 

The sound blaster 16 driver needs work, but theres alot of ports, and if someone wants to help with it that would be great.

Jan 6, 2012 at 7:58 AM
First step in the joining process is joing the cosmos-dev mailinglist. Next step is understand how the drivers need to be structured...


On Fri, Jan 6, 2012 at 3:27 AM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Hey guys, here is some work I have done for two drivers, one a Sound Blaster 16, which is what VMWare emulates. And the other is a built in PC speaker.

If you guys wouldn't mind adding me as a dev, that would be great.

namespace Cosmos.Hardware.Drivers
{
    public class BuiltInSpeaker
    {
        //Based off of Orvid, lol, driver by: Civilwarrock & Orvid.

        public Cosmos.Core.IOPort Card = new Cosmos.Core.IOPort(0x61);
        //Write a 1 to the Sound Card.
        public void Write1()
        {
            Card.Byte = 1;
        }
        //Write a 0 to the Sound Card.
        public void Write0()
        {
            Card.Byte = 1;
        }

        /*
         * Have someone test this, make sure that it actually works. :p
         */
    }
}



namespace Cosmos.Hardware.Drivers
{
    public class SoundBlasterCard
    {
        //Based off of the Sound Blaster 16, driver by: Civilwarrock

        /*
         * Docs: http://www.inversereality.org/tutorials/sound%20programming/examples/soundblaster16example2.html & http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html
         * This is experminetal and may not work right away.
         */

        /*
         * Port table:
         *                                                    |-Bit-Numbers-|
         * Index	 7	         6	          5	           4	         3	          2	              1	           0
         * 0x00	                                              |Reset Mixer
         * 0x04	     |Voice Volume (L)	                                 |Voice Volume (R)
         * 0x0A		                                                                  |Mic Volume
         * 0x22	     |Master Volume (L)	                                 |Master Volume (R)
         * 0x26	     |MIDI Volume (L)	                                 |MIDI Volume (R)
         * 0x28	     |CD Volume (L)	                                     |CD Volume (R)
         * 0x2E	     |Line Volume (L)	                                 |Line Volume (R)
         * 0x30	     |Master Volume (L)
         * 0x31	     |Master Volume (R)
         * 0x32	     |Voice Volume (L)
         * 0x33	     |Voice Volume (R)
         * 0x34	     |MIDI Volume (L)
         * 0x35	     |MIDI Volume (R)
         * 0x36	     |CD Volume (L)
         * 0x37	     |CD Volume (R)
         * 0x38	     |Line Volume (L)
         * 0x39	     |Line Volume (R)
         * 0x3A	     |Mic Volume
         * 0x3B	     |PC Speaker Volume
         * 0x3F	     |Input Gain (L)
         * 0x40	     |Input Gain (R)
         * 0x41	     |Output Gain (L)
         * 0x42	     |Output Gain (R)
         * 0x43                                                                                                     |AGC
         * 0x44	     |Treble (L)
         * 0x45	     |Treble (R)
         * 0x46	     |Bass (L)
         * 0x47	     |Bass (R)
         */

       /*
        * Todo add all the needed ports, theres alot but it needs to be done.
        */
    }
}

These are my very first drivers, and I need people to test them if at all possible. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 6, 2012 at 10:34 PM

how would one include an audio file to play?

Jan 6, 2012 at 11:51 PM
L448 wrote:

how would one include an audio file to play?

Well FAT, is not actually fully working yet, so you can't yet. But you coud make sound effects if you know what your doing. I still have to figure out if these work. As I dont have a computer that has a built in speaker on the board. Yours Truly - Matt

And how do I join the mailing list? I though I did when I joined the yahoo group?

Jan 7, 2012 at 7:10 AM

program your own sound effects? - cool

Jan 7, 2012 at 12:19 PM
mailinglist = the yahoo thingy (cosmos-dev)

On Sat, Jan 7, 2012 at 8:10 AM, L448 <notifications@codeplex.com> wrote:

From: L448

program your own sound effects? - cool

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 8, 2012 at 4:15 PM
I dont see anything here except a few lines for beep?

On 1/5/2012 10:27 PM, civilwarrock wrote:
> From: civilwarrock
>
> Hey guys, here is some work I have done for two drivers, one a Sound
> Blaster 16, which is what VMWare emulates. And the other is a built in
> PC speaker.
>
> If you guys wouldn't mind adding me as a dev, that would be great.
>
> namespace Cosmos.Hardware.Drivers
> {
> public class BuiltInSpeaker
> {
> //Based off of Orvid, lol, driver by: Civilwarrock& Orvid.
>
> public Cosmos.Core.IOPort Card =new Cosmos.Core.IOPort(0x61);
> //Write a 1 to the Sound Card.
> public void Write1()
> {
> Card.Byte = 1;
> }
> //Write a 0 to the Sound Card.
> public void Write0()
> {
> Card.Byte = 1;
> }
>
> /*
> * Have someone test this, make sure that it actually works. :p
> */
> }
> }
>
>
>
> namespace Cosmos.Hardware.Drivers
> {
> public class SoundBlasterCard
> {
> //Based off of the Sound Blaster 16, driver by: Civilwarrock
>
> /*
> * Docs: http://www.inversereality.org/tutorials/sound%20programming/examples/soundblaster16example2.html& http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html
> * This is experminetal and may not work right away.
> */
>
> /*
> * Port table:
> * |-Bit-Numbers-|
> * Index 7 6 5 4 3 2 1 0
> * 0x00 |Reset Mixer
> * 0x04 |Voice Volume (L) |Voice Volume (R)
> * 0x0A |Mic Volume
> * 0x22 |Master Volume (L) |Master Volume (R)
> * 0x26 |MIDI Volume (L) |MIDI Volume (R)
> * 0x28 |CD Volume (L) |CD Volume (R)
> * 0x2E |Line Volume (L) |Line Volume (R)
> * 0x30 |Master Volume (L)
> * 0x31 |Master Volume (R)
> * 0x32 |Voice Volume (L)
> * 0x33 |Voice Volume (R)
> * 0x34 |MIDI Volume (L)
> * 0x35 |MIDI Volume (R)
> * 0x36 |CD Volume (L)
> * 0x37 |CD Volume (R)
> * 0x38 |Line Volume (L)
> * 0x39 |Line Volume (R)
> * 0x3A |Mic Volume
> * 0x3B |PC Speaker Volume
> * 0x3F |Input Gain (L)
> * 0x40 |Input Gain (R)
> * 0x41 |Output Gain (L)
> * 0x42 |Output Gain (R)
> * 0x43 |AGC
> * 0x44 |Treble (L)
> * 0x45 |Treble (R)
> * 0x46 |Bass (L)
> * 0x47 |Bass (R)
> */
>
> /*
> * Todo add all the needed ports, theres alot but it needs to be done.
> */
> }
> }
>
> These are my very first drivers, and I need people to test them if at
> all possible. Thanks - Matt
>
> Read the full discussion online
> <http://cosmos.codeplex.com/discussions/285166#post721204>.
>
> To add a post to this discussion, reply to this email
> ([email removed]
> <mailto:[email removed]?subject=[Cosmos:285166]>)
>
> To start a new discussion for this project, email
> [email removed] <mailto:[email removed]>
>
> You are receiving this email because you subscribed to this discussion
> on CodePlex. You can unsubscribe or change your settings
> <https://cosmos.codeplex.com/subscriptions/thread/project/edit> on
> codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any
> posts to this discussion will also be available online at codeplex.com
>
Jan 8, 2012 at 7:43 PM

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Jan 9, 2012 at 8:11 AM
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 9, 2012 at 7:28 PM
mterwoord wrote:
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Ok thanks mterwood, but before I do that, does the first one work? Because I dont have a machine that would work with that, so I wonder if it actually work? Thanks - Matt

Jan 9, 2012 at 7:28 PM
mterwoord wrote:
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Ok thanks mterwood, but before I do that, does the first one work? Because I dont have a machine that would work with that, so I wonder if it actually work? Thanks - Matt

Jan 9, 2012 at 7:28 PM
mterwoord wrote:
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Ok thanks mterwood, but before I do that, does the first one work? Because I dont have a machine that would work with that, so I wonder if it actually work? Thanks - Matt

Jan 9, 2012 at 7:28 PM
mterwoord wrote:
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Ok thanks mterwood, but before I do that, does the first one work? Because I dont have a machine that would work with that, so I wonder if it actually work? Thanks - Matt

Jan 10, 2012 at 7:54 AM
Dont have such a machine either.....

On Mon, Jan 9, 2012 at 8:28 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

mterwoord wrote:
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Ok thanks mterwood, but before I do that, does the first one work? Because I dont have a machine that would work with that, so I wonder if it actually work? Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 10, 2012 at 1:51 PM

I'll test it later today...

On Jan 10, 2012 12:54 AM, "mterwoord" <notifications@codeplex.com> wrote:

From: mterwoord

Dont have such a machine either.....

On Mon, Jan 9, 2012 at 8:28 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

mterwoord wrote:
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Ok thanks mterwood, but before I do that, does the first one work? Because I dont have a machine that would work with that, so I wonder if it actually work? Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jan 10, 2012 at 7:19 PM
joshbeitler wrote:

I'll test it later today...

On Jan 10, 2012 12:54 AM, "mterwoord" <notifications@codeplex.com> wrote:

From: mterwoord

Dont have such a machine either.....

On Mon, Jan 9, 2012 at 8:28 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

mterwoord wrote:
For this driver to be included in the Cosmos repository, the driver needs to be restructured i guess.. Have a look at how this is done for ATA etc....


On Sun, Jan 8, 2012 at 8:43 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

Yeah, that was my goal was to make it beep. Remember only 13, so these are my first simple drivers. Because I wanted to make a beep in my os playground, and I Console.Beep() didn't work and I didn't think there were any drivers for it, so I wrote these two. But however the second one needs to be finished, and the first was a test. But it only works for builtin speakers on the board, which I don't have, so that means the second would work...but it's kind of a hard one. Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Ok thanks mterwood, but before I do that, does the first one work? Because I dont have a machine that would work with that, so I wonder if it actually work? Thanks - Matt

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Thanks. I know someone attempted PIT support so im going to look into that and see if I might be able to get it working. Thanks - Matt