How do I switch modes on DOSBox?

How do I switch modes on DOSBox? - Top view of plastic remote control with rows of buttons representing power and mute symbols on brown background

enter image description hereSo, Im trying to run this Spongebob game on DOSBox, Spongebob Squarepants Obstacle Odyssey to be exact. I try to run the .EXE file, and it give me the statement that DOSBox cannot run the program in DOS mode. Is there a way to switch modes and if so, how do I do it? Thank you, please send help.



Best Answer

TLDR: The executable file for the game isn't compatible with the format that DOS understands, thus it can't run.


You can't run the game from DOSBox because it isn't compatible with DOS. Why? I'll try my best to explain why...

Go back nearly 40 years to 1981 and the release of MS-DOS. MS-DOS was (and still is) able to run DOS MZ executable files, which was a specific format of a .exe. This format contained a DOS Header, which will become relevant later on in this post.

Fast forward 4 years to 1985 and the release of Windows 1.0. This version of Windows was the first operating system to use a new format of executable files called New Executable. Remember that DOS Header present in the previous DOS MZ executable format? It's still present within this format - only now it's retained within a DOS Stub! The reason for it still being there is to maintain backwards compatibility. Early versions of Windows like Windows 1.0 (not to be confused with early versions of Windows NT - see next paragraph) and MS-DOS 4.0 (multitasking) were capable of running this executable. They could not run under DOS.

Continue forward through time to 1993 and the release of Windows 3.1 NT. This is the "family" of Windows you are almost certainly running today. With the release of Windows 3.1 NT, yet another format of executable files was created called Portable Executable. This is the format that is still widely used today. Despite nearly 40 years going by, this format still maintains that old DOS Header from the DOS MZ executable days in the DOS Stub introduced with the New Executable format for backwards compatibility.

Your Spongebob game is using an executable that is of the format Portable Executable. But if it has this DOS Stub, why can't it run in DOS? The stub is to maintain backwards compatibility right? Well, in this case, the backwards compatibility is to print that message you received (This program cannot be run in DOS mode) and then exit safely:

The format has retained limited legacy support to bridge the gap between DOS-based and NT systems. For example, PE/COFF headers still include a DOS executable program, which is by default a DOS stub that displays a message like "This program cannot be run in DOS mode" (or similar)




Pictures about "How do I switch modes on DOSBox?"

How do I switch modes on DOSBox? - Black and Silver Audio Mixer
How do I switch modes on DOSBox? - Black and Gray Audio Mixer
How do I switch modes on DOSBox? - Old fashioned cassette player placed in shabby garage near old industrial equipment



How do I switch drives in DOSBox?

Double-click the DOSBox executable in your Start menu, and when you see a black box with a Z: prompt, type the following command: mount c c:dosgames. That tells DOSBox to treat the C:DOSGAMES folder as the root C: drive. To get to your new C: drive (or any drive, for that matter), simply type c: at the Z: prompt.

How do you change cycles in DOSBox?

You can change the actual value with Ctrl+F11 and Ctrl+F12 (keycombo) while DOSBox runs. cycles=max - All games you start run at the maximum speed your CPU permits. Use Ctrl+F11 and Ctrl+F12 to change the percentage of your CPU to be used.

How do I configure DOSBox?

Depending on the version or host OS, the dosbox. conf file is located either inside the user profile folder or inside the same folder as dosbox.exe. On 0.74, just go to the DOSBox folder and open "DOSBox 0.74 Options. bat" in order to open the configuration file (*.

How do I use DOSBox commands?

Open DOSBox and mount your game folder as the C: drive by running the mount command (for example, mount c /path/to/game/folder). Change the directory to the new C: drive, then type the name of the EXE file and press Enter to launch a game.



dosbox - How do I switch modes on DOSBox?




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Erik Mclean, Boris Hamer, Dmitry Demidov, Andrea Piacquadio