Pure DOS gaming system with 100% digital audio output

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

Re: Pure DOS gaming system with 100% digital audio output

Postby RayeR » 2018-12-06 @ 03:39

Thanks for confirmation that it is locaded in MMIO and how the value changes - BTW there is not any description of MMIO registers in YMF7xx datasheets (they describe only PCI config and legacy SB IO registers). I already tried to install YMF724 driver in WinXP and then use Power YMF 2.0.1 tool to control digital out. There are 3 options: OFF, ON for digital sources only, ON for all (analog out muted) In my case the Byte at base+18h changes only from 00 (off) to 01 (both on). But I saw other ~5 registers changed too... I inspect it via R & W Everything.
Currently my DOS tool doesn't support physical memory access functions available for user but I want to add it.

I started to make a simple DOS tool to YMF7xx that can report some info according to PCI config regs. so I'm able to find YMF on PCI bus and get the MMIO base address. So please be patient... ;)

Code: Select all
Yamaha YMF7XX configuration tool 1.0 (C) 2018 by Martin Rehak; raye****am.cz
Compiled by GCC 6.3.0 at 04:29:13, Dec  6 2018 (Win9x/NT/64 compatability)

Yamaha YMF724 was found at bus: 5, dev: 1, func: 0, VID: 1073h, DID: 000Dh
SERR: disabled, PERR: disabled, BusMaster: enabled, MMIO: enabled
MMIO base address: FBDF0000h, IRQ: 16, INTA, PCI status: 0210h
Legacy Audio: disabled, SB: enabled, DSP version: 3.01, IO decoding: 10-bit
SB I/O base address: 0220h, SB IRQ: 5 (legacy), SB DMA: 1 (PC/PCI)
FM-synth: enabled, FM I/O base address: 0388h
MPU401: enabled, MPU401 I/O base address: 0330h, MPU401 IRQ: 9
Gameport: enabled, Game I/O base address: 0201h
Master clk: on, PLL0: on, PLL1: on, LegacyAu0: on, LegacyAu1: on, PCI: on
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: 116
Joined: 2007-8-11 @ 13:26
Location: CZ

Re: Pure DOS gaming system with 100% digital audio output

Postby Malvineous » 2018-12-06 @ 22:32

Looks like you're making some good progress! The Linux header file seems to list many registers, maybe that will explain what the registers you are seeing changed are for. It looks like there are a few SPDIF registers, for setting things like the volume, so I'm guessing these are the ones that are also set.
User avatar
Malvineous
Oldbie
 
Posts: 592
Joined: 2006-6-11 @ 02:24
Location: Brisbane, Australia

Re: Pure DOS gaming system with 100% digital audio output

Postby RayeR » 2018-12-06 @ 23:57

Yes I got the ymfpci.h and ymfpci_main.c but they are not much documented - I mean description of what every bit of what MMIO register does. And why this is not in datasheet? There must be some more detailed datasheet for driver writers, probably secret under NDA...

The problem is that in ymfpci_main.c they set bit 1 of word 18 but in my case bit 0 is changed.
Here's a dump with SPDIF off:
Code: Select all
00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 [00] 00 00 00 00 9A 00 00
00 00 00 00 00 00 00 00 EE 00 00 80 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
05 05 02 00 10 2C 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 FF 3F FF 3F 00 00 00 00 FF 3F FF 3F
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 FF 3F FF 3F
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


and another with SPDIF on:
Code: Select all
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 [01] 00 00 00 00 9A 00 00
00 00 00 00 00 00 00 00 EE 00 00 80 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 80 02 00 10 2C 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 FF 3F FF 3F 00 00 00 00 FF 3F FF 3F
FF 3F FF 3F 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 FF 3F FF 3F
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00



I also found a strange behavior of Yamaha DSDMA TSR. Once it is loaded it mess up DPMI services some way because when I called __djgpp_map_physical_memory() it failed. When I try to compile my source with DJGPP GCC crashes on strip command in makefile. So the setting utility will be needed to be executed before DSDMA is loaded...
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: 116
Joined: 2007-8-11 @ 13:26
Location: CZ

Re: Pure DOS gaming system with 100% digital audio output

Postby Stretch » 2018-12-07 @ 02:08

I finally got SPDIF output working with my YMF-744 under pure MS-DOS!

1. Download Curtiss-Wright Graphics - Peritool and unzip to your MS-DOS hard drive.

2. Find your Yamaha sound card base address (RayeR's SMB.exe, Craig Hart's pci.exe, Intel pciview.exe, etc.).

3. Add 0x0018 to the base address and use the following command line (my YMF-744 base address is FBEB8000)
Code: Select all
PT.EXE MEM write 1 0xFBEB8018 0x1


I have never been able to get DSDMA working on my Asrock, so I don't know if there is any conflict with DSDMA or PC/PCI with this tweak.

I ran PT.EXE after Yamaha's setupds.exe /s. I plan to add a batch file to probe the PCI bus to ensure the sound card is detected and base address the same before I add the PT command to my autoexec.bat

I tested SPDIF output by running Wacky Wheels (but no SFX) and I was able to hear music from the digital output.
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: 313
Joined: 2013-11-16 @ 00:57

Re: Pure DOS gaming system with 100% digital audio output

Postby RayeR » 2018-12-07 @ 04:34

You can try 1st test version:
http://rayer.g6.cz/programm/ymf7xx.exe

I can also set some mixer value that should enable analog signal to be digitalized and send to SPDIF too. In default setting, if I understand well, in only send digital sources via SPDIF.
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: 116
Joined: 2007-8-11 @ 13:26
Location: CZ

Re: Pure DOS gaming system with 100% digital audio output

Postby Kamerat » 2018-12-07 @ 08:20

Nice work RayeR and Strech! RayeR's tool works fine on my YMF744B-V based Xwave card when loaded before the DSDMA TSR and outputs 48 kHz to my surround receiver. Added info to my spreadsheet.
User avatar
Kamerat
Oldbie
 
Posts: 856
Joined: 2014-3-14 @ 19:09
Location: Oslo, Norway

Re: Pure DOS gaming system with 100% digital audio output

Postby ruthan » 2018-12-07 @ 10:15

Kamerat wrote:Nice work RayeR and Strech!

What about me.., it was my idea to make it happen, i "spammed" right guy with registry idea:)

Stretch wrote:I have never been able to get DSDMA working on my Asrock, so I don't know if there is any conflict with DSDMA or PC/PCI with this tweak.

Which Asrock MB, are using exactly? I can confirm that Yamahas DSDMA are working on Vsta-4Core and Conroe865.

Could digital work in parallel with analog output or you have to choose at boot, which output you would use? its general midi device too mixed in digital output?

Update: You now me.. because im always greedy and feature hungry, i have to ask what about Aureal Vortex 2 digital out for Dos? Could it work too? I wasnt planned but i yesterday supplied Rayer with such card :)
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: 701
Joined: 2013-3-07 @ 04:01
Location: Schwarz Wald-from France to Ukraine, from Denmark to Austria. Celts+German+Slavs melting pot.

Re: Pure DOS gaming system with 100% digital audio output

Postby Stretch » 2018-12-07 @ 13:01

RayeR's tool worked for my YMF-744 also.

I prefer RayeR's tool since it finds your card and memory address for you so you don't have to worry about accidentally writing to the wrong address in case you swap your card out in the future.

EDIT: Ruthan, I believe I can't get NOVME switch with Jemmex because I am booting up into MS-DOS from a USB pen drive. Later I plan to reformat my PC so I can triple boot WinXP, Win98SE, and MS-DOS 7.
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: 313
Joined: 2013-11-16 @ 00:57

Re: Pure DOS gaming system with 100% digital audio output

Postby PARUS » 2018-12-07 @ 15:39

Great! I just tried it with my YMF754 and it works!!! Thank you very much!!!
Config:
Intel ICH2 PC/PCI bus
Yamaha XWAVE 6000
SB-Link cable, PC/PCI DMA
Resources 220/5/1/388
User avatar
PARUS
Member
 
Posts: 362
Joined: 2013-4-14 @ 04:03

Re: Pure DOS gaming system with 100% digital audio output

Postby ruthan » 2018-12-07 @ 22:04

Stretch wrote:Ruthan, I believe I can't get NOVME switch with Jemmex because I am booting up into MS-DOS from a USB pen drive. Later I plan to reformat my PC so I can triple boot WinXP, Win98SE, and MS-DOS 7.

Reformat is old fashion, you can just resize partition make some allocated space and copy partition from USB driver to it and boot Win98 from WinXP boot.ini (too avoid boot sector hassle).
BTW HimemX is not working for you?
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: 701
Joined: 2013-3-07 @ 04:01
Location: Schwarz Wald-from France to Ukraine, from Denmark to Austria. Celts+German+Slavs melting pot.

Re: Pure DOS gaming system with 100% digital audio output

Postby j^aws » 2018-12-07 @ 22:06

RayeR et al, great work everyone in making SPDIF available in DOS for this great sound card. I haven't tested it yet, but are you able to get both sound effects and OPL3 FM in DOS for various games?
j^aws
Oldbie
 
Posts: 665
Joined: 2013-2-02 @ 19:39
Location: UK

Re: Pure DOS gaming system with 100% digital audio output

Postby Malvineous » 2018-12-08 @ 13:18

RayeR wrote:The problem is that in ymfpci_main.c they set bit 1 of word 18 but in my case bit 0 is changed.

If you look in the Linux header file, register 0x18 is defined as YDSXGR_SPDIFOUTCTRL. If you search the C code for this, you can see where it's used and which bits are changed. The whole register has 0x00 written to it during init, and bit 0 is never written to but it is read on line 1313 just before updating the SPDIF status.

So it looks to me like bit 0 is a read-only status bit set by the hardware to indicate whether SPDIF output is active or not. Bit 1 may be a write-only bit to enable or disable the SPDIF, so it always comes back as 0 when read?

j^aws wrote:I haven't tested it yet, but are you able to get both sound effects and OPL3 FM in DOS for various games?

There are other registers for SPDIF output volume and SPDIF loop volume, so this is probably worth testing in case other registers need to be enabled in order to get OPL + PCM coming out over SPDIF.
User avatar
Malvineous
Oldbie
 
Posts: 592
Joined: 2006-6-11 @ 02:24
Location: Brisbane, Australia

Re: Pure DOS gaming system with 100% digital audio output

Postby Stretch » 2018-12-09 @ 16:41

Ruthan, there is an MS-DOS mixer which enables SPDIF created by Zanquance at Release -New Aureal DOS Mixer Util-

Unfortunately, I could not get SPDIF working properly with the utility in MS-DOS with my Superquad Vortex2.

Recorded audio in Audacity just shows up as pure PCM noise, which I did not attempt to play, because of potential damage to my speakers/ears.
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: 313
Joined: 2013-11-16 @ 00:57

Re: Pure DOS gaming system with 100% digital audio output

Postby PARUS » 2018-12-09 @ 18:26

If people let me I have to go on this topic with another digital output question.
We all know that any AWE card has SPDIF output. In AWE32/SB32 case there is only FM+EMU8k output, in AWE64 case there is SFX + FM + EMU8k output. Then, if the PCM current is not 44 kHz it is not present on SPDIF out.
Now the question: is it possible to eliminate this limitation and make any PCM samples playable via SPDIF for sure and be all resampled to 44,1 kHz?

Thank you!
User avatar
PARUS
Member
 
Posts: 362
Joined: 2013-4-14 @ 04:03

Re: Pure DOS gaming system with 100% digital audio output

Postby ruthan » 2018-12-09 @ 19:10

Stretch - Thanks i have SQ2500, i will test it.
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: 701
Joined: 2013-3-07 @ 04:01
Location: Schwarz Wald-from France to Ukraine, from Denmark to Austria. Celts+German+Slavs melting pot.

Re: Pure DOS gaming system with 100% digital audio output

Postby ZanQuance » 2018-12-09 @ 19:49

Stretch wrote:Ruthan, there is an MS-DOS mixer which enables SPDIF created by Zanquance at Release -New Aureal DOS Mixer Util-

Unfortunately, I could not get SPDIF working properly with the utility in MS-DOS with my Superquad Vortex2.

Recorded audio in Audacity just shows up as pure PCM noise, which I did not attempt to play, because of potential damage to my speakers/ears.

Oh? This is odd, you enable S/PDIF with AU30mix reset, which resets the cards VDB routing table and adds the front channel output to S/PDIF. It shouldn't need anything more, but I will test and check back here.
All projects are currently on the backburner, but ARE being worked on.
User avatar
ZanQuance
Member
 
Posts: 350
Joined: 2015-1-01 @ 23:47
Location: Aureal HQ

Re: Pure DOS gaming system with 100% digital audio output

Postby ZanQuance » 2018-12-09 @ 21:37

[edit] The new S/PDIF tool I worked up is just a temporary fix for Stretch and shouldn't be used in general, so I'm removing the link here.
a better fix will be in the new mixer tool update instead.
Last edited by ZanQuance on 2018-12-10 @ 15:37, edited 1 time in total.
All projects are currently on the backburner, but ARE being worked on.
User avatar
ZanQuance
Member
 
Posts: 350
Joined: 2015-1-01 @ 23:47
Location: Aureal HQ

Re: Pure DOS gaming system with 100% digital audio output

Postby Stretch » 2018-12-09 @ 22:04

ZanQuance, thank you for the ASPDIF tool. I played some Q2DOS through SPDIF in MS-DOS with my Vortex2 and the audio came out properly.
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: 313
Joined: 2013-11-16 @ 00:57

Re: Pure DOS gaming system with 100% digital audio output

Postby PARUS » 2018-12-10 @ 05:52

Is AWE64 DSP's datasheet available somewhere for download?
My AWE64 CT4520 (and I'm sure all of them all revisions) plays through SPDIF only 44 kHz sounds, therefore in fact I get only EMU8k+FM sound. And I use the AV310 card for getting Sound FX by SPDIF. Want to try enable (if possible) force live resampling all wave sounds to 44,1 and play through SPDIF. Yamaha, Vortex2, Live, Audigy all can play DOS wave sounds resampled to 48 kHz and send to digital out; AV310 can all sounds resampled to 44,1 kHz and digital out too. Maybe AWE64 can too?
User avatar
PARUS
Member
 
Posts: 362
Joined: 2013-4-14 @ 04:03

Re: Pure DOS gaming system with 100% digital audio output

Postby RayeR » 2018-12-10 @ 21:31

>Malvineous
Nono, all that my utility currently do is setting bit 0 of SPDIFOUTCTRL from 0 to 1 as I saw via R&W tool and PowerYMF 2.0.1 so it cannot be read-only status bit. I don't have any digital input equipped device so I didn't tried if setting of bit 1 would enable it too. Well I could hook some wires to my scope but I had only few hours at night when coding it. Later I will add some command line options also to let user overwrite any Byte so it would be possible to build individual config script. That's a pitty there's no full datasheet and it need to be reversed. My utility probes PCI deviced of all family of YMF724/740/744/754. I hope that mentioned bit and control register is the same for all.

>Stretch
Sure you can play any noise without damaging anything if you keep it in acceptable level.

BTW the 44/48k resampler build in HW is probably not good quality. Even on SB Live and Audigy HiFi people preferred to use SW resampler (plugin for Winamp or Foobar) if possible.
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: 116
Joined: 2007-8-11 @ 13:26
Location: CZ

PreviousNext

Return to Sound

Who is online

Users browsing this forum: cyclone3d and 3 guests