diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c
index 7f9717f36..ae44d5f23 100644
--- a/src/video/vid_ega.c
+++ b/src/video/vid_ega.c
@@ -9,7 +9,7 @@
* Emulation of the EGA, Chips & Technologies SuperEGA, and
* AX JEGA graphics cards.
*
- * Version: @(#)vid_ega.c 1.0.12 2018/01/24
+ * Version: @(#)vid_ega.c 1.0.13 2018/01/24
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -41,11 +41,6 @@
#define BIOS_SEGA_PATH L"roms/video/ega/lega.vbi"
-static wchar_t *ibm_path = BIOS_IBM_PATH;
-static wchar_t *cpq_path = BIOS_CPQ_PATH;
-static wchar_t *sega_path = BIOS_SEGA_PATH;
-
-
enum {
EGA_IBM = 0,
EGA_COMPAQ,
@@ -368,7 +363,6 @@ void ega_out(uint16_t addr, uint8_t val, void *p)
uint8_t ega_in(uint16_t addr, void *p)
{
ega_t *ega = (ega_t *)p;
- int crtcreg;
if (((addr & 0xfff0) == 0x3d0 || (addr & 0xfff0) == 0x3b0) && !(ega->miscout & 1))
addr ^= 0x60;
@@ -1085,8 +1079,24 @@ void ega_init(ega_t *ega, int monitor_type, int is_mono)
ega->pallook = pallook16;
egaswitches = monitor_type & 0xf;
+
ega->vram_limit = 256 * 1024;
ega->vrammask = ega->vram_limit-1;
+
+ old_overscan_color = 0;
+
+ ega->miscout |= 0x22;
+ ega->enablevram = 1;
+ ega->oddeven_page = 0;
+
+ ega->seqregs[4] |= 2;
+ ega->extvram = 1;
+
+ update_overscan = 0;
+
+#ifdef JEGA
+ ega->is_jega = 0;
+#endif
}
@@ -1107,11 +1117,11 @@ static void *ega_standalone_init(device_t *info)
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
break;
case EGA_COMPAQ:
- rom_init(&ega->bios_rom, BIOS_IBM_PATH,
+ rom_init(&ega->bios_rom, BIOS_CPQ_PATH,
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
break;
- casae EGA_SUPEREGA:
- rom_init(&ega->bios_rom, BIOS_IBM_PATH,
+ case EGA_SUPEREGA:
+ rom_init(&ega->bios_rom, BIOS_SEGA_PATH,
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
break;
}
@@ -1128,12 +1138,6 @@ static void *ega_standalone_init(device_t *info)
}
}
- update_overscan = 0;
-
-#ifdef JEGA
- ega->is_jega = 0;
-#endif
-
monitor_type = device_get_config_int("monitor_type");
ega_init(ega, monitor_type, (monitor_type & 0xf) == 10);
diff --git a/src/video/vid_ega.h b/src/video/vid_ega.h
index f748c863a..65512b460 100644
--- a/src/video/vid_ega.h
+++ b/src/video/vid_ega.h
@@ -9,7 +9,7 @@
* Emulation of the EGA, Chips & Technologies SuperEGA, and
* AX JEGA graphics cards.
*
- * Version: @(#)vid_ega.h 1.0.4 2018/01/24
+ * Version: @(#)vid_ega.h 1.0.5 2018/01/24
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -126,6 +126,13 @@ extern uint8_t jfont_dbcs_16[DBCS16_LEN]; /* 65536 * 16 * 2 (* 8) */
extern int update_overscan;
+#define DISPLAY_RGB 0
+#define DISPLAY_COMPOSITE 1
+#define DISPLAY_RGB_NO_BROWN 2
+#define DISPLAY_GREEN 3
+#define DISPLAY_AMBER 4
+#define DISPLAY_WHITE 5
+
#if defined(EMU_MEM_H) && defined(EMU_ROM_H)
extern void ega_init(ega_t *ega, int monitor_type, int is_mono);