mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 01:48:21 -07:00
Merge remote-tracking branch 'upstream/master' into version/4.1
This commit is contained in:
@@ -173,8 +173,8 @@ int gfxcard[2] = { 0, 0 }; /* (C) graphic
|
||||
int show_second_monitors = 1; /* (C) show non-primary monitors */
|
||||
int sound_is_float = 1; /* (C) sound uses FP values */
|
||||
int voodoo_enabled = 0; /* (C) video option */
|
||||
int ibm8514_enabled = 0; /* (C) video option */
|
||||
int xga_enabled = 0; /* (C) video option */
|
||||
int ibm8514_standalone_enabled = 0; /* (C) video option */
|
||||
int xga_standalone_enabled = 0; /* (C) video option */
|
||||
uint32_t mem_size = 0; /* (C) memory size (Installed on system board)*/
|
||||
uint32_t isa_mem_size = 0; /* (C) memory size (ISA Memory Cards) */
|
||||
int cpu_use_dynarec = 0; /* (C) cpu uses/needs Dyna */
|
||||
|
||||
198
src/config.c
198
src/config.c
@@ -564,9 +564,16 @@ load_video(void)
|
||||
free(p);
|
||||
}
|
||||
|
||||
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_8514A)) || video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_8514)
|
||||
ini_section_delete_var(cat, "8514a");
|
||||
if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_XGA)) || video_card_get_flags(gfxcard[0]) == VIDEO_FLAG_TYPE_XGA)
|
||||
ini_section_delete_var(cat, "xga");
|
||||
|
||||
voodoo_enabled = !!ini_section_get_int(cat, "voodoo", 0);
|
||||
ibm8514_enabled = !!ini_section_get_int(cat, "8514a", 0);
|
||||
xga_enabled = !!ini_section_get_int(cat, "xga", 0);
|
||||
ibm8514_standalone_enabled = !!ini_section_get_int(cat, "8514a", 0);
|
||||
ibm8514_active = ibm8514_standalone_enabled;
|
||||
xga_standalone_enabled = !!ini_section_get_int(cat, "xga", 0);
|
||||
xga_active = xga_standalone_enabled;
|
||||
show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1);
|
||||
video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0);
|
||||
|
||||
@@ -1016,14 +1023,19 @@ load_storage_controllers(void)
|
||||
sprintf(temp, "cartridge_%02i_fn", c + 1);
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_storage_controllers(): strlen(p) > 511 (cart_fns[%i])\n", c);
|
||||
else
|
||||
strncpy(cart_fns[c], p, 511);
|
||||
} else
|
||||
path_append_filename(cart_fns[c], usr_path, p);
|
||||
path_normalize(cart_fns[c]);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_storage_controllers(): strlen(p) > 511 (cart_fns[%i])\n", c);
|
||||
else
|
||||
strncpy(cart_fns[c], p, 511);
|
||||
} else
|
||||
path_append_filename(cart_fns[c], usr_path, p);
|
||||
path_normalize(cart_fns[c]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1179,14 +1191,19 @@ load_hard_disks(void)
|
||||
* When loading differencing VHDs, the absolute path is required.
|
||||
* So we should not convert absolute paths to relative. -sards
|
||||
*/
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_hard_disks(): strlen(p) > 511 (hdd[%i].fn)\n", c);
|
||||
else
|
||||
strncpy(hdd[c].fn, p, 511);
|
||||
} else
|
||||
path_append_filename(hdd[c].fn, usr_path, p);
|
||||
path_normalize(hdd[c].fn);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_hard_disks(): strlen(p) > 511 (hdd[%i].fn)\n", c);
|
||||
else
|
||||
strncpy(hdd[c].fn, p, 511);
|
||||
} else
|
||||
path_append_filename(hdd[c].fn, usr_path, p);
|
||||
path_normalize(hdd[c].fn);
|
||||
}
|
||||
|
||||
sprintf(temp, "hdd_%02i_vhd_blocksize", c + 1);
|
||||
hdd[c].vhd_blocksize = ini_section_get_int(cat, temp, 0);
|
||||
@@ -1245,14 +1262,19 @@ load_floppy_drives(void)
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
ini_section_delete_var(cat, temp);
|
||||
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_floppy_drives(): strlen(p) > 511 (floppyfns[%i])\n", c);
|
||||
else
|
||||
strncpy(floppyfns[c], p, 511);
|
||||
} else
|
||||
path_append_filename(floppyfns[c], usr_path, p);
|
||||
path_normalize(floppyfns[c]);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_floppy_drives(): strlen(p) > 511 (floppyfns[%i])\n", c);
|
||||
else
|
||||
strncpy(floppyfns[c], p, 511);
|
||||
} else
|
||||
path_append_filename(floppyfns[c], usr_path, p);
|
||||
path_normalize(floppyfns[c]);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_CONFIG_LOG) && (ENABLE_CONFIG_LOG == 2)
|
||||
if (*p != '\0')
|
||||
@@ -1300,14 +1322,19 @@ load_floppy_and_cdrom_drives(void)
|
||||
sprintf(temp, "fdd_%02i_fn", c + 1);
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 511 (floppyfns[%i])\n", c);
|
||||
else
|
||||
strncpy(floppyfns[c], p, 511);
|
||||
} else
|
||||
path_append_filename(floppyfns[c], usr_path, p);
|
||||
path_normalize(floppyfns[c]);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 511 (floppyfns[%i])\n", c);
|
||||
else
|
||||
strncpy(floppyfns[c], p, 511);
|
||||
} else
|
||||
path_append_filename(floppyfns[c], usr_path, p);
|
||||
path_normalize(floppyfns[c]);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_CONFIG_LOG) && (ENABLE_CONFIG_LOG == 2)
|
||||
if (*p != '\0')
|
||||
@@ -1354,7 +1381,7 @@ load_floppy_and_cdrom_drives(void)
|
||||
else
|
||||
snprintf(fdd_image_history[c][i], 255, "%s", p);
|
||||
} else
|
||||
snprintf(fdd_image_history[c][i], 255, "%s%$s%s", usr_path,
|
||||
snprintf(fdd_image_history[c][i], 255, "%s%s%s", usr_path,
|
||||
path_get_slash(usr_path), p);
|
||||
path_normalize(fdd_image_history[c][i]);
|
||||
}
|
||||
@@ -1438,14 +1465,19 @@ load_floppy_and_cdrom_drives(void)
|
||||
sprintf(temp, "cdrom_%02i_image_path", c + 1);
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 511 (cdrom[%i].image_path)\n", c);
|
||||
else
|
||||
strncpy(cdrom[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(cdrom[c].image_path, usr_path, p);
|
||||
path_normalize(cdrom[c].image_path);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_floppy_and_cdrom_drives(): strlen(p) > 511 (cdrom[%i].image_path)\n", c);
|
||||
else
|
||||
strncpy(cdrom[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(cdrom[c].image_path, usr_path, p);
|
||||
path_normalize(cdrom[c].image_path);
|
||||
}
|
||||
|
||||
if (cdrom[c].host_drive && (cdrom[c].host_drive != 200))
|
||||
cdrom[c].host_drive = 0;
|
||||
@@ -1465,7 +1497,7 @@ load_floppy_and_cdrom_drives(void)
|
||||
else
|
||||
snprintf(cdrom[c].image_history[i], 511, "%s", p);
|
||||
} else
|
||||
snprintf(cdrom[c].image_history[i], 511, "%s%$s%s", usr_path,
|
||||
snprintf(cdrom[c].image_history[i], 511, "%s%s%s", usr_path,
|
||||
path_get_slash(usr_path), p);
|
||||
path_normalize(cdrom[c].image_history[i]);
|
||||
}
|
||||
@@ -1567,14 +1599,20 @@ load_other_removable_devices(void)
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
ini_section_delete_var(cat, temp);
|
||||
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_other_removable_devices(): strlen(p) > 511 (cdrom[%i].image_path)\n", c);
|
||||
else
|
||||
strncpy(cdrom[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(cdrom[c].image_path, usr_path, p);
|
||||
path_normalize(cdrom[c].image_path);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_other_removable_devices(): strlen(p) > 511 (cdrom[%i].image_path)\n",
|
||||
c);
|
||||
else
|
||||
strncpy(cdrom[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(cdrom[c].image_path, usr_path, p);
|
||||
path_normalize(cdrom[c].image_path);
|
||||
}
|
||||
|
||||
if (cdrom[c].host_drive && (cdrom[c].host_drive != 200))
|
||||
cdrom[c].host_drive = 0;
|
||||
@@ -1644,14 +1682,20 @@ load_other_removable_devices(void)
|
||||
sprintf(temp, "zip_%02i_image_path", c + 1);
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_other_removable_devices(): strlen(p) > 511 (zip_drives[%i].image_path)\n", c);
|
||||
else
|
||||
strncpy(zip_drives[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(zip_drives[c].image_path, usr_path, p);
|
||||
path_normalize(zip_drives[c].image_path);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_other_removable_devices(): strlen(p) > 511 (zip_drives[%i].image_path)\n",
|
||||
c);
|
||||
else
|
||||
strncpy(zip_drives[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(zip_drives[c].image_path, usr_path, p);
|
||||
path_normalize(zip_drives[c].image_path);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_PREV_IMAGES; i++) {
|
||||
zip_drives[c].image_history[i] = (char *) calloc(MAX_IMAGE_PATH_LEN + 1, sizeof(char));
|
||||
@@ -1665,7 +1709,7 @@ load_other_removable_devices(void)
|
||||
else
|
||||
snprintf(zip_drives[c].image_history[i], 511, "%s", p);
|
||||
} else
|
||||
snprintf(zip_drives[c].image_history[i], 511, "%s%$s%s", usr_path,
|
||||
snprintf(zip_drives[c].image_history[i], 511, "%s%s%s", usr_path,
|
||||
path_get_slash(usr_path), p);
|
||||
path_normalize(zip_drives[c].image_history[i]);
|
||||
}
|
||||
@@ -1754,14 +1798,20 @@ load_other_removable_devices(void)
|
||||
sprintf(temp, "mo_%02i_image_path", c + 1);
|
||||
p = ini_section_get_string(cat, temp, "");
|
||||
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_other_removable_devices(): strlen(p) > 511 (mo_drives[%i].image_path)\n", c);
|
||||
else
|
||||
strncpy(mo_drives[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(mo_drives[c].image_path, usr_path, p);
|
||||
path_normalize(mo_drives[c].image_path);
|
||||
if (!strcmp(p, usr_path))
|
||||
p[0] = 0x00;
|
||||
|
||||
if (p[0] != 0x00) {
|
||||
if (path_abs(p)) {
|
||||
if (strlen(p) > 511)
|
||||
fatal("load_other_removable_devices(): strlen(p) > 511 (mo_drives[%i].image_path)\n",
|
||||
c);
|
||||
else
|
||||
strncpy(mo_drives[c].image_path, p, 511);
|
||||
} else
|
||||
path_append_filename(mo_drives[c].image_path, usr_path, p);
|
||||
path_normalize(mo_drives[c].image_path);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_PREV_IMAGES; i++) {
|
||||
mo_drives[c].image_history[i] = (char *) calloc(MAX_IMAGE_PATH_LEN + 1, sizeof(char));
|
||||
@@ -1775,7 +1825,7 @@ load_other_removable_devices(void)
|
||||
else
|
||||
snprintf(mo_drives[c].image_history[i], 511, "%s", p);
|
||||
} else
|
||||
snprintf(mo_drives[c].image_history[i], 511, "%s%$s%s", usr_path,
|
||||
snprintf(mo_drives[c].image_history[i], 511, "%s%s%s", usr_path,
|
||||
path_get_slash(usr_path), p);
|
||||
path_normalize(mo_drives[c].image_history[i]);
|
||||
}
|
||||
@@ -2309,15 +2359,15 @@ save_video(void)
|
||||
else
|
||||
ini_section_set_int(cat, "voodoo", voodoo_enabled);
|
||||
|
||||
if (ibm8514_enabled == 0)
|
||||
if (ibm8514_standalone_enabled == 0)
|
||||
ini_section_delete_var(cat, "8514a");
|
||||
else
|
||||
ini_section_set_int(cat, "8514a", ibm8514_enabled);
|
||||
ini_section_set_int(cat, "8514a", ibm8514_standalone_enabled);
|
||||
|
||||
if (xga_enabled == 0)
|
||||
if (xga_standalone_enabled == 0)
|
||||
ini_section_delete_var(cat, "xga");
|
||||
else
|
||||
ini_section_set_int(cat, "xga", xga_enabled);
|
||||
ini_section_set_int(cat, "xga", xga_standalone_enabled);
|
||||
|
||||
if (gfxcard[1] == 0)
|
||||
ini_section_delete_var(cat, "gfxcard_2");
|
||||
|
||||
@@ -487,21 +487,6 @@ cycles_biu(int bus, int init)
|
||||
BUS_CYCLE_NEXT;
|
||||
}
|
||||
|
||||
#ifdef REENIGNE_MODELING
|
||||
static void
|
||||
bus_init(void)
|
||||
{
|
||||
/* Replacement for the old access() stuff. */
|
||||
if ((BUS_CYCLE == BUS_T4) && last_was_code && (opcode != 0x8f) && (opcode != 0xc7) && (opcode != 0xcc) && (opcode != 0xcd) && (opcode != 0xce) && ((opcode & 0xf0) != 0xa0))
|
||||
cycles_idle(1);
|
||||
|
||||
cycles_idle(2);
|
||||
|
||||
while ((BUS_CYCLE == BUS_T2) || (BUS_CYCLE == BUS_T3))
|
||||
cycles_idle(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Bus:
|
||||
0 CPU cycles without bus access.
|
||||
1 CPU cycle T1-T4, bus access.
|
||||
@@ -561,10 +546,6 @@ resub_cycles(int old_cycles)
|
||||
static void
|
||||
cpu_io(int bits, int out, uint16_t port)
|
||||
{
|
||||
#ifdef REENIGNE_MODELING
|
||||
bus_init();
|
||||
#endif
|
||||
|
||||
if (out) {
|
||||
if (bits == 16) {
|
||||
if (is8086 && !(port & 1)) {
|
||||
@@ -608,10 +589,6 @@ readmemb(uint32_t s, uint16_t a)
|
||||
{
|
||||
uint8_t ret;
|
||||
|
||||
#ifdef REENIGNE_MODELING
|
||||
bus_init();
|
||||
#endif
|
||||
|
||||
mem_seg = s;
|
||||
mem_addr = a;
|
||||
bus_request_type = BUS_MEM;
|
||||
@@ -642,10 +619,6 @@ readmemw(uint32_t s, uint16_t a)
|
||||
{
|
||||
uint16_t ret;
|
||||
|
||||
#ifdef REENIGNE_MODELING
|
||||
bus_init();
|
||||
#endif
|
||||
|
||||
mem_seg = s;
|
||||
mem_addr = a;
|
||||
if (is8086 && !(a & 1)) {
|
||||
@@ -715,10 +688,6 @@ writememb(uint32_t s, uint32_t a, uint8_t v)
|
||||
{
|
||||
uint32_t addr = s + a;
|
||||
|
||||
#ifdef REENIGNE_MODELING
|
||||
bus_init();
|
||||
#endif
|
||||
|
||||
mem_seg = s;
|
||||
mem_addr = a;
|
||||
mem_data = v;
|
||||
@@ -736,10 +705,6 @@ writememw(uint32_t s, uint32_t a, uint16_t v)
|
||||
{
|
||||
uint32_t addr = s + a;
|
||||
|
||||
#ifdef REENIGNE_MODELING
|
||||
bus_init();
|
||||
#endif
|
||||
|
||||
mem_seg = s;
|
||||
mem_addr = a;
|
||||
mem_data = v;
|
||||
|
||||
@@ -356,7 +356,7 @@ softresetx86(void)
|
||||
if (soft_reset_mask)
|
||||
return;
|
||||
|
||||
if (ibm8514_enabled || xga_enabled)
|
||||
if (ibm8514_active || xga_active)
|
||||
vga_on = 1;
|
||||
|
||||
reset_common(0);
|
||||
|
||||
@@ -130,8 +130,8 @@ extern int isamem_type[]; /* (C) enable ISA mem cards */
|
||||
extern int isartc_type; /* (C) enable ISA RTC card */
|
||||
extern int sound_is_float; /* (C) sound uses FP values */
|
||||
extern int voodoo_enabled; /* (C) video option */
|
||||
extern int ibm8514_enabled; /* (C) video option */
|
||||
extern int xga_enabled; /* (C) video option */
|
||||
extern int ibm8514_standalone_enabled; /* (C) video option */
|
||||
extern int xga_standalone_enabled; /* (C) video option */
|
||||
extern uint32_t mem_size; /* (C) memory size (Installed on system board) */
|
||||
extern uint32_t isa_mem_size; /* (C) memory size (ISA Memory Cards) */
|
||||
extern int cpu; /* (C) cpu type */
|
||||
|
||||
@@ -83,38 +83,38 @@
|
||||
#define MACHINE_FLAGS_NONE 0x00000000 /* sys has no int devices */
|
||||
#define MACHINE_SOFTFLOAT_ONLY 0x00000001 /* sys requires SoftFloat FPU */
|
||||
#define MACHINE_VIDEO 0x00000002 /* sys has int video */
|
||||
#define MACHINE_VIDEO_ONLY 0x00000004 /* sys has fixed video */
|
||||
#define MACHINE_MOUSE 0x00000008 /* sys has int mouse */
|
||||
#define MACHINE_FDC 0x00000010 /* sys has int FDC */
|
||||
#define MACHINE_LPT_PRI 0x00000020 /* sys has int pri LPT */
|
||||
#define MACHINE_LPT_SEC 0x00000040 /* sys has int sec LPT */
|
||||
#define MACHINE_LPT_TER 0x00000080 /* sys has int ter LPT */
|
||||
#define MACHINE_LPT_QUA 0x00000100 /* sys has int qua LPT */
|
||||
#define MACHINE_UART_PRI 0x00000200 /* sys has int pri UART */
|
||||
#define MACHINE_UART_SEC 0x00000400 /* sys has int sec UART */
|
||||
#define MACHINE_UART_TER 0x00000800 /* sys has int ter UART */
|
||||
#define MACHINE_UART_QUA 0x00001000 /* sys has int qua UART */
|
||||
#define MACHINE_GAMEPORT 0x00002000 /* sys has int game port */
|
||||
#define MACHINE_SOUND 0x00004000 /* sys has int sound */
|
||||
#define MACHINE_NIC 0x00008000 /* sys has int NIC */
|
||||
#define MACHINE_MODEM 0x00010000 /* sys has int modem */
|
||||
#define MACHINE_VIDEO_8514A 0x00000004 /* sys has int video */
|
||||
#define MACHINE_VIDEO_XGA 0x00000008 /* sys has int video */
|
||||
#define MACHINE_VIDEO_ONLY 0x00000010 /* sys has fixed video */
|
||||
#define MACHINE_MOUSE 0x00000020 /* sys has int mouse */
|
||||
#define MACHINE_FDC 0x00000040 /* sys has int FDC */
|
||||
#define MACHINE_LPT_PRI 0x00000080 /* sys has int pri LPT */
|
||||
#define MACHINE_LPT_SEC 0x00000100 /* sys has int sec LPT */
|
||||
#define MACHINE_LPT_TER 0x00000200 /* sys has int ter LPT */
|
||||
#define MACHINE_LPT_QUA 0x00000400 /* sys has int qua LPT */
|
||||
#define MACHINE_UART_PRI 0x00000800 /* sys has int pri UART */
|
||||
#define MACHINE_UART_SEC 0x00001000 /* sys has int sec UART */
|
||||
#define MACHINE_UART_TER 0x00002000 /* sys has int ter UART */
|
||||
#define MACHINE_UART_QUA 0x00004000 /* sys has int qua UART */
|
||||
#define MACHINE_GAMEPORT 0x00008000 /* sys has int game port */
|
||||
#define MACHINE_SOUND 0x00010000 /* sys has int sound */
|
||||
#define MACHINE_NIC 0x00020000 /* sys has int NIC */
|
||||
#define MACHINE_MODEM 0x00040000 /* sys has int modem */
|
||||
/* Feature flags for advanced devices. */
|
||||
#define MACHINE_APM 0x00020000 /* sys has APM */
|
||||
#define MACHINE_ACPI 0x00040000 /* sys has ACPI */
|
||||
#define MACHINE_HWM 0x00080000 /* sys has hw monitor */
|
||||
#define MACHINE_COREBOOT 0x00100000 /* sys has coreboot BIOS */
|
||||
#define MACHINE_APM 0x00080000 /* sys has APM */
|
||||
#define MACHINE_ACPI 0x00100000 /* sys has ACPI */
|
||||
#define MACHINE_HWM 0x00200000 /* sys has hw monitor */
|
||||
#define MACHINE_COREBOOT 0x00400000 /* sys has coreboot BIOS */
|
||||
/* Feature flags for internal storage controllers. */
|
||||
#define MACHINE_MFM 0x00200000 /* sys has int MFM/RLL */
|
||||
#define MACHINE_XTA 0x00400000 /* sys has int XTA */
|
||||
#define MACHINE_ESDI 0x00800000 /* sys has int ESDI */
|
||||
#define MACHINE_IDE_PRI 0x01000000 /* sys has int pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_SEC 0x02000000 /* sys has int sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_TER 0x04000000 /* sys has int ter IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUA 0x08000000 /* sys has int qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI_PRI 0x10000000 /* sys has int pri SCSI */
|
||||
#define MACHINE_SCSI_SEC 0x20000000 /* sys has int sec SCSI */
|
||||
#define MACHINE_USB_PRI 0x40000000 /* sys has int pri USB */
|
||||
#define MACHINE_USB_SEC 0x80000000 /* sys has int sec USB */
|
||||
#define MACHINE_MFM 0x00800000 /* sys has int MFM/RLL */
|
||||
#define MACHINE_XTA 0x01000000 /* sys has int XTA */
|
||||
#define MACHINE_ESDI 0x02000000 /* sys has int ESDI */
|
||||
#define MACHINE_IDE_PRI 0x04000000 /* sys has int pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_SEC 0x08000000 /* sys has int sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_TER 0x10000000 /* sys has int ter IDE/ATAPI */
|
||||
#define MACHINE_IDE_QUA 0x20000000 /* sys has int qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI 0x40000000 /* sys has int SCSI */
|
||||
#define MACHINE_USB 0x80000000 /* sys has int USB */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_LPT (MACHINE_LPT-PRI | MACHINE_LPT_SEC | \
|
||||
MACHINE_LPT_TER | MACHINE_LPT_QUA)
|
||||
@@ -132,13 +132,9 @@
|
||||
#define MACHINE_IDE_DUAL (MACHINE_IDE_PRI | MACHINE_IDE_SEC) /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
|
||||
#define MACHINE_IDE_DUALTQ (MACHINE_IDE_TER | MACHINE_IDE_QUA)
|
||||
#define MACHINE_IDE_QUAD (MACHINE_IDE_DUAL | MACHINE_IDE_DUALTQ) /* sys has int quad IDE/ATAPI - mark as dual + both ter and and qua IDE/ATAPI */
|
||||
#define MACHINE_SCSI (MACHINE_SCSI_PRI) /* sys has int single SCSI - mark as pri SCSI */
|
||||
#define MACHINE_SCSI_DUAL (MACHINE_SCSI_PRI | MACHINE_SCSI_SEC) /* sys has int dual SCSI - mark as both pri and sec SCSI */
|
||||
#define MACHINE_USB (MACHINE_USB_PRI)
|
||||
#define MACHINE_USB_DUAL (MACHINE_USB_PRI | MACHINE_USB_SEC)
|
||||
#define MACHINE_HDC (MACHINE_MFM | MACHINE_XTA | \
|
||||
MACHINE_ESDI | MACHINE_IDE_QUAD | \
|
||||
MACHINE_SCSI_DUAL | MACHINE_USB_DUAL)
|
||||
MACHINE_SCSI | MACHINE_USB)
|
||||
/* Special combined flags. */
|
||||
#define MACHINE_PIIX (MACHINE_IDE_DUAL)
|
||||
#define MACHINE_PIIX3 (MACHINE_PIIX | MACHINE_USB)
|
||||
|
||||
@@ -21,6 +21,7 @@ typedef struct mda_t {
|
||||
int firstline;
|
||||
int lastline;
|
||||
|
||||
int fontbase;
|
||||
int linepos;
|
||||
int displine;
|
||||
int vc;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#ifndef VIDEO_XGA_DEVICE_H
|
||||
#define VIDEO_XGA_DEVICE_H
|
||||
extern int xga_has_vga;
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t xga_device;
|
||||
|
||||
@@ -208,7 +208,8 @@ extern double cpuclock;
|
||||
extern int emu_fps;
|
||||
extern int frames;
|
||||
extern int readflash;
|
||||
extern int ibm8514_has_vga;
|
||||
extern int ibm8514_active;
|
||||
extern int xga_active;
|
||||
|
||||
/* Function handler pointers. */
|
||||
extern void (*video_recalctimings)(void);
|
||||
|
||||
@@ -1690,6 +1690,7 @@ vid_init_200(amstrad_t *ams)
|
||||
mda_setcol(0xC0, 0, 1, 0);
|
||||
|
||||
cga->fontbase = (device_get_config_int("codepage") & 3) * 256;
|
||||
mda->fontbase = cga->fontbase;
|
||||
|
||||
timer_add(&vid->timer, vid_poll_200, vid, 1);
|
||||
mem_mapping_add(&vid->mda.mapping, 0xb0000, 0x08000,
|
||||
|
||||
@@ -7752,7 +7752,7 @@ const machine_t machines[] = {
|
||||
.max_multi = MACHINE_MULTIPLIER_FIXED
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_VIDEO_8514A | MACHINE_APM | MACHINE_ACPI,
|
||||
.ram = {
|
||||
.min = 2048,
|
||||
.max = 131072,
|
||||
|
||||
@@ -616,7 +616,7 @@ pci_readl(uint16_t port, UNUSED(void *priv))
|
||||
/* No split here, actual 32-bit access. */
|
||||
if (pci_flags & FLAG_MECHANISM_1) {
|
||||
ret = pci_index | (pci_func << 8) | (pci_card << 11) | (pci_bus << 16);
|
||||
if (pci_flags & FLAG_CONFIG_IO_ON)
|
||||
if (pci_flags & FLAG_CONFIG_M1_IO_ON)
|
||||
ret |= PCI_ENABLED;
|
||||
|
||||
pci_log("PCI: [RL] Mechanism #1 port 0CF8 = %08X\n", ret);
|
||||
|
||||
@@ -278,7 +278,7 @@ MachineStatus::hasIDE()
|
||||
bool
|
||||
MachineStatus::hasSCSI()
|
||||
{
|
||||
return machine_has_flags(machine, MACHINE_SCSI_DUAL) > 0;
|
||||
return machine_has_flags(machine, MACHINE_SCSI) > 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -49,11 +49,11 @@ SettingsDisplay::~SettingsDisplay()
|
||||
void
|
||||
SettingsDisplay::save()
|
||||
{
|
||||
gfxcard[0] = ui->comboBoxVideo->currentData().toInt();
|
||||
gfxcard[1] = ui->comboBoxVideoSecondary->currentData().toInt();
|
||||
voodoo_enabled = ui->checkBoxVoodoo->isChecked() ? 1 : 0;
|
||||
ibm8514_enabled = ui->checkBox8514->isChecked() ? 1 : 0;
|
||||
xga_enabled = ui->checkBoxXga->isChecked() ? 1 : 0;
|
||||
gfxcard[0] = ui->comboBoxVideo->currentData().toInt();
|
||||
gfxcard[1] = ui->comboBoxVideoSecondary->currentData().toInt();
|
||||
voodoo_enabled = ui->checkBoxVoodoo->isChecked() ? 1 : 0;
|
||||
ibm8514_standalone_enabled = ui->checkBox8514->isChecked() ? 1 : 0;
|
||||
xga_standalone_enabled = ui->checkBoxXga->isChecked() ? 1 : 0;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -102,17 +102,6 @@ SettingsDisplay::onCurrentMachineChanged(int machineId)
|
||||
ui->comboBoxVideoSecondary->setEnabled(true);
|
||||
ui->pushButtonConfigureSecondary->setEnabled(true);
|
||||
}
|
||||
if (gfxcard[0] == VID_INTERNAL) {
|
||||
if (video_get_type_monitor(0) != VIDEO_FLAG_TYPE_8514)
|
||||
ibm8514_has_vga = 0;
|
||||
if (video_get_type_monitor(0) != VIDEO_FLAG_TYPE_XGA)
|
||||
xga_has_vga = 0;
|
||||
} else {
|
||||
if (video_card_get_flags(gfxcard[0]) != VIDEO_FLAG_TYPE_8514)
|
||||
ibm8514_has_vga = 0;
|
||||
if (video_card_get_flags(gfxcard[0]) != VIDEO_FLAG_TYPE_XGA)
|
||||
xga_has_vga = 0;
|
||||
}
|
||||
ui->comboBoxVideo->setCurrentIndex(selectedRow);
|
||||
if (gfxcard[1] == 0)
|
||||
ui->pushButtonConfigureSecondary->setEnabled(false);
|
||||
@@ -134,12 +123,10 @@ SettingsDisplay::on_pushButtonConfigureVoodoo_clicked()
|
||||
void
|
||||
SettingsDisplay::on_pushButtonConfigureXga_clicked()
|
||||
{
|
||||
if (!xga_has_vga) {
|
||||
if (machine_has_bus(machineId, MACHINE_BUS_MCA) > 0) {
|
||||
DeviceConfig::ConfigureDevice(&xga_device, 0, qobject_cast<Settings *>(Settings::settings));
|
||||
} else {
|
||||
DeviceConfig::ConfigureDevice(&xga_isa_device, 0, qobject_cast<Settings *>(Settings::settings));
|
||||
}
|
||||
if (machine_has_bus(machineId, MACHINE_BUS_MCA) > 0) {
|
||||
DeviceConfig::ConfigureDevice(&xga_device, 0, qobject_cast<Settings *>(Settings::settings));
|
||||
} else {
|
||||
DeviceConfig::ConfigureDevice(&xga_isa_device, 0, qobject_cast<Settings *>(Settings::settings));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,18 +146,21 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index)
|
||||
}
|
||||
ui->pushButtonConfigureVoodoo->setEnabled(machineHasPci && ui->checkBoxVoodoo->isChecked());
|
||||
|
||||
bool hasIsa16 = machine_has_bus(machineId, MACHINE_BUS_ISA16) > 0;
|
||||
bool has_MCA = machine_has_bus(machineId, MACHINE_BUS_MCA) > 0;
|
||||
ui->checkBox8514->setEnabled((hasIsa16 || has_MCA) && !ibm8514_has_vga);
|
||||
if (hasIsa16 || has_MCA) {
|
||||
ui->checkBox8514->setChecked(ibm8514_enabled);
|
||||
}
|
||||
bool machineHasIsa16 = machine_has_bus(machineId, MACHINE_BUS_ISA16) > 0;
|
||||
bool machineHasMca = machine_has_bus(machineId, MACHINE_BUS_MCA) > 0;
|
||||
|
||||
ui->checkBoxXga->setEnabled((hasIsa16 || has_MCA) && !xga_has_vga);
|
||||
if (hasIsa16 || has_MCA)
|
||||
ui->checkBoxXga->setChecked(xga_enabled);
|
||||
bool videoCardHas8514 = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_8514A) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_8514));
|
||||
bool videoCardHasXga = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_XGA) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_XGA));
|
||||
|
||||
ui->pushButtonConfigureXga->setEnabled((hasIsa16 || has_MCA) && ui->checkBoxXga->isChecked() && !xga_has_vga);
|
||||
ui->checkBox8514->setEnabled((machineHasIsa16 || machineHasMca) && !videoCardHas8514);
|
||||
if (machineHasIsa16 || machineHasMca)
|
||||
ui->checkBox8514->setChecked(ibm8514_standalone_enabled && !videoCardHas8514);
|
||||
|
||||
ui->checkBoxXga->setEnabled((machineHasIsa16 || machineHasMca) && !videoCardHasXga);
|
||||
if (machineHasIsa16 || machineHasMca)
|
||||
ui->checkBoxXga->setChecked(xga_standalone_enabled && !videoCardHasXga);
|
||||
|
||||
ui->pushButtonConfigureXga->setEnabled((machineHasIsa16 || machineHasMca) && ui->checkBoxXga->isChecked() && !videoCardHasXga);
|
||||
|
||||
int c = 2;
|
||||
|
||||
@@ -190,7 +180,13 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index)
|
||||
break;
|
||||
}
|
||||
|
||||
if (video_card_available(c) && device_is_valid(video_dev, machineId) && !(video_card_get_flags(c) == video_card_get_flags(videoCard[0]) && (video_card_get_flags(c) != VIDEO_FLAG_TYPE_SPECIAL))) {
|
||||
int primaryFlags = video_card_get_flags(videoCard[0]);
|
||||
int secondaryFlags = video_card_get_flags(c);
|
||||
if (video_card_available(c)
|
||||
&& device_is_valid(video_dev, machineId)
|
||||
&& !((secondaryFlags == primaryFlags) && (secondaryFlags != VIDEO_FLAG_TYPE_SPECIAL))
|
||||
&& !(((primaryFlags == VIDEO_FLAG_TYPE_8514) || (primaryFlags == VIDEO_FLAG_TYPE_XGA)) && (secondaryFlags != VIDEO_FLAG_TYPE_MDA) && (secondaryFlags != VIDEO_FLAG_TYPE_SPECIAL))
|
||||
&& !((primaryFlags != VIDEO_FLAG_TYPE_MDA) && (primaryFlags != VIDEO_FLAG_TYPE_SPECIAL) && ((secondaryFlags == VIDEO_FLAG_TYPE_8514) || (secondaryFlags == VIDEO_FLAG_TYPE_XGA)))) {
|
||||
ui->comboBoxVideoSecondary->addItem(name, c);
|
||||
if (c == curVideoCard_2)
|
||||
ui->comboBoxVideoSecondary->setCurrentIndex(ui->comboBoxVideoSecondary->count() - 1);
|
||||
@@ -214,7 +210,7 @@ SettingsDisplay::on_checkBoxVoodoo_stateChanged(int state)
|
||||
void
|
||||
SettingsDisplay::on_checkBoxXga_stateChanged(int state)
|
||||
{
|
||||
ui->pushButtonConfigureXga->setEnabled((state == Qt::Checked) && !xga_has_vga);
|
||||
ui->pushButtonConfigureXga->setEnabled(state == Qt::Checked);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -188,7 +188,7 @@ ibm8514_log(const char *fmt, ...)
|
||||
dev->changedvram[(((addr)) & (dev->vram_mask)) >> 12] = changeframecount; \
|
||||
}
|
||||
|
||||
int ibm8514_has_vga = 0;
|
||||
int ibm8514_active = 0;
|
||||
|
||||
int
|
||||
ibm8514_cpu_src(svga_t *svga)
|
||||
@@ -4224,7 +4224,7 @@ ibm8514_recalctimings(svga_t *svga)
|
||||
svga->clock = (cpuclock * (double) (1ULL << 32)) / 25175000.0;
|
||||
}
|
||||
svga->render8514 = ibm8514_render_8bpp;
|
||||
ibm8514_log("BPP=%d, Pitch = %d, rowoffset = %d, crtc13 = %02x, mode = %d, highres bit = %02x, has_vga? = %d.\n", dev->bpp, dev->pitch, dev->rowoffset, svga->crtc[0x13], dev->ibm_mode, dev->accel.advfunc_cntl & 4, ibm8514_has_vga);
|
||||
ibm8514_log("BPP=%d, Pitch = %d, rowoffset = %d, crtc13 = %02x, mode = %d, highres bit = %02x, has_vga? = %d.\n", dev->bpp, dev->pitch, dev->rowoffset, svga->crtc[0x13], dev->ibm_mode, dev->accel.advfunc_cntl & 4, !ibm8514_standalone_enabled);
|
||||
}
|
||||
ibm8514_log("8514 enabled, hdisp=%d, vtotal=%d, htotal=%d, dispend=%d, rowoffset=%d, split=%d, vsyncstart=%d, split=%08x\n", dev->hdisp, dev->vtotal, dev->htotal, dev->dispend, dev->rowoffset, dev->split, dev->vsyncstart, dev->split);
|
||||
}
|
||||
@@ -4351,7 +4351,7 @@ const device_t ibm8514_mca_device = {
|
||||
void
|
||||
ibm8514_device_add(void)
|
||||
{
|
||||
if (!ibm8514_enabled || (ibm8514_enabled && ibm8514_has_vga))
|
||||
if (!ibm8514_standalone_enabled)
|
||||
return;
|
||||
|
||||
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
||||
|
||||
@@ -165,9 +165,9 @@ mda_poll(void *priv)
|
||||
buffer32->line[mda->displine][(x * 9) + c] = mdacols[attr][blink][1];
|
||||
} else {
|
||||
for (c = 0; c < 8; c++)
|
||||
buffer32->line[mda->displine][(x * 9) + c] = mdacols[attr][blink][(fontdatm[chr][mda->sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
buffer32->line[mda->displine][(x * 9) + c] = mdacols[attr][blink][(fontdatm[chr + mda->fontbase][mda->sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
if ((chr & ~0x1f) == 0xc0)
|
||||
buffer32->line[mda->displine][(x * 9) + 8] = mdacols[attr][blink][fontdatm[chr][mda->sc] & 1];
|
||||
buffer32->line[mda->displine][(x * 9) + 8] = mdacols[attr][blink][fontdatm[chr + mda->fontbase][mda->sc] & 1];
|
||||
else
|
||||
buffer32->line[mda->displine][(x * 9) + 8] = mdacols[attr][blink][0];
|
||||
}
|
||||
|
||||
@@ -1495,10 +1495,10 @@ s3_virge_mmio_read(uint32_t addr, void *priv)
|
||||
ret = virge->advfunc_cntl & 0x3f;
|
||||
ret |= virge->fifo_slots_num << 6;
|
||||
ret &= 0xff;
|
||||
break;
|
||||
return ret;
|
||||
case 0x850d:
|
||||
ret = virge->fifo_slots_num >> 2;
|
||||
break;
|
||||
return ret;
|
||||
|
||||
case 0x83b0:
|
||||
case 0x83b1:
|
||||
@@ -1585,7 +1585,7 @@ s3_virge_mmio_read_w(uint32_t addr, void *priv)
|
||||
case 0x850c:
|
||||
ret = virge->advfunc_cntl & 0x3f;
|
||||
ret |= virge->fifo_slots_num << 6;
|
||||
break;
|
||||
return ret;
|
||||
|
||||
case 0x859c:
|
||||
return virge->cmd_dma;
|
||||
|
||||
@@ -207,9 +207,9 @@ svga_out(uint16_t addr, uint8_t val, void *priv)
|
||||
svga_recalctimings(svga);
|
||||
break;
|
||||
case 0x3c3:
|
||||
if (xga_enabled)
|
||||
if (xga_active)
|
||||
xga->on = (val & 0x01) ? 0 : 1;
|
||||
if (ibm8514_enabled)
|
||||
if (ibm8514_active)
|
||||
dev->on = (val & 0x01) ? 0 : 1;
|
||||
|
||||
vga_on = val & 0x01;
|
||||
@@ -517,7 +517,7 @@ svga_set_ramdac_type(svga_t *svga, int type)
|
||||
svga->ramdac_type = type;
|
||||
|
||||
for (int c = 0; c < 256; c++) {
|
||||
if (ibm8514_enabled) {
|
||||
if (ibm8514_active) {
|
||||
if (svga->ramdac_type == RAMDAC_8BIT)
|
||||
dev->pallook[c] = makecol32(svga->vgapal[c].r, svga->vgapal[c].g, svga->vgapal[c].b);
|
||||
else
|
||||
@@ -706,12 +706,12 @@ svga_recalctimings(svga_t *svga)
|
||||
svga->recalctimings_ex(svga);
|
||||
}
|
||||
|
||||
if (ibm8514_enabled) {
|
||||
if (ibm8514_active) {
|
||||
if (!dev->local)
|
||||
ibm8514_recalctimings(svga);
|
||||
}
|
||||
|
||||
if (xga_enabled)
|
||||
if (xga_active)
|
||||
xga_recalctimings(svga);
|
||||
|
||||
if (svga->hdisp >= 2048)
|
||||
@@ -815,11 +815,11 @@ svga_poll(void *priv)
|
||||
int ret;
|
||||
int old_ma;
|
||||
|
||||
if (ibm8514_enabled && dev->on) {
|
||||
if (ibm8514_active && dev->on) {
|
||||
ibm8514_poll(dev, svga);
|
||||
return;
|
||||
}
|
||||
if (xga_enabled && xga->on) {
|
||||
if (xga_active && xga->on) {
|
||||
xga_poll(xga, svga);
|
||||
return;
|
||||
}
|
||||
@@ -1231,7 +1231,7 @@ svga_write_common(uint32_t addr, uint8_t val, uint8_t linear, void *priv)
|
||||
cycles -= svga->monitor->mon_video_timing_write_b;
|
||||
|
||||
if (!linear) {
|
||||
if (xga_enabled) {
|
||||
if (xga_active) {
|
||||
if (((xga->op_mode & 7) >= 4) && (xga->aperture_cntl >= 1)) {
|
||||
if (val == 0xa5) { /*Memory size test of XGA*/
|
||||
xga->test = val;
|
||||
@@ -1438,7 +1438,7 @@ svga_read_common(uint32_t addr, uint8_t linear, void *priv)
|
||||
cycles -= svga->monitor->mon_video_timing_read_b;
|
||||
|
||||
if (!linear) {
|
||||
if (xga_enabled) {
|
||||
if (xga_active) {
|
||||
if (((xga->op_mode & 7) >= 4) && (xga->aperture_cntl >= 1)) {
|
||||
if (xga->test == 0xa5) { /*Memory size test of XGA*/
|
||||
xga->on = 1;
|
||||
|
||||
@@ -370,6 +370,7 @@ video_reset(int card)
|
||||
void
|
||||
video_post_reset(void)
|
||||
{
|
||||
int ibm8514_has_vga = 0;
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
ibm8514_has_vga = (video_get_type_monitor(0) == VIDEO_FLAG_TYPE_8514);
|
||||
else if (gfxcard[0] != VID_NONE)
|
||||
@@ -378,14 +379,12 @@ video_post_reset(void)
|
||||
ibm8514_has_vga = 0;
|
||||
|
||||
if (ibm8514_has_vga)
|
||||
ibm8514_enabled = 1;
|
||||
ibm8514_active = 1;
|
||||
|
||||
if (ibm8514_enabled) {
|
||||
if (!ibm8514_has_vga)
|
||||
ibm8514_device_add();
|
||||
}
|
||||
if (ibm8514_standalone_enabled)
|
||||
ibm8514_device_add();
|
||||
|
||||
if (xga_enabled)
|
||||
if (xga_standalone_enabled)
|
||||
xga_device_add();
|
||||
|
||||
/* Reset the graphics card (or do nothing if it was already done
|
||||
|
||||
@@ -49,7 +49,7 @@ static uint8_t xga_ext_inb(uint16_t addr, void *priv);
|
||||
static void xga_writew(uint32_t addr, uint16_t val, void *priv);
|
||||
static uint16_t xga_readw(uint32_t addr, void *priv);
|
||||
|
||||
int xga_has_vga = 0;
|
||||
int xga_active = 0;
|
||||
|
||||
#ifdef ENABLE_XGA_LOG
|
||||
int xga_do_log = ENABLE_XGA_LOG;
|
||||
@@ -2133,7 +2133,7 @@ xga_mem_read(uint32_t addr, xga_t *xga, UNUSED(svga_t *svga))
|
||||
|
||||
addr &= 0x1fff;
|
||||
if (addr < 0x1800) {
|
||||
if (!xga_has_vga)
|
||||
if (xga_standalone_enabled)
|
||||
temp = xga->bios_rom.rom[addr];
|
||||
else
|
||||
temp = xga->vga_bios_rom.rom[addr];
|
||||
@@ -2938,7 +2938,7 @@ xga_pos_in(uint16_t addr, void *priv)
|
||||
xga_t *xga = &svga->xga;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (xga_has_vga) {
|
||||
if (!xga_standalone_enabled) {
|
||||
switch (addr) {
|
||||
case 0x0100:
|
||||
case 0x0101:
|
||||
@@ -3053,7 +3053,7 @@ xga_pos_out(uint16_t addr, uint8_t val, void *priv)
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
|
||||
if (xga_has_vga) {
|
||||
if (!xga_standalone_enabled) {
|
||||
switch (addr) {
|
||||
case 0x0106:
|
||||
xga->pos_idx = (xga->pos_idx & 0x00ff) | (val << 8);
|
||||
@@ -3148,7 +3148,7 @@ xga_init(const device_t *info)
|
||||
xga->rom_addr = 0;
|
||||
rom_init(&xga->bios_rom, xga->type ? XGA2_BIOS_PATH : XGA_BIOS_PATH, 0xc0000, 0x2000, 0x1fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
} else {
|
||||
if (xga_has_vga) {
|
||||
if (!xga_standalone_enabled) {
|
||||
rom_init(&xga->vga_bios_rom, INMOS_XGA_BIOS_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
} else
|
||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_xga_isa);
|
||||
@@ -3168,7 +3168,7 @@ xga_init(const device_t *info)
|
||||
NULL, MEM_MAPPING_EXTERNAL, svga);
|
||||
mem_mapping_add(&xga->memio_mapping, 0, 0, xga_memio_readb, xga_memio_readw, xga_memio_readl,
|
||||
xga_memio_writeb, xga_memio_writew, xga_memio_writel,
|
||||
xga_has_vga ? xga->vga_bios_rom.rom : xga->bios_rom.rom, MEM_MAPPING_EXTERNAL, svga);
|
||||
!xga_standalone_enabled ? xga->vga_bios_rom.rom : xga->bios_rom.rom, MEM_MAPPING_EXTERNAL, svga);
|
||||
|
||||
mem_mapping_disable(&xga->video_mapping);
|
||||
mem_mapping_disable(&xga->linear_mapping);
|
||||
@@ -3181,7 +3181,7 @@ xga_init(const device_t *info)
|
||||
mca_add(xga_mca_read, xga_mca_write, xga_mca_feedb, xga_mca_reset, svga);
|
||||
} else {
|
||||
io_sethandler(0x0100, 0x0008, xga_pos_in, NULL, NULL, NULL, NULL, NULL, svga);
|
||||
if (xga_has_vga)
|
||||
if (!xga_standalone_enabled)
|
||||
io_sethandler(0x0106, 0x0002, NULL, NULL, NULL, xga_pos_out, NULL, NULL, svga);
|
||||
|
||||
io_sethandler(0x2100 + (xga->instance << 4), 0x0010, xga_ext_inb, NULL, NULL, xga_ext_outb, NULL, NULL, svga);
|
||||
@@ -3209,8 +3209,7 @@ svga_xga_init(const device_t *info)
|
||||
|
||||
svga->bpp = 8;
|
||||
svga->miscout = 1;
|
||||
xga_has_vga = 1;
|
||||
xga_enabled = 1;
|
||||
xga_active = 1;
|
||||
|
||||
return xga_init(info);
|
||||
}
|
||||
@@ -3411,7 +3410,7 @@ const device_t inmos_isa_device = {
|
||||
void
|
||||
xga_device_add(void)
|
||||
{
|
||||
if (!xga_enabled || (xga_has_vga && xga_enabled))
|
||||
if (!xga_standalone_enabled)
|
||||
return;
|
||||
|
||||
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <86box/win.h>
|
||||
|
||||
#define MACHINE_HAS_IDE (machine_has_flags(machine, MACHINE_IDE_QUAD))
|
||||
#define MACHINE_HAS_SCSI (machine_has_flags(machine, MACHINE_SCSI_DUAL))
|
||||
#define MACHINE_HAS_SCSI (machine_has_flags(machine, MACHINE_SCSI))
|
||||
|
||||
#define CASSETTE_FIRST 0
|
||||
#define CARTRIDGE_FIRST CASSETTE_FIRST + 1
|
||||
|
||||
@@ -371,8 +371,8 @@ win_settings_init(void)
|
||||
temp_gfxcard[0] = gfxcard[0];
|
||||
temp_gfxcard[1] = gfxcard[1];
|
||||
temp_voodoo = voodoo_enabled;
|
||||
temp_ibm8514 = ibm8514_enabled;
|
||||
temp_xga = xga_enabled;
|
||||
temp_ibm8514 = ibm8514_standalone_enabled;
|
||||
temp_xga = xga_standalone_enabled;
|
||||
|
||||
/* Input devices category */
|
||||
temp_mouse = mouse_type;
|
||||
@@ -501,8 +501,8 @@ win_settings_changed(void)
|
||||
i = i || (gfxcard[0] != temp_gfxcard[0]);
|
||||
i = i || (gfxcard[1] != temp_gfxcard[1]);
|
||||
i = i || (voodoo_enabled != temp_voodoo);
|
||||
i = i || (ibm8514_enabled != temp_ibm8514);
|
||||
i = i || (xga_enabled != temp_xga);
|
||||
i = i || (ibm8514_standalone_enabled != temp_ibm8514);
|
||||
i = i || (xga_standalone_enabled != temp_xga);
|
||||
|
||||
/* Input devices category */
|
||||
i = i || (mouse_type != temp_mouse);
|
||||
@@ -592,11 +592,11 @@ win_settings_save(void)
|
||||
time_sync = temp_sync;
|
||||
|
||||
/* Video category */
|
||||
gfxcard[0] = temp_gfxcard[0];
|
||||
gfxcard[1] = temp_gfxcard[1];
|
||||
voodoo_enabled = temp_voodoo;
|
||||
ibm8514_enabled = temp_ibm8514;
|
||||
xga_enabled = temp_xga;
|
||||
gfxcard[0] = temp_gfxcard[0];
|
||||
gfxcard[1] = temp_gfxcard[1];
|
||||
voodoo_enabled = temp_voodoo;
|
||||
ibm8514_standalone_enabled = temp_ibm8514;
|
||||
xga_standalone_enabled = temp_xga;
|
||||
|
||||
/* Input devices category */
|
||||
mouse_type = temp_mouse;
|
||||
|
||||
@@ -522,7 +522,7 @@ ui_sb_update_panes(void)
|
||||
xta_int = machine_has_flags(machine, MACHINE_XTA) ? 1 : 0;
|
||||
esdi_int = machine_has_flags(machine, MACHINE_ESDI) ? 1 : 0;
|
||||
ide_int = machine_has_flags(machine, MACHINE_IDE_QUAD) ? 1 : 0;
|
||||
scsi_int = machine_has_flags(machine, MACHINE_SCSI_DUAL) ? 1 : 0;
|
||||
scsi_int = machine_has_flags(machine, MACHINE_SCSI) ? 1 : 0;
|
||||
|
||||
c_mfm = hdd_count(HDD_BUS_MFM);
|
||||
c_esdi = hdd_count(HDD_BUS_ESDI);
|
||||
|
||||
Reference in New Issue
Block a user