Abstracted away the machine bus'es and flags in order to make the rest of the emulator agnostic as to how they're stored.
This commit is contained in:
12
src/config.c
12
src/config.c
@@ -831,9 +831,9 @@ load_machine(void)
|
||||
|
||||
mem_size = config_get_int(cat, "mem_size", 64);
|
||||
#if 0
|
||||
if (mem_size < (((machines[machine].flags & MACHINE_AT) &&
|
||||
if (mem_size < ((machine_has_bus(machine, MACHINE_AT) &&
|
||||
(machines[machine].ram_granularity < 128)) ? machines[machine].min_ram*1024 : machines[machine].min_ram))
|
||||
mem_size = (((machines[machine].flags & MACHINE_AT) && (machines[machine].ram_granularity < 128)) ? machines[machine].min_ram*1024 : machines[machine].min_ram);
|
||||
mem_size = (((machine_has_bus(machine, MACHINE_AT) && (machines[machine].ram_granularity < 128)) ? machines[machine].min_ram*1024 : machines[machine].min_ram);
|
||||
#endif
|
||||
|
||||
if (mem_size > 2097152)
|
||||
@@ -874,13 +874,13 @@ load_video(void)
|
||||
char *p;
|
||||
int free_p = 0;
|
||||
|
||||
if (machines[machine].flags & MACHINE_VIDEO_ONLY) {
|
||||
if (machine_has_flags(machine, MACHINE_VIDEO_ONLY)) {
|
||||
config_delete_var(cat, "gfxcard");
|
||||
gfxcard = VID_INTERNAL;
|
||||
} else {
|
||||
p = config_get_string(cat, "gfxcard", NULL);
|
||||
if (p == NULL) {
|
||||
if (machines[machine].flags & MACHINE_VIDEO) {
|
||||
if (machine_has_flags(machine, MACHINE_VIDEO)) {
|
||||
p = (char *)malloc((strlen("internal")+1)*sizeof(char));
|
||||
strcpy(p, "internal");
|
||||
} else {
|
||||
@@ -1120,7 +1120,7 @@ load_storage_controllers(void)
|
||||
|
||||
p = config_get_string(cat, "hdc", NULL);
|
||||
if (p == NULL) {
|
||||
if (machines[machine].flags & MACHINE_HDC) {
|
||||
if (machine_has_flags(machine, MACHINE_HDC)) {
|
||||
p = (char *)malloc((strlen("internal")+1)*sizeof(char));
|
||||
strcpy(p, "internal");
|
||||
} else {
|
||||
@@ -1948,7 +1948,7 @@ load_other_peripherals(void)
|
||||
|
||||
p = config_get_string(cat, "hdc", NULL);
|
||||
if (p == NULL) {
|
||||
if (machines[machine].flags & MACHINE_HDC) {
|
||||
if (machine_has_flags(machine, MACHINE_HDC)) {
|
||||
p = (char *)malloc((strlen("internal")+1)*sizeof(char));
|
||||
strcpy(p, "internal");
|
||||
} else {
|
||||
|
22
src/device.c
22
src/device.c
@@ -646,29 +646,29 @@ device_set_config_mac(const char *s, int val)
|
||||
|
||||
|
||||
int
|
||||
device_is_valid(const device_t *device, int mflags)
|
||||
device_is_valid(const device_t *device, int m)
|
||||
{
|
||||
if (device == NULL) return(1);
|
||||
|
||||
if ((device->flags & DEVICE_AT) && !(mflags & MACHINE_BUS_ISA16)) return(0);
|
||||
if ((device->flags & DEVICE_AT) && !machine_has_bus(m, MACHINE_BUS_ISA16)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_CBUS) && !(mflags & MACHINE_BUS_CBUS)) return(0);
|
||||
if ((device->flags & DEVICE_CBUS) && !machine_has_bus(m, MACHINE_BUS_CBUS)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_ISA) && !(mflags & MACHINE_BUS_ISA)) return(0);
|
||||
if ((device->flags & DEVICE_ISA) && !machine_has_bus(m, MACHINE_BUS_ISA)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_MCA) && !(mflags & MACHINE_BUS_MCA)) return(0);
|
||||
if ((device->flags & DEVICE_MCA) && !machine_has_bus(m, MACHINE_BUS_MCA)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_EISA) && !(mflags & MACHINE_BUS_EISA)) return(0);
|
||||
if ((device->flags & DEVICE_EISA) && !machine_has_bus(m, MACHINE_BUS_EISA)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_VLB) && !(mflags & MACHINE_BUS_VLB)) return(0);
|
||||
if ((device->flags & DEVICE_VLB) && !machine_has_bus(m, MACHINE_BUS_VLB)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_PCI) && !(mflags & MACHINE_BUS_PCI)) return(0);
|
||||
if ((device->flags & DEVICE_PCI) && !machine_has_bus(m, MACHINE_BUS_PCI)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_AGP) && !(mflags & MACHINE_BUS_AGP)) return(0);
|
||||
if ((device->flags & DEVICE_AGP) && !machine_has_bus(m, MACHINE_BUS_AGP)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_PS2) && !(mflags & MACHINE_BUS_PS2)) return(0);
|
||||
if ((device->flags & DEVICE_PS2) && !machine_has_bus(m, MACHINE_BUS_PS2)) return(0);
|
||||
|
||||
if ((device->flags & DEVICE_AC97) && !(mflags & MACHINE_BUS_AC97)) return(0);
|
||||
if ((device->flags & DEVICE_AC97) && !machine_has_bus(m, MACHINE_BUS_AC97)) return(0);
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
@@ -194,7 +194,7 @@ cart_reset(void)
|
||||
cart_image_close(1);
|
||||
cart_image_close(0);
|
||||
|
||||
if (!(machines[machine].flags & MACHINE_CARTRIDGE))
|
||||
if (!machine_has_cartridge(machine))
|
||||
return;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
@@ -1063,7 +1063,7 @@ write_output(atkbd_t *dev, uint8_t val)
|
||||
val |= ((dev->mem[0] << 4) & 0x10);
|
||||
|
||||
/*IRQ 12*/
|
||||
if ((dev->output_port ^ val) & 0x20) {
|
||||
if ((old ^ val) & 0x20) {
|
||||
if (val & 0x20)
|
||||
picint(1 << 12);
|
||||
else
|
||||
@@ -1071,14 +1071,14 @@ write_output(atkbd_t *dev, uint8_t val)
|
||||
}
|
||||
|
||||
/*IRQ 1*/
|
||||
if ((dev->output_port ^ val) & 0x10) {
|
||||
if ((old ^ val) & 0x10) {
|
||||
if (val & 0x10)
|
||||
picint(1 << 1);
|
||||
else
|
||||
picintc(1 << 1);
|
||||
}
|
||||
|
||||
if ((dev->output_port ^ val) & 0x02) { /*A20 enable change*/
|
||||
if ((old ^ val) & 0x02) { /*A20 enable change*/
|
||||
mem_a20_key = val & 0x02;
|
||||
mem_a20_recalc();
|
||||
flushmmucache();
|
||||
@@ -1086,7 +1086,7 @@ write_output(atkbd_t *dev, uint8_t val)
|
||||
|
||||
/* 0 holds the CPU in the RESET state, 1 releases it. To simplify this,
|
||||
we just do everything on release. */
|
||||
if ((dev->output_port ^ val) & 0x01) { /*Reset*/
|
||||
if ((old ^ val) & 0x01) { /*Reset*/
|
||||
if (! (val & 0x01)) { /* Pin 0 selected. */
|
||||
/* Pin 0 selected. */
|
||||
kbd_log("write_output(): Pulse reset!\n");
|
||||
|
@@ -111,15 +111,15 @@ postcard_init(const device_t *info)
|
||||
{
|
||||
postcard_reset();
|
||||
|
||||
if (machines[machine].flags & MACHINE_MCA)
|
||||
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
||||
postcard_port = 0x680; /* MCA machines */
|
||||
else if (strstr(machines[machine].name, " PS/2 ") || strstr(machines[machine].name, " PS/1 "))
|
||||
else if (strstr(machines[machine].name, " PS/2 ") || strstr(machine_getname_ex(machine), " PS/1 "))
|
||||
postcard_port = 0x190; /* ISA PS/2 machines */
|
||||
else if (strstr(machines[machine].name, " IBM XT "))
|
||||
postcard_port = 0x60; /* IBM XT */
|
||||
else if (strstr(machines[machine].name, " IBM PCjr"))
|
||||
postcard_port = 0x10; /* IBM PCjr */
|
||||
else if (strstr(machines[machine].name, " Compaq ") && !(machines[machine].flags & MACHINE_PCI))
|
||||
else if (strstr(machines[machine].name, " Compaq ") && !machine_has_bus(machine, MACHINE_BUS_PCI))
|
||||
postcard_port = 0x84; /* ISA Compaq machines */
|
||||
else
|
||||
postcard_port = 0x80; /* AT and clone machines */
|
||||
|
@@ -360,7 +360,7 @@ gameport_add(const device_t *gameport_type)
|
||||
{
|
||||
/* Prevent a standalone game port from being added later on, unless this
|
||||
is an unused Super I/O game port (no MACHINE_GAMEPORT machine flag). */
|
||||
if (!(gameport_type->local & GAMEPORT_SIO) || (machines[machine].flags & MACHINE_GAMEPORT))
|
||||
if (!(gameport_type->local & GAMEPORT_SIO) || machine_has_flags(machine, MACHINE_GAMEPORT))
|
||||
standalone_gameport_type = NULL;
|
||||
|
||||
/* Add game port device. */
|
||||
|
@@ -145,7 +145,7 @@ extern void device_speed_changed(void);
|
||||
extern void device_force_redraw(void);
|
||||
extern void device_get_name(const device_t *d, int bus, char *name);
|
||||
|
||||
extern int device_is_valid(const device_t *, int machine_flags);
|
||||
extern int device_is_valid(const device_t *, int m);
|
||||
|
||||
extern int device_get_config_int(const char *name);
|
||||
extern int device_get_config_int_ex(const char *s, int dflt_int);
|
||||
|
@@ -189,6 +189,7 @@ extern int AT, PCI;
|
||||
extern int machine_count(void);
|
||||
extern int machine_available(int m);
|
||||
extern char *machine_getname(void);
|
||||
extern char *machine_getname_ex(int m);
|
||||
extern char *machine_get_internal_name(void);
|
||||
extern int machine_get_machine_from_internal_name(char *s);
|
||||
extern void machine_init(void);
|
||||
@@ -197,6 +198,9 @@ extern const device_t *machine_getdevice(int m);
|
||||
#endif
|
||||
extern char *machine_get_internal_name_ex(int m);
|
||||
extern int machine_get_nvrmask(int m);
|
||||
extern int machine_has_flags(int m, int flags);
|
||||
extern int machine_has_bus(int m, int bus_flags);
|
||||
extern int machine_has_cartridge(int m);
|
||||
extern void machine_close(void);
|
||||
|
||||
|
||||
|
@@ -979,6 +979,27 @@ machine_get_nvrmask(int m)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_has_flags(int m, int flags)
|
||||
{
|
||||
return(machines[m].flags & flags);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_has_bus(int m, int bus_flags)
|
||||
{
|
||||
return(machines[m].flags & bus_flags);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_has_cartridge(int m)
|
||||
{
|
||||
return(machine_has_flags(m, MACHINE_CARTRIDGE) ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_get_machine_from_internal_name(char *s)
|
||||
{
|
||||
|
@@ -406,7 +406,7 @@ spd_write_drbs_interleaved(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint
|
||||
{
|
||||
uint8_t row, dimm;
|
||||
uint8_t drb;
|
||||
uint16_t size, size_acc;
|
||||
uint16_t size, size_acc = 0;
|
||||
uint16_t rows[SPD_MAX_SLOTS];
|
||||
|
||||
/* No SPD: split SIMMs into pairs as if they were "DIMM"s. */
|
||||
|
@@ -167,7 +167,7 @@ scsi_card_init(void)
|
||||
|
||||
/* On-board SCSI controllers get the first bus, so if one is present,
|
||||
increase our instance number here. */
|
||||
if (machines[machine].flags & MACHINE_SCSI)
|
||||
if (machine_has_flags(machine, MACHINE_SCSI))
|
||||
max--;
|
||||
|
||||
/* Do not initialize any controllers if we have do not have any SCSI
|
||||
|
@@ -1703,7 +1703,7 @@ mpu401_device_add(void)
|
||||
if (!mpu401_standalone_enable)
|
||||
return;
|
||||
|
||||
if (machines[machine].flags & MACHINE_MCA)
|
||||
if (machine_has_bus(machine, MACHINE_BUS_MCA))
|
||||
device_add(&mpu401_mca_device);
|
||||
else
|
||||
device_add(&mpu401_device);
|
||||
|
@@ -274,7 +274,7 @@ void
|
||||
video_pre_reset(int card)
|
||||
{
|
||||
if ((card == VID_NONE) || \
|
||||
(card == VID_INTERNAL) || (machines[machine].flags & MACHINE_VIDEO_ONLY))
|
||||
(card == VID_INTERNAL) || machine_has_flags(machine, MACHINE_VIDEO_ONLY))
|
||||
video_prepare();
|
||||
}
|
||||
|
||||
@@ -287,13 +287,13 @@ video_reset(int card)
|
||||
return;
|
||||
|
||||
vid_table_log("VIDEO: reset (gfxcard=%d, internal=%d)\n",
|
||||
card, (machines[machine].flags & MACHINE_VIDEO)?1:0);
|
||||
card, machine_has_flags(machine, MACHINE_VIDEO) ? 1 : 0);
|
||||
|
||||
loadfont("roms/video/mda/mda.rom", 0);
|
||||
|
||||
/* Do not initialize internal cards here. */
|
||||
if (!(card == VID_NONE) && \
|
||||
!(card == VID_INTERNAL) && !(machines[machine].flags & MACHINE_VIDEO_ONLY)) {
|
||||
!(card == VID_INTERNAL) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY)) {
|
||||
vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].name);
|
||||
|
||||
video_prepare();
|
||||
|
@@ -24,8 +24,8 @@
|
||||
#include <86box/zip.h>
|
||||
#include <86box/win.h>
|
||||
|
||||
#define MACHINE_HAS_IDE (machines[machine].flags & MACHINE_IDE_QUAD)
|
||||
#define MACHINE_HAS_SCSI (machines[machine].flags & MACHINE_SCSI_DUAL)
|
||||
#define MACHINE_HAS_IDE (machine_has_flags(machine, MACHINE_IDE_QUAD))
|
||||
#define MACHINE_HAS_SCSI (machine_has_flags(machine, MACHINE_SCSI_DUAL))
|
||||
|
||||
#define CASSETTE_FIRST 0
|
||||
#define CARTRIDGE_FIRST CASSETTE_FIRST + 1
|
||||
@@ -403,7 +403,7 @@ media_menu_load_submenus()
|
||||
static inline int
|
||||
is_valid_cartridge(void)
|
||||
{
|
||||
return ((machines[machine].flags & MACHINE_CARTRIDGE) ? 1 : 0);
|
||||
return (machine_has_cartridge(machine));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1080,7 +1080,7 @@ win_settings_video_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
while (1) {
|
||||
/* Skip "internal" if machine doesn't have it. */
|
||||
if ((c == 1) && !(machines[temp_machine].flags & MACHINE_VIDEO)) {
|
||||
if ((c == 1) && !machine_has_flags(temp_machine, MACHINE_VIDEO)) {
|
||||
c++;
|
||||
continue;
|
||||
}
|
||||
@@ -1091,7 +1091,7 @@ win_settings_video_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
if (video_card_available(c) &&
|
||||
device_is_valid(video_card_getdevice(c), machines[temp_machine].flags)) {
|
||||
device_is_valid(video_card_getdevice(c), temp_machine)) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_VIDEO, win_get_string(IDS_2103));
|
||||
else if (c == 1)
|
||||
@@ -1109,12 +1109,12 @@ win_settings_video_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
settings_process_messages();
|
||||
}
|
||||
|
||||
settings_enable_window(hdlg, IDC_COMBO_VIDEO, !(machines[temp_machine].flags & MACHINE_VIDEO_ONLY));
|
||||
settings_enable_window(hdlg, IDC_COMBO_VIDEO, !machine_has_flags(temp_machine, MACHINE_VIDEO_ONLY));
|
||||
e = settings_list_to_device[0][settings_get_cur_sel(hdlg, IDC_COMBO_VIDEO)];
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_VID, video_card_has_config(e));
|
||||
settings_enable_window(hdlg, IDC_CHECK_VOODOO, (machines[temp_machine].flags & MACHINE_BUS_PCI));
|
||||
settings_enable_window(hdlg, IDC_CHECK_VOODOO, machine_has_bus(temp_machine, MACHINE_BUS_PCI));
|
||||
settings_set_check(hdlg, IDC_CHECK_VOODOO, temp_voodoo);
|
||||
settings_enable_window(hdlg, IDC_BUTTON_VOODOO, (machines[temp_machine].flags & MACHINE_BUS_PCI) && temp_voodoo);
|
||||
settings_enable_window(hdlg, IDC_BUTTON_VOODOO, machine_has_bus(temp_machine, MACHINE_BUS_PCI) && temp_voodoo);
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
@@ -1157,10 +1157,10 @@ mouse_valid(int num, int m)
|
||||
const device_t *dev;
|
||||
|
||||
if ((num == MOUSE_TYPE_INTERNAL) &&
|
||||
!(machines[m].flags & MACHINE_MOUSE)) return(0);
|
||||
!machine_has_flags(m, MACHINE_MOUSE)) return(0);
|
||||
|
||||
dev = mouse_get_device(num);
|
||||
return(device_is_valid(dev, machines[m].flags));
|
||||
return(device_is_valid(dev, m));
|
||||
}
|
||||
|
||||
|
||||
@@ -1294,7 +1294,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
settings_reset_content(hdlg, IDC_COMBO_SOUND);
|
||||
while (1) {
|
||||
/* Skip "internal" if machine doesn't have it. */
|
||||
if ((c == 1) && !(machines[temp_machine].flags & MACHINE_SOUND)) {
|
||||
if ((c == 1) && !machine_has_flags(temp_machine, MACHINE_SOUND)) {
|
||||
c++;
|
||||
continue;
|
||||
}
|
||||
@@ -1307,7 +1307,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (sound_card_available(c)) {
|
||||
sound_dev = sound_card_getdevice(c);
|
||||
|
||||
if (device_is_valid(sound_dev, machines[temp_machine].flags)) {
|
||||
if (device_is_valid(sound_dev, temp_machine)) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_SOUND, win_get_string(IDS_2103));
|
||||
else if (c == 1)
|
||||
@@ -1377,15 +1377,15 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
settings_set_check(hdlg, IDC_CHECK_MPU401, temp_mpu401);
|
||||
settings_enable_window(hdlg, IDC_CHECK_MPU401, mpu401_standalone_allow());
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_MPU401, mpu401_standalone_allow() && temp_mpu401);
|
||||
settings_enable_window(hdlg, IDC_CHECK_CMS, (machines[temp_machine].flags & MACHINE_BUS_ISA));
|
||||
settings_enable_window(hdlg, IDC_CHECK_CMS, machine_has_bus(temp_machine, MACHINE_BUS_ISA));
|
||||
settings_set_check(hdlg, IDC_CHECK_CMS, temp_GAMEBLASTER);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_CMS, (machines[temp_machine].flags & MACHINE_BUS_ISA) && temp_GAMEBLASTER);
|
||||
settings_enable_window(hdlg, IDC_CHECK_GUS, (machines[temp_machine].flags & MACHINE_BUS_ISA16));
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_CMS, machine_has_bus(temp_machine, MACHINE_BUS_ISA) && temp_GAMEBLASTER);
|
||||
settings_enable_window(hdlg, IDC_CHECK_GUS, machine_has_bus(temp_machine, MACHINE_BUS_ISA16));
|
||||
settings_set_check(hdlg, IDC_CHECK_GUS, temp_GUS);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_GUS, (machines[temp_machine].flags & MACHINE_BUS_ISA16) && temp_GUS);
|
||||
settings_enable_window(hdlg, IDC_CHECK_SSI, (machines[temp_machine].flags & MACHINE_BUS_ISA));
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_GUS, machine_has_bus(temp_machine, MACHINE_BUS_ISA16) && temp_GUS);
|
||||
settings_enable_window(hdlg, IDC_CHECK_SSI, machine_has_bus(temp_machine, MACHINE_BUS_ISA));
|
||||
settings_set_check(hdlg, IDC_CHECK_SSI, temp_SSI2001);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SSI, (machines[temp_machine].flags & MACHINE_BUS_ISA) && temp_SSI2001);
|
||||
settings_enable_window(hdlg, IDC_CONFIGURE_SSI, machine_has_bus(temp_machine, MACHINE_BUS_ISA) && temp_SSI2001);
|
||||
settings_set_check(hdlg, IDC_CHECK_FLOAT, temp_float);
|
||||
|
||||
free(lptsTemp);
|
||||
@@ -1440,7 +1440,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case IDC_CONFIGURE_MPU401:
|
||||
temp_deviceconfig |= deviceconfig_open(hdlg, (machines[temp_machine].flags & MACHINE_MCA) ?
|
||||
temp_deviceconfig |= deviceconfig_open(hdlg, machine_has_bus(temp_machine, MACHINE_BUS_MCA) ?
|
||||
(void *)&mpu401_mca_device : (void *)&mpu401_device);
|
||||
break;
|
||||
|
||||
@@ -1589,7 +1589,7 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
settings_reset_content(hdlg, IDC_COMBO_HDC);
|
||||
while (1) {
|
||||
/* Skip "internal" if machine doesn't have it. */
|
||||
if ((c == 1) && !(machines[temp_machine].flags & MACHINE_HDC)) {
|
||||
if ((c == 1) && !machine_has_flags(temp_machine, MACHINE_HDC)) {
|
||||
c++;
|
||||
continue;
|
||||
}
|
||||
@@ -1602,7 +1602,7 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (hdc_available(c)) {
|
||||
hdc_dev = hdc_get_device(c);
|
||||
|
||||
if (device_is_valid(hdc_dev, machines[temp_machine].flags)) {
|
||||
if (device_is_valid(hdc_dev, temp_machine)) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_HDC, win_get_string(IDS_2103));
|
||||
else if (c == 1)
|
||||
@@ -1634,7 +1634,7 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (fdc_card_available(c)) {
|
||||
fdc_dev = fdc_card_getdevice(c);
|
||||
|
||||
if (device_is_valid(fdc_dev, machines[temp_machine].flags)) {
|
||||
if (device_is_valid(fdc_dev, temp_machine)) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_FDC, win_get_string(IDS_2118));
|
||||
else
|
||||
@@ -1665,7 +1665,7 @@ win_settings_storage_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (scsi_card_available(c)) {
|
||||
scsi_dev = scsi_card_getdevice(c);
|
||||
|
||||
if (device_is_valid(scsi_dev, machines[temp_machine].flags)) {
|
||||
if (device_is_valid(scsi_dev, temp_machine)) {
|
||||
for (e = 0; e < SCSI_BUS_MAX; e++) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_SCSI_1 + e, win_get_string(IDS_2103));
|
||||
@@ -1823,7 +1823,7 @@ win_settings_network_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if (device_name[0] == L'\0')
|
||||
break;
|
||||
|
||||
if (network_card_available(c) && device_is_valid(network_card_getdevice(c), machines[temp_machine].flags)) {
|
||||
if (network_card_available(c) && device_is_valid(network_card_getdevice(c), temp_machine)) {
|
||||
if (c == 0)
|
||||
settings_add_string(hdlg, IDC_COMBO_NET, win_get_string(IDS_2103));
|
||||
else
|
||||
|
Reference in New Issue
Block a user