First post, by emendelson
With the help of advice from ripsaw8080 and h-a-l-9000, I've been able to add native 50-line and 66-line video modes to my project, and created internal commands to turn them on. (Details later in this post.) The one problem I haven't been able to solve is this:
If I try to switch to 66-line mode when the screen is not tall enough to display all 66 lines (this is the case in my OS X build and my MacBook Air), then DOSBox seems to lock up (though in fact, it simply doesn't display any typed characters, and I can blindly type a command to return to VGA mode.) I wonder if anyone knows any code that I can add to the command that turns on 66-line mode so it can detect the vertical dimension of the screen, and not do anything if the screen is too tall.
Here are the details.
I added these two modes to int10_modes.cpp:
/* info from ripsaw8080 - 50-line mode */
{ 0x057 ,M_TEXT ,720, 800, 80, 50, 9, 16, 1 ,0xB8000 ,0x2000, 100, 800, 80, 800, 0 },
/* info from h-a-l-9000 - 66-line mode */
{ 0x058 ,M_TEXT ,720,1056, 80, 66, 9, 16, 1 ,0xB8000 ,0x3000, 100, 1100,80,1056, 0 },
And I added these commands to dos_programs.cpp; first this:
class LINE50 : public Program {
public:
void Run(void);
};
void LINE50::Run(void) {
reg_ax=0x0057;
CALLBACK_RunRealInt(0x10);
}
static void LINE50_ProgramStart(Program * * make) {
*make=new LINE50;
}
// 66lines - needs code to block when screen too large
class LINE66 : public Program {
public:
void Run(void);
};
void LINE66::Run(void) {
reg_ax=0x0058;
CALLBACK_RunRealInt(0x10);
}
static void LINE66_ProgramStart(Program * * make) {
*make=new LINE66;
}
then this, just above the closing curly bracket at the foot of the file:
PROGRAMS_MakeFile("50LINES.COM", LINE50_ProgramStart);
PROGRAMS_MakeFile("66LINES.COM", LINE66_ProgramStart);
The question, again, is, can I add something to the 66line that will cause it to perform no operation if the screen height is smaller than, say, 1000? (The full height of the 66-line mode is 1056, but I want to allow for at least 40 pixels for the topline menu in OS X and the title bar on a window.)
Thanks for any help with this.
EDIT: Corrected misstatement that DOSBox locks up.