How to access I/O Port of the PCI card?

I have a legacy audio PCI card ( FM sound card ) . There is no any device driver for modren Windows(x64).

Datasheet of the PCI card is here.
https://html.alldatasheet.jp/html-pdf/86387/YAMAHA/YMF724/1660/9/YMF724.html

I thought I can sound FM sounds on the device to access the I/O port (220H or 388H) .
So, I used INP/OUTP instruction to access I/O port. However, I could not sound.
// Of cause, I’m using WinRing0/WinIO lib and set TESTSIGNING ON to use INP/OUTP.

I thinks the reason is the PCI configuration data of the card has no I/O memory space on BAR area. (There are only a memory space configuration.) So, Windows blocks I/O access…?

Anyone could you please tell me how to access I/O port on the PCI card?

If I create a device driver for this PCI card, I can sound the FM sounds ?

Thanks,

If you’re not getting I/O space resources, but you ar e getting memory space resources, it’s likely that the card doesn’t have any I/O space resources.

Why not use the memory space resources you’re given?

Peter

Thanks!

I believe that the PCI card has I/O memory space. Because MS-DOS ~ Windows XP can sound sounds through I/O port 220H or 388H. However, I don’t know the reason the sound is sounding regardless there are no I/O memory space confguration data on the PCI configuration space.

Generally, user need to set environment variable “BLASTER=A220 I5 D1 T2” on the MS-DOS to sound.
On Windows XP, I think the sound driver reserves or allocates or assigns I/O port 220H or 388H for the PCI card to OS/BIOS? by using kernel/BIOS API ?

EDIT:
Also, Linux sound driver can sound sounds from the PCI card. the driver access the I/O port.
So, I think modern Windows can sound sounds from the PCI card, too.

Are you writing a DRIVER for this device, or are you simply trying to USE it??

Unless you understand how the hardware works, and have the register specs, you’re not going to be able successfully write a driver.

And if you’re just trying to USE the device… well, this is the wrong forum to be asking questions.

Peter

You made me read the datasheet.
This device can emulate a Sound Blaster device (lol) but you have to
program it to do that. Once it is programmed to do that it exposes io ports
through PCI IO space.
It also has a ‘legacy ISA mode’ that has to be configured from the bios,
good luck with that, see page 27 of the data sheet:
https://html.alldatasheet.jp/html-pdf/86387/YAMAHA/YMF724/4990/27/YMF724.html

Did you read the data sheet, or were we supposed to do that for you?

The chances of this device working on a modern windows system are very
slight.
Mark Roddy

Personally, I think this is a fool’s errand, but I will point out this is an AC97 device, and the Windows 7 DDK does include a sample driver for AC97 and MPU401 devices.

However, I’m pretty sure this will lead to tears. Seriously – and I do mean seriously – throw this thing in the garbage can and buy a $19 USB audio adapter.

@“Peter_Viscarola_(OSR)” @Mark_Roddy @Tim_Roberts

Thank you for replying.

I want to use FM sound module (OPL3) only. It’s very simple to sound sounds ( Access only 388H/220H port ). And, I already wrote the sound driver for the OPL3 emulator.

So, I believe I can drive the hardware OPL3 but also emulator OPL3 easily by accessing 388H/220H port.

I just want to know how to enable I/O port 388H (220H) on Windows 10/11(x64)… Linux and Windows XP(x86) can drive OPL3 module but Windows 10/11 not. Do you know what is the difference of the handling of I/O memory space ?

NOTE:
There are the “ALSA” AC97 driver for Linux for this PCI card. So, if I have a skill, I think I can port the driver to modern Windows, too…

@Mark_Roddy

It also has a ‘legacy ISA mode’ that has to be configured from the bios,
good luck with that, see page 27 of the data sheet:

Hmm… This means if BIOS does not support “legacy ISA mode”, Any OS can not sound FM sounds of this card ?

EDIT:
Can I use the PCI card’s I/O port by disabling “PnP” settings on the BIOS… ?

Mr Roberts is right.

Oh, and you can get a USB sound card for US$3… including shipping. Forget whatever it is you’re trying to do.

Peter

1 Like

You can program the pci device to provide IO Ports as part of it’s ‘Sound Blaster’ emulation.

1 Like

Thanks all.

I could write a custom device driver for abandoned legacy device.
But there are still some mysteries to be solved. I will investigate.