VOGONS

Common searches


First post, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

Hey Vogons!

Name is Roger Wilco, playing DOS Games since I can think,
right now I am messing with DosBox a bit, I am trying to write
my own files to adjust the DB settings, from inside.

The question is about Batch files.
The commands seem to be very limited, but all I would need for now
is something like set /P - I want to write a text file into a variable.

Is there any way to achieve that in DosBox,
OR does anyone know an external tool that I could use?

I found INPUT.COM on the DosBox page, but this only asks for a prompt...

Thanks for your help!

Roger Wilco

edit:
2nd question:

If there is absolutely no workaround for that - would it be possible to program
the Batch on a geniune DOS machine, convert it to a .exe or .com and run
THAT in DosBox?

Reply 1 of 15, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Roger Wilco wrote:

I am trying to write
my own files to adjust the DB settings, from inside.

I think a better question is: are you sure you can do this in DOSBox, and are you sure the the way you're trying to do it is the best way of doing it in DOSBox?

In any case, if you want to do strange things with batch files, you might have better luck running 4DOS.COM in DOSBox.

would it be possible to program
the Batch on a geniune DOS machine, convert it to a .exe or .com and run
THAT in DosBox?

Many things are "possible". Whether it is easy or practical is another matter.

Reply 2 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

Cheers Jorpho!

I CAN do it in DosBox, if it's the best way, I am about to find out!
Basically, I am working on my own frontend, to be run inside DosBox.

Why?
Just for the feel. And messing around in DOS is an old hobby of mine.
Its great to run DB in FullScreen and actually NEVER have to go back
to too many pixels land, until I switch it off.

I allready wrote all files to adjust Dosbox' settings, a custom.bat that
lets me pass custom settings to games and reset them to default afterwards.
Everything menu based...
Works.

The set /p would just be for a nicer status output, with Ansi action going on...

If it is easy or not, I don't care, I have my vision and I want to make it...

Thanks for the tip with 4DOS.COM, will read about it!
Allthough I would love to leave it "as is", to achieve a super compatible old school frontend.

cheers
Roger Wilco

Reply 3 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

Oh wow.
Exactly what I was searching for.

Do you know, If using 4DOS might lead to problems with memory managment?
Cwsdpmi and things like that?
Or does it alter the shell ONLY?

thank you very much
RW

Reply 6 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

Cheers Vogons!

About 4DOS.COM:

I don't know, if I made something wrong, I used 4DOS.COM via
SET COMSPEC=C:\4DOS.COM

It worked, but it seemed quite slow!

Also, like I mentioned above, I'd prefer to use DB "as is", with its internal command.com,
if it works somehow, so you can basically copy and mount my Frontend without altering too much.

So I searched and found this handy tool:
ASET10.ZIP
http://manmrk.net/tutorials/batch/

ASET lets you put ANYTHING into a variable. Not super easy, but works.
For example, if you want to put the first line of example.txt into a Variable called EX.
ASET EX := LINE(1,example.txt)

Mighty tool.
Now I can start with the real ANSI action and am super happy!

cheers
Roger Wilco

Reply 8 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

Hey Qbix!

Yes, but it took me a while to find that out. I thougt I just wrote it wrong.
Honestly, it has been 22 years since I did Batch stuff for the last time.
And all I remember is the massive Boot menus I had to write.

...

The recent project I made was an Arcade Machine in DOS 7.1, with a lot of
Emulators (Mame, Nesticle...) running via ArcadeOS. Took me 3 months to get everything working.
But I only had to mess with autoexec/config a LOT for that, not many batch files...
not to mention the HARDWARE!!! 😉 Connecting the TV was life threatening, actually.
But its probably the best machine I ever made.

...

Right now I am trying to write some files that give me status outputs for Memory, CPU
... settings in Dosbox, via config -get.
Works allready, wasnt too hard, I just want them to be a bit prettier.

But actually, I am a bloody beginner 😀

cheers
Roger Wilco

Reply 9 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

And here is the last question, and the answer will decide if I actually go on with
what I am doing, or not.
Not would be not great, as I allready spent a lot of time to make this work.

Anyways:

I am using an old shareware menu program called G-Menu for my whacky frontend,
I use it to launch all the games and also my batch files for the settings.
If you are asking yourself why, I like this just for old school 90s feel.
G-Menu is the best I found amongst ~50 old shareware menu programs.

I tested it a LOT, before I started this. No game has a problem with it.
It has this wonderful "leave G-Menu resident" option - if unchecked, its slower, but no memory is used.
I am aware that it has to be -somewhere-, as it re-launches when a game closes.

All config -get and config -set options work flawlessly.
As said, I allready testet it many many times.

As I mentioned above, I try to use ASET to set Variables....
this only works outside G-Menu. From inside, it just delivers an empty string.
SET VAR=example works normally for example.
This shows me, that a basic thing is going wrong here - is that a problem
of G-Menu or ASET?

If I still would be 12 years old, I would probably try and try and try to find it out,
but I am a bit older right now, having a lot of things to do and maybe someone here
can shorten this and help me...

edit: my 12 year old self was clever enough, to find it out (seems like)
G-Menu loads the VARs on startup, but doesnt update them until next restart.
(when I quit, they are there)
Huge drawback 🙁

edit2: ... but this is actually normal behaviour.
but ASET affects the master environment.
things coming back ... SLOWLY. Makes fun again.
When this is done, I will post it. 😀

Last edited by Roger Wilco on 2016-10-17, 23:52. Edited 1 time in total.

Reply 10 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

What I found out after hours of try and error:

It seems like all these tiny helper programs (I tried some, ASET, XSET and ten others)
work - somehow - in the DosBox shell.
But the vars are always passed to the ----excuse my french----top level shell or
how you call it. Run inside a program, they are invisible, until you exit to the "last" shell
and there they are!! 😀

But unfortunately not very helpful in my case.
(Also, CALLing a bat doesnt work)

So I tried 4DOS again. Everything works normal with 4DOS, I started to work on
my fancy status messages until

config -set "dos ems" true
----> FREEZE 😀

Also happens with umb and xms.

CONs: My settings have to stay as they are now, working, but not very pretty.
PROs: My settings have to stay as they are now, working, but not very pretty.

Initially I started this for a genuine millenium bugged Pentium, with original soundblaster,
huge CRT and two button mouse.
But I will -NEVER- again write a 10 page boot menu to sort out all that memory issues in Dos.
This will be a Linux machine booting in DB and that is it.

I just found out that there are actual DB authors writing here...
So, thanks to you all for your great work!!!!!! 😀

Roger Wilco

Reply 11 of 15, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

I don't think I've ever heard someone to refer to DOSBox as "DB" before. It took me a while to figure out what you were getting at.

Setting DOSBox configuration parameters while DOSBox is running is indeed not something people usually do and I would not expect it to work very well.

There really aren't very many cases where you have to mess with the memory settings anyway.

Reply 12 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

At least the settings changings I tried worked so far - but you are right, you don't have to mess around
THAT much - actually its only Ultima 7 in my collection thats a bit picky so far...the rest really
works out of the box. But you can always enhance a bit. Or at least try to 😀

But what I read about it, only "dosbox machine" and "dosbox memsize"
require a restart of the program.
Config -get delivers the new setting, but it requires restart to kick in.

Right now I am diving into MIDI stuff to check that out...I want to compare it with
an actual MT-32. Curious, how close it gets.

edit: mouse sensitivity also requires restart and there might be more...testing

Reply 14 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

That ASET and XSET are that functions or small programs ?

These are tiny Batch utilities, I tried ASET, VARSET, XSET, SETENV and some more,
there must be thousands of them out there. Basically all shareware from
the early 90s.
.COM and .EXE files from 10k to 100k.

Effects of them were all the same, in DosBox they affected the
master environment, in 4DOS the actual subshell.
(tested with SET COMSPEC=4DOS.COM)

So, in DosBox shell, I couldn't SEE the variables in the subshell
I was running the Batch, but when I exited to the very first shell,
the VARs suddenly appeared.

With 4DOS it worked as it should, VARs were there, when exiting the
subshell they were gone.

RW

Reply 15 of 15, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

I tried FreeDos now, looks pretty nice as well!
Same problems with memory settings, but I will now start to learn about
SVNs and how to install custom updates.
config -writeconf -r looks quite interesting for example
(saves state and makes restart)
That would allow to make "dangerous" changes to the settings before the FreeDos is loaded
and of course allows to make the changes that requires a restart with one "ENTER".

Just one more question (probably not the last one, like promised above):

There is a big difference in the speed how batch files are processed when comparing
DosBox' shell and 4DOS for example.

Is that because Z:\command.com can use the "real" resources of the machine
and 4DOS uses the emulated ones?

cheers
Roger Wilco

edit: FreeDOS is almost twice as fast as 4DOS.