diff options
author | kcgen <kcgen@users.noreply.github.com> | 2022-08-07 17:18:20 +0300 |
---|---|---|
committer | kcgen <kcgen@users.noreply.github.com> | 2022-08-07 17:26:53 +0300 |
commit | f95a6954d5f66ef3bb0d84bd5ad8729e64c198bb (patch) | |
tree | cbfd5a282e1863239cb194d81ad6e4c981e2ce63 | |
parent | 1a77162532fa33f9822b51d9054ecb7db8c1b562 (diff) |
Log modes 11h and 12h as VGA istead of EGAkc/logging-mode-11h-12h-1
Thanks to co-authors for references:
Co-authored-by: Antti Peltola <antti.peltola@kolumbus.fi>
Co-authored-by: John Novak <john@johnovak.net>
-rw-r--r-- | include/vga.h | 3 | ||||
-rw-r--r-- | src/gui/sdlmain.cpp | 3 | ||||
-rw-r--r-- | src/hardware/vga.cpp | 23 |
3 files changed, 24 insertions, 5 deletions
diff --git a/include/vga.h b/include/vga.h index 6d0144c38..6ff2bdc4e 100644 --- a/include/vga.h +++ b/include/vga.h @@ -508,7 +508,8 @@ void VGA_SetupXGA(void); void VGA_AddCompositeSettings(Config &conf); /* Some Support Functions */ -std::pair<const char *, const char *> VGA_DescribeType(VGAModes type); +std::pair<const char *, const char *> VGA_DescribeType(const VGAModes type, + const uint16_t mode); void VGA_SetClock(Bitu which, uint32_t target); // Save, get, and limit refresh and clock functions diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index 5cbd85c75..b1cc4dba4 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -683,7 +683,8 @@ static void log_display_properties(int in_x, int in_y, const SCALING_MODE scalin const auto scale_y = static_cast<double>(out_y) / in_y; const auto out_par = scale_y / scale_x; - const auto [type_name, type_colours] = VGA_DescribeType(CurMode->type); + const auto [type_name, type_colours] = VGA_DescribeType(CurMode->type, + CurMode->mode); const char *frame_mode = nullptr; switch (sdl.frame.mode) { diff --git a/src/hardware/vga.cpp b/src/hardware/vga.cpp index 6f1bb4f5a..027705933 100644 --- a/src/hardware/vga.cpp +++ b/src/hardware/vga.cpp @@ -42,8 +42,10 @@ uint32_t ExpandTable[256]; uint32_t Expand16Table[4][16]; uint32_t FillTable[16]; -std::pair<const char *, const char *> VGA_DescribeType(const VGAModes type) +std::pair<const char *, const char *> VGA_DescribeType(const VGAModes type, + uint16_t mode) { + // clang-format off switch (type) { case M_TEXT: case M_HERC_TEXT: @@ -58,7 +60,12 @@ std::pair<const char *, const char *> VGA_DescribeType(const VGAModes type) case M_TANDY2: return std::pair("Tandy", " 2 color"); case M_TANDY4: return std::pair("Tandy", " 4 color"); case M_TANDY16: return std::pair("Tandy", " 16 color"); - case M_EGA: return std::pair("EGA", " 16 color"); + case M_EGA: // see comment below + switch (mode) { + case 0x011: return std::pair("VGA", " monochrome"); + case 0x012: return std::pair("VGA", " 16 color"); + default: return std::pair("EGA", " 16 color"); + } case M_VGA: return std::pair("VGA", " 8-bit"); case M_LIN4: return std::pair("VESA", " 16 color"); case M_LIN8: return std::pair("VESA", " 8-bit"); @@ -68,7 +75,17 @@ std::pair<const char *, const char *> VGA_DescribeType(const VGAModes type) case M_LIN32: return std::pair("VESA", " 32-bit"); case M_ERROR: default: return std::pair("Unknown", ""); - }; + } + // clang-format on + + // Modes 11h and 12h were supported by high-end EGA cards and because of + // that operate internally more like EGA modes (so DOBBox uses the EGA + // type for them), however they were classified as VGA from a standards + // perspective, so we report them as such. + // References: + // [1] IBM VGA Technical Reference, Mode of Operation, pp 2-12, 19 March, 1992. + // [2] "IBM PC Family- BIOS Video Modes", http://minuszerodegrees.net/video/bios_video_modes.htm + } void VGA_LogInitialization(const char *adapter_name, |