Jump to content
  • Advertisement
Sign in to follow this  
space warp

Hardware port access

This topic is 4164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to access the sound card on my computer and have got a good base for this. The problem now is that I have not found anything on how to access a hardware port in Win32, there seems to be quite bit on accessing serial ports but that is not what I am looking for. Does anyone know how to access a hardware port?

Share this post


Link to post
Share on other sites
Advertisement
Do you just want to play sound or do you want to directly access your sound-card hardware for some reason?

If it's the former then just use an appropriate API, like FMOD. If it's the latter then on a modern system you'll need to write a driver to actually get access to the hardware. Futhermore the documentation for the hardware interface for your soundcard is probably not publically available so you won't be able to do anything with it. It may have a soundblaster emulation mode or something in which case you might be able to write a driver for it.

Share this post


Link to post
Share on other sites
I am trying to access the sound card's Sound Blaster 2.0 functionality. I am just using the sound card as a test. Later on I will connect to a special IR-unit that I have.
Does it really matter? All I want to do at the moment is to connect to hardware port #220, read, write, and close it again.

Share this post


Link to post
Share on other sites
Well the ASM instructions for writing ports, are privledged instructions which means normal programs running in user mode can't use them. AFAIK there's no way to read and write directly from and to an arbitrary port in a user-mode application under Windows.

Quote:
I am just using the sound card as a test


As in a test to make sure you can read and write ports directly? Presumably so you know it all works when you attach this IR-unit you have.

So this begs the question how does this IR-unit interface with your computer? It may be you don't need to read and write directly to hardware ports to access it. If you do you're either gonna have to find a driver or write one probably.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!