Baron-von-Riedesel / VSBHDA

Sound Blaster emulation for DOS
57 stars 3 forks source link

Disney's The Jungle Book crashes with VSBHDA #14

Closed vicokoby closed 1 month ago

vicokoby commented 2 months ago

The game allows you to configure Sound Blaster, Sound Blaster Pro and Sound Blaster 16. The game crashes with all three.

Sound card used: SBLive! 5.1 / SB0100 Here the game: https://www.old-games.ru/game/421.html

Baron-von-Riedesel commented 1 month ago

I confirm the crash.

It looks like the program expects the (SoundBlaster) interrupt routine to be called in a "known" context ( while "usually" programs don't make too much assumptions inside ISRs ). So if VSBHDA is to emulate a SB interrupt, it has to switch to the client's context ( stack pointer, segment registers, ... ). Currently that's just a guess, though.

Baron-von-Riedesel commented 1 month ago

Currently that's just a guess, though.

This guess turned out to be wrong. On my system I get a "transfer stack overflow" error. That's a known problem - it once occured with DOOM and similar programs, because of a bug in the Rational DOS extender DOS4/GW ( interrupts remain disabled because IRET doesn't restore the interrupt flag if IOPL==0 ). For DOOM, there's a "on the fly"-fix implemented, but this fix obviously doesn't work for "Jungle Book".

However, there's the SETPVI tool - it's usually of little help, but may cure exactly this problem. On my machine, it makes "Jungle Book" work, but my current version is already pretty modified compared to the GitHub state, so I cannot say if it works for you as well.

vicokoby commented 1 month ago

@Baron-von-Riedesel You're right. With SETPVI Jungle Book it works. Thanks!