Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Need help on I/O access!

This topic is 6070 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''m a Delphi user. And I am developing a 3D game using a electronic device (something similar as a Joystick) made by myself as the input device via the Joystick/MIDI port. Don''t tell me to try something like DirectInput, etc, instead, I need a hardware-level method to read the exact value of the port, which reflects the analog signal being inputted. But I''m not sure how to do this in Delphi (I know that in Turbo Pascal 6.0 PORT[] is used to access the port). Please help if you know it. Thanx in advance!

Share this post

Link to post
Share on other sites
If you''re using Windows 2000 (or any NT-based kernel), then you''ll need to write a device driver for accing the hardware, since user-mode programs are not allowed access to the I/O ports. This is quite an undertaking, and shouldn''t be taken lightly. If you''re interested, download the DDK (driver developement kit). I''m not sure if you''ll have any luck compiling device drivers in delphi (it would require a delphi SDK, which you''re probably not going to find.)

Under Windows 95/98/ME, you can still directly access the I/O ports from a user-mode program, so if you can write assembly, you just need to use the "in" and "out" instructions. Again, I don''t know if delphi has inline assembly, but my guess is "probably not"...

I think you should consider writing at least the driver for your input device in C, because delphi was never meant to access low-level stuff like this (heck, even C wasn''t designed to access low-level stuff like this, but at least you got better libraries and inline assembly to help you).

codeka.com - Just click it.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!