VOGONS


First post, by Lighthope

User metadata
Rank Newbie
Rank
Newbie

Okay, how about this one:

There is a game called The Kingdom of Syree III: Black Magic. It was made in 1999-ish using Microsoft BASIC 7.x. Part of the programme will create a small file, write some data into it, and then call up another programme which will open the file and read the data.

One of the first things it will do in a batch file is run the Creative Labs programme sbfmdrv, which is the SoundBlaster FM driver for old SoundBlaster cards like SoundBlaster Pro. It uses the following DOS command:

sbfmdrv > sbport.dat

The > is supposed to redirect the output from the screen to the file sbport.dat. However, many times (but not 100% of time time, more like 98%) nothing will be written to the file. If you type in sbfmdrv at the command prompt, the output goes to the screen all the time, so the programme is functioning normally. The redirect output (>) is not working properly, it seems.

Also, the main programme is not opening and writing to that small file as well. For example, the programme syre3cnj.exe is supposed to create a small file called syree3.tmp. (I looked all this up in the exe code.) The programme then exits and runs another programme called cnj.exe. However, when cnj.exe runs, it can't find syree3.tmp because the file was never created. At least, that's what I seem to find.

So, basically, DOSBox is having a problem with this programme writing to the disc.

Any thoughts on this?

  • Motherboard: Attempted on several motherboards with same result
    Processor type and speed: Pentium IV: 2 Ghz.
    Amount and type of RAM: 1 Gid
    Video board w/ RAM amount and type: Don't know off the top of my head but tried with with three different cards.
    Sound board: SoundBlaster Audigy 2 ZX
    Operating system: Windows XP
    Game name (and version, if applicable): TKOS III
    Reproducibility of problem (always, only once, always but only on a specific level, etc.): 100%
    Sound mode used: Huh?
    Video mode (Software, OpenGL, Direct3D, or Glide, and resolution): VGA
    Version of emulator (for VDMSound, probably 2.0.4 or 2.1.0; for DOSBox, 0.58+): DOSBox 0.72
    Steps already attempted to solve the problem: Test via direct keyboard input to see if any output is created and make sure programme is operating properly, which it is

Lighthope

Pearls of Wisdom - "Killers’ drums echo and pound, the heartbreak beat that will track you down. Time to run or stand ground, or let it fade..." - Let It Fade (Tigers' Quest)

Reply 1 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

you are running the game from a writable directory ?
> and < seems to work for at least the cases I tried.
sbfmdrv > sbport.dat

did you try this yourself as well ? (acting like the program ?)

if you run the debugger version of dosbox (see development forum) you should be able to see if the application tries to open the files (and in which mode). Maybe that shows something.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 4, by Lighthope

User metadata
Rank Newbie
Rank
Newbie

I did try to manually enter sbfmdrv > sbport.dat

98% of the time, the file would be zero bytes. Once in a great while it would correctly write sbfmdrv's output to sbport.dat

I will try the debugger version and report on the results.

Lighthope

Pearls of Wisdom - "As you are now, I once was. As I am now, so you shall be. Are you prepared to follow me?" - Epitaph on tombstone

Reply 3 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

can you attach that sbfmdrv ? as
mount > a
works 100 % of the time at my place. So maybe the application has some influence on it

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 4, by Lighthope

User metadata
Rank Newbie
Rank
Newbie

No luck.

Also, the debug did not tell me what file is missing.

There are actually two versions of the main programme:

One is without SB effects. That one runs fine. But if you try to run it with SB effects, it doesn't work. So that tells me that the drive is writeable since both versions write to the disc.

Also, there is a starter programme and the main programme. The starter programme runs fine. It plays the sound and music and successfully writes to the disk.

The batch file that you run at the very beginning as three commands in it:

@sbfmdrv > sbport.dat
@syre3cnj /link 0439jrs5l /blaster
@sbfmdrv /u > NUL

The first line is supposed to output the screen data to the file sbport.dat which is does not.

The second line runs the starter programme. /link 0439jsr5l is meaningless. It just tells the programme that the starter programme was run from the batch file. /blaster tells the programme to use SB effects.

The third line unloads sbfmdrv from memory when the game is finished.

Once the starter programme is done, it runs the main programme cnj.exe. That is the one that crashes when SoundBlaster is used but does not crash when SoundBlaster isn't used.

I tested it with sbfmdrv in memory but without the /blaster switch and it ran fine but without sound of course.

=================

Addendum:

While typing this out, I found something very interesting.

In order to get the programme to run, I had to manually create the file sbport.dat. I typed in all the output from sbfmdrv and saved the file. However, since sbfmdrv > sbport.dat overwrote the file with zero bytes, I set the attribute to read only so it wouldn't do that. So the starter programme ran fine.

I do know that the cnj programme wants to delete sbport.dat but it couldn't do that because of the read only attribute. While the starter programme ran, I changed the attribute of sbport.dat, removing the read only. The cnj programme now runs correctly with music and deletes sbport.dat

So, after all that, it turns out that the redirect > is not working properly...at least on my machine. I've actually had this on a few machines and it always produced the same result. For some reason, it isn't redirecting output to the specified file.

Thoughts?

Lighthope

Pearls of Wisdom - "It's not the length of our lives [that matters], it's the depth." - Bob Hattoy