VOGONS


First post, by Corona688

User metadata
Rank Newbie
Rank
Newbie

I just spent days figuring out why Stargunner works on older versions of DOSbox for me but not newer ones.

It turns out that the old example dosbox.conf I've used for years and modified to my needs was crashing it because it turns on Tandy 3-voice. Which still worked in older versions because they didn't touch the DMA controller, but in newer ones, it reaches in and deletes the second DMA controller -- I guess Tandies didn't have them?

So I guess the problem isn't that StarGunner won't run on a Tandy, but that the Soundblaster code does no errorchecking at all when it fails to grab a DMA -- it should fail, not crash. And, since the behavior's changed, the Tandy code ought to give a warning when it reaches in and disables crucial portions of virtual hardware.

Reply 1 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You're using machine=vga AND tandy=true. In this configuration the
2nd dma controller HAS to be disabled as there are port conflicts, and
in order to get sound of the games which support vga video modes and
tandy sound simultaneously the 2nd dma controller has to be closed.

There won't be any warning as people who force some non-standard
configuration settings should know what they are doing.
And using old configuration files is VERY bad, jfi.

Reply 2 of 6, by Corona688

User metadata
Rank Newbie
Rank
Newbie

Absolutely. As I said, that Stargunner won't work on a Tandy isn't the problem. The problem is that actually crash dosbox because the Soundblaster code doesn't bother to check if it actually gets the DMA it wants for whatever reason.

Reply 3 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I don't see any problem with this, you force tandy sound, which disables
the 2nd dma, which disables the soundblaster16 (regular soundblasters
work fine as they don't need the hdma channel) and have the game
configured to sb16 sound. The game writes to the 2nd dma registers
and thus messes up the tandy sound ports.
Maybe dosbox shouldn't crash by this though, will see.

Reply 4 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The following code should work, in case you want to compile sources:

static void DSP_PrepareDMA_New(DMA_MODES mode,Bitu length,bool autoinit,bool stereo) {
Bitu freq=sb.freq;
sb.dma.total=length;
sb.dma.autoinit=autoinit;
if (mode==DSP_DMA_16) {
if (sb.hw.dma16!=0xff) {
sb.dma.chan=GetDMAChannel(sb.hw.dma16);
if (sb.dma.chan==NULL) {
sb.dma.chan=GetDMAChannel(sb.hw.dma8);
mode=DSP_DMA_16_ALIASED;
freq/=2;
}
} else {
sb.dma.chan=GetDMAChannel(sb.hw.dma8);
mode=DSP_DMA_16_ALIASED;
freq/=2;
}
} else sb.dma.chan=GetDMAChannel(sb.hw.dma8);
DSP_DoDMATransfer(mode,freq,stereo);
}

Reply 5 of 6, by The Devil Hunter

User metadata
Rank Newbie
Rank
Newbie
wd wrote:
You're using machine=vga AND tandy=true. In this configuration the 2nd dma controller HAS to be disabled as there are port confl […]
Show full quote

You're using machine=vga AND tandy=true. In this configuration the
2nd dma controller HAS to be disabled as there are port conflicts, and
in order to get sound of the games which support vga video modes and
tandy sound simultaneously the 2nd dma controller has to be closed.

There won't be any warning as people who force some non-standard
configuration settings should know what they are doing.
And using old configuration files is VERY bad, jfi.

Hey i changed teh tandy thing to off, and i got the game to run fine, thou it makes the cpu usage go up to like 66% witch makes some other programs iam running lag a bit. So is there anyway i can reslove that? Iam sure u can make dosbox not use so much cpu usage.

Mess with the best, die like the rest.

Reply 6 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

dosbox emulates a full computer system, which is pretty cpu demanding.
Try the dynamic core and set the cycles rather low, maybe raise the
frameskip value.

> Hey i changed teh tandy thing to off

There's no need to modify the default setting.