[info][tutorial]Real DOS with Sound on Modern PC?!

ZDoom LE, Pentium 133's, Windows 98, and DOS 3.1 all go here! A bygone era, of particular interest to some folks.
Post Reply
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

[info][tutorial]Real DOS with Sound on Modern PC?!

Post by Drathian »

I dual partitioned my win10 with msdos and freedos, that was quite the feat itself.

Among other things I had to reimage win10 to mbr, make dos the boot primary partition...

But now I'm having extreme difficulty getting any sound to work.

Based on the project:
http://www.georgpotthast.de/dossound/

and the update here from this project:
https://sourceforge.net/projects/hx-dos/files/2.17/
Spoiler:
I was able to get DOSBox running inside dos. and using the commandline:
echo RUN DPMILD32.EXE -g (NAMEOF).exe for sound support!
DPMILD32.ESE -g C:\dosbox\dosbox.exe

In theory under ac'97 or some intel cards I should hear sound, no luck so far. Thought perhaps I'm missing something.
Last edited by Drathian on Sat Apr 27, 2019 2:12 am, edited 6 times in total.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by wildweasel »

To what end, though? What are you trying to run?
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by Drathian »

Well since I enabled video acceleration I was hoping to get a dos machine running games with sound on any pc.

There was an old thread somewhere on the net (here: http://www.bttr-software.de/forum/forum ... p?id=15201 )about a developer porting a working hxdos sound emulator that runs via win32 api translation on actual dos.

I can't run a direct dos exe via this method, but there is a compiled version of DOSBox for dos (I know right), that can be hooked via this method and is supposed to make sound. So in theory I could run doom in DOSBox on dos.

I'm not sure if I'm doing something wrong or if I have the wrong intel chipset to try this hack. I've emailed the dev and the person who made the post to no avail.

It runs no errors but no sound. I'm not sure if its not working or if I need to output to a jack or a computer with ac'97 jack (which i'm exploring atm).
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by Drathian »

Ok here is the main driver link:

https://sound-dos.ucoz.ru/load/new_hxdo ... 17/1-1-0-8

I read on vogons that the guy behind hxldr32 hx dos loader died japeth, :(

https://www.vogons.org/viewtopic.php?t=53061&p=572075

but someone got it to work. hmmm

I'm searching around still, there has been progress on freedos working with various video accelerators like mtrrlfbe or fastvid. so we are close however silly it is to play dos games on a modern computer.

On Ruslan page he also has some ports compiled for dos including YES ZDOOM, so that is another way this find might be useful. If we can wrap the win32 api sound driver on dos into a port compiled for dos it has sound too then!
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by Drathian »

This youtube video suggests that even dos-x (allows pc98 emulation) could be ported to use hx dos sound loader:

https://www.youtube.com/watch?v=h7PhIGMNPE4
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by Drathian »

If anyone is interested in launching dos on a modern computer, you need to keep this in mind though.

MS-DOS can't see partitions that aren't FAT or FAT32 (without patches) it must be run on the first primary partition, no bigger then 4GB FAT with the latest win98se or winme (Ms-dos 8.0) dos patches. I have a game drive on the second partition that is fat32 to allow compatibility with ms-dos it is 32GB only, but it has a lot of trouble reading it most of the time, FreeDOS on the other hand supports it better for games and drive compatibility. There is a readonly ntfs driver by paragon called ntfs4dos that can be loaded by either.

By default MS-DOS or freedos does not see your powerful video card (anything is powerful compared to the dos days) you will have to use either fastvid or mtrrlfbe (I prefer) to enable fast VESA loading in the environment.

To allow any of the ports or DOSBox or dos-x compiled for dos to run you need to have a copy of the last version of hx dos 32 extender.

and run the TSR (resident program driver) before launching.

like so:

Code: Select all

SET HDPMI=32768
hdpmi32.exe
Then you can attempt the sound emulation via:

Code: Select all

DPMILD32.ESE -g C:\zdoom\zdoom.exe doom.wad
of course I would always recommend use dosidle.exe (a tsr) or your cpu will run at max the whole time you are in dos. Also if you want mouse support run ctmouse (tsr) or mouse.exe (tsr).

MS-Dos runs out of memory fast with all the tsrs so if you need ems memory, your better off to use freedos with himemx.exe and jemm386 settings, sometimes that even isn't enough to play games then you'll need to fiddle with udma2s.sys and umbpci.sys loading.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by wildweasel »

I'm not sure I understood even 25% of what you're trying to do. You're running DOSBox... from FreeDOS? To run ZDoom? Of which any reasonably useful version doesn't even have a DOS version?

I'm sure you have your reasons - hell, so do I sometimes, like timedemoing Quake on two different Windows CE devices - but this is such unexplored territory that I'm not sure anybody else on the forum would know how to help you with what you need help with.

[edit] Also, with your replies being so close together as they are, you could probably just Edit them into your previous reply instead of replying a bunch of times in succession.
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by Drathian »

If you load up freedos or msdos for that matter on a modern computer = no sound support.

There are a two precompiled versions of DOSBox that will run on dos, that I know of, I only have one.
there is a precompiled version of zdoom (not sure which version going to check that out now) that runs in dos.

With the tsr api stuff I can attach sound to either of these two, and with additional programs play doom or zdoom even in a dos booted environment.

I agree with it being uncharted territory, that's why I gravitate to it, the absurd I suppose draws me.

With all the developers on here that deal with dos games like doom I figured that this might be at least bit interesting, I'm not expecting expedient help but I thought it be worth throwing it out here.

Besides who (who lived through the 90s) doesn't want to power on a dos on their computer and type "cd doom" doom and get it to run with sound. I've missed doing that, its been years since I had a computer old enough to run pre-win2k let alone dos. There is always DOSBox I suppose, but with all of the overhead with windows its a bit slow, and the ports are great option for now.

EDIT:

Sorry for the bad Language, I kinda write like a stream of consciousness, anyhow, maybe this post will explain it better, and it has the DOSBox precompiled for dos attached:

http://freedos.10956.n7.nabble.com/HX-D ... 24534.html

EDIT2:

So there wasn't a good version of zdoom made for dos as described here:
viewtopic.php?t=9198

I'll be back later after some more testing.


EDIT3:

I forgot some important information about MS-DOS. Most versions of dos can't use my setup, as they can't see the fat32 partition. I worked around this by grabbing a version of MS-DOS8.0 which you can do via the next link and any 32bit version of XP, Vista, or Seven:

http://reboot.pro/topic/11587-real-dos- ... ms-dos-80/

http://www.multiboot.ru/DOS8_Patch.htm

if for some reason you also want to run Windows 3.1, via the win /s commandline then be sure to edit the batch file on the patch8.zip 1create8.bat and uncomment the following line:

Code: Select all

REM To start Windows 3.x onto DOS 7, you have to patch the IO.SYS - thanks to Microsoft. by Henrik Haftmann https://www-user.tu-chemnitz.de/~heha/a/w95oem_p.bat
REM modified for MSDOS8
REM fpatch -s81FF00047306BE0400E9EFFD5032C086065C0F0AC05874EE -r81FF00007306BE0400E9E7FD5032C086065C0F0AC0589090 io.sys
to

Code: Select all

REM To start Windows 3.x onto DOS 7, you have to patch the IO.SYS - thanks to Microsoft. by Henrik Haftmann https://www-user.tu-chemnitz.de/~heha/a/w95oem_p.bat
REM modified for MSDOS8
fpatch -s81FF00047306BE0400E9EFFD5032C086065C0F0AC05874EE -r81FF00007306BE0400E9E7FD5032C086065C0F0AC0589090 io.sys
I find dos8 a bit more stable then other versions but it won't run a lot of older dos applications with a program to override the version control. Although setver.exe is supposed to do this, I find only dosver.exe that works here:

https://www.vogons.org/viewtopic.php?t=17008

You'll need to run it something like this:

dosver.exe
dosver.exe /r /v07.10

Also there is a version of DOSBox-x that is compiled from running in real dos via the hxloader, here:

https://github.com/joncampbell123/dosbox-x/releases

look for the versions that say dosbox-x-mingw-hx-dos
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

Re: Actual MS-DOS or FREE-DOS with Sound?

Post by Drathian »

If you want to get dos on your modern computer, you'll need to remember that fat32 drive for games can be only 32000MB MAX only (even a few mb more and it won't read on dos8, freedos is more lenient) and partition type "C" not the default "B" ,
type C FAT32 LBA.

Please note this can only be done on a MBR not GPT/UEFI hard drive!

GPT/UEFI is a better partition table as it is less likely to corrupt and is required for secure boot on windows 8+, and it supports harddrives bigger then 2TB (there are a few hd hacks for 3tb on mbr but do so at your OWN RISK).

Personally I use gpt and filesystem refs as my data drive for windows 10+ or gpt and filesystem ntfs for win 7, and mbr for my os stuff on a 2TB or less drive!

Note only windows 8+ can boot on a gpt drive, and no version of windows can boot on refs yet!

You should have READY TO USE a boot disk/disc with linux or windows , if your config is wrong so that you don't get locked out of windows or others OS's!



Using or nonfree pay partition software in windows like minitool pro

or free a Linux boot disk with like gparted and gdisk installed (first drive is (be careful!) /dev/sda, subsequent drives are like this /dev/sdb /dev/sdc, might want to use the p (print partition table) command first before w and exit,
you can convert an existing GPT hard drive WITHOUT losing files (Still backup, your files and configurations!) to MBR this way

Code: Select all

gdisk /dev/sda
r
g
w
exit
or MBR to GPT this way

Code: Select all

gdisk /dev/sda
w
exit
YOU CAN TRICK WINDOWS 64 to install on a MBR hard drive on a UEFI system (after disabling secure boot) in Classic Mode/ Legacy/BIOS/CSM via using grub4dos and running the menu.lst like this from the second drive:

Code: Select all

title WINDOWS INSTALL
root (hd1,0)
map --mem /windows.iso (0xff)
map --hook
root (0xff)
chainloader /bootmgr
or from the cdrom using this:

Code: Select all

title WINDOWS INSTALL
root (cd0)
chainloader /bootmgr

Its easiest to install this on a fresh computer on one drive

DOS FAT16
4GB
DOS FAT32
32GB LBA
WINDOWS OR LINUX up to this size of unallocated space
<2TB (minus 36gb)

Dos need to be the first primary partition on the drive period. And if you need more then 4 primary partitions you'll need to make windows (and its recovery drive) an extended partitions (convert them with software at your own risk)
If you already have a computer with data on it and have enough free space you can, if you backup your data first run a partion wizard of somesort and move your primary windows or Linux right on the first drive to enable 36GB of unallocated space before it boots. Then make 2 primary partitions ^like above^ Though You'll need to fix your windows or Linux boot stuff though like boot into windows recovery and try :
where you have 2 primary partitions and 3 (up to 23) extended:
when booting the windows recovery drive (usb or dvd/cdrom)

Z: is windows recovery drive (disc or usb)
primary below
C: is dos
D: is dosgames
E: is boot drive (where /boot/bcd, bootmgr or boot.ini, ntdetect.exe, ntldr etc is, put you grldr, grldr.mbr, and menu.lst here)
extended below
F: is windows
G: is recovery

Code: Select all

  
E:
bootrec /fixboot
bootrec /fixmbr
bootrec /scanos
bcdboot F:\windows /s E: /f ALL
reagentc /disable
Reagentc /setreimage /path G:\Recovery\WindowsRE /target F:\Windows
Reagentc /setosimage /path G:\RecoveryImage /index 1 /target F:\Windows
reagentc /enable

You'll need a bootloader to get into dos if you want to dual boot with windows(s) and/or Linux(s), I use grub4dos personally:
http://grub4dos.chenall.net/categories/downloads/

grab the latest version (Not the source).

Honestly its easier to put dos on its own drive, if it was my second drive this would be the menu.lst config for grub4dos:
Spoiler:
or third drive here:
Spoiler:

If you have xp you can try something like this,

boot.ini

Code: Select all

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect /KERNEL=NTOSBOOT.EXE /maxmem=1024
C:\gldr="Grub4Dos"
or to add to Vista's or above Windows bootmgr:

Code: Select all

E:
cd boot
set STORE=%~dp0BCD
Set BCDEDIT=%SYSTEMROOT%\System32\BCDEDIT.exe
set Partition=e:
echo GRUB4DOS 
for /f "tokens=3" %%A in ('%BCDEDIT% %STORE% /create /d "Grub4dos" /application bootsector') do set guid=%%A
%BCDEDIT% %STORE% /set %guid% device %partition%
%BCDEDIT% %STORE% /set %guid% path \grldr
%BCDEDIT% %STORE% /displayorder %guid% /addlast
in an os boot disk, if your target drive is the first hard drive in Linux:
32
run:

Code: Select all

./bootlace.com /dev/sda
64
run:

Code: Select all

 ./bootlace64.com /dev/sda
or in windows:
run:

Code: Select all

grubinst.exe (hd0)
or use grubinst gui/wingrub here:
https://sourceforge.net/projects/grub4d ... t%201.0.1/

You'll need miniumum the following 3 files on your boot fat or fat32 drive on target computer:

grldr
grldr.mbr
menu.lst

example my menu.lst:
Spoiler:

Originally I merged dos71, freedos, and ntfs4dos startup files with my own fixes.

Here is a fixed setup of config files for those that are starting out, got rid of some of the unnecessary commands (With a few remarks REM comments lines for freedos 2.1 and dos8.0 patched):
Spoiler:
Drathian
Posts: 13
Joined: Sun Apr 21, 2019 5:36 pm
Graphics Processor: nVidia with Vulkan support

Re: [info][tutorial]Real DOS with Sound on Modern PC?!

Post by Drathian »

Back on my tech support question:

Whenever I run the program to test sound on my Realtek HDA sound cards (any of my current setups):

Code: Select all

C:\HXGUI217\TEST\PLAYWAVE.EXE WIN.WAV
waveOutGetNumDevs() returned 0

When I do run this on my old Dell Inspiron 1720 with a Intel HDA sound card:
I get this:
dos_crash.jpg
a crash and no sound, although the pc speaker works on this computer so awful Wolfenstein 3d sound is available lol.

C:\HX.DOS is in my path
and the following file is on the root of my C drive.

HXSNDHLP.INI

Code: Select all

;stereo_speaker=1 sound out STEREO_SPEAKER (for LAPTOR)
;stereo_speaker=0 sound out LINE_OUT_JACK
;spdif=1 enable sound out SPDIF_JACK (if there is SPDIF)
;volume=volume of sound in percent
;joystick=1 enable joystick (if there is connector for JOYSTICK)
;midi=1 enable midi port (if there is port for MIDI)
;mpu401=port address midi in hex
;irq=number for PCI device (if incorrect defined auto)  (irq=0 for auto)

[config_out]
stereo_speaker=1
spdif=0
volume=80

[input]
joystick=1

[midi]
midi=1
mpu401=0x330

[device]
irq=0
Post Reply

Return to “Legacy Discussion”