dosbox-pure icon indicating copy to clipboard operation
dosbox-pure copied to clipboard

Autoboot

Open Massouille78 opened this issue 3 years ago • 30 comments

Hello,

To use Dosbox-Pure without choosing the executable everytime at game launch, I must confirm that if you already have DOSBOX.BAT just add a file AUTOBOOT.DBP containing Code:

C:\DOSBOX.BAT

My request : Can you automatically launch dosbox.bat if this file is detected in game folder without this autoboot.dbp?

Thanks very much for you work!

Massouille78 avatar Nov 12 '21 16:11 Massouille78

In fact, more dos games use play.bat to start

crashGG avatar Nov 19 '21 04:11 crashGG

Really a good idea, for my part i can't launch any games or not many more because my config files are also dosbox.bat and PURE is not reading them. But all are working fine withe standalone version. Is it possible to launch fine these dosbox.bat files at start ? or play.bat, @crashGG , the name is not really important. but for sure many are also using dosbox.bat. Thanks a lot

Darknior avatar Nov 23 '21 21:11 Darknior

The start menu allows you to set the autoboot by pressing right or by moving the mouse to the right for a bit. If you continue to press right it's possible to set the number of frames that are skipped when launching the game. This only needs to be done once per game. Is this too much?

schellingb avatar Nov 25 '21 16:11 schellingb

The start menu allows you to set the autoboot by pressing right or by moving the mouse to the right for a bit. If you continue to press right it's possible to set the number of frames that are skipped when launching the game. This only needs to be done once per game. Is this too much?

Yes but it is a pain, we must work on each game on libretro and we can't work with simple text file to prepare a set. And the option to skip frame is cool but not enough. On a dosbox.bat we can set all the game need, it is the more important feature of DOSBOX, to make games working fine, and pure not read it ... it is really strange for me.

Exemple

`joysticktype=none keyb fr

cputype=pentium_slow core=dynamic memsize=63

cd cd imgmount d "DARKF.iso"-t iso

cd.. c: cd DARK DARK.EXE`

Darknior avatar Nov 25 '21 18:11 Darknior

OK, I think "dosbox.bat" is a unique enough name that shouldn't exist in any real DOS game. I'll make it so it automatically runs "dosbox.bat" if that exists and no other autoboot option has been set in the start menu. Should hopefully make it into the next version.

schellingb avatar Nov 25 '21 19:11 schellingb

Hello,

Indeed, dosbox.bat is typically used for Batocera, our retro-gaming project to which I am contributing. I am creating a set of games under MS-dos, and all of them have the same architecture and work perfectly under standalone dosbox. We can get hold with you if you wish because I would like to make them work under Libretro Pure.

Massouille78 avatar Nov 25 '21 20:11 Massouille78

Now in the just released version 0.22 of the core, C:\DOSBOX.BAT will automatically boot if it exists without any need to setup auto start in the start menu. @Massouille78 Please try it out.

schellingb avatar Jan 05 '22 15:01 schellingb

Now in the just released version 0.22 of the core, C:\DOSBOX.BAT will automatically boot if it exists without any need to setup auto start in the start menu. @Massouille78 Please try it out.

These commands don't work.

cycles=1000 cputype=pentium_slow core=dynamic memsize=63

It shows this error: Illegal command z:config

It would be great if we could use dosbox parameters: https://www.dosbox.com/wiki/Configuration:CPU

toniosj avatar Jan 05 '22 17:01 toniosj

cycles=1000 cputype=pentium_slow core=dynamic memsize=63

For sure we need them ... maybe in a future update :)

Darknior avatar Jan 06 '22 10:01 Darknior

Now in the just released version 0.22 of the core, C:\DOSBOX.BAT will automatically boot if it exists without any need to setup auto start in the start menu. @Massouille78 Please try it out.

These commands don't work.

cycles=1000 cputype=pentium_slow core=dynamic memsize=63

It shows this error: Illegal command z:config

It would be great if we could use dosbox parameters: https://www.dosbox.com/wiki/Configuration:CPU

If looking for some specification, I think these settings should be in .conf, not .bat

crashGG avatar Jan 11 '22 06:01 crashGG

In regular DOSBox these commands do work but for libretro cores these are complicated.

Normal DOSBox reads the settings from the .conf file once at startup and then modifications can be done with commands like these.

Libretro cores read the settings from the core options (and DOSBox cores OTHER than this one) from a .conf file and then modifications can be done with the core options through the libretro menu.

Now, if a libretro core allows modifications of settings with these commands and afterwards the user touches ANYTHING in the core options, the setting modification will reset to what the core options have set. Libretro doesn't tell the core which option has changed just that a option has changed, thus the core needs to assume the core options are overruling everything.

But! For a few months now there exists this: libretro/RetroArch#13079 With this a command line cputype=pentium_slow executed could reversibly modify the core option cpu type. But (but but) this then would make the setting change permanent, unlike in regular DOSBox where the setting change only sticks until DOSBox quits.

So... it's not that simple :-)

Edit: Now that I think about it, a solution would be if the command line cputype=pentium_slow would somehow mark the setting cputype as unmodifiable (by core options) until the core exists/restarts.

schellingb avatar Jan 11 '22 07:01 schellingb

@toniosj @Darknior Changing certain config properties by with commands like cycles=1000, cputype=pentium_slow or core=dynamic is now supported. Keep in mind, just like in regular DOSBox, memsize=63 makes the impression that it works but it actually doesn't. The property memsize can only be set on startup, so changing the config at runtime doesn't do anything. You can easily confirm that yourself by running mem.

Please try it out in the just released version 0.25 and report back so maybe we can close this :-)

schellingb avatar Jan 11 '22 16:01 schellingb

@schellingb ok thanks a lot

Darknior avatar Jan 11 '22 17:01 Darknior

@schellingb awesome!! I'll try it! thanks!

toniosj avatar Jan 11 '22 19:01 toniosj

Hello, I have try version 0.25, and perfect, commandline are well taken into account. Good Job! Excellent, I tested a dozen games with different configurations, only the command line

sensitivity=100

does not work: illegal command.

Thank you in advance and soon,

Massouille78 avatar Jan 12 '22 12:01 Massouille78

image

Massouille78 avatar Jan 12 '22 12:01 Massouille78

Is it possible that it also loads the configuration from a "dosbox.cfg" file in addition to the dosbox.bat ?

Example:

dosbox.bat

c: cd goody goody

dosbox.cfg

[sdl] fullscreen=true fulldouble=false fullresolution=0x0 windowresolution=1280x960 output=overlay renderer=auto vsync=false mapperfile=mapper.map [dosbox] machine=svga_s3 memsize=64 [render] aspect=true scaler=normal2x [cpu] core=auto cputype=auto cycles=1200 [mixer] [midi] [sblaster] [gus] [speaker] [joystick] [serial] [dos] [ipx] [autoexec]

toniosj avatar Mar 26 '22 16:03 toniosj

It seems that the first thing the core does is mount the first iso it finds. But I think the imgmount of the dosbox.bat file should take precedence.

It would also be interesting to include the possibility of mounting more than one ISO at the same time as in Dosbox Standalone.

imgmount d ".\MegaRac2\cd\megar1.iso" ".\MegaRac2\cd\megar2.iso" -t cdrom

I've also found that the "." in the paths causes problems, it says it can't find the file.

Only works with:

imgmount d "\MegaRac2\cd\megar1.iso" "\MegaRac2\cd\megar2.iso" -t cdrom

toniosj avatar Mar 30 '22 11:03 toniosj

What do you want to achieve with mounting multiple ISO files? In DOSBox Pure the way to change the mounted CD (or disk) image is via the Disc Control menu in RetroArch.

I'll see if I can fix paths prefixed with ".", thanks for reporting that.

schellingb avatar Mar 30 '22 13:03 schellingb

What do you want to achieve with mounting multiple ISO files? In DOSBox Pure the way to change the mounted CD (or disk) image is via the Disc Control menu in RetroArch.

I'll see if I can fix paths prefixed with ".", thanks for reporting that.

I can't see other ISO files (inside .zip) via Disc Control menu.

toniosj avatar Mar 30 '22 14:03 toniosj

That is weird, do you see them listed in the DOSBox Pure start menu? I think the menu is a bit confusing to use. Did you press "Eject Disc" first and then selected "Current Disc Index"? It should list all IMG/ISO/CUE files and selecting one followed by "Insert Disc" should mount it.

schellingb avatar Mar 30 '22 14:03 schellingb

You are right! It's a bit confusing. Selecting "Current Disc Index" I can select other disk! Thanks!

toniosj avatar Mar 30 '22 16:03 toniosj

Sorry for making so many proposals, I hope not to disturb.

I think that lines with [xxx] in dosbox.bat file should not be taken into account.

Example:

# Config file for Dosbox-0.74
[sdl]
fullscreen=true
fulldouble=false
output=texture
renderer=auto
vsync=false
mapperfile=mapper.map
[dosbox]
machine=svga_s3
memsize=32
[render]
aspect=true
scaler=normal2x
[cpu]
core=auto
cycles=8000
cycleup=500
[mixer]
blocksize=2048
prebuffer=10
[midi]
[sblaster]
[gus]
gus=true
[speaker]
[joystick]
buttonwrap=false
[serial]
[dos]
keyboardlayout=none
[ipx]
[autoexec]
imgmount d .\adark1\cd\alonein.cue -t cdrom
c:
cd adark1
cd DARK
cd INDARK
INDARK

toniosj avatar Mar 30 '22 16:03 toniosj

I'm getting closer to finding a way to re-integrate conf file parsing in this core. A lot of the settings (like everything in [sdl] and [render] and [mixer]) will be ignored because it doesn't apply to how this core works but it would apply the machine settings and run autoexec which should make things work.

schellingb avatar Mar 30 '22 16:03 schellingb

Amazing news!

Thank you very much for your work and this great core.

toniosj avatar Mar 30 '22 16:03 toniosj

The just released 0.9.0 beta version has the improvements from the last few months in it. It's now possible to launch a .conf file directly via RetroArch or if a DOSBOX.CONF file exists in the root of the mounted C: drive (e.g. inside a loaded ZIP file) it will get loaded and applied directly. If there is an [autoexec] section in the .conf file that will get executed automatically as well.

Please try it out!

schellingb avatar Apr 19 '22 16:04 schellingb

It seems to work well! Great work!!! Awesome!

toniosj avatar Apr 19 '22 18:04 toniosj

The just released 0.9.0 beta version has the improvements from the last few months in it. It's now possible to launch a .conf file directly via RetroArch or if a DOSBOX.CONF file exists in the root of the mounted C: drive (e.g. inside a loaded ZIP file) it will get loaded and applied directly. If there is an [autoexec] section in the .conf file that will get executed automatically as well.

Please try it out!

I would add the following for perfection.

Right now, when booting first it mounts the image inside the ZIP to drive D, but I think mounting the dosbox.conf file should have priority. If it exists, of course ;)

toniosj avatar Apr 19 '22 18:04 toniosj

That is a good point indeed.

I'll change it so that just like the start menu getting skipped if there exists an [autoexec] section it would also skip the default auto mounting.

schellingb avatar Apr 19 '22 18:04 schellingb

That is a good point indeed.

I'll change it so that just like the start menu getting skipped if there exists an [autoexec] section it would also skip the default auto mounting.

Great!! Thanks so much!

toniosj avatar Apr 19 '22 18:04 toniosj