Skip to content

Commit

Permalink
For ega200 or less than 128KB EGA, just use the CGA 640x200 2-color m…
Browse files Browse the repository at this point in the history
…ode for splash screen
  • Loading branch information
joncampbell123 committed Jun 14, 2024
1 parent 7e25d5a commit a4bbd19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Next:
- Fix BIOS screen to use CGA 640x200 2-color mode if machine=ega with
less than 128KB of video ram, or machine=ega200, instead of showing
a garbled 640x350 display. (joncampbell123).
- Fix memory buffer overrun with machine=ega that can occur with
640x350 mode and less than 256KB of video RAM. (joncampbell123).
- The DOSBox clipboard API (via INT 2Fh) is now disabled by default, because
Expand Down
9 changes: 6 additions & 3 deletions src/ints/bios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ extern bool PS1AudioCard;
# define S_ISREG(x) ((x & S_IFREG) == S_IFREG)
#endif

extern bool ega200;

unsigned char ACPI_ENABLE_CMD = 0xA1;
unsigned char ACPI_DISABLE_CMD = 0xA0;
unsigned int ACPI_IO_BASE = 0x820;
Expand Down Expand Up @@ -10775,9 +10777,10 @@ class BIOS:public Module_base{
CALLBACK_RunRealInt(0x10);
DrawDOSBoxLogoVGA((unsigned int)logo_x*8u,(unsigned int)logo_y*(unsigned int)rowheight);
}
else if (machine == MCH_EGA && !textsplash) {
else if (machine == MCH_EGA && !textsplash && !ega200 && vga.mem.memsize >= (128*1024)) { /* not ega200 and at least 128KB of VRAM */
rowheight = 14;
reg_eax = 16; // 640x350 16-color
reg_eax = 16; // 640x350 16-color

CALLBACK_RunRealInt(0x10);

// color correction: change Dark Puke Yellow to brown
Expand All @@ -10789,7 +10792,7 @@ class BIOS:public Module_base{

DrawDOSBoxLogoVGA((unsigned int)logo_x*8u,(unsigned int)logo_y*(unsigned int)rowheight);
}
else if ((machine == MCH_CGA || machine == MCH_MCGA || machine == MCH_PCJR || machine == MCH_AMSTRAD || machine == MCH_TANDY) && !textsplash) {
else if ((machine == MCH_CGA || machine == MCH_EGA || machine == MCH_MCGA || machine == MCH_PCJR || machine == MCH_AMSTRAD || machine == MCH_TANDY) && !textsplash) {
rowheight = 8;
reg_eax = 6; // 640x200 2-color
CALLBACK_RunRealInt(0x10);
Expand Down

0 comments on commit a4bbd19

Please sign in to comment.