Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Discussion about old sound cards, MIDI devices and sound related accessories.

Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby Kamerat » 2018-7-17 @ 07:25

With the help of PCI.EXE for finding the PCI base address and PCISET to modify the correct registers I managed to get the YMF744 working on a motherboard that doesn't support legacy/ISA addressing over the PCI bus. This could also be useful when using the YMF744 behind a PCIe-PCI bridge. The registers you want to modify are 62-63h and set them to PCI base address +40 after the initialization of the card with SETUPDS.EXE.

Used this to set the Sound Blaster base address to DF40h (PCI base address is DF00). The FM synth of the card are aviable at PCI base address +60h.
(DF40h = 1101111101000000b)
Code: Select all
pciset 0010 1073 63 11111111 11011111
pciset 0010 1073 62 11111111 01000000

SMB may be an easier way to set up the PCI registers, no need to convert to binary with this one. To load a script just type "SMB /dbg scriptfile". Here I'm also setting up MPU-401 interface (base +68h) and FM synth (base +60h).
Here's a sample script:
Code: Select all
pci_find_device(00101073)
pci_write16(60, DF60)
pci_write16(62, DF40)
pci_write16(64, DF68)
exit

The largest problem now is configuring games. Some games you can manually edit the configuration file to set the right addresses. A tool like REMAPCMI could be useful for mapping legacy addresses, and it will probably also work on the YMF744.

Useful links:

This picture actually gave me the idea to try this out:

audio.jpg
This picture actually gave me the idea to try this out.
audio.jpg (22.75 KiB) Viewed 638 times


Edit: Tried Epic Pinball and One Must Fall 2097 with the REMAPCMI utility without success with both games crashing hard. Perhaps REMAPCMI and DSDMA don't like each other? Forgot that REMAPCMI remaps 220 to PCI base address +50h, when loading it with the YMF744 you need to subtract 10h from the base address to get base address +40h.
The games I had success with: Descent, Doom 1.9 (no FM bacause of hardcoded address) and Duke Nukem 3D (no FM bacause of hardcoded address).

Also played around with my PCIe-PCI brigde based on the Pericom Semiconductor PI7C9X111SL chip and here are the results with the YMF744:
  • Asus P5VD2-VM SE (VIA P4M900/VT8237S): Bridge not detected.
  • ASRock 939Dual-SATA2 (ULi M1695/M1567): Bridge detected but not the YMF744.
  • Gigabyte GA-MA790X-UD3P (AMD 790X/SB750): Both bridge and YMF744 detected but it got IRQ conflicts (Duke Nukem 3D fails in IRQ detection). The card works in the onboard PCI slots and is the board I used for my testing.
  • Asus P5B-Deluxe (Intel P965/ICH8): Same problem as above.
Last edited by Kamerat on 2018-7-21 @ 06:19, edited 2 times in total.
User avatar
Kamerat
Oldbie
 
Posts: 832
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby RayeR » 2018-7-18 @ 17:05

Hi, for editing PCI registers (and much more) you can try my program SMB http://rayer.g6.cz/programm/programe.htm#SMB
Run smb /dbg and try help command to see what you can do. All you type into interactive shell can be loaded as a sequence from a script file.
I'm still developing this tool and added/improved a lot of features (SPD, SMART, shell...) but I messed some code I'm working on so I cannot make a clean release. But if you want to try a WIP version as is I can send it to you.

UPDATE:
Here I found some notes in intel PCH 7-series datasheet about PCI legacy mode and subtr. decode, maybe you had read it too...

5.1.9 PCI Legacy Mode
For some PCH SKUs, native PCI functionality is not supported requiring methods such
as using PCIe*-to-PCI bridges to enable external PCI I/O devices. To be able to use
PCIe-to-PCI bridges and attached legacy PCI devices, the PCH provides PCI Legacy
Mode. PCI Legacy Mode allows both the PCI Express* root port and PCIe-to-PCI bridge
look like subtractive PCI-to-PCI bridges. This allows the PCI Express root port to
subtractively decode and forward legacy cycles to the bridge, and the PCIe-to-PCI
bridge continues forwarding legacy cycles to downstream PCI devices. For designs that
would like to utilize PCI Legacy Mode, BIOS must program registers in the PCI-to-PCI
bridge (Device 30:Function 0) and in the desired PCI Express Root Port (Device
28:Functions 0–7) to enable subtractive decode.
Note: Software must ensure that only one PCH device is enabled for Subtractive decode at a
time.
Gigabyte GA-P67-DS3-B3, Core i7-2600K @4,5GHz, 4GB DDR3, 128GB SSD, GF7900GT, SB Audigy + YMF724F + DreamBlaster combo
User avatar
RayeR
Member
 
Posts: 107
Joined: 2007-8-11 @ 13:26
Location: CZ

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby Kamerat » 2018-7-21 @ 06:29

RayeR wrote:Hi, for editing PCI registers (and much more) you can try my program SMB http://rayer.g6.cz/programm/programe.htm#SMB
Run smb /dbg and try help command to see what you can do. All you type into interactive shell can be loaded as a sequence from a script file.

I added an example using your SMB tool, thanks alot. Is there any way to find the I/O addresses of a PCI card with SMB?

RayeR wrote:I'm still developing this tool and added/improved a lot of features (SPD, SMART, shell...) but I messed some code I'm working on so I cannot make a clean release. But if you want to try a WIP version as is I can send it to you.

Yes, please Please send me the WIP version.

RayeR wrote:UPDATE:
Here I found some notes in intel PCH 7-series datasheet about PCI legacy mode and subtr. decode, maybe you had read it too...

Unfortunately I don't own any newer motherboards than X58 based ones so I have no way of testing it.
User avatar
Kamerat
Oldbie
 
Posts: 832
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby Stretch » 2018-7-21 @ 20:14

Would Duke3d work if you open the duke3d config file with a text editor and change the port from 0x220?
Win98SE - Intel SE440BX-2 - Pentium II 233 Mhz - 256 MB System Ram - Voodoo 3 1000 AGP - Yamaha YMF-724 PCI - Soundblaster 32 ISA
Stretch
Member
 
Posts: 305
Joined: 2013-11-16 @ 00:57

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby Kamerat » 2018-7-21 @ 20:21

Stretch wrote:Would Duke3d work if you open the duke3d config file with a text editor and change the port from 0x220?

Yes, also use a driver package with the DSDMA TSR included if you intend to run the card in a motherboard that doesn't work with DDMA mode.
User avatar
Kamerat
Oldbie
 
Posts: 832
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby RayeR » 2018-7-22 @ 19:55

BTW why is the DSDMA so hard to find and missing in most of driver packages? I had to google quite hard until I found some russian site with full driver package. Did someone investigated how this TSR is working? Could it be possible to modify it to work with SB cards?
Gigabyte GA-P67-DS3-B3, Core i7-2600K @4,5GHz, 4GB DDR3, 128GB SSD, GF7900GT, SB Audigy + YMF724F + DreamBlaster combo
User avatar
RayeR
Member
 
Posts: 107
Joined: 2007-8-11 @ 13:26
Location: CZ

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby LSS10999 » 2018-7-23 @ 00:34

RayeR wrote:BTW why is the DSDMA so hard to find and missing in most of driver packages? I had to google quite hard until I found some russian site with full driver package. Did someone investigated how this TSR is working? Could it be possible to modify it to work with SB cards?


As far as I could remember DSDMA is only present in the official YAMAHA DOS driver package, which probably has a higher version than most of the OEM provided driver files. The DSDMA TSR, on the other hand, is not well known and was hardly mentioned until recent developments that found out it could be used to make DOS audio working on post-ICH5 chipsets.
LSS10999
Member
 
Posts: 109
Joined: 2009-10-28 @ 14:32

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby Kamerat » 2018-7-30 @ 21:56

Kamerat wrote:The games I had success with: Descent, Doom 1.9 (no FM bacause of hardcoded address) and Duke Nukem 3D (no FM bacause of hardcoded address).

Also tested the MPU-401 interface at PCI base address +68h on theese games, all three working.
User avatar
Kamerat
Oldbie
 
Posts: 832
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby RayeR » 2018-8-11 @ 02:17

BTW is there some standard for MPU-401 TX out voltage level? I tried more soundcards and seems that PCI cards provide 3,3V output and some but not all ISA cards provide 5V output. From some reference schematics I can see that MIDI UART Tx just goes from the sound chip via some resitor so it depensd on how the chip is powered (newer use 3,3V, older 5V)
Gigabyte GA-P67-DS3-B3, Core i7-2600K @4,5GHz, 4GB DDR3, 128GB SSD, GF7900GT, SB Audigy + YMF724F + DreamBlaster combo
User avatar
RayeR
Member
 
Posts: 107
Joined: 2007-8-11 @ 13:26
Location: CZ

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby Tiido » 2018-8-11 @ 03:27

MIDI comms in the cables are current based not voltage, but stuff going to the gameport is logic levels and you're at the mercy of the circuit in the gameport to MIDI cable that converts it to what is going on it the MIDI cables. There shouldn't be any issues though, treshold voltage is supposed to be 2.4V for "1" so 3.3V should to work without issues.
User avatar
Tiido
Member
 
Posts: 371
Joined: 2018-1-14 @ 04:40
Location: Estonia

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby RayeR » 2018-8-12 @ 19:16

Yes, I read that MIDI use current loop to drive some optocoupler but probably most soundcards implement MIDI OUT on gameport by simple pin with resistor in series, not a current source. But newer mind, as I looked to datasheet of Dreamblaster SAM2695 it has 5V tollerand MIDI input so there shouldn't be problem.
Gigabyte GA-P67-DS3-B3, Core i7-2600K @4,5GHz, 4GB DDR3, 128GB SSD, GF7900GT, SB Audigy + YMF724F + DreamBlaster combo
User avatar
RayeR
Member
 
Posts: 107
Joined: 2007-8-11 @ 13:26
Location: CZ

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby gdjacobs » 2018-8-13 @ 01:40

The MIDI Assoc. do have a recommended configuration.
https://www.midi.org/specifications-old ... cification

Modern boosted optocouplers generally have enough current transfer ratio to make do with a 3.3V supply voltage and 220 ohm resistors.
User avatar
gdjacobs
l33t++
 
Posts: 5542
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby ruthan » 2018-9-26 @ 21:52

Nice thread, it would great to make some originally not working games from my list, working with Yamaha with help such tool:
https://docs.zoho.com/sheet/published.d ... &mode=html
If you manage it, report it pleas.

Are these addresses / scripts unique per machine, or could be shared and used for other machines?
Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough HW.
User avatar
ruthan
Oldbie
 
Posts: 532
Joined: 2013-3-07 @ 04:01
Location: Schwarz Wald-from France to Ukraine, from Denmark to Austria. Celts+German+Slavs melting pot.

Re: Using Yamaha the YMF744 under DOS without legacy/ISA addressing

Postby Kamerat » 2018-9-27 @ 05:43

I will report if I test some more games this way.

PCI base addresses can vary from setup to setup and it might also change if you remove/disable or add/enable other PCI devices, so it's a bit of a hazzle. The values I add to the base adress are the same though.
User avatar
Kamerat
Oldbie
 
Posts: 832
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway


Return to Sound

Who is online

Users browsing this forum: No registered users and 5 guests