VOGONS

Common searches


First post, by Guest

User metadata

Hi,

I already read in another post that you are working on a PAUSE-Button, (which would be a great thing, by the way).

I'd like to ask, if there exist an "EXIT" button in DosBox.
I know, that you can QUIT DosBox by pressing CRTL-F9,
but I would prefer a button, which only quits the momentary program and returns you the DOS-prompt,
so you don't have to restart DOS-Box any time, when playing some old games (which have no or only a difficult to access exit option).

Reply 1 of 6, by canadacow

User metadata
Rank Member
Rank
Member

Real DOS didn't let you do this and there's a good reason DosBox doesn't either. Its a simple fact of what's called "memory protection". Modern operating systems (really OS's that make use of modern CPU features) like OS X and Windows 2000 and XP, can close particular programs at will because they run completely encapsulated in their own little virtual worlds. DOS, on the other hand, doesn't have this kind of encapsulation protection. Each program has complete and total reign on the system. Though killing a program mid-run is technically possible it would result in leaving DosBox in a very precarious situation. The emulated system would most likely be in such a state that the next program to run would most like crash or force you to restart DosBox anyway. Letting programs terminate themselves gives them a chance to clean themselves and the environment up before they terminate. Killing them prematurely is only asking for a crash from DosBox (or even a real DOS system).

Reply 2 of 6, by Guest

User metadata

Ok, too bad it isn't possible. 🙁

I don't know anything about the internal structure of DosBox, but I thought that the DOS-prompt in DosBox is not a real (emulated) shell like the one used in the "real DOS-Box" of Windows or old MS-DOS versions, but only simulates its general behaviour.
So that just killing the "emulation" itself would not affect the "shell".
Seems, I was wrong.

Reply 3 of 6, by BoyOfDestiny

User metadata

I was a little puzzled by the response. I totally understand this business of not being able to exit... and that terminating the program would cause problems... However, why not make a key combination that would "reset" dosbox? Is that impossible? Or is it more practical to just run dosbox again due to the work this would involve. (if anyone knows how to exit from crossfire (1981-1982 OnLine Systems... let me know) Also, sorry if I missed something obvious. 😀

Reply 4 of 6, by jal

User metadata
Rank Oldbie
Rank
Oldbie

Of course it would be perfectly possible technically to make this 'EXIT'-key in DOSBox. The amount of work involved would depend totally on the internal structure of DOSBox. If, e.g., the initial setting of many internal variables and structures was done by code like this:

int some_variable = 0;

instead of some reset or init function, I can imagine it would be a real pain to reset the emulator into its initial state. If there's one general "init" function, it would be rather simple.

JAL

Reply 6 of 6, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:

DOSBox works on INIT functions.

(a whole INIT tree actually )

Well, in that case it would be no problem to implement this, I guess. *cough* 😀

JAL