joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.71k stars 381 forks source link

jill of the jungle soundblaster emulation is garbled #5128

Closed supertails12 closed 2 months ago

supertails12 commented 2 months ago

Describe the bug

when playing jill of the jungle the complete trilogy the soundblaster emulation makes the sounds all garbled and strange i compared the sound to the latest dosbox regular release and the sound is broken in comparison

Steps to reproduce the behaviour

  1. go to this website and download jill of the jungle: https://archive.org/download/000889-JillOfTheJungleTheCompleteTrilogy
  2. open the img file in 7zip and drag the 3 files to their own folder called jill where u keep your dos games
  3. mount the folder where you keep the dos games type cd/jill then type install
  4. follow the prompts and install it to the folder u created in step 2
  5. when installed type jill
  6. pick a game/chapter in the main menu
  7. enjoy the terrible glitched music

Expected behavior

https://www.youtube.com/watch?v=VozQHlInrtw&list=PLZOK8A4t81FMcyQ8DkJwUqnYVSnmFQRpG this is how it should sound

What operating system(s) this bug have occurred on?

windows 11 home 22631.3880

What version(s) of DOSBox-X have this bug?

dos box x latest version ming w sdl2 win 64 bit version

Used configuration

No response

Output log

No response

Additional information

No response

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines

joncampbell123 commented 2 months ago

Here on Linux it sounds exactly like the video, not sure where Windows builds are having any problems.

supertails12 commented 2 months ago

strange i wonder whats going on can someone try using windows?

maron2000 commented 2 months ago

I don't know if you feel this as garbled. No difference between VS and MinGW builds.

The video is VS x64 SDL2 on Windows 10 22H2.

https://github.com/user-attachments/assets/59c8c378-b05f-4756-9435-87e93d71cc6b

supertails12 commented 2 months ago

try jumping and getting that gemstone i need to see more to confirm if you found it

supertails12 commented 2 months ago

also im on windows 11 so u have to test on that os

maron2000 commented 2 months ago

Music is OK, but the sound effects sounds bad, kind of slow.

You need to change sbtype=sbpro2. I also hear large popping noise, so ran command mixer sb 50 before launching the game. Linux, Windows 10/11 doesn't matter.

Bad: sb16 (default)

https://github.com/user-attachments/assets/3247c452-63f2-42da-bc9d-56a7009e8c09

Good: sbpro2

https://github.com/user-attachments/assets/be9a44b8-f992-4aaf-a77f-f2ee2c19eaa3

supertails12 commented 2 months ago

I have no idea what any of that means couldn't you just fix it from the inside with an update?

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: maron2000 @.> Sent: Wednesday, July 24, 2024 3:59:06 AM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Music is OK, but the sound effects sounds bad, kind of slow.

You need to change sbtype=sbpro2. I also hear large popping noise, so ran command mixer sb 50 before launching the game. Linux, Windows 10/11 doesn't matter.

Bad: sb16

https://github.com/user-attachments/assets/3247c452-63f2-42da-bc9d-56a7009e8c09

Good: sbpro2

https://github.com/user-attachments/assets/be9a44b8-f992-4aaf-a77f-f2ee2c19eaa3

— Reply to this email directly, view it on GitHubhttps://github.com/joncampbell123/dosbox-x/issues/5128#issuecomment-2247154450, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMO7IRQN2OX7MBGOV4UDZN5NEVAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBXGE2TINBVGA. You are receiving this because you authored the thread.Message ID: @.***>

grapeli commented 2 months ago

If you really want to use this version of the game, change the settings to sbtype=sbpro2. No complications, as simple as typing 'cd jill'. The game is bugged. It has lots of versions, patches, fixes. https://www.youtube.com/watch?v=w1JY95Yfcbo

In this version of the game downloaded from eXoDOS, the sound is fully played correctly for sbpro2 and sb16. Jill.of.the.Jungle.(1992).zip

supertails12 commented 2 months ago

Interesting so how do I implement the thing you're talking about?

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: grapeli @.> Sent: Wednesday, July 24, 2024 12:06:41 PM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

If you really want to use this version of the game, change the settings to sbtype=sbpro2. No complications, as simple as typing 'cd jill'. The game is bugged. It has lots of versions, patches, fixes. https://www.youtube.com/watch?v=w1JY95Yfcbo

It was created long before the SB16 sound card appeared. In this version of the game downloaded from eXoDOS, the sound is fully played correctly for sbpro2 and sb16. Jill.of.the.Jungle.(1992).ziphttps://github.com/user-attachments/files/16364755/Jill.of.the.Jungle.1992.zip

— Reply to this email directly, view it on GitHubhttps://github.com/joncampbell123/dosbox-x/issues/5128#issuecomment-2248396401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMOZL62GXIZTOF7RLXF3ZN7GJDAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGM4TMNBQGE. You are receiving this because you authored the thread.Message ID: @.***>

supertails12 commented 2 months ago

Never mind I got it

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 12:31:39 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Interesting so how do I implement the thing you're talking about?

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: grapeli @.> Sent: Wednesday, July 24, 2024 12:06:41 PM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

If you really want to use this version of the game, change the settings to sbtype=sbpro2. No complications, as simple as typing 'cd jill'. The game is bugged. It has lots of versions, patches, fixes. https://www.youtube.com/watch?v=w1JY95Yfcbo

It was created long before the SB16 sound card appeared. In this version of the game downloaded from eXoDOS, the sound is fully played correctly for sbpro2 and sb16. Jill.of.the.Jungle.(1992).ziphttps://github.com/user-attachments/files/16364755/Jill.of.the.Jungle.1992.zip

— Reply to this email directly, view it on GitHubhttps://github.com/joncampbell123/dosbox-x/issues/5128#issuecomment-2248396401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMOZL62GXIZTOF7RLXF3ZN7GJDAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGM4TMNBQGE. You are receiving this because you authored the thread.Message ID: @.***>

supertails12 commented 2 months ago

But i need help with something else too

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 12:59:01 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Never mind I got it

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 12:31:39 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Interesting so how do I implement the thing you're talking about?

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: grapeli @.> Sent: Wednesday, July 24, 2024 12:06:41 PM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

If you really want to use this version of the game, change the settings to sbtype=sbpro2. No complications, as simple as typing 'cd jill'. The game is bugged. It has lots of versions, patches, fixes. https://www.youtube.com/watch?v=w1JY95Yfcbo

It was created long before the SB16 sound card appeared. In this version of the game downloaded from eXoDOS, the sound is fully played correctly for sbpro2 and sb16. Jill.of.the.Jungle.(1992).ziphttps://github.com/user-attachments/files/16364755/Jill.of.the.Jungle.1992.zip

— Reply to this email directly, view it on GitHubhttps://github.com/joncampbell123/dosbox-x/issues/5128#issuecomment-2248396401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMOZL62GXIZTOF7RLXF3ZN7GJDAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGM4TMNBQGE. You are receiving this because you authored the thread.Message ID: @.***>

supertails12 commented 2 months ago

In the ultimate Doom copy I have the sound effects are not working at all!

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 1:24:08 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

But i need help with something else too

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 12:59:01 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Never mind I got it

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 12:31:39 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Interesting so how do I implement the thing you're talking about?

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: grapeli @.> Sent: Wednesday, July 24, 2024 12:06:41 PM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

If you really want to use this version of the game, change the settings to sbtype=sbpro2. No complications, as simple as typing 'cd jill'. The game is bugged. It has lots of versions, patches, fixes. https://www.youtube.com/watch?v=w1JY95Yfcbo

It was created long before the SB16 sound card appeared. In this version of the game downloaded from eXoDOS, the sound is fully played correctly for sbpro2 and sb16. Jill.of.the.Jungle.(1992).ziphttps://github.com/user-attachments/files/16364755/Jill.of.the.Jungle.1992.zip

— Reply to this email directly, view it on GitHubhttps://github.com/joncampbell123/dosbox-x/issues/5128#issuecomment-2248396401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMOZL62GXIZTOF7RLXF3ZN7GJDAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGM4TMNBQGE. You are receiving this because you authored the thread.Message ID: @.***>

supertails12 commented 2 months ago

I tried to adjust the setup settings but then the sound was acting all strange

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 1:25:09 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

In the ultimate Doom copy I have the sound effects are not working at all!

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 1:24:08 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

But i need help with something else too

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 12:59:01 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Never mind I got it

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Julia Dos Santos @.> Sent: Wednesday, July 24, 2024 12:31:39 PM To: joncampbell123/dosbox-x @.>; joncampbell123/dosbox-x @.> Cc: Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Interesting so how do I implement the thing you're talking about?

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: grapeli @.> Sent: Wednesday, July 24, 2024 12:06:41 PM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

If you really want to use this version of the game, change the settings to sbtype=sbpro2. No complications, as simple as typing 'cd jill'. The game is bugged. It has lots of versions, patches, fixes. https://www.youtube.com/watch?v=w1JY95Yfcbo

It was created long before the SB16 sound card appeared. In this version of the game downloaded from eXoDOS, the sound is fully played correctly for sbpro2 and sb16. Jill.of.the.Jungle.(1992).ziphttps://github.com/user-attachments/files/16364755/Jill.of.the.Jungle.1992.zip

— Reply to this email directly, view it on GitHubhttps://github.com/joncampbell123/dosbox-x/issues/5128#issuecomment-2248396401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMOZL62GXIZTOF7RLXF3ZN7GJDAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGM4TMNBQGE. You are receiving this because you authored the thread.Message ID: @.***>

joncampbell123 commented 2 months ago

Looking at the version initially listed here, it's an older version I've never seen before.

It's not using DMA to play Sound Blaster audio like the newer version does. It's using the "set the system timer IRQ0 to the sample rate times two and send DSP direct DAC command 0x10" method of playback. Run the older version, break into the debugger, and look at the INT 8h (IRQ 0) handler using "inthand 8".

DSP command 0x10 is a way to send a single directly to the Sound Blaster DAC every time you use it. If you use it at a more or less constant rate, you can play audio.

This was how DOS code I wrote back in the mid 1990s worked before I finally figured out how the DMA controller works :)

joncampbell123 commented 2 months ago

Also the older version uses the same initial menu system that I've seen Xargon use.

supertails12 commented 2 months ago

Do I need to put in another bug report to get the Doom thing fixed or can you help me now?

Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Jonathan Campbell @.> Sent: Wednesday, July 24, 2024 1:29:22 PM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128)

Also the older version uses the same initial menu system that I've seen Xargon use.

— Reply to this email directly, view it on GitHubhttps://github.com/joncampbell123/dosbox-x/issues/5128#issuecomment-2248548381, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMO2TBKMBFIRBFXRQTW3ZN7P7FAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGU2DQMZYGE. You are receiving this because you authored the thread.Message ID: @.***>

joncampbell123 commented 2 months ago

I think what's going on here is that while the SB16 also supports "Direct DAC" playback, the DSP busy bit toggles on an off at a known rate by itself whether or not DMA playback is active. This is different from the older cards (Pro and earlier) where the busy bit toggles on and off only if playing or recording audio over DMA.

This difference is also what causes "Crystal Dream" to work on Sound Blaster and Pro cards but fail on SB16, though the method of playback is completely different.

Perhaps the game doesn't poll too much to avoid slowing the game down, but if the busy bit happens to be set most of that time, it means no sample is sent to the DSP, and therefore the slower erratic sound.

I'll look at it again in the debugger to check, hold on.

joncampbell123 commented 2 months ago

That's exactly what's going on!

Look at the IRQ 0 handler. It doesn't loop until the DSP is not busy, it just checks once and doesn't bother sending a sample at all if the DSP happens to be busy at that timer tick.

0EBB:0000002B 8B16C429            mov  dx,[29C4]              ds:[29C4]=0220
0EBB:0000002F 83C20C              add  dx,000C
0EBB:00000032 EC                  in   al,dx
0EBB:00000033 A880                test al,80
0EBB:00000035 751C                jne  00000053 ($+1c)        (no jmp)
0EBB:00000037 FA                  cli
0EBB:00000038 B010                mov  al,10
0EBB:0000003A EE                  out  dx,al
joncampbell123 commented 2 months ago

On Pro cards, since the game isn't doing anything to cause Sound Blaster DMA, the DSP is never busy, so it works fine.

On SB16 cards, the busy bit is always toggling on and off, and apparently it's on enough times for the timer tick handler to see it, and to make playback erratic and slow.

It doesn't wait for DSP not busy in the ISR until after sending DSP command 0x10, so it can then send the 8-bit sample.

supertails12 commented 2 months ago

again do i have to make another bug report for the doom thing and by the way jill of the jungle works fine now....

supertails12 commented 2 months ago

i followed ur steps and now it works

joncampbell123 commented 2 months ago

Do I need to put in another bug report to get the Doom thing fixed or can you help me now? Sent from my Verizon, Samsung Galaxy smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg ____ From: Jonathan Campbell @.> Sent: Wednesday, July 24, 2024 1:29:22 PM To: joncampbell123/dosbox-x @.> Cc: supertails12 @.>; Author @.> Subject: Re: [joncampbell123/dosbox-x] jill of the jungle soundblaster emulation is garbled (Issue #5128) Also the older version uses the same initial menu system that I've seen Xargon use. — Reply to this email directly, view it on GitHub<#5128 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5VCMO2TBKMBFIRBFXRQTW3ZN7P7FAVCNFSM6AAAAABLIU7RBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGU2DQMZYGE. You are receiving this because you authored the thread.Message ID: @.***>

Another bug report? Where is the current one?

supertails12 commented 2 months ago

but my copy of the ultimate doom isnt playing the sound effects at all

supertails12 commented 2 months ago

ur talking in the current bug report silly

joncampbell123 commented 2 months ago

but my copy of the ultimate doom isnt playing the sound effects at all

Did you configure it properly?

Remember, DOS games pre-date "Plug & Play", and some required you to tell them "port", "IRQ", and "DMA" configuration of your card.

Run SETUP and tell the program you want to use the Sound Blaster for music and sound effects.

When it asks for port number, IRQ, and DMA, select the settings that match whatever you put in your dosbox.conf file, or the default DOSBox settings port 220, IRQ 7, DMA 1. setup_000

joncampbell123 commented 2 months ago

DOOM cannot use your sound card if you don't tell it what to use and what the sound configuration is.

joncampbell123 commented 2 months ago

Looking at the DEFAULT.CFG file I guess it isn't working by default because DOSBox (and DOSBox-X) default to IRQ 7, while Ultimate DOOM defaults to IRQ 5.

By the mid 1990s IRQ 5 was a very common Sound Blaster IRQ setting.

supertails12 commented 2 months ago

got it working thank u

supertails12 commented 2 months ago

one last thing before i close this chat can u change the shortcut for full screen to alt + enter? f11 is hardwired to something else my hp the makers of my pc or you could make it changeable by the user

supertails12 commented 2 months ago

By*

joncampbell123 commented 2 months ago

one last thing before i close this chat can u change the shortcut for full screen to alt + enter? f11 is hardwired to something else my hp the makers of my pc or you could make it changeable by the user

On most systems the "host" key is F12, but Windows uses F12 internally, so Windows builds use F11.

The "host" key is configurable in the mapper and you can change it to any key you want. F11/F12 was chosen to minimize conflicts with DOS and Windows 3.1 applications that may have their own shortcuts. Those shortcuts often involve some combination of CTRL and possibly function keys F1-F10.

DOSBox-X specifically avoid ALT+ENTER to go fullscreen because that conflicts with general usage of Windows 3.1.

supertails12 commented 2 months ago

thank you have changed the key combo to suit my needs i will close this issue now!