Skip to contentSkip to conversation

Sound and MinGW problems on Windows host

Qemu-devel Tomasz B�tor 5 participants 11 messages Jul 6, 2004 – Jul 8, 2004

lore
Share & tools
lore
#0 lore raw

Hi.
I have a few problems using QEMU on Windows XP host and MS-DOS guest.

1. Sound is very choppy. And I mean _very_. It's not usable at all. Under Linux there's no problem.

2. Sound only works at 22050 Hz, setting 44100 make it go silent.

3. As Natalia Portillo noticed in different thread, compiling CVS under MinGW creates the binary, but it's only runnable under MinGW itself, directly under windows command prompt it exits immediatelly. There'd be no problem, but within MinGW the sound doesn't work at all.

I tried patches from http://www.h7.dion.ne.jp/~qemu-win/,
but without any success.

I used binaries from http://www.h7.dion.ne.jp/~qemu-win/
(qemu-20040621-windows.zip) and from http://www.freeoszoo.org/
(QemuInstall_20040705.exe) with the same result (choppy sound and 22050 only). Sources from 07.04 and original 0.5.5 compiled and worked fine (more or less) under linux.

Can anyone give me any hints? I've searched through archive, but I didn't find the answers.

t.

Signature · 4 lines
  Tomasz Bątor  e-mail: [email protected]  ICQ: 101194886
 ------ ---- -- - -  -    -   -  -  -   -    -  - - -- ---- ------
"Call me paranoid but finding '/*' inside this comment makes me suspicious."
                        -- MPW C Compiler
#1 lore raw

Hi Tomasz,

I have the same configuration here (WinXP Home host / Freedos guest). It plays modules in ScreamTracker as if they were open in Winamp. (sound is mono though ;)
Make sure you have correct setup for adress/irq/dma/hdma
and try to change the software, some use still unimplemented DSP commands.

Quoted 3 lines

1. Sound is very choppy. And I mean _very_. It's not usable at all. Under Linux there's no problem.
2. Sound only works at 22050 Hz, setting 44100 make it go silent.

Make sure you applied sound patch to enable it in MinGW and check the output of configure.

Quoted 7 lines

3. As Natalia Portillo noticed in different thread, compiling CVS under MinGW creates the binary, but it's only runnable under MinGW itself, directly under windows command prompt it exits immediatelly. There'd be no problem, but within MinGW the sound doesn't work at all.

I tried patches from http://www.h7.dion.ne.jp/~qemu-win/,
but without any success.

=====
Sylvain Petreolle (spetreolle_at_users_dot_sourceforge_dot_net) Say NO to software patents
Dites NON aux brevets logiciels

"You believe it's the year 1984, when in fact, its closer to 2184"1984 / Matrix

Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com

#2 lore raw
Quoted 4 lines · Sylvain Petreolle

3. As Natalia Portillo noticed in different thread, compiling CVS under MinGW creates the binary, but it's only runnable under MinGW itself, directly under windows command prompt it exits immediatelly. There'd be no problem, but within MinGW the sound doesn't work at all.

I successfully compiled CVS under msys/MinGW and ran it outside it, however before compiling I edited CONFIG_QEMU_SHAREDIR in config-host.h to "." (otherwise it's set to $prefix, which is by default "/c/Program Files/Qemu"). If you remove -mwindows from CFLAGS and run qemu from command line, you can usually see why it immediately exits (though the very latest CVS doesn't seem to output anything anymore)

Signature · 5 lines
< Jernej Simoncic ><><><><>< http://deepthought.ena.si/ >
< for personal mail, replace guest.arnes.si with isg.si >

A smoker is always attracted to the non-smoking section.
       -- Dhawan's Third Law for the Non-Smoker
#3 lore raw

Witam,
Dnia Wed, Jul 07, 2004 at 09:50:17PM +0200 Jernej Simon?i? napisal(a):

Quoted 6 lines

I successfully compiled CVS under msys/MinGW and ran it outside it, however before compiling I edited CONFIG_QEMU_SHAREDIR in config-host.h to "." (otherwise it's set to $prefix, which is by default "/c/Program Files/Qemu"). If you remove -mwindows from CFLAGS and run qemu from command line, you can usually see why it immediately exits (though the very latest CVS doesn't seem to output anything anymore)

I solved that immediate exit without output by applying qemu-20040621-monitor.patch.gz and changing manually LIBS in i386-softmmu/Makefile (I only compile i386-softmmu), so it looks like:

DEFINES+=-D_GNU_SOURCE
LIBS+=-lm
ifdef CONFIG_WIN32
LIBS+=-lwinmm -lws2_32 -liphlpapi -mconsole
endif

After that, the console in windows is back.

t.

Signature · 4 lines
  Tomasz Bątor  e-mail: [email protected]  ICQ: 101194886
 ------ ---- -- - -  -    -   -  -  -   -    -  - - -- ---- ------
"Today it's a race between programmers making better idiot proof software,
and the universe making better idiots. So far the universe is winning"
#4 lore raw

[Qemu-devel] freeoszoo and mandrake linux

does anyone know why the mandrake linux img from the freeoszoo won't work?

Quoted 35 lines · Tomasz B±tor

Witam,
Dnia Wed, Jul 07, 2004 at 09:50:17PM +0200 Jernej Simon?i? napisal(a):

Quoted 6 lines

I successfully compiled CVS under msys/MinGW and ran it outside it, however before compiling I edited CONFIG_QEMU_SHAREDIR in config-host.h to "." (otherwise it's set to $prefix, which is by default "/c/Program Files/Qemu"). If you remove -mwindows from CFLAGS and run qemu from command line, you can usually see why it immediately exits (though the very latest CVS doesn't seem to output anything anymore)

I solved that immediate exit without output by applying qemu-20040621-monitor.patch.gz and changing manually LIBS in i386-softmmu/Makefile (I only compile i386-softmmu), so it looks like:

DEFINES+=-D_GNU_SOURCE
LIBS+=-lm
ifdef CONFIG_WIN32
LIBS+=-lwinmm -lws2_32 -liphlpapi -mconsole
endif

After that, the console in windows is back.

t.

Signature · 10 lines
  Tomasz Bątor  e-mail: [email protected]  ICQ: 101194886
 ------ ---- -- - -  -    -   -  -  -   -    -  - - -- ---- ------
"Today it's a race between programmers making better idiot proof software,
and the universe making better idiots. So far the universe is winning"


_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
#5 lore raw
In reply to Sylvain Petreolle

Witam,
Dnia Wed, Jul 07, 2004 at 09:08:42PM +0200 Sylvain Petreolle napisal(a):

Quoted 4 lines

I have the same configuration here (WinXP Home host / Freedos guest). It plays modules in ScreamTracker as if they were open in Winamp. (sound is mono though ;)
Make sure you have correct setup for adress/irq/dma/hdma

Could you tell me the difference between dma and hdma? In DOS-times I wasn't using PC ;). Now in setups I use 220h/irq 5/dma 5

Quoted 1 line

and try to change the software, some use still unimplemented DSP commands.

I use QEMU for watching demos, so the sound players differ very much. I'm surprised though that some standard stuff like MIDAS also cause trouble, but there're some experiments ahead of me ;)

Quoted 6 lines
Quoted 3 lines

1. Sound is very choppy. And I mean _very_. It's not usable at all. Under Linux there's no problem.
2. Sound only works at 22050 Hz, setting 44100 make it go silent.

Make sure you applied sound patch to enable it in MinGW and check the output of configure.

After a "few" tries I finally compiled it with sound and console support in windows, but there're still strange trouble like those above. Sound chopping is still there (I read somewhere on Bochs' forum that this problem is known to them too. Windows? SDL?), but in some cases the higher frequency, the lesser the problem is. On 44100 it's like 2 seconds smooth, 3/4 second garbled, 2 seconds smooth, 3/4 second garbled and so on (more or less). On 22050 there're 0.1s "chops" all the time, it's not smooth at all.

I have one more problem in 07.04 version on windows: full screen doesn't work. QEMU just quits.

Both sound and fullscreen problems are not present when I run QEMU (from the same sources and patches) under linux.

Anyway, thanx for your answer. I'll keep my fingers crossed for the developers to make QEMU better for an usual user ;)

t.

Signature · 4 lines
  Tomasz Bątor  e-mail: [email protected]  ICQ: 101194886
 ------ ---- -- - -  -    -   -  -  -   -    -  - - -- ---- ------
                    "Here kitty, kitty, kitty..."
                    -- last words in a RPG game
#6 lore raw
Quoted 4 lines
Quoted 1 line

Make sure you have correct setup for adress/irq/dma/hdma

Could you tell me the difference between dma and hdma? In DOS-times I wasn't using PC ;). Now in setups I use 220h/irq 5/dma 5

This could explain why the sound is choppy for you... A dma is a direct channel for memory access.

DMA from 0 to 3 have 8 bit access, and
DMA from 4 to 7 have 16 bit acess (these are HDMAs)

Youre using the dma 5 (16 bit) when it should be a 8 bit acess. Current config for qemu is (in DOS settings) :
SET BLASTER=A220 I5 D1 H5 T5

D1 is dma 1, H5 is for hdma 5.
T5 means Soundblaster 16

=====
Sylvain Petreolle (spetreolle_at_users_dot_sourceforge_dot_net) Say NO to software patents
Dites NON aux brevets logiciels

"You believe it's the year 1984, when in fact, its closer to 2184"1984 / Matrix

Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com

#7 lore raw

Witam,
Dnia Thu, Jul 08, 2004 at 02:12:31PM +0200 Sylvain Petreolle napisal(a):

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Make sure you have correct setup for adress/irq/dma/hdma

Could you tell me the difference between dma and hdma? In DOS-times I wasn't using PC ;). Now in setups I use 220h/irq 5/dma 5

This could explain why the sound is choppy for you... A dma is a direct channel for memory access.

Quoted 6 lines

DMA from 0 to 3 have 8 bit access, and
DMA from 4 to 7 have 16 bit acess (these are HDMAs)

Youre using the dma 5 (16 bit) when it should be a 8 bit acess. Current config for qemu is (in DOS settings) :
SET BLASTER=A220 I5 D1 H5 T5

That's not the problem. Setting DMA to 1 don't change anything for me, and as I said earlier, on Linux even with DMA=5 I have no problem at all. On Windows - choppy sound :/

t.

Signature · 4 lines
  Tomasz Bątor  e-mail: [email protected]  ICQ: 101194886
 ------ ---- -- - -  -    -   -  -  -   -    -  - - -- ---- ------
  "Hey, he shouldn't step out of my pentagram just like that, eh?"
                    -- last words in a RPG game
#8 lore raw
Quoted 17 lines · Tomasz B╠tor

Witam,
Dnia Thu, Jul 08, 2004 at 02:12:31PM +0200 Sylvain Petreolle napisal(a):

Quoted 13 lines
Quoted 4 lines
Quoted 1 line

Make sure you have correct setup for adress/irq/dma/hdma

Could you tell me the difference between dma and hdma? In DOS-times I wasn't using PC ;). Now in setups I use 220h/irq 5/dma 5

This could explain why the sound is choppy for you... A dma is a direct channel for memory access.

DMA from 0 to 3 have 8 bit access, and
DMA from 4 to 7 have 16 bit acess (these are HDMAs)

Youre using the dma 5 (16 bit) when it should be a 8 bit acess. Current config for qemu is (in DOS settings) :
SET BLASTER=A220 I5 D1 H5 T5

You can try setting QEMU_SDL_NSAMPLES environment variable. To 2048, 1024, 512 for instance. No guarantee though that it will help much.

Signature · 1 line
mailto:[email protected]
#9 lore raw

Witam,
Dnia Thu, Jul 08, 2004 at 09:05:28PM +0000 malc napisal(a):

Quoted 2 lines

You can try setting QEMU_SDL_NSAMPLES environment variable. To 2048, 1024, 512 for instance. No guarantee though that it will help much.

Hmm, nice. I've just tested it, and with QEMU_SDL_NSAMPLES=38192 I get 18 seconds of smooth sound, 3/4 s garbled, 18 s smooth and so on ;). That's something... I'll test it a little more. Thanks.

t.

Signature · 4 lines
  Tomasz Bątor  e-mail: [email protected]  ICQ: 101194886
 ------ ---- -- - -  -    -   -  -  -   -    -  - - -- ---- ------
                   "Nigdy nie czułem się lepiej."
                  -- Ostatnie słowa przed śmiercią
#10 lore raw
In reply to Sylvain Petreolle
Quoted 10 lines · On Thu, 8 Jul 2004, [iso-8859-1] Sylvain Petreolle wrote:
Quoted 4 lines
Quoted 1 line

Make sure you have correct setup for adress/irq/dma/hdma

Could you tell me the difference between dma and hdma? In DOS-times I wasn't using PC ;). Now in setups I use 220h/irq 5/dma 5

This could explain why the sound is choppy for you... A dma is a direct channel for memory access.

DMA from 0 to 3 have 8 bit access, and
DMA from 4 to 7 have 16 bit acess (these are HDMAs)

Quoted 6 lines

Youre using the dma 5 (16 bit) when it should be a 8 bit acess. Current config for qemu is (in DOS settings) :
SET BLASTER=A220 I5 D1 H5 T5

D1 is dma 1, H5 is for hdma 5.
T5 means Soundblaster 16

T6 means SB16

Signature · 1 line
mailto:[email protected]