VOGONS


Re: Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel Error

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by paulacchang2

User metadata
Rank Newbie
Rank
Newbie

Hi,

Running DOSBox 0.74. Downloaded source code and compiled it.

After the first digital sound is played in the intro sequence of the game, I got the error message "DMA segbound wrapping (read)". I had a look at the source code, and hacked in a change in dma.cpp, line 52, from

if (offset>(dma_wrapping<<dma16)) { E_Exit("DMA segbound wrapping (read)"); }

to

if (offset>(dma_wrapping<<dma16) && size > 1) { E_Exit("DMA segbound wrapping (read)"); }

All the digital sounds now play (with very infrequent popping), but I was wondering if a more 'sound' fix could be implemented.

Thanks,

Paul AC Chang

PS: Related to this issue, in the function Bitu DmaChannel::Read, line 288, (which hits if want >= left) should this line read as

DMA_BlockRead(pagebase,curraddr,buffer,left,DMA16);

rather than

DMA_BlockRead(pagebase,curraddr,buffer,want,DMA16);

Reply 2 of 14, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author
PS: Related to this issue, in the function Bitu DmaChannel::Read, line 288, (which hits if want >= left) should this line read a […]
Show full quote

PS: Related to this issue, in the function Bitu DmaChannel::Read, line 288, (which hits if want >= left) should this line read as

DMA_BlockRead(pagebase,curraddr,buffer,left,DMA16);

rather than

DMA_BlockRead(pagebase,curraddr,buffer,want,DMA16);

Does that game actually hit the want>left case? As want==left should be the maximum
glancing at the calling code, but not sure.

In dma.cpp, DMA_Init() change the call to DMA_SetWrapping(0xffffffff);
(disables wrapping so simulates an emm386 bug). Does this fix anything?

Reply 3 of 14, by paulacchang2

User metadata
Rank Newbie
Rank
Newbie

Does that game actually hit the want>left case? As want==left should be the maximum
glancing at the calling code, but not sure.

You're right, the game never hits the want > left case.

In dma.cpp, DMA_Init() change the call to DMA_SetWrapping(0xffffffff);
(disables wrapping so simulates an emm386 bug). Does this fix anything?

Yes it does - Sherlock Holmes/Serrated Scalpel doesn't cause the error anymore. As an aside, I should mention Sherlock Holmes/Serrated Scalpel was released in 1992.

Reply 7 of 14, by derboo

User metadata
Rank Newbie
Rank
Newbie

I've got an issue vaguely related to this bug, maybe I can ask for quick help here? Or should I repost it in a new thread?

I've got a game that causes the same bug (EOL!), and I'm trying to compile dosbox with the above fixes, but I'm a total beginner in this stuff. I've followed that guide so far http://www.dosbox.com/wiki/BuildingDOSBox

I've gotten to the point where it says "After compiling you'll need to adjust the PATH variable to point at the directory where the freshly built SDL-Library can be found.",

but I've got no clue where to find that PATH variable I have to change. Can someone help me out here?

Reply 9 of 14, by derboo

User metadata
Rank Newbie
Rank
Newbie

The error is the same as above DMA segbound wrapping (read) with DOSBox 0.74 for Windows (using XP). The game is EOL! by Family Production, the error only appears with certain sound effects. For the compiler I followed that tutorial, getting MingW and (the last full package version of) MSYS (1.0.11).

EDIT:

OK, I now noticed that the step that kept me puzzling wasn't neccessary at all (maybe that needs clarifying in the guide...). Could compile DOSBox now, game works fine with the above fixes.

Reply 10 of 14, by DX

User metadata
Rank Newbie
Rank
Newbie

Having similar problem - game plays fine with digital sound until I try to enter the chemist, when the sound pops and then repeats and the game freezes. Could not find any file that you dudes mentioned, would love to fix this so I can finish the game!!

Reply 11 of 14, by DigitalMonk

User metadata
Rank Newbie
Rank
Newbie

Also experiencing this problem. Exits at end of first digital sound effect - of the bottle breaking when the cat knocks it off the crate at the beginning of the introduction.

Tried loadfix, but just ran it and it told me that it allocated 64kB. Not sure if I'm supposed to do something else with it. Too much base memory doesn't appear to be the issue, though.

Turned off Expanded memory usage in the install program.

Neither of those steps (nor the combination of the two) helped.

Am I correct in my understanding that the only fix for this (as of 0.74) is to patch the source code and recompile?

Thanks,
DM

Reply 12 of 14, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Try a less round number with loadfix than 64 ("round" in powers of 2, that is), e.g. loadfix -26, and you'll get further in the intro. You will still encounter wrapping at some point in the game, though, so the problem is only reduced in this case. It at least demonstrates that the DMA buffer location in memory relative to the load address has an effect on the issue.

In 0.74 (and current source) the only way to prevent the problem is to change the source and recompile. You can, of course, run the game in 0.73, which does not have the error exit for DMA wrapping; but you may get some pops in the audio or other undesirable side-effects of the wrapping.

Reply 13 of 14, by melissamortiis

User metadata
Rank Newbie
Rank
Newbie

I had a similar problem when running v 0.74 on Win7 with this game. after running only game.exe, it comes later in the game that it will completely freeze when entering the Chemist.
I had to download and run through 0.73 to bypass this. Sorted! 😁
I panicked when it first froze because this game is so nostaligic and I just wanted to play it all the way to the end again.
But voila, downloading v0.73 worked for me.

I had to download it from http://www.fileplanet.com/170717/170000/fileinfo/DOSBox-v.73

I wish the DOSBOX website would give option to download previous versions, but this download from FilePlanet is pretty trustworthy to me!

facebook.com/mortiism

Reply 14 of 14, by VileR

User metadata
Rank l33t
Rank
l33t
melissamortiis wrote:

I wish the DOSBOX website would give option to download previous versions

There's a link to "old dosbox versions" on the downloads page - guess you missed it?

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]