VOGONS


First post, by sarbash

User metadata
Rank Newbie
Rank
Newbie

Hello all.

I hope there is a chance to run some clipper's stuff there.

It's old database app written in clipper. It built using some blinker 8.x version, clipper's version is Summer'87. I found this info inside exe-file.

What I did:

core=normal
built dosbox with #define DOS_FILES 250
set clipper=f100

When I run app it shows 2 messages:

First message: ERRORE in APERTURA FILE :C:\AD2\ad2tab3.NTX
Second: ERRORE IMPOSSIBILE aprire file di .LOG.-> 4

It seems like "clipper" environment variable hasn't any effect for this app.

Any advices and suggestions?

-----
My environment:
Arch Linux 32bit
DOSBox version SVN

Reply 2 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

Sure.
I can send you 7zip-packed archive for testing purposes. It is working db. The archive size with empty db is 773,125 bytes.
It's better to see once than hear a lot.

Now, we have that config:
Netware 4.11 file-server --> PC-DOS clients on 1.44-floppies with Netware Client --> database app on Netware's Volume shared as drive O:

I wanna get rid of lockin on Netware and replace it with Linux file-server. DOSBox can mount dirs from linux fs so I simply can mount network share either by Samba or NFS and use that in DOSBox to run clipper app.

Reply 3 of 32, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Does the "-> 4" refer to DOS error 4, too many open files?

If you've built DOSBox with 250 maximum file handles, why are you limiting Clipper to 100 file handles with the environment variable?

Reply 4 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

I guess that.

CLIPPER=F100 is because that works in Netware clients and in WinXP. Sure, I have had played with "set FILES" and "set CLIPPER", changed DOS_FILES in the sources. Posting in the forum is the last thing I did after all tries. Maybe, I missed something?

I think the problem is in a something else but I have no experience in debugging DOS progs generally and Clipper apps particularly.

Reply 5 of 32, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The problem might indeed be elsewhere; however we don't support applications very much. You can't print for example. So it might be useless to begin with.

Nonetheless, it could be beneficial to figure out what goes wrong.

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

Reply 6 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

A printing isn't an issue in this case.
Empirical way shows that it's enough to set FILES=13 (!) in CONFIG.NT to run this app in WinXP. To say more, I didn't set CLIPPER variable at all, despite of this that program run and functions (edit: sure, it runs, but some functions fail - so, FILES=13 isn't enough to function properly).

Maybe, the cause is in a method how ntvdm's and msdos's interpreter provides file handlers for programs?

Last edited by sarbash on 2012-07-27, 12:44. Edited 1 time in total.

Reply 7 of 32, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

C:\AD2\ad2tab3.NTX
this file is accessable inside dosbox at that exact location ? (with read/write permissions)

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

Reply 8 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

Maybe, would it be better if I will give the archive with this app to you for a review? It's less than 1Mb in size.
Just now I've played with FILES's value on my WinXP-workstation. Seems that setting FILES=50 in system32\config.NT is enough to run and use this app. Simply I try to find what is affecting it to prevent run in DOSBox.

Yeah, all files are Ok there. "type" command shows content of any file in dir. "del" command deletes files there.

P.S. Further research shows that FILES=50 is enough to run but CLIPPER variable is required for proper functioning.

Reply 10 of 32, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well without having a look at the application itself. There is not more we can do.
You can try running it from a diskimage with a msdos installed on it. but then you loose most of the benefits that dosbox has with regards to using local folders as drives.

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

Reply 11 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

Surely. That's what I told about to be allowed.

The key file for it to run properly is INSTALL.MEM

The folder "C:\AD2\" in settings should be set to actual folder for program to function properly. Otherwise, it will not find it's working set files.
Also, CLIPPER=F100 is mandatory.

Attachments

  • Filename
    ad2.7z
    File size
    755 KiB
    Downloads
    254 downloads
    File comment
    The application.
    File license
    Fair use/fair dealing exception
  • shot.jpg
    Filename
    shot.jpg
    File size
    177.18 KiB
    Views
    4990 views
    File comment
    If it will be look like this it'll be the success.
    (There should be no errors complaining about *.NXT-files at start there.)
    File license
    Fair use/fair dealing exception

Reply 12 of 32, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It runs out of handles in real DOS as well.

As to why the app works in the NTVDM without running out of handles... I can only guess that calls to INT 21/67 are ignored there or otherwise handled differently than real DOS.

When you link a Clipper executable with Blinker, you have the option to "burn in" values from the CLIPPER environment variable, and when you do this the values can't be overridden by the environment variable. It's a feature of Blinker.

For some reason, AD2.EXE has 11 file handles burned into it. If possible, link the application again and either don't specify the number of handles so the CLIPPER environment variable will be used, or specify a higher number. In the Blinker link script there should be a line like:

BLINKER EXECUTABLE CLIPPER F100;E000

If you are unable to link the application, you can directly modify AD2.EXE to pay attention to the "F" (file handles) portion of the CLIPPER environment variable by changing the byte at offset 99F7h from 00h to 46h.

I ran "keyb ru" to get an appropriate char set, but the app seems to have some complaint about what I guess is a login ID that comes from your AD2.BAT file. However, this is the same thing happening in the above screenshot, so I guess it's not unexpected behavior.

Reply 13 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

ripsaw8080, you made my day!!! 😅

Thanks a lot to you, changing 0x00h --> 0x46h made it work.
I dunno why it works in WinXP and in PC-DOS without this patching...
In my CONFIG.NT:
SET CLIPPER=F100
SET FILES=100

Our girls use boot-floppies with PC-DOS version 7 Revision 0. I don't realize what is the difference between that and genuine MS-DOS...
I took a look to their config. It uses qemm386.sys, himem.sys along with other stuff.
In config.sys:
SET CLIPPER=F100
SET FILES=100
SET FCBS=4,0
SET STACKS=0

Nevertheless, in this PC-DOS ad2 works without your patching... Moreover, CLIPPER environment variable affects ad2 on my WinXP station too. Dunno these low-level internals, most probably there is some difference there.

The fact is that ad2 works in dosbox now! 😀
Sometimes somewhere it slows down but this is an emulation and I understand.

Reply 14 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

And you probably guess there are no sources there.

Attachments

  • snapshot.png
    Filename
    snapshot.png
    File size
    17.93 KiB
    Views
    4926 views
    File comment
    Yet no deep testing nevertheless seems to work as expected.
    File license
    Fair use/fair dealing exception

Reply 15 of 32, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If you don't have the source code, it can be recovered with Clipper decompilers such as Valkyrie. Whether or not you have rights or permission to do so is something you should consider, though.

Some of the other executables have the maximum number of handles burned into them, and therefore ignore the "F" value in the CLIPPER environment variable.

AD2P.EXE = 31
AD2S.EXE = 31
AD2T.EXE = 31
AD2U.EXE = 59
AD2V.EXE = 45

They seem like a more reasonable amount than just 11, though.

About the speed: these programs run in real mode, and so won't automatically be fast with default settings in DOSBox. Set core=dynamic, cycles=max to run them as fast as possible.

Reply 16 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

Thank you very much again.
With that settings you advised to me it runs much more flawlessly.

Now, I can talk with my boss about buying expensive hardware for M$ Windows(tm) Terminal Server(tm) with Server itself and Windows(tm) Licenses for workplaces of our db operators.
It would be foolish to spend a lot of money for that what isn't worth for it.

Reply 18 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

Ok, but I run 2 instances of dosbox and run the same AD2 inside each of them. So, I have 2 running instances of the same AD2 in 2 different instances of dosbox. Changes made in one instance are immediately visible in another. So, I think allright and that is what I needed.
What kind of sharing do you mean?

Reply 19 of 32, by sarbash

User metadata
Rank Newbie
Rank
Newbie

Another question about Valkyrie... Are you running it inside dosbox? I've got error with decompilation trying run it in WinXP cmd-shell.

P.S. It was my mistake. Just don't give file's extention to V.EXE and viola. 😀

Last edited by sarbash on 2012-08-01, 08:01. Edited 1 time in total.