diff --git a/src/chipset/opti895.c b/src/chipset/opti895.c index 8bc93702f..512c4fc82 100644 --- a/src/chipset/opti895.c +++ b/src/chipset/opti895.c @@ -155,6 +155,7 @@ opti895_write(uint16_t addr, uint8_t val, void *priv) dev->regs[dev->idx] = val; opti895_log("dev->regs[%04x] = %08x\n", dev->idx, val); + /* TODO: Registers 0x30-0x3F for OPTi 802GP and 898. */ switch (dev->idx) { case 0x21: cpu_cache_ext_enabled = !!(dev->regs[0x21] & 0x10); @@ -213,12 +214,14 @@ opti895_read(uint16_t addr, void *priv) ret = dev->regs[dev->idx]; break; case 0x24: + /* TODO: Registers 0x30-0x3F for OPTi 802GP and 898. */ if (((dev->idx >= 0x20) && (dev->idx <= 0x2f)) || ((dev->idx >= 0xe0) && (dev->idx <= 0xef))) { ret = dev->regs[dev->idx]; if (dev->idx == 0xe0) ret = (ret & 0xf6) | (in_smm ? 0x00 : 0x08) | !!dev->forced_green; } break; + case 0xe1: case 0xe2: ret = dev->scratch[addr - 0xe1]; diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index d633b9bb2..46f4618a4 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -2735,6 +2735,10 @@ amd_k_invalid_rdmsr: EAX = msr.ecx187 & 0xffffffff; EDX = msr.ecx187 >> 32; break; + case 0x1d9: + EAX = msr.debug_ctl & 0xffffffff; + EDX = msr.debug_ctl >> 32; + break; case 0x1e0: EAX = msr.ecx1e0 & 0xffffffff; EDX = msr.ecx1e0 >> 32; @@ -3172,6 +3176,9 @@ amd_k_invalid_wrmsr: case 0x187: msr.ecx187 = EAX | ((uint64_t) EDX << 32); break; + case 0x1d9: + msr.debug_ctl = EAX | ((uint64_t) EDX << 32); + break; case 0x1e0: msr.ecx1e0 = EAX | ((uint64_t) EDX << 32); break; diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index d13201608..c1ffb3591 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -284,6 +284,11 @@ typedef struct { /* Pentium Pro, Pentium II Klamath, and Pentium II Deschutes MSR's */ uint64_t ecx186; /* 0x00000186, 0x00000187 */ uint64_t ecx187; /* 0x00000186, 0x00000187 */ + + /* Pentium Pro, Pentium II Klamath, and Pentium II Deschutes MSR's */ + uint64_t debug_ctl; /* 0x000001d9 - Debug Registers Control */ + + /* Pentium Pro, Pentium II Klamath, and Pentium II Deschutes MSR's */ uint64_t ecx1e0; /* 0x000001e0 */ /* Pentium Pro, Pentium II Klamath, and Pentium II Deschutes MSR's that are also diff --git a/src/device/keyboard.c b/src/device/keyboard.c index e788ff23f..15eb06035 100644 --- a/src/device/keyboard.c +++ b/src/device/keyboard.c @@ -167,6 +167,12 @@ keyboard_input(int down, uint16_t scan) case 0x138: /* Right Alt */ shift |= 0x40; break; + case 0x15b: /* Left Windows */ + shift |= 0x08; + break; + case 0x15c: /* Right Windows */ + shift |= 0x80; + break; default: break; @@ -191,6 +197,12 @@ keyboard_input(int down, uint16_t scan) case 0x138: /* Right Alt */ shift &= ~0x40; break; + case 0x15b: /* Left Windows */ + shift &= ~0x08; + break; + case 0x15c: /* Right Windows */ + shift &= ~0x80; + break; case 0x03a: /* Caps Lock */ caps_lock ^= 1; break; diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index f9b340080..57f65811b 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -633,6 +633,7 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth return ret; machine_at_common_init(model); + device_add(&ide_vlb_2ch_device); pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); @@ -642,8 +643,8 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth device_add(&opti802g_pci_device); device_add(&opti822_device); - device_add(&keyboard_ps2_device); - device_add(&fdc37c665_device); + device_add(&keyboard_ps2_ami_device); + device_add(&fdc37c665_ide_device); device_add(&ide_opti611_vlb_device); device_add(&intel_flash_bxt_device); diff --git a/src/video/vid_table.c b/src/video/vid_table.c index eb999eb3f..c417229dc 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -343,16 +343,6 @@ video_reset(int card) monitor_index_global = 0; loadfont("roms/video/mda/mda.rom", 0); - /* Do not initialize internal cards here. */ - if (!(card == VID_NONE) && !(card == VID_INTERNAL) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY)) { - vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].device->name); - - video_prepare(); - - /* Initialize the video card. */ - device_add(video_cards[card].device); - } - if (!(card == VID_NONE) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY) && gfxcard[1] != 0 @@ -363,6 +353,16 @@ video_reset(int card) monitor_index_global = 0; } + /* Do not initialize internal cards here. */ + if (!(card == VID_NONE) && !(card == VID_INTERNAL) && !machine_has_flags(machine, MACHINE_VIDEO_ONLY)) { + vid_table_log("VIDEO: initializing '%s'\n", video_cards[card].device->name); + + video_prepare(); + + /* Initialize the video card. */ + device_add(video_cards[card].device); + } + /* Enable the Voodoo if configured. */ if (voodoo_enabled) device_add(&voodoo_device);