Driver For SoundBlaster 16

Topics: Using Cosmos (Developing your own OS, projects, etc)
Jul 31, 2012 at 6:27 PM
Edited Jul 31, 2012 at 8:19 PM

I am making a driver for sound blaster 16 audio device but all the ports i can find for it won't work in cosmos for example the reset port is 2x6h and that won't work the compiler reds it out, all i need to know is how to use these ports and i will most likely have a driver working for this soon. Also how would i delay 3 microseconds?

 

namespace Cosmos.Hardware.Drivers {

    public class SB16 {

        public static void Init() {
            Cosmos.Core.IOPort port = new Cosmos.Core.IOPort(2x6h);
            port.Byte = 1;
            }
       

        }
    
    }
Coordinator
Jul 31, 2012 at 9:46 PM

Did you have a look at existing drivers, like data work?
Are you planning on contributing your work to cosmos?

Op 31 jul. 2012 20:27 schreef "Matt8110" <notifications@codeplex.com> het volgende:

From: Matt8110

I am developing some drivers for the Nvidia Geforce series and AC'97 and SoundBlaster16 audio because they are the most used, however i can't figure out how ioports work, i know the functions to use them, but don't understand how they work, if someone could give me an example that would be great.

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

Jul 31, 2012 at 9:49 PM

I looked at the VMWare SVGA driver and yes i am planning on contributing my work to cosmos.

Jul 31, 2012 at 9:56 PM

I Noticed Under Your Post It Had My Old Post Before I Edited It, Just Wondering If You Saw My Post After I Edited It

Jul 31, 2012 at 9:57 PM

I Noticed Under Your Post It Had My Old Post Before I Edited It, Just Wondering If You Saw My Post After I Edited It

Coordinator
Aug 1, 2012 at 6:20 AM

Yes I saw. What part of the IOPorts stuff is unclear?

Op 31 jul. 2012 23:56 schreef "Matt8110" <notifications@codeplex.com> het volgende:

From: Matt8110

I Noticed Under Your Post It Had My Old Post Before I Edited It, Just Wondering If You Saw My Post After I Edited It

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

Aug 1, 2012 at 6:20 PM

For some reason it won't let me user IOPort 2x6h which is the reset port for the sound blaster 16

 

Here is where i got the ioports from, everywhere i look they are the same: http://homepages.cae.wisc.edu/~brodskye/sb16doc/sb16doc.html#DSPPorts

Aug 1, 2012 at 6:22 PM
Edited Aug 1, 2012 at 6:22 PM

I gave example code in my first post.

Aug 1, 2012 at 6:27 PM

Also i am a bit unclear as to how IOPorts work exactly, The way i see it is you are writing/reading data from the ports and by doing that you can tell devices what to do, Is that correct?

Aug 1, 2012 at 6:55 PM

Nevermind I Figured It Out, The Correct Port Was 0x6 Anyways I Have A New Question, How Can I Delay For 3 Microseconds?

 

You Initialize The Sound Blaster 16 By Writing 1 To Port 0x6 Then Waiting 3 Microseconds Then Writing 0 To Port 0x6

Coordinator
Aug 1, 2012 at 6:57 PM
On 8/1/2012 2:55 PM, Matt8110 wrote:
> From: Matt8110
>
> Nevermind I Figured It Out, The Correct Port Was 0x6 Anyways I Have A
> New Question, How Can I Delay For 3 Microseconds?
>
> You Initialize The Sound Blaster 16 By Writing 1 To Port 0x6 Then
> Waiting 3 Microseconds Then Writing 0 To Port 0x6

Look in the ATA code, there are comments about delalys and ports.
Aug 1, 2012 at 7:35 PM

Where do i find it?

Coordinator
Aug 2, 2012 at 1:26 AM
On 8/1/2012 3:35 PM, Matt8110 wrote:
> Where do i find it?

In the source code.
Developer
Aug 2, 2012 at 1:29 AM

Wow its pretty well hidden. ;)

Aug 2, 2012 at 1:39 AM

Okay, I Will Download The Source And Take A Look At It