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 1456 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: 954
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: 159
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: 954
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?
PC1: Win98SE - Via Apollo Pro Mobo - Pentium II 233 - 256 MB - Voodoo 3 1000 - Soundblaster 32
PC2: Win98SE - ASRock 775i65G R3.0 - Celeron 2.2 GHz - 2048 MB - Geforce FX5700 - Vortex 2 - SBLive SB0100 - YMF744
Stretch
Member
 
Posts: 335
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: 954
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: 159
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: 171
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: 954
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: 159
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
Oldbie
 
Posts: 1067
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: 159
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: 6588
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: 1094
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: 954
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

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

Postby Kamerat » 2019-5-16 @ 19:05

Tried this with an YMF724E-V based card and it looks like it doesn't have the registers for it. They are not mentioned in the datasheet and the registers I used on the YMF744 are read only on the YMF724E-V.
User avatar
Kamerat
Oldbie
 
Posts: 954
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

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

Postby Duffman » 2019-7-26 @ 18:13

Thanks for referring me to these tools

my PCIE to PCI Bridge is a different chip from the Pericom Semiconductor PI7C9X111SL

PCI\VEN_104C&DEV_8240
It's a XIO2001 Texas Instruments PCI Express-to-PCI Bridge

does this matter for config registers?
gigabyte Z97X-UD5H-BK
I7-4790
GTX 970
32GB RAM @1600
2x 256GB samsung 950 SSDs
1x WD Black 1TB
1x Seagate 3TB
Duffman
Member
 
Posts: 161
Joined: 2002-12-05 @ 05:20

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

Postby mikedebian » 2019-10-02 @ 18:55

I am not sure I understand this procedure. I am sorry to be a burden, but I promise that I am trying to understand.

So, am I to set this with pciset? Or does my own chipset need another variable? Is this standard?

pciset 0010 1073 63 11111111 11011111
pciset 0010 1073 62 11111111 01000000

I don't quite understand this:

"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."

I do get base address 220 (It says so anyway, but no DMA). Do I still need to remap it? What is the options to be used with REMAPCMI in order to get the base address remapped?

Again, sorry for asking you to do the work for me and thank you for this thread.

Edit:

I found it, and it seems to be the same as yours:

Vendor 1073h YAMAHA Corp
Device 0010h YMF744B DS1S Audio
Command 0007h (I/O Access,Memory Access, BusMaster)
Status 0210h ( Has Capabilities List, Medium Timing)
Revision 02h, Header Type 00h, Bus Latency 20h
Self test 00h (Self test not supported)
PCI Class Multimedia, type Audio
Subsystem ID 00101073h DS-XG PCI Audio Codec (Generic ID)
Subsystem Vendor 1073h YAMAHA Corp
Address 0 is a Memory Address (anywhere in 0-4Gb) : FC900000h
Address 1 is an I/O Port : 0000D000h
Address 2 is an I/O Port : 0000D040h
System IRQ 5, INT# A
New Capabilities List Present:
Power Management Capability
Current Power State : D0 (Device operational, no power saving)

So far, so good, right? I used the smb w/ script.
What else do I need to do?

Settings in Autoexec.bat

A220 I5 D1

Settings in setupds (console)

220 I5 DMA Disable
User avatar
mikedebian
Newbie
 
Posts: 21
Joined: 2017-7-12 @ 20:00

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

Postby Kamerat » 2019-10-03 @ 18:10

I would strongly suggest using SMB instead of PCISET so you can skip the hex to binary translation. Either way you have to change the values so that they reflect your PCI base IO which is D000h.

Script for D000h base address (FM=D060h, SB=D040h, MPU-401=D068h):

Code: Select all
pci_find_device(00101073)
pci_write16(60, D060)
pci_write16(62, D040)
pci_write16(64, D068)
exit

With PCISET run this for D000h:

Code: Select all
pciset 0010 1073 61 11111111 11010000
pciset 0010 1073 60 11111111 01100000
pciset 0010 1073 63 11111111 11010000
pciset 0010 1073 62 11111111 01000000
pciset 0010 1073 65 11111111 11010000
pciset 0010 1073 64 11111111 01101000

Run this after SETUPDS and DSDMA. First thing to try is FM, use Adlib Tracker II and enter the FM address of D060h in ADTRACK2.INI. If FM doesn't even work you're out of luck.
User avatar
Kamerat
Oldbie
 
Posts: 954
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

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

Postby mikedebian » 2019-10-03 @ 19:23

The problem is that DSDMA instantly reboots my computer. I've seen other people have the same problem in other threads, in which they have old(er) motherboards!
User avatar
mikedebian
Newbie
 
Posts: 21
Joined: 2017-7-12 @ 20:00

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

Postby cyclone3d » 2019-10-03 @ 19:30

mikedebian wrote:The problem is that DSDMA instantly reboots my computer. I've seen other people have the same problem in other threads, in which they have old(er) motherboards!


I wonder if replacing DOS4GW with DOS32A would make a difference.
User avatar
cyclone3d
l33t
 
Posts: 3376
Joined: 2015-4-08 @ 06:06
Location: Huntsville, AL USA

Next

Return to Sound

Who is online

Users browsing this forum: No registered users and 2 guests