diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 9cb155f81..1191d5100 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -54,7 +54,6 @@ #define MACHINE_PCMCIA 0x00000400 /* sys is AT-compatible laptop with PCMCIA */ #define MACHINE_AGP 0x00000A0C /* sys is AT-compatible with AGP */ #define MACHINE_AGP98 0x00000A10 /* sys is NEC PC-98x1 series with AGP (did that even exist?) */ -#define MACHINE_IS_AT 0x00000FCC /* sys is AT-compatible (ISA + ISA16) */ /* Feature flags for miscellaneous internal devices. */ #define MACHINE_VIDEO 0x00001000 /* sys has int video */ #define MACHINE_VIDEO_ONLY 0x00002000 /* sys has fixed video */ @@ -83,7 +82,8 @@ #define MACHINE_SCSI 0x08000000 /* sys has int single SCSI - mark as pri SCSI */ #define MACHINE_SCSI_DUAL 0x18000000 /* sys has int dual SCSI - mark as both pri and sec SCSI */ -#define IS_ARCH(m, a) (machines[(m)].flags & (a)) ? 1 : 0; +#define IS_ARCH(m, a) (machines[m].flags & (a)) ? 1 : 0; +#define IS_AT(m) ((machines[m].flags & 0x00000FCC) && !(machines[m].flags & MACHINE_PC98)) ? 1 : 0; #define MACHINE_MULTIPLIER_FIXED -1, -1 @@ -492,8 +492,8 @@ extern int machine_at_apas3_init(const machine_t *); extern int machine_at_wcf681_init(const machine_t *); extern int machine_at_6via85x_init(const machine_t *); extern int machine_at_603tcf_init(const machine_t *); -extern int machine_at_trinity371_init(const machine_t *); -extern int machine_at_p6bap_init(const machine_t *); +extern int machine_at_trinity371_init(const machine_t *); +extern int machine_at_p6bap_init(const machine_t *); /* m_at_misc.c */ extern int machine_at_vpc2007_init(const machine_t *); diff --git a/src/machine/machine.c b/src/machine/machine.c index 4ff0993bd..19f821419 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -76,7 +76,7 @@ machine_init_ex(int m) is_vpc = 0; /* Set up the architecture flags. */ - AT = IS_ARCH(machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + AT = IS_AT(machine); PCI = IS_ARCH(machine, MACHINE_BUS_PCI); /* Reset the memory state. */ diff --git a/src/nvr.c b/src/nvr.c index fb7c3dfb8..d949c78bc 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -147,7 +147,7 @@ onesec_timer(void *priv) if (++nvr->onesec_cnt >= 100) { /* Update the internal clock. */ - is_at = IS_ARCH(machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + is_at = IS_AT(machine); if (!is_at) rtc_tick(); diff --git a/src/pic.c b/src/pic.c index ad2efc67e..8b0727070 100644 --- a/src/pic.c +++ b/src/pic.c @@ -176,7 +176,7 @@ find_best_interrupt(pic_t *dev) dev->interrupt = (ret == -1) ? 7 : ret; - is_at = IS_ARCH(machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + is_at = IS_AT(machine); if (is_at && (ret != -1) && (cpu_fast_off_flags & (1 << dev->interrupt))) cpu_fast_off_count = cpu_fast_off_val + 1; @@ -187,7 +187,7 @@ find_best_interrupt(pic_t *dev) void pic_update_pending(void) { - int is_at = IS_ARCH(machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + int is_at = IS_AT(machine); if (is_at) { pic2.int_pending = (find_best_interrupt(&pic2) != -1); @@ -227,7 +227,7 @@ pic_callback(void *priv) void pic_reset() { - int is_at = IS_ARCH(machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + int is_at = IS_AT(machine); memset(&pic, 0, sizeof(pic_t)); memset(&pic2, 0, sizeof(pic_t)); @@ -493,7 +493,7 @@ picint_common(uint16_t num, int level, int set) int is_at; uint8_t b, slaves = 0; - is_at = IS_ARCH(machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + is_at = IS_AT(machine); /* Make sure to ignore all slave IRQ's, and in case of AT+, translate IRQ 2 to IRQ 9. */ diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 1ca739b9d..ae674e328 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -783,7 +783,7 @@ win_settings_machine_recalc_machine(HWND hdlg) accel.nSec = 0; accel.nInc = machines[temp_machine].ram_granularity; SendMessage(h, UDM_SETACCEL, 1, (LPARAM)&accel); - is_at = IS_ARCH(temp_machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + is_at = IS_AT(temp_machine); if (!is_at || (machines[temp_machine].ram_granularity >= 128)) { SendMessage(h, UDM_SETPOS, 0, temp_mem_size); h = GetDlgItem(hdlg, IDC_TEXT_MB); @@ -990,7 +990,7 @@ win_settings_machine_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) temp_mem_size = machines[temp_machine].min_ram; else if (temp_mem_size > machines[temp_machine].max_ram) temp_mem_size = machines[temp_machine].max_ram; - is_at = IS_ARCH(temp_machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + is_at = IS_AT(temp_machine); if (is_at && (machines[temp_machine].ram_granularity < 128)) temp_mem_size *= 1024; free(stransi); @@ -1609,7 +1609,7 @@ win_settings_peripherals_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lPa settings_enable_window(hdlg, IDC_COMBO_SCSI, d); settings_enable_window(hdlg, IDC_CONFIGURE_SCSI, scsi_card_has_config(temp_scsi_card)); - is_at = IS_ARCH(temp_machine, (MACHINE_BUS_ISA16 | MACHINE_BUS_MCA | MACHINE_BUS_PCMCIA)); + is_at = IS_AT(temp_machine); settings_enable_window(hdlg, IDC_CHECK_IDE_TER, is_at); settings_enable_window(hdlg, IDC_BUTTON_IDE_TER, is_at && temp_ide_ter); settings_enable_window(hdlg, IDC_CHECK_IDE_QUA, is_at);