Skip to content

Commit 35a5231

Browse files
committed
Add permanent option for initial DOSBox-X shell
1 parent 4dd3302 commit 35a5231

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

dosbox-x.reference.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ debuggerrun = debugger
212212
# convertdrivefat: If set, DOSBox-X will auto-convert mounted non-FAT drives (such as local drives) to FAT format for use with guest systems.
213213
#
214214
# Advanced options (see full configuration reference file [dosbox-x.reference.full.conf] for more details):
215-
# -> disable graphical splash; allow quit after warning; keyboard hook; weitek; bochs debug port e9; video debug at startup; compresssaveparts; show recorded filename; skip encoding unchanged frames; capture chroma format; capture format; shell environment size; private area size; turn off a20 gate on boot; cbus bus clock; isa bus clock; pci bus clock; call binary on reset; unhandled irq handler; call binary on boot; ibm rom basic; rom bios allocation max; rom bios minimum size; irq delay ns; iodelay; iodelay16; iodelay32; acpi; acpi rsd ptr location; acpi sci irq; acpi iobase; acpi reserved size; memsizekb; dos mem limit; isa memory hole at 512kb; isa memory hole at 15mb; reboot delay; memalias; convert fat free space; convert fat timeout; leading colon write protect image; locking disk image mount; unmask keyboard on int 16 read; int16 keyboard polling undocumented cf behavior; allow port 92 reset; enable port 92; enable 1st dma controller; enable 2nd dma controller; allow dma address decrement; enable 128k capable 16-bit dma; enable dma extra page registers; dma page registers write-only; cascade interrupt never in service; cascade interrupt ignore in service; enable slave pic; enable pc nmi mask; allow more than 640kb base memory; enable pci bus
215+
# -> disable graphical splash; allow quit after warning; keyboard hook; weitek; bochs debug port e9; video debug at startup; compresssaveparts; show recorded filename; skip encoding unchanged frames; capture chroma format; capture format; shell environment size; shell permanent; private area size; turn off a20 gate on boot; cbus bus clock; isa bus clock; pci bus clock; call binary on reset; unhandled irq handler; call binary on boot; ibm rom basic; rom bios allocation max; rom bios minimum size; irq delay ns; iodelay; iodelay16; iodelay32; acpi; acpi rsd ptr location; acpi sci irq; acpi iobase; acpi reserved size; memsizekb; dos mem limit; isa memory hole at 512kb; isa memory hole at 15mb; reboot delay; memalias; convert fat free space; convert fat timeout; leading colon write protect image; locking disk image mount; unmask keyboard on int 16 read; int16 keyboard polling undocumented cf behavior; allow port 92 reset; enable port 92; enable 1st dma controller; enable 2nd dma controller; allow dma address decrement; enable 128k capable 16-bit dma; enable dma extra page registers; dma page registers write-only; cascade interrupt never in service; cascade interrupt ignore in service; enable slave pic; enable pc nmi mask; allow more than 640kb base memory; enable pci bus
216216
#
217217
language =
218218
title =

dosbox-x.reference.full.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ debuggerrun = debugger
279279
# shell environment size: Size of the initial DOSBox-X shell environment block, in bytes. Setting to 0 implies a default size of 720 bytes as in DOSBox.
280280
# You can increase this size to store more environment variables in DOS, although this does not affect the environment block
281281
# of sub-processes spawned from the DOS shell. This option has no effect unless the dynamic kernel allocation is enabled.
282+
# shell permanent: If enabled, initial DOSBox-X shell will stay permanent (equivalent to /P switch).
282283
# private area size: Set DOSBox-X private memory area size. This area contains private memory structures used by the DOS kernel.
283284
# It is discarded when you boot into another OS. Mainline DOSBox uses 32KB. Testing shows that it is possible
284285
# to run DOSBox with as little as 4KB. If DOSBox-X aborts with error "not enough memory for internal tables"
@@ -491,6 +492,7 @@ skip encoding unchanged frames = false
491492
capture chroma format = auto
492493
capture format = default
493494
shell environment size = 0
495+
shell permanent = false
494496
private area size = 32768
495497
a20 = mask
496498
turn off a20 gate on boot = true

src/dosbox.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,9 @@ void DOSBOX_SetupConfigSections(void) {
17671767
"You can increase this size to store more environment variables in DOS, although this does not affect the environment block\n"
17681768
"of sub-processes spawned from the DOS shell. This option has no effect unless the dynamic kernel allocation is enabled.");
17691769

1770+
Pbool = secprop->Add_bool("shell permanent", Property::Changeable::OnlyAtStart, false);
1771+
Pbool->Set_help("If enabled, initial DOSBox-X shell will stay permanent (equivalent to /P switch).");
1772+
17701773
Pint = secprop->Add_int("private area size",Property::Changeable::OnlyAtStart,32768); // DOSBox mainline compatible 32KB region
17711774
Pint->SetMinMax(16,128*1024);
17721775
Pint->Set_help("Set DOSBox-X private memory area size. This area contains private memory structures used by the DOS kernel.\n"

src/shell/shell.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ void DOS_Shell::Prepare(void) {
892892
}
893893
Section_prop *section = static_cast<Section_prop *>(control->GetSection("dosbox"));
894894
bool startbanner = section->Get_bool("startbanner");
895+
first_shell->perm = section->Get_bool("shell permanent");
895896
if (!countryNo) {
896897
#if defined(WIN32)
897898
char buffer[128];

0 commit comments

Comments
 (0)