How to switch modes on DOSBox

dosdosbox

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)