VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I have a custom build that includes three custom video modes:

mode 56 - 43 lines
mode 57 - 50 lines
mode 58 - 66 lines

Mode 56 (43 lines) is the default mode at startup.

In another thread, ripsaw8080 explained how to create a custom CLS command that would preserve the current video mode. What I am now trying to do is create internal commands named 25LINES, 43LINES, 50LINES, and 66LINES that will set mode 3, mode 56, etc.

It's easy to create 25LINES. I simply copy the existing CLS command in the standard source for shell_cmds.cpp, paste it into my custom shell_cmds.cpp, change the name from CMD_CLS to CMD_25LINES, then add CMD_25LINES to the list of DOS_Shell commands near the top of shell_cmds.cpp. I also add it to the list in shell.h and I add help text in shell.cpp.

It's also easy to create 43LINES. I simply add this command to shell_cmds.cpp:

void DOS_Shell::CMD_43LINES(char * args) {
HELP("43LINES");
reg_ax=0x0056;
CALLBACK_RunRealInt(0x10);
}

and also add CMD_43LINES to the list near the top of the file, to the help entries in shell.cpp, and to the list in shell.h. Works perfectly.

But when I try to add 50LINES or 66LINES in the same way, they don't work at all. They either return me to a 25-line screen or keep the existing 43 line screen. I guess (without knowing anything about it) that I can't use this kind of command to set a video mode with a larger screen than the one that I started DOSBox with. But of course that's a guess.

I can switch to 50 and 66 lines with an external MODE command that sets my custom modes 57 and 58, but I would like to be able to have an internal command instead. Is there is an easy solution, or am I simply being foolish for trying?

Thanks for any help.