Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
/*
|
2022-11-05 21:44:11 -04:00
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
*
|
2022-11-05 21:44:11 -04:00
|
|
|
* This file is part of the 86Box distribution.
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
*
|
2022-11-05 21:44:11 -04:00
|
|
|
* CPU type handler.
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
*
|
2023-01-06 15:36:29 -05:00
|
|
|
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
2022-11-05 21:44:11 -04:00
|
|
|
* leilei,
|
|
|
|
|
* Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
*
|
2022-11-05 21:44:11 -04:00
|
|
|
* Copyright 2008-2020 Sarah Walker.
|
|
|
|
|
* Copyright 2016-2018 leilei.
|
|
|
|
|
* Copyright 2016-2020 Miran Grca.
|
|
|
|
|
* Copyright 2018-2021 Fred N. van Kempen.
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
*/
|
2023-08-08 15:38:40 +02:00
|
|
|
#include <inttypes.h>
|
2020-02-29 19:12:23 +01:00
|
|
|
#include <math.h>
|
2020-04-01 08:59:29 +02:00
|
|
|
#include <stdarg.h>
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <wchar.h>
|
2020-04-01 08:59:29 +02:00
|
|
|
|
|
|
|
|
#define HAVE_STDARG_H
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/86box.h>
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#include "cpu.h"
|
2024-06-12 20:46:27 +02:00
|
|
|
#include "x86.h"
|
2024-06-10 00:08:48 +02:00
|
|
|
#include "x87_sf.h"
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/device.h>
|
|
|
|
|
#include <86box/machine.h>
|
|
|
|
|
#include <86box/io.h>
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#include "x86_ops.h"
|
2023-08-21 02:56:33 +02:00
|
|
|
#include "x86seg_common.h"
|
2020-03-29 14:24:42 +02:00
|
|
|
#include <86box/mem.h>
|
|
|
|
|
#include <86box/nmi.h>
|
|
|
|
|
#include <86box/pic.h>
|
|
|
|
|
#include <86box/pci.h>
|
2025-03-19 03:12:36 +01:00
|
|
|
#include <86box/smram.h>
|
2024-06-18 20:05:44 +06:00
|
|
|
#include <86box/timer.h>
|
2022-03-16 00:33:01 -03:00
|
|
|
#include <86box/gdbstub.h>
|
2023-08-10 15:43:16 -04:00
|
|
|
#include <86box/plat_fallthrough.h>
|
|
|
|
|
#include <86box/plat_unused.h>
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
# include "codegen.h"
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2020-06-15 04:11:12 -06:00
|
|
|
#include "x87_timings.h"
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
enum {
|
2024-02-01 18:34:58 +05:00
|
|
|
CPUID_FPU = (1 << 0), /* On-chip Floating Point Unit */
|
|
|
|
|
CPUID_VME = (1 << 1), /* Virtual 8086 mode extensions */
|
|
|
|
|
CPUID_DE = (1 << 2), /* Debugging extensions */
|
|
|
|
|
CPUID_PSE = (1 << 3), /* Page Size Extension */
|
|
|
|
|
CPUID_TSC = (1 << 4), /* Time Stamp Counter */
|
|
|
|
|
CPUID_MSR = (1 << 5), /* Model-specific registers */
|
|
|
|
|
CPUID_PAE = (1 << 6), /* Physical Address Extension */
|
|
|
|
|
CPUID_MCE = (1 << 7), /* Machine Check Exception */
|
|
|
|
|
CPUID_CMPXCHG8B = (1 << 8), /* CMPXCHG8B instruction */
|
|
|
|
|
CPUID_APIC = (1 << 9), /* On-chip APIC */
|
|
|
|
|
CPUID_AMDPGE = (1 << 9), /* Global Page Enable (AMD K5 Model 0 only) */
|
|
|
|
|
CPUID_AMDSEP = (1 << 10), /* SYSCALL and SYSRET instructions (AMD K6 only) */
|
|
|
|
|
CPUID_SEP = (1 << 11), /* SYSENTER and SYSEXIT instructions (SYSCALL and SYSRET if EAX=80000001h) */
|
|
|
|
|
CPUID_MTRR = (1 << 12), /* Memory type range registers */
|
|
|
|
|
CPUID_PGE = (1 << 13), /* Page Global Enable */
|
|
|
|
|
CPUID_MCA = (1 << 14), /* Machine Check Architecture */
|
|
|
|
|
CPUID_CMOV = (1 << 15), /* Conditional move instructions */
|
|
|
|
|
CPUID_PAT = (1 << 16), /* Page Attribute Table */
|
2024-12-21 20:37:26 +05:00
|
|
|
CPUID_PSE36 = (1 << 17), /* 36-bit Page Size Extension */
|
2024-02-01 18:34:58 +05:00
|
|
|
CPUID_MMX = (1 << 23), /* MMX technology */
|
|
|
|
|
CPUID_FXSR = (1 << 24) /* FXSAVE and FXRSTOR instructions */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
};
|
|
|
|
|
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Additional flags returned by CPUID function 0x80000001 */
|
|
|
|
|
#define CPUID_3DNOWE (1UL << 30UL) /* Extended 3DNow! instructions */
|
|
|
|
|
#define CPUID_3DNOW (1UL << 31UL) /* 3DNow! instructions */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2024-01-15 06:22:38 +05:00
|
|
|
/* Remove the Debugging Extensions CPUID flag if not compiled
|
|
|
|
|
with debug register support for 486 and later CPUs. */
|
|
|
|
|
#ifndef USE_DEBUG_REGS_486
|
|
|
|
|
# define CPUID_DE 0
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-08-26 13:53:13 +02:00
|
|
|
/* Make sure this is as low as possible. */
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_state_t cpu_state;
|
2023-04-29 18:56:57 +02:00
|
|
|
fpu_state_t fpu_state;
|
2021-08-26 13:53:13 +02:00
|
|
|
|
2022-10-27 04:10:16 +02:00
|
|
|
/* Place this immediately after. */
|
|
|
|
|
uint32_t abrt_error;
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2023-06-26 22:31:03 -04:00
|
|
|
const OpFn *x86_dynarec_opcodes;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_0f;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_d8_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_d8_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_d9_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_d9_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_da_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_da_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_db_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_db_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_dc_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_dc_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_dd_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_dd_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_de_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_de_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_df_a16;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_df_a32;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_REPE;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_REPNE;
|
|
|
|
|
const OpFn *x86_dynarec_opcodes_3DNOW;
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2023-06-26 22:31:03 -04:00
|
|
|
const OpFn *x86_opcodes;
|
|
|
|
|
const OpFn *x86_opcodes_0f;
|
|
|
|
|
const OpFn *x86_opcodes_d8_a16;
|
|
|
|
|
const OpFn *x86_opcodes_d8_a32;
|
|
|
|
|
const OpFn *x86_opcodes_d9_a16;
|
|
|
|
|
const OpFn *x86_opcodes_d9_a32;
|
|
|
|
|
const OpFn *x86_opcodes_da_a16;
|
|
|
|
|
const OpFn *x86_opcodes_da_a32;
|
|
|
|
|
const OpFn *x86_opcodes_db_a16;
|
|
|
|
|
const OpFn *x86_opcodes_db_a32;
|
|
|
|
|
const OpFn *x86_opcodes_dc_a16;
|
|
|
|
|
const OpFn *x86_opcodes_dc_a32;
|
|
|
|
|
const OpFn *x86_opcodes_dd_a16;
|
|
|
|
|
const OpFn *x86_opcodes_dd_a32;
|
|
|
|
|
const OpFn *x86_opcodes_de_a16;
|
|
|
|
|
const OpFn *x86_opcodes_de_a32;
|
|
|
|
|
const OpFn *x86_opcodes_df_a16;
|
|
|
|
|
const OpFn *x86_opcodes_df_a32;
|
|
|
|
|
const OpFn *x86_opcodes_REPE;
|
|
|
|
|
const OpFn *x86_opcodes_REPNE;
|
|
|
|
|
const OpFn *x86_opcodes_3DNOW;
|
|
|
|
|
|
2023-08-08 19:39:52 +02:00
|
|
|
const OpFn *x86_2386_opcodes;
|
|
|
|
|
const OpFn *x86_2386_opcodes_0f;
|
|
|
|
|
const OpFn *x86_2386_opcodes_d8_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_d8_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_d9_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_d9_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_da_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_da_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_db_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_db_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_dc_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_dc_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_dd_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_dd_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_de_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_de_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_df_a16;
|
|
|
|
|
const OpFn *x86_2386_opcodes_df_a32;
|
|
|
|
|
const OpFn *x86_2386_opcodes_REPE;
|
|
|
|
|
const OpFn *x86_2386_opcodes_REPNE;
|
|
|
|
|
|
2023-06-26 22:31:03 -04:00
|
|
|
uint16_t cpu_fast_off_count;
|
|
|
|
|
uint16_t cpu_fast_off_val;
|
2022-09-20 01:00:45 -04:00
|
|
|
uint16_t temp_seg_data[4] = { 0, 0, 0, 0 };
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2023-06-26 22:31:03 -04:00
|
|
|
int isa_cycles;
|
|
|
|
|
int cpu_inited;
|
|
|
|
|
|
|
|
|
|
int cpu_cycles_read;
|
|
|
|
|
int cpu_cycles_read_l;
|
|
|
|
|
int cpu_cycles_write;
|
|
|
|
|
int cpu_cycles_write_l;
|
|
|
|
|
int cpu_prefetch_cycles;
|
|
|
|
|
int cpu_prefetch_width;
|
|
|
|
|
int cpu_mem_prefetch_cycles;
|
|
|
|
|
int cpu_rom_prefetch_cycles;
|
|
|
|
|
int cpu_waitstates;
|
|
|
|
|
int cpu_cache_int_enabled;
|
|
|
|
|
int cpu_cache_ext_enabled;
|
2024-08-27 02:34:59 +02:00
|
|
|
int cpu_flush_pending;
|
2024-08-29 01:57:22 +02:00
|
|
|
int cpu_old_paging;
|
2023-06-26 22:31:03 -04:00
|
|
|
int cpu_isa_speed;
|
|
|
|
|
int cpu_pci_speed;
|
|
|
|
|
int cpu_isa_pci_div;
|
|
|
|
|
int cpu_agp_speed;
|
|
|
|
|
int cpu_alt_reset;
|
|
|
|
|
|
|
|
|
|
int cpu_override;
|
|
|
|
|
int cpu_effective;
|
|
|
|
|
int cpu_multi;
|
|
|
|
|
int cpu_16bitbus;
|
|
|
|
|
int cpu_64bitbus;
|
|
|
|
|
int cpu_cyrix_alignment;
|
2024-01-06 01:51:20 +01:00
|
|
|
int cpu_cpurst_on_sr;
|
2024-02-02 05:25:40 +01:00
|
|
|
int cpu_use_exec = 0;
|
2024-04-25 19:10:40 +02:00
|
|
|
int cpu_override_interpreter;
|
2023-06-26 22:31:03 -04:00
|
|
|
int CPUID;
|
|
|
|
|
|
|
|
|
|
int is186;
|
2024-12-22 13:52:25 +01:00
|
|
|
int is_mazovia;
|
2023-06-26 22:31:03 -04:00
|
|
|
int is_nec;
|
|
|
|
|
int is286;
|
|
|
|
|
int is386;
|
|
|
|
|
int is6117;
|
|
|
|
|
int is486 = 1;
|
2025-03-16 18:37:32 +01:00
|
|
|
int is586 = 0;
|
2023-06-26 22:31:03 -04:00
|
|
|
int cpu_isintel;
|
|
|
|
|
int cpu_iscyrix;
|
|
|
|
|
int hascache;
|
|
|
|
|
int isibm486;
|
|
|
|
|
int israpidcad;
|
|
|
|
|
int is_vpc;
|
|
|
|
|
int is_am486;
|
|
|
|
|
int is_am486dxl;
|
|
|
|
|
int is_pentium;
|
|
|
|
|
int is_k5;
|
|
|
|
|
int is_k6;
|
|
|
|
|
int is_p6;
|
|
|
|
|
int is_cxsmm;
|
|
|
|
|
int hasfpu;
|
|
|
|
|
|
|
|
|
|
int timing_rr;
|
|
|
|
|
int timing_mr;
|
|
|
|
|
int timing_mrl;
|
|
|
|
|
int timing_rm;
|
|
|
|
|
int timing_rml;
|
|
|
|
|
int timing_mm;
|
|
|
|
|
int timing_mml;
|
|
|
|
|
int timing_bt;
|
|
|
|
|
int timing_bnt;
|
|
|
|
|
int timing_int;
|
|
|
|
|
int timing_int_rm;
|
|
|
|
|
int timing_int_v86;
|
|
|
|
|
int timing_int_pm;
|
|
|
|
|
int timing_int_pm_outer;
|
|
|
|
|
int timing_iret_rm;
|
|
|
|
|
int timing_iret_v86;
|
|
|
|
|
int timing_iret_pm;
|
|
|
|
|
int timing_iret_pm_outer;
|
|
|
|
|
int timing_call_rm;
|
|
|
|
|
int timing_call_pm;
|
|
|
|
|
int timing_call_pm_gate;
|
|
|
|
|
int timing_call_pm_gate_inner;
|
|
|
|
|
int timing_retf_rm;
|
|
|
|
|
int timing_retf_pm;
|
|
|
|
|
int timing_retf_pm_outer;
|
|
|
|
|
int timing_jmp_rm;
|
|
|
|
|
int timing_jmp_pm;
|
|
|
|
|
int timing_jmp_pm_gate;
|
|
|
|
|
int timing_misaligned;
|
|
|
|
|
|
|
|
|
|
uint32_t cpu_features;
|
|
|
|
|
uint32_t cpu_fast_off_flags;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
uint32_t _tr[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
|
|
|
|
uint32_t cache_index = 0;
|
|
|
|
|
uint8_t _cache[2048];
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2023-06-26 22:31:03 -04:00
|
|
|
uint64_t cpu_CR4_mask;
|
2024-02-03 21:39:40 +05:00
|
|
|
uint64_t tsc = 0;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2023-06-26 22:31:03 -04:00
|
|
|
double cpu_dmulti;
|
|
|
|
|
double cpu_busspeed;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
msr_t msr;
|
2021-03-24 19:52:44 +01:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
cyrix_t cyrix;
|
2021-03-24 19:52:44 +01:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_family_t *cpu_f;
|
|
|
|
|
CPU *cpu_s;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2023-08-11 13:00:04 -04:00
|
|
|
uint8_t do_translate = 0;
|
2023-06-26 22:31:03 -04:00
|
|
|
uint8_t do_translate2 = 0;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2023-10-13 15:34:00 -04:00
|
|
|
void (*cpu_exec)(int32_t cycs);
|
2021-04-10 07:18:47 +02:00
|
|
|
|
Implement Cyrix EMMI extensions and 4 FPU instructions
PADDSIW, PSUBSIW, PMULHRW (named PMULHRWC in the code as recognized by some assemblers), PMULHRIW, PDISTIB, PMACHRIW, PAVEB, PMAGW, PMVZB, PMVNZB, PMVLZB, PMVGEZB, FTSTP, FRINT2, FRINEAR, FRICHOP are implemented for Cyrix 6x86MX. Cyrix 6x86(L) only has the last 4 instructions.
2025-03-06 00:54:28 +06:00
|
|
|
uint8_t ccr0;
|
|
|
|
|
uint8_t ccr1;
|
|
|
|
|
uint8_t ccr2;
|
|
|
|
|
uint8_t ccr3;
|
|
|
|
|
uint8_t ccr4;
|
|
|
|
|
uint8_t ccr5;
|
|
|
|
|
uint8_t ccr6;
|
|
|
|
|
uint8_t ccr7;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2025-03-19 03:12:36 +01:00
|
|
|
uint8_t reg_30 = 0x00;
|
|
|
|
|
uint8_t arr[24] = { 0 };
|
|
|
|
|
uint8_t rcr[8] = { 0 };
|
|
|
|
|
|
2025-03-20 21:52:48 +06:00
|
|
|
/* Table for FXTRACT. */
|
|
|
|
|
double exp_pow_table[0x800];
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
static int cyrix_addr;
|
2020-11-16 00:01:21 +01:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
static void cpu_write(uint16_t addr, uint8_t val, void *priv);
|
|
|
|
|
static uint8_t cpu_read(uint16_t addr, void *priv);
|
2020-04-01 08:59:29 +02:00
|
|
|
|
|
|
|
|
#ifdef ENABLE_CPU_LOG
|
|
|
|
|
int cpu_do_log = ENABLE_CPU_LOG;
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cpu_log(const char *fmt, ...)
|
|
|
|
|
{
|
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
|
|
if (cpu_do_log) {
|
2022-09-20 01:00:45 -04:00
|
|
|
va_start(ap, fmt);
|
|
|
|
|
pclog_ex(fmt, ap);
|
|
|
|
|
va_end(ap);
|
2020-04-01 08:59:29 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
# define cpu_log(fmt, ...)
|
2020-04-01 08:59:29 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
cpu_has_feature(int feature)
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
return cpu_features & feature;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cpu_dynamic_switch(int new_cpu)
|
|
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
int c;
|
|
|
|
|
|
|
|
|
|
if (cpu_effective == new_cpu)
|
2022-09-20 01:00:45 -04:00
|
|
|
return;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
c = cpu;
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu = new_cpu;
|
|
|
|
|
cpu_set();
|
|
|
|
|
pc_speed_changed();
|
|
|
|
|
cpu = c;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cpu_set_edx(void)
|
|
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
EDX = cpu_s->edx_reset;
|
2023-05-07 00:24:57 +02:00
|
|
|
if (fpu_softfloat)
|
2023-04-29 18:56:57 +02:00
|
|
|
SF_FPU_reset();
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
2020-11-18 01:09:17 -03:00
|
|
|
cpu_family_t *
|
2020-11-18 19:56:22 -03:00
|
|
|
cpu_get_family(const char *internal_name)
|
2020-06-15 04:11:12 -06:00
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
int c = 0;
|
|
|
|
|
|
|
|
|
|
while (cpu_families[c].package) {
|
2022-09-20 01:00:45 -04:00
|
|
|
if (!strcmp(internal_name, cpu_families[c].internal_name))
|
|
|
|
|
return (cpu_family_t *) &cpu_families[c];
|
|
|
|
|
c++;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
return NULL;
|
2020-11-18 01:09:17 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8_t
|
2020-11-18 19:56:22 -03:00
|
|
|
cpu_is_eligible(const cpu_family_t *cpu_family, int cpu, int machine)
|
2020-11-18 01:09:17 -03:00
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
const machine_t *machine_s = &machines[machine];
|
2022-09-20 01:00:45 -04:00
|
|
|
const CPU *cpu_s = &cpu_family->cpus[cpu];
|
2023-06-26 22:31:03 -04:00
|
|
|
uint32_t packages;
|
|
|
|
|
uint32_t bus_speed;
|
2022-09-20 01:00:45 -04:00
|
|
|
uint8_t i;
|
|
|
|
|
double multi;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
|
|
|
|
/* Full override. */
|
|
|
|
|
if (cpu_override > 1)
|
2022-09-20 01:00:45 -04:00
|
|
|
return 1;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Add implicit CPU package compatibility. */
|
2022-07-19 18:51:18 -04:00
|
|
|
packages = machine_s->cpu.package;
|
2021-04-10 07:18:47 +02:00
|
|
|
if (packages & CPU_PKG_SOCKET3)
|
2022-09-20 01:00:45 -04:00
|
|
|
packages |= CPU_PKG_SOCKET1;
|
2021-04-10 07:18:47 +02:00
|
|
|
else if (packages & CPU_PKG_SLOT1)
|
2025-02-13 19:14:36 +01:00
|
|
|
packages |= CPU_PKG_SOCKET370 | CPU_PKG_SOCKET8;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Package type. */
|
|
|
|
|
if (!(cpu_family->package & packages))
|
2022-09-20 01:00:45 -04:00
|
|
|
return 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Partial override. */
|
|
|
|
|
if (cpu_override)
|
2022-09-20 01:00:45 -04:00
|
|
|
return 1;
|
2020-11-23 14:48:32 -03:00
|
|
|
|
2025-03-18 19:21:00 +01:00
|
|
|
/* Cyrix 6x86MX on the NuPRO 592. */
|
|
|
|
|
if (((cpu_s->cyrix_id & 0xff00) == 0x0400) && (strstr(machine_s->internal_name, "nupro") != NULL))
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
/* Cyrix 6x86MX or MII on the P5MMS98. */
|
|
|
|
|
if ((cpu_s->cpu_type == CPU_Cx6x86MX) && (strstr(machine_s->internal_name, "p5mms98") != NULL))
|
|
|
|
|
return 0;
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Check CPU blocklist. */
|
2022-07-19 18:51:18 -04:00
|
|
|
if (machine_s->cpu.block) {
|
2022-09-20 01:00:45 -04:00
|
|
|
i = 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
while (machine_s->cpu.block[i]) {
|
|
|
|
|
if (machine_s->cpu.block[i++] == cpu_s->cpu_type)
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
bus_speed = cpu_s->rspeed / cpu_s->multi;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Minimum bus speed with ~0.84 MHz (for 8086) tolerance. */
|
2022-07-19 18:51:18 -04:00
|
|
|
if (machine_s->cpu.min_bus && (bus_speed < (machine_s->cpu.min_bus - 840907)))
|
2022-09-20 01:00:45 -04:00
|
|
|
return 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Maximum bus speed with ~0.84 MHz (for 8086) tolerance. */
|
2022-07-19 18:51:18 -04:00
|
|
|
if (machine_s->cpu.max_bus && (bus_speed > (machine_s->cpu.max_bus + 840907)))
|
2022-09-20 01:00:45 -04:00
|
|
|
return 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Minimum voltage with 0.1V tolerance. */
|
2022-07-19 18:51:18 -04:00
|
|
|
if (machine_s->cpu.min_voltage && (cpu_s->voltage < (machine_s->cpu.min_voltage - 100)))
|
2022-09-20 01:00:45 -04:00
|
|
|
return 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Maximum voltage with 0.1V tolerance. */
|
2022-07-19 18:51:18 -04:00
|
|
|
if (machine_s->cpu.max_voltage && (cpu_s->voltage > (machine_s->cpu.max_voltage + 100)))
|
2022-09-20 01:00:45 -04:00
|
|
|
return 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Account for CPUs which use a different internal multiplier than specified by jumpers. */
|
|
|
|
|
multi = cpu_s->multi;
|
|
|
|
|
|
|
|
|
|
/* Don't care about multiplier compatibility on fixed multiplier CPUs. */
|
|
|
|
|
if (cpu_s->cpu_flags & CPU_FIXED_MULTIPLIER)
|
2022-09-20 01:00:45 -04:00
|
|
|
return 1;
|
2021-04-10 07:18:47 +02:00
|
|
|
else if (cpu_family->package & CPU_PKG_SOCKET5_7) {
|
2022-09-20 01:00:45 -04:00
|
|
|
if ((multi == 1.5) && (cpu_s->cpu_type == CPU_5K86) && (machine_s->cpu.min_multi > 1.5)) /* K5 5k86 */
|
|
|
|
|
multi = 2.0;
|
|
|
|
|
else if (multi == 1.75) /* K5 5k86 */
|
|
|
|
|
multi = 2.5;
|
|
|
|
|
else if (multi == 2.0) {
|
|
|
|
|
if (cpu_s->cpu_type == CPU_5K86) /* K5 5k86 */
|
|
|
|
|
multi = 3.0;
|
|
|
|
|
/* K6-2+ / K6-3+ */
|
|
|
|
|
else if ((cpu_s->cpu_type == CPU_K6_2P) || (cpu_s->cpu_type == CPU_K6_3P))
|
|
|
|
|
multi = 2.5;
|
|
|
|
|
else if (((cpu_s->cpu_type == CPU_WINCHIP) || (cpu_s->cpu_type == CPU_WINCHIP2)) && (machine_s->cpu.min_multi > 2.0)) /* WinChip (2) */
|
|
|
|
|
multi = 2.5;
|
|
|
|
|
} else if (multi == (7.0 / 3.0)) /* WinChip 2A - 2.33x */
|
|
|
|
|
multi = 5.0;
|
|
|
|
|
else if (multi == (8.0 / 3.0)) /* WinChip 2A - 2.66x */
|
|
|
|
|
multi = 5.5;
|
|
|
|
|
else if ((multi == 3.0) && (cpu_s->cpu_type == CPU_Cx6x86 || cpu_s->cpu_type == CPU_Cx6x86L)) /* 6x86(L) */
|
|
|
|
|
multi = 1.5;
|
|
|
|
|
else if (multi == (10.0 / 3.0)) /* WinChip 2A - 3.33x */
|
|
|
|
|
multi = 2.0;
|
|
|
|
|
else if (multi == 3.5) /* standard set by the Pentium MMX */
|
|
|
|
|
multi = 1.5;
|
|
|
|
|
else if (multi == 4.0) {
|
|
|
|
|
/* WinChip (2) */
|
|
|
|
|
if ((cpu_s->cpu_type == CPU_WINCHIP) || (cpu_s->cpu_type == CPU_WINCHIP2)) {
|
|
|
|
|
if (machine_s->cpu.min_multi >= 1.5)
|
|
|
|
|
multi = 1.5;
|
|
|
|
|
else if (machine_s->cpu.min_multi >= 3.5)
|
|
|
|
|
multi = 3.5;
|
|
|
|
|
else if (machine_s->cpu.min_multi >= 4.5)
|
|
|
|
|
multi = 4.5;
|
|
|
|
|
} else if ((cpu_s->cpu_type == CPU_Cx6x86) || (cpu_s->cpu_type == CPU_Cx6x86L)) /* 6x86(L) */
|
|
|
|
|
multi = 3.0;
|
|
|
|
|
} else if ((multi == 5.0) && ((cpu_s->cpu_type == CPU_WINCHIP) || (cpu_s->cpu_type == CPU_WINCHIP2)) && (machine_s->cpu.min_multi > 5.0)) /* WinChip (2) */
|
|
|
|
|
multi = 5.5;
|
|
|
|
|
else if (multi == 6.0) /* K6-2(+) / K6-3(+) */
|
|
|
|
|
multi = 2.0;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Minimum multiplier, */
|
2022-07-19 18:51:18 -04:00
|
|
|
if (multi < machine_s->cpu.min_multi)
|
2022-09-20 01:00:45 -04:00
|
|
|
return 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
/* Maximum multiplier. */
|
2022-07-19 18:51:18 -04:00
|
|
|
if (machine_s->cpu.max_multi && (multi > machine_s->cpu.max_multi))
|
2022-09-20 01:00:45 -04:00
|
|
|
return 0;
|
2020-11-18 01:09:17 -03:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
return 1;
|
2020-11-18 01:09:17 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8_t
|
2020-11-18 19:56:22 -03:00
|
|
|
cpu_family_is_eligible(const cpu_family_t *cpu_family, int machine)
|
2020-11-18 01:09:17 -03:00
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
int c = 0;
|
2020-06-15 04:11:12 -06:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
while (cpu_family->cpus[c].cpu_type) {
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_is_eligible(cpu_family, c, machine))
|
|
|
|
|
return 1;
|
|
|
|
|
c++;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
2020-06-15 04:11:12 -06:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
return 0;
|
2020-06-15 04:11:12 -06:00
|
|
|
}
|
|
|
|
|
|
2023-04-29 18:56:57 +02:00
|
|
|
void
|
|
|
|
|
SF_FPU_reset(void)
|
|
|
|
|
{
|
|
|
|
|
if (fpu_type != FPU_NONE) {
|
|
|
|
|
fpu_state.cwd = 0x0040;
|
|
|
|
|
fpu_state.swd = 0;
|
|
|
|
|
fpu_state.tos = 0;
|
|
|
|
|
fpu_state.tag = 0x5555;
|
|
|
|
|
fpu_state.foo = 0;
|
|
|
|
|
fpu_state.fip = 0;
|
|
|
|
|
fpu_state.fcs = 0;
|
|
|
|
|
fpu_state.fds = 0;
|
|
|
|
|
fpu_state.fdp = 0;
|
2023-08-11 13:00:04 -04:00
|
|
|
memset(fpu_state.st_space, 0, sizeof(floatx80) * 8);
|
2023-04-29 18:56:57 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
void
|
|
|
|
|
cpu_set(void)
|
|
|
|
|
{
|
2021-04-22 04:27:50 +02:00
|
|
|
cpu_inited = 1;
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_effective = cpu;
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_s = (CPU *) &cpu_f->cpus[cpu_effective];
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2020-07-15 18:30:27 +02:00
|
|
|
#ifdef USE_ACYCS
|
2021-04-10 07:18:47 +02:00
|
|
|
acycs = 0;
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_ACYCS */
|
2020-07-12 20:01:16 +02:00
|
|
|
|
2024-06-12 20:46:27 +02:00
|
|
|
soft_reset_pci = 0;
|
|
|
|
|
cpu_init = 0;
|
2021-06-07 00:06:17 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_alt_reset = 0;
|
2021-04-10 07:18:47 +02:00
|
|
|
unmask_a20_in_smm = 0;
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
CPUID = cpu_s->cpuid_model;
|
2022-10-26 16:45:17 +02:00
|
|
|
is8086 = (cpu_s->cpu_type > CPU_8088) && (cpu_s->cpu_type != CPU_V20) && (cpu_s->cpu_type != CPU_188);
|
2024-12-22 13:52:25 +01:00
|
|
|
is_mazovia = (cpu_s->cpu_type == CPU_8086_MAZOVIA);
|
2022-10-19 16:24:10 -04:00
|
|
|
is_nec = (cpu_s->cpu_type == CPU_V20) || (cpu_s->cpu_type == CPU_V30);
|
|
|
|
|
is186 = (cpu_s->cpu_type == CPU_186) || (cpu_s->cpu_type == CPU_188) || (cpu_s->cpu_type == CPU_V20) || (cpu_s->cpu_type == CPU_V30);
|
2022-09-20 01:00:45 -04:00
|
|
|
is286 = (cpu_s->cpu_type >= CPU_286);
|
|
|
|
|
is386 = (cpu_s->cpu_type >= CPU_386SX);
|
|
|
|
|
israpidcad = (cpu_s->cpu_type == CPU_RAPIDCAD);
|
|
|
|
|
isibm486 = (cpu_s->cpu_type == CPU_IBM386SLC) || (cpu_s->cpu_type == CPU_IBM486SLC) || (cpu_s->cpu_type == CPU_IBM486BL);
|
|
|
|
|
is486 = (cpu_s->cpu_type >= CPU_RAPIDCAD);
|
|
|
|
|
is_am486 = (cpu_s->cpu_type == CPU_ENH_Am486DX);
|
|
|
|
|
is_am486dxl = (cpu_s->cpu_type == CPU_Am486DXL);
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
is6117 = !strcmp(cpu_f->manufacturer, "ALi");
|
2022-07-18 23:38:06 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_isintel = !strcmp(cpu_f->manufacturer, "Intel");
|
|
|
|
|
cpu_iscyrix = !strcmp(cpu_f->manufacturer, "Cyrix") || !strcmp(cpu_f->manufacturer, "ST");
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2021-04-15 21:38:03 -06:00
|
|
|
/* SL-Enhanced Intel 486s have the same SMM save state table layout as Pentiums,
|
2021-04-15 23:28:07 -06:00
|
|
|
and the WinChip datasheet claims those are Pentium-compatible as well. AMD Am486DXL/DXL2 also has compatible SMM, or would if not for it's different SMBase*/
|
2022-09-20 01:00:45 -04:00
|
|
|
is_pentium = (cpu_isintel && (cpu_s->cpu_type >= CPU_i486SX_SLENH) && (cpu_s->cpu_type < CPU_PENTIUMPRO)) || !strcmp(cpu_f->manufacturer, "IDT") || (cpu_s->cpu_type == CPU_Am486DXL);
|
|
|
|
|
is_k5 = !strcmp(cpu_f->manufacturer, "AMD") && (cpu_s->cpu_type > CPU_ENH_Am486DX) && (cpu_s->cpu_type < CPU_K6);
|
|
|
|
|
is_k6 = (cpu_s->cpu_type >= CPU_K6) && !strcmp(cpu_f->manufacturer, "AMD");
|
2021-04-10 07:18:47 +02:00
|
|
|
/* The Samuel 2 datasheet claims it's Celeron-compatible. */
|
2022-09-20 01:00:45 -04:00
|
|
|
is_p6 = (cpu_isintel && (cpu_s->cpu_type >= CPU_PENTIUMPRO)) || !strcmp(cpu_f->manufacturer, "VIA");
|
|
|
|
|
is_cxsmm = (!strcmp(cpu_f->manufacturer, "Cyrix") || !strcmp(cpu_f->manufacturer, "ST")) && (cpu_s->cpu_type >= CPU_Cx486S);
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_isintel = cpu_isintel || !strcmp(cpu_f->manufacturer, "AMD");
|
2022-08-01 23:40:11 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
hasfpu = (fpu_type != FPU_NONE);
|
|
|
|
|
hascache = (cpu_s->cpu_type >= CPU_486SLC) || (cpu_s->cpu_type == CPU_IBM386SLC) || (cpu_s->cpu_type == CPU_IBM486SLC) || (cpu_s->cpu_type == CPU_IBM486BL);
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_16bitbus = (cpu_s->cpu_type == CPU_286) || (cpu_s->cpu_type == CPU_386SX) || (cpu_s->cpu_type == CPU_486SLC) || (cpu_s->cpu_type == CPU_IBM386SLC) || (cpu_s->cpu_type == CPU_IBM486SLC);
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_64bitbus = (cpu_s->cpu_type >= CPU_WINCHIP);
|
|
|
|
|
|
2025-03-16 18:37:32 +01:00
|
|
|
is586 = cpu_64bitbus || (cpu_s->cpu_type == CPU_P24T);
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
if (cpu_s->multi)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_busspeed = cpu_s->rspeed / cpu_s->multi;
|
2021-04-10 07:18:47 +02:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_busspeed = cpu_s->rspeed;
|
|
|
|
|
cpu_multi = (int) ceil(cpu_s->multi);
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_dmulti = cpu_s->multi;
|
Implement Cyrix EMMI extensions and 4 FPU instructions
PADDSIW, PSUBSIW, PMULHRW (named PMULHRWC in the code as recognized by some assemblers), PMULHRIW, PDISTIB, PMACHRIW, PAVEB, PMAGW, PMVZB, PMVNZB, PMVLZB, PMVGEZB, FTSTP, FRINT2, FRINEAR, FRICHOP are implemented for Cyrix 6x86MX. Cyrix 6x86(L) only has the last 4 instructions.
2025-03-06 00:54:28 +06:00
|
|
|
ccr0 = ccr1 = ccr2 = ccr3 = ccr4 = ccr5 = ccr6 = ccr7 = 0;
|
|
|
|
|
ccr4 = 0x85;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_update_waitstates();
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
isa_cycles = cpu_s->atclk_div;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-06-03 05:02:22 +02:00
|
|
|
if (cpu_s->rspeed <= 8000000)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_rom_prefetch_cycles = cpu_mem_prefetch_cycles;
|
2021-06-03 05:02:22 +02:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_rom_prefetch_cycles = cpu_s->rspeed / 1000000;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_set_isa_pci_div(0);
|
|
|
|
|
cpu_set_pci_speed(0);
|
|
|
|
|
cpu_set_agp_speed(0);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
io_handler(cpu_iscyrix, 0x0022, 0x0002, cpu_read, NULL, NULL, cpu_write, NULL, NULL, NULL);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
io_handler(hasfpu, 0x00f0, 0x000f, cpu_read, NULL, NULL, cpu_write, NULL, NULL, NULL);
|
|
|
|
|
io_handler(hasfpu, 0xf007, 0x0001, cpu_read, NULL, NULL, cpu_write, NULL, NULL, NULL);
|
2020-02-29 19:12:23 +01:00
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2021-04-10 07:18:47 +02:00
|
|
|
x86_setopcodes(ops_386, ops_386_0f, dynarec_ops_386, dynarec_ops_386_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2021-04-10 07:18:47 +02:00
|
|
|
x86_setopcodes(ops_386, ops_386_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-08-08 19:39:52 +02:00
|
|
|
x86_setopcodes_2386(ops_2386_386, ops_2386_386_0f);
|
2023-08-11 13:00:04 -04:00
|
|
|
x86_opcodes_REPE = ops_REPE;
|
|
|
|
|
x86_opcodes_REPNE = ops_REPNE;
|
|
|
|
|
x86_2386_opcodes_REPE = ops_2386_REPE;
|
2023-08-08 19:39:52 +02:00
|
|
|
x86_2386_opcodes_REPNE = ops_2386_REPNE;
|
2023-08-11 13:00:04 -04:00
|
|
|
x86_opcodes_3DNOW = ops_3DNOW;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_dynarec_opcodes_REPE = dynarec_ops_REPE;
|
2021-04-10 07:18:47 +02:00
|
|
|
x86_dynarec_opcodes_REPNE = dynarec_ops_REPNE;
|
|
|
|
|
x86_dynarec_opcodes_3DNOW = dynarec_ops_3DNOW;
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
if (hasfpu) {
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2023-05-07 00:24:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_dynarec_opcodes_d8_a16 = dynarec_ops_sf_fpu_d8_a16;
|
|
|
|
|
x86_dynarec_opcodes_d8_a32 = dynarec_ops_sf_fpu_d8_a32;
|
|
|
|
|
x86_dynarec_opcodes_d9_a16 = dynarec_ops_sf_fpu_d9_a16;
|
|
|
|
|
x86_dynarec_opcodes_d9_a32 = dynarec_ops_sf_fpu_d9_a32;
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_sf_fpu_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_sf_fpu_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_sf_fpu_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_sf_fpu_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_dc_a16 = dynarec_ops_sf_fpu_dc_a16;
|
|
|
|
|
x86_dynarec_opcodes_dc_a32 = dynarec_ops_sf_fpu_dc_a32;
|
|
|
|
|
x86_dynarec_opcodes_dd_a16 = dynarec_ops_sf_fpu_dd_a16;
|
|
|
|
|
x86_dynarec_opcodes_dd_a32 = dynarec_ops_sf_fpu_dd_a32;
|
|
|
|
|
x86_dynarec_opcodes_de_a16 = dynarec_ops_sf_fpu_de_a16;
|
|
|
|
|
x86_dynarec_opcodes_de_a32 = dynarec_ops_sf_fpu_de_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_sf_fpu_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_sf_fpu_df_a32;
|
|
|
|
|
} else {
|
|
|
|
|
x86_dynarec_opcodes_d8_a16 = dynarec_ops_fpu_d8_a16;
|
|
|
|
|
x86_dynarec_opcodes_d8_a32 = dynarec_ops_fpu_d8_a32;
|
|
|
|
|
x86_dynarec_opcodes_d9_a16 = dynarec_ops_fpu_d9_a16;
|
|
|
|
|
x86_dynarec_opcodes_d9_a32 = dynarec_ops_fpu_d9_a32;
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_fpu_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_fpu_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_fpu_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_fpu_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_dc_a16 = dynarec_ops_fpu_dc_a16;
|
|
|
|
|
x86_dynarec_opcodes_dc_a32 = dynarec_ops_fpu_dc_a32;
|
|
|
|
|
x86_dynarec_opcodes_dd_a16 = dynarec_ops_fpu_dd_a16;
|
|
|
|
|
x86_dynarec_opcodes_dd_a32 = dynarec_ops_fpu_dd_a32;
|
|
|
|
|
x86_dynarec_opcodes_de_a16 = dynarec_ops_fpu_de_a16;
|
|
|
|
|
x86_dynarec_opcodes_de_a32 = dynarec_ops_fpu_de_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_df_a32;
|
|
|
|
|
}
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-04-29 18:56:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_opcodes_d8_a16 = ops_sf_fpu_d8_a16;
|
|
|
|
|
x86_opcodes_d8_a32 = ops_sf_fpu_d8_a32;
|
|
|
|
|
x86_opcodes_d9_a16 = ops_sf_fpu_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_sf_fpu_d9_a32;
|
|
|
|
|
x86_opcodes_da_a16 = ops_sf_fpu_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_sf_fpu_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_sf_fpu_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_sf_fpu_db_a32;
|
|
|
|
|
x86_opcodes_dc_a16 = ops_sf_fpu_dc_a16;
|
|
|
|
|
x86_opcodes_dc_a32 = ops_sf_fpu_dc_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_sf_fpu_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_sf_fpu_dd_a32;
|
|
|
|
|
x86_opcodes_de_a16 = ops_sf_fpu_de_a16;
|
|
|
|
|
x86_opcodes_de_a32 = ops_sf_fpu_de_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_sf_fpu_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_sf_fpu_df_a32;
|
2023-08-08 19:39:52 +02:00
|
|
|
|
|
|
|
|
x86_2386_opcodes_d8_a16 = ops_2386_sf_fpu_d8_a16;
|
|
|
|
|
x86_2386_opcodes_d8_a32 = ops_2386_sf_fpu_d8_a32;
|
|
|
|
|
x86_2386_opcodes_d9_a16 = ops_2386_sf_fpu_d9_a16;
|
|
|
|
|
x86_2386_opcodes_d9_a32 = ops_2386_sf_fpu_d9_a32;
|
|
|
|
|
x86_2386_opcodes_da_a16 = ops_2386_sf_fpu_da_a16;
|
|
|
|
|
x86_2386_opcodes_da_a32 = ops_2386_sf_fpu_da_a32;
|
|
|
|
|
x86_2386_opcodes_db_a16 = ops_2386_sf_fpu_db_a16;
|
|
|
|
|
x86_2386_opcodes_db_a32 = ops_2386_sf_fpu_db_a32;
|
|
|
|
|
x86_2386_opcodes_dc_a16 = ops_2386_sf_fpu_dc_a16;
|
|
|
|
|
x86_2386_opcodes_dc_a32 = ops_2386_sf_fpu_dc_a32;
|
|
|
|
|
x86_2386_opcodes_dd_a16 = ops_2386_sf_fpu_dd_a16;
|
|
|
|
|
x86_2386_opcodes_dd_a32 = ops_2386_sf_fpu_dd_a32;
|
|
|
|
|
x86_2386_opcodes_de_a16 = ops_2386_sf_fpu_de_a16;
|
|
|
|
|
x86_2386_opcodes_de_a32 = ops_2386_sf_fpu_de_a32;
|
|
|
|
|
x86_2386_opcodes_df_a16 = ops_2386_sf_fpu_df_a16;
|
|
|
|
|
x86_2386_opcodes_df_a32 = ops_2386_sf_fpu_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
} else {
|
|
|
|
|
x86_opcodes_d8_a16 = ops_fpu_d8_a16;
|
|
|
|
|
x86_opcodes_d8_a32 = ops_fpu_d8_a32;
|
|
|
|
|
x86_opcodes_d9_a16 = ops_fpu_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_fpu_d9_a32;
|
|
|
|
|
x86_opcodes_da_a16 = ops_fpu_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_fpu_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_fpu_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_fpu_db_a32;
|
|
|
|
|
x86_opcodes_dc_a16 = ops_fpu_dc_a16;
|
|
|
|
|
x86_opcodes_dc_a32 = ops_fpu_dc_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_fpu_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_fpu_dd_a32;
|
|
|
|
|
x86_opcodes_de_a16 = ops_fpu_de_a16;
|
|
|
|
|
x86_opcodes_de_a32 = ops_fpu_de_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_fpu_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_fpu_df_a32;
|
2023-08-08 19:39:52 +02:00
|
|
|
|
|
|
|
|
x86_2386_opcodes_d8_a16 = ops_2386_fpu_d8_a16;
|
|
|
|
|
x86_2386_opcodes_d8_a32 = ops_2386_fpu_d8_a32;
|
|
|
|
|
x86_2386_opcodes_d9_a16 = ops_2386_fpu_d9_a16;
|
|
|
|
|
x86_2386_opcodes_d9_a32 = ops_2386_fpu_d9_a32;
|
|
|
|
|
x86_2386_opcodes_da_a16 = ops_2386_fpu_da_a16;
|
|
|
|
|
x86_2386_opcodes_da_a32 = ops_2386_fpu_da_a32;
|
|
|
|
|
x86_2386_opcodes_db_a16 = ops_2386_fpu_db_a16;
|
|
|
|
|
x86_2386_opcodes_db_a32 = ops_2386_fpu_db_a32;
|
|
|
|
|
x86_2386_opcodes_dc_a16 = ops_2386_fpu_dc_a16;
|
|
|
|
|
x86_2386_opcodes_dc_a32 = ops_2386_fpu_dc_a32;
|
|
|
|
|
x86_2386_opcodes_dd_a16 = ops_2386_fpu_dd_a16;
|
|
|
|
|
x86_2386_opcodes_dd_a32 = ops_2386_fpu_dd_a32;
|
|
|
|
|
x86_2386_opcodes_de_a16 = ops_2386_fpu_de_a16;
|
|
|
|
|
x86_2386_opcodes_de_a32 = ops_2386_fpu_de_a32;
|
|
|
|
|
x86_2386_opcodes_df_a16 = ops_2386_fpu_df_a16;
|
|
|
|
|
x86_2386_opcodes_df_a32 = ops_2386_fpu_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
}
|
2021-04-10 07:18:47 +02:00
|
|
|
} else {
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_dynarec_opcodes_d8_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_d8_a32 = dynarec_ops_nofpu_a32;
|
|
|
|
|
x86_dynarec_opcodes_d9_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_d9_a32 = dynarec_ops_nofpu_a32;
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_nofpu_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_nofpu_a32;
|
|
|
|
|
x86_dynarec_opcodes_dc_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_dc_a32 = dynarec_ops_nofpu_a32;
|
|
|
|
|
x86_dynarec_opcodes_dd_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_dd_a32 = dynarec_ops_nofpu_a32;
|
|
|
|
|
x86_dynarec_opcodes_de_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_de_a32 = dynarec_ops_nofpu_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_nofpu_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_nofpu_a32;
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_opcodes_d8_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_d8_a32 = ops_nofpu_a32;
|
|
|
|
|
x86_opcodes_d9_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_nofpu_a32;
|
|
|
|
|
x86_opcodes_da_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_nofpu_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_nofpu_a32;
|
|
|
|
|
x86_opcodes_dc_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_dc_a32 = ops_nofpu_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_nofpu_a32;
|
|
|
|
|
x86_opcodes_de_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_de_a32 = ops_nofpu_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_nofpu_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_nofpu_a32;
|
2023-08-08 19:39:52 +02:00
|
|
|
|
|
|
|
|
x86_2386_opcodes_d8_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_d8_a32 = ops_2386_nofpu_a32;
|
|
|
|
|
x86_2386_opcodes_d9_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_d9_a32 = ops_2386_nofpu_a32;
|
|
|
|
|
x86_2386_opcodes_da_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_da_a32 = ops_2386_nofpu_a32;
|
|
|
|
|
x86_2386_opcodes_db_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_db_a32 = ops_2386_nofpu_a32;
|
|
|
|
|
x86_2386_opcodes_dc_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_dc_a32 = ops_2386_nofpu_a32;
|
|
|
|
|
x86_2386_opcodes_dd_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_dd_a32 = ops_2386_nofpu_a32;
|
|
|
|
|
x86_2386_opcodes_de_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_de_a32 = ops_2386_nofpu_a32;
|
|
|
|
|
x86_2386_opcodes_df_a16 = ops_2386_nofpu_a16;
|
|
|
|
|
x86_2386_opcodes_df_a32 = ops_2386_nofpu_a32;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2021-04-10 07:18:47 +02:00
|
|
|
codegen_timing_set(&codegen_timing_486);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2021-04-10 07:18:47 +02:00
|
|
|
|
|
|
|
|
memset(&msr, 0, sizeof(msr));
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_misaligned = 0;
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_cyrix_alignment = 0;
|
2024-01-06 01:51:20 +01:00
|
|
|
cpu_cpurst_on_sr = 0;
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_CR4_mask = 0;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
|
|
|
|
switch (cpu_s->cpu_type) {
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_8088:
|
|
|
|
|
case CPU_8086:
|
2024-12-22 13:52:25 +01:00
|
|
|
case CPU_8086_MAZOVIA:
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-10-19 16:24:10 -04:00
|
|
|
case CPU_V20:
|
|
|
|
|
case CPU_V30:
|
|
|
|
|
case CPU_186:
|
|
|
|
|
case CPU_188:
|
2022-03-13 06:47:33 -04:00
|
|
|
#ifdef USE_DYNAREC
|
2022-10-19 16:24:10 -04:00
|
|
|
x86_setopcodes(ops_186, ops_186_0f, dynarec_ops_186, dynarec_ops_186_0f);
|
2022-03-13 06:47:33 -04:00
|
|
|
#else
|
2022-10-19 16:24:10 -04:00
|
|
|
x86_setopcodes(ops_186, ops_186_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-08-08 21:04:49 +02:00
|
|
|
x86_setopcodes_2386(ops_2386_186, ops_2386_186_0f);
|
2022-10-19 16:24:10 -04:00
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_286:
|
2020-03-25 18:02:25 -06:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_286, ops_286_0f, dynarec_ops_286, dynarec_ops_286_0f);
|
2020-03-25 18:02:25 -06:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_286, ops_286_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-08-08 21:04:49 +02:00
|
|
|
x86_setopcodes_2386(ops_2386_286, ops_2386_286_0f);
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
if (fpu_type == FPU_287) {
|
2020-03-25 18:02:25 -06:00
|
|
|
#ifdef USE_DYNAREC
|
2023-05-07 00:24:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_dynarec_opcodes_d9_a16 = dynarec_ops_sf_fpu_287_d9_a16;
|
|
|
|
|
x86_dynarec_opcodes_d9_a32 = dynarec_ops_sf_fpu_287_d9_a32;
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_sf_fpu_287_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_sf_fpu_287_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_sf_fpu_287_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_sf_fpu_287_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_dc_a16 = dynarec_ops_sf_fpu_287_dc_a16;
|
|
|
|
|
x86_dynarec_opcodes_dc_a32 = dynarec_ops_sf_fpu_287_dc_a32;
|
|
|
|
|
x86_dynarec_opcodes_dd_a16 = dynarec_ops_sf_fpu_287_dd_a16;
|
|
|
|
|
x86_dynarec_opcodes_dd_a32 = dynarec_ops_sf_fpu_287_dd_a32;
|
|
|
|
|
x86_dynarec_opcodes_de_a16 = dynarec_ops_sf_fpu_287_de_a16;
|
|
|
|
|
x86_dynarec_opcodes_de_a32 = dynarec_ops_sf_fpu_287_de_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_sf_fpu_287_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_sf_fpu_287_df_a32;
|
|
|
|
|
} else {
|
|
|
|
|
x86_dynarec_opcodes_d9_a16 = dynarec_ops_fpu_287_d9_a16;
|
|
|
|
|
x86_dynarec_opcodes_d9_a32 = dynarec_ops_fpu_287_d9_a32;
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_fpu_287_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_fpu_287_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_fpu_287_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_fpu_287_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_dc_a16 = dynarec_ops_fpu_287_dc_a16;
|
|
|
|
|
x86_dynarec_opcodes_dc_a32 = dynarec_ops_fpu_287_dc_a32;
|
|
|
|
|
x86_dynarec_opcodes_dd_a16 = dynarec_ops_fpu_287_dd_a16;
|
|
|
|
|
x86_dynarec_opcodes_dd_a32 = dynarec_ops_fpu_287_dd_a32;
|
|
|
|
|
x86_dynarec_opcodes_de_a16 = dynarec_ops_fpu_287_de_a16;
|
|
|
|
|
x86_dynarec_opcodes_de_a32 = dynarec_ops_fpu_287_de_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_287_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_287_df_a32;
|
|
|
|
|
}
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-04-29 18:56:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_opcodes_d9_a16 = ops_sf_fpu_287_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_sf_fpu_287_d9_a32;
|
|
|
|
|
x86_opcodes_da_a16 = ops_sf_fpu_287_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_sf_fpu_287_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_sf_fpu_287_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_sf_fpu_287_db_a32;
|
|
|
|
|
x86_opcodes_dc_a16 = ops_sf_fpu_287_dc_a16;
|
|
|
|
|
x86_opcodes_dc_a32 = ops_sf_fpu_287_dc_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_sf_fpu_287_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_sf_fpu_287_dd_a32;
|
|
|
|
|
x86_opcodes_de_a16 = ops_sf_fpu_287_de_a16;
|
|
|
|
|
x86_opcodes_de_a32 = ops_sf_fpu_287_de_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_sf_fpu_287_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_sf_fpu_287_df_a32;
|
2023-08-08 19:39:52 +02:00
|
|
|
|
|
|
|
|
x86_2386_opcodes_d9_a16 = ops_2386_sf_fpu_287_d9_a16;
|
|
|
|
|
x86_2386_opcodes_d9_a32 = ops_2386_sf_fpu_287_d9_a32;
|
|
|
|
|
x86_2386_opcodes_da_a16 = ops_2386_sf_fpu_287_da_a16;
|
|
|
|
|
x86_2386_opcodes_da_a32 = ops_2386_sf_fpu_287_da_a32;
|
|
|
|
|
x86_2386_opcodes_db_a16 = ops_2386_sf_fpu_287_db_a16;
|
|
|
|
|
x86_2386_opcodes_db_a32 = ops_2386_sf_fpu_287_db_a32;
|
|
|
|
|
x86_2386_opcodes_dc_a16 = ops_2386_sf_fpu_287_dc_a16;
|
|
|
|
|
x86_2386_opcodes_dc_a32 = ops_2386_sf_fpu_287_dc_a32;
|
|
|
|
|
x86_2386_opcodes_dd_a16 = ops_2386_sf_fpu_287_dd_a16;
|
|
|
|
|
x86_2386_opcodes_dd_a32 = ops_2386_sf_fpu_287_dd_a32;
|
|
|
|
|
x86_2386_opcodes_de_a16 = ops_2386_sf_fpu_287_de_a16;
|
|
|
|
|
x86_2386_opcodes_de_a32 = ops_2386_sf_fpu_287_de_a32;
|
|
|
|
|
x86_2386_opcodes_df_a16 = ops_2386_sf_fpu_287_df_a16;
|
|
|
|
|
x86_2386_opcodes_df_a32 = ops_2386_sf_fpu_287_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
} else {
|
|
|
|
|
x86_opcodes_d9_a16 = ops_fpu_287_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_fpu_287_d9_a32;
|
|
|
|
|
x86_opcodes_da_a16 = ops_fpu_287_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_fpu_287_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_fpu_287_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_fpu_287_db_a32;
|
|
|
|
|
x86_opcodes_dc_a16 = ops_fpu_287_dc_a16;
|
|
|
|
|
x86_opcodes_dc_a32 = ops_fpu_287_dc_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_fpu_287_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_fpu_287_dd_a32;
|
|
|
|
|
x86_opcodes_de_a16 = ops_fpu_287_de_a16;
|
|
|
|
|
x86_opcodes_de_a32 = ops_fpu_287_de_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_fpu_287_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_fpu_287_df_a32;
|
2023-08-08 19:39:52 +02:00
|
|
|
|
|
|
|
|
x86_2386_opcodes_d9_a16 = ops_2386_fpu_287_d9_a16;
|
|
|
|
|
x86_2386_opcodes_d9_a32 = ops_2386_fpu_287_d9_a32;
|
|
|
|
|
x86_2386_opcodes_da_a16 = ops_2386_fpu_287_da_a16;
|
|
|
|
|
x86_2386_opcodes_da_a32 = ops_2386_fpu_287_da_a32;
|
|
|
|
|
x86_2386_opcodes_db_a16 = ops_2386_fpu_287_db_a16;
|
|
|
|
|
x86_2386_opcodes_db_a32 = ops_2386_fpu_287_db_a32;
|
|
|
|
|
x86_2386_opcodes_dc_a16 = ops_2386_fpu_287_dc_a16;
|
|
|
|
|
x86_2386_opcodes_dc_a32 = ops_2386_fpu_287_dc_a32;
|
|
|
|
|
x86_2386_opcodes_dd_a16 = ops_2386_fpu_287_dd_a16;
|
|
|
|
|
x86_2386_opcodes_dd_a32 = ops_2386_fpu_287_dd_a32;
|
|
|
|
|
x86_2386_opcodes_de_a16 = ops_2386_fpu_287_de_a16;
|
|
|
|
|
x86_2386_opcodes_de_a32 = ops_2386_fpu_287_de_a32;
|
|
|
|
|
x86_2386_opcodes_df_a16 = ops_2386_fpu_287_df_a16;
|
|
|
|
|
x86_2386_opcodes_df_a32 = ops_2386_fpu_287_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
}
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
timing_rr = 2; /* register dest - register src */
|
|
|
|
|
timing_rm = 7; /* register dest - memory src */
|
|
|
|
|
timing_mr = 7; /* memory dest - register src */
|
|
|
|
|
timing_mm = 7; /* memory dest - memory src */
|
|
|
|
|
timing_rml = 9; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 11; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 11; /* memory dest - memory src */
|
|
|
|
|
timing_bt = 4; /* branch taken */
|
|
|
|
|
timing_bnt = 3; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 0;
|
|
|
|
|
timing_int_rm = 23;
|
|
|
|
|
timing_int_v86 = 0;
|
|
|
|
|
timing_int_pm = 40;
|
|
|
|
|
timing_int_pm_outer = 78;
|
|
|
|
|
timing_iret_rm = 17;
|
|
|
|
|
timing_iret_v86 = 0;
|
|
|
|
|
timing_iret_pm = 31;
|
|
|
|
|
timing_iret_pm_outer = 55;
|
|
|
|
|
timing_call_rm = 13;
|
|
|
|
|
timing_call_pm = 26;
|
|
|
|
|
timing_call_pm_gate = 52;
|
|
|
|
|
timing_call_pm_gate_inner = 82;
|
|
|
|
|
timing_retf_rm = 15;
|
|
|
|
|
timing_retf_pm = 25;
|
|
|
|
|
timing_retf_pm_outer = 55;
|
|
|
|
|
timing_jmp_rm = 11;
|
|
|
|
|
timing_jmp_pm = 23;
|
|
|
|
|
timing_jmp_pm_gate = 38;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_IBM486SLC:
|
|
|
|
|
case CPU_IBM386SLC:
|
|
|
|
|
case CPU_IBM486BL:
|
2020-06-15 04:11:12 -06:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_ibm486_0f, dynarec_ops_386, dynarec_ops_ibm486_0f);
|
2021-04-10 07:18:47 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_ibm486_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-08-08 19:39:52 +02:00
|
|
|
x86_setopcodes_2386(ops_2386_386, ops_2386_ibm486_0f);
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_features = CPU_FEATURE_MSR;
|
2023-08-10 15:43:16 -04:00
|
|
|
fallthrough;
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_386SX:
|
|
|
|
|
case CPU_386DX:
|
2023-08-08 19:39:52 +02:00
|
|
|
/* In case we get Deskpro 386 emulation */
|
|
|
|
|
if (fpu_type == FPU_287) {
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2023-05-07 00:24:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_dynarec_opcodes_d9_a16 = dynarec_ops_sf_fpu_287_d9_a16;
|
|
|
|
|
x86_dynarec_opcodes_d9_a32 = dynarec_ops_sf_fpu_287_d9_a32;
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_sf_fpu_287_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_sf_fpu_287_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_sf_fpu_287_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_sf_fpu_287_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_dc_a16 = dynarec_ops_sf_fpu_287_dc_a16;
|
|
|
|
|
x86_dynarec_opcodes_dc_a32 = dynarec_ops_sf_fpu_287_dc_a32;
|
|
|
|
|
x86_dynarec_opcodes_dd_a16 = dynarec_ops_sf_fpu_287_dd_a16;
|
|
|
|
|
x86_dynarec_opcodes_dd_a32 = dynarec_ops_sf_fpu_287_dd_a32;
|
|
|
|
|
x86_dynarec_opcodes_de_a16 = dynarec_ops_sf_fpu_287_de_a16;
|
|
|
|
|
x86_dynarec_opcodes_de_a32 = dynarec_ops_sf_fpu_287_de_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_sf_fpu_287_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_sf_fpu_287_df_a32;
|
|
|
|
|
} else {
|
|
|
|
|
x86_dynarec_opcodes_d9_a16 = dynarec_ops_fpu_287_d9_a16;
|
|
|
|
|
x86_dynarec_opcodes_d9_a32 = dynarec_ops_fpu_287_d9_a32;
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_fpu_287_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_fpu_287_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_fpu_287_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_fpu_287_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_dc_a16 = dynarec_ops_fpu_287_dc_a16;
|
|
|
|
|
x86_dynarec_opcodes_dc_a32 = dynarec_ops_fpu_287_dc_a32;
|
|
|
|
|
x86_dynarec_opcodes_dd_a16 = dynarec_ops_fpu_287_dd_a16;
|
|
|
|
|
x86_dynarec_opcodes_dd_a32 = dynarec_ops_fpu_287_dd_a32;
|
|
|
|
|
x86_dynarec_opcodes_de_a16 = dynarec_ops_fpu_287_de_a16;
|
|
|
|
|
x86_dynarec_opcodes_de_a32 = dynarec_ops_fpu_287_de_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_287_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_287_df_a32;
|
|
|
|
|
}
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-04-29 18:56:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_opcodes_d9_a16 = ops_sf_fpu_287_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_sf_fpu_287_d9_a32;
|
|
|
|
|
x86_opcodes_da_a16 = ops_sf_fpu_287_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_sf_fpu_287_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_sf_fpu_287_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_sf_fpu_287_db_a32;
|
|
|
|
|
x86_opcodes_dc_a16 = ops_sf_fpu_287_dc_a16;
|
|
|
|
|
x86_opcodes_dc_a32 = ops_sf_fpu_287_dc_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_sf_fpu_287_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_sf_fpu_287_dd_a32;
|
|
|
|
|
x86_opcodes_de_a16 = ops_sf_fpu_287_de_a16;
|
|
|
|
|
x86_opcodes_de_a32 = ops_sf_fpu_287_de_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_sf_fpu_287_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_sf_fpu_287_df_a32;
|
2023-08-08 19:39:52 +02:00
|
|
|
|
|
|
|
|
x86_2386_opcodes_d9_a16 = ops_2386_sf_fpu_287_d9_a16;
|
|
|
|
|
x86_2386_opcodes_d9_a32 = ops_2386_sf_fpu_287_d9_a32;
|
|
|
|
|
x86_2386_opcodes_da_a16 = ops_2386_sf_fpu_287_da_a16;
|
|
|
|
|
x86_2386_opcodes_da_a32 = ops_2386_sf_fpu_287_da_a32;
|
|
|
|
|
x86_2386_opcodes_db_a16 = ops_2386_sf_fpu_287_db_a16;
|
|
|
|
|
x86_2386_opcodes_db_a32 = ops_2386_sf_fpu_287_db_a32;
|
|
|
|
|
x86_2386_opcodes_dc_a16 = ops_2386_sf_fpu_287_dc_a16;
|
|
|
|
|
x86_2386_opcodes_dc_a32 = ops_2386_sf_fpu_287_dc_a32;
|
|
|
|
|
x86_2386_opcodes_dd_a16 = ops_2386_sf_fpu_287_dd_a16;
|
|
|
|
|
x86_2386_opcodes_dd_a32 = ops_2386_sf_fpu_287_dd_a32;
|
|
|
|
|
x86_2386_opcodes_de_a16 = ops_2386_sf_fpu_287_de_a16;
|
|
|
|
|
x86_2386_opcodes_de_a32 = ops_2386_sf_fpu_287_de_a32;
|
|
|
|
|
x86_2386_opcodes_df_a16 = ops_2386_sf_fpu_287_df_a16;
|
|
|
|
|
x86_2386_opcodes_df_a32 = ops_2386_sf_fpu_287_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
} else {
|
|
|
|
|
x86_opcodes_d9_a16 = ops_fpu_287_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_fpu_287_d9_a32;
|
|
|
|
|
x86_opcodes_da_a16 = ops_fpu_287_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_fpu_287_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_fpu_287_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_fpu_287_db_a32;
|
|
|
|
|
x86_opcodes_dc_a16 = ops_fpu_287_dc_a16;
|
|
|
|
|
x86_opcodes_dc_a32 = ops_fpu_287_dc_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_fpu_287_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_fpu_287_dd_a32;
|
|
|
|
|
x86_opcodes_de_a16 = ops_fpu_287_de_a16;
|
|
|
|
|
x86_opcodes_de_a32 = ops_fpu_287_de_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_fpu_287_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_fpu_287_df_a32;
|
2023-08-08 19:39:52 +02:00
|
|
|
|
|
|
|
|
x86_2386_opcodes_d9_a16 = ops_2386_fpu_287_d9_a16;
|
|
|
|
|
x86_2386_opcodes_d9_a32 = ops_2386_fpu_287_d9_a32;
|
|
|
|
|
x86_2386_opcodes_da_a16 = ops_2386_fpu_287_da_a16;
|
|
|
|
|
x86_2386_opcodes_da_a32 = ops_2386_fpu_287_da_a32;
|
|
|
|
|
x86_2386_opcodes_db_a16 = ops_2386_fpu_287_db_a16;
|
|
|
|
|
x86_2386_opcodes_db_a32 = ops_2386_fpu_287_db_a32;
|
|
|
|
|
x86_2386_opcodes_dc_a16 = ops_2386_fpu_287_dc_a16;
|
|
|
|
|
x86_2386_opcodes_dc_a32 = ops_2386_fpu_287_dc_a32;
|
|
|
|
|
x86_2386_opcodes_dd_a16 = ops_2386_fpu_287_dd_a16;
|
|
|
|
|
x86_2386_opcodes_dd_a32 = ops_2386_fpu_287_dd_a32;
|
|
|
|
|
x86_2386_opcodes_de_a16 = ops_2386_fpu_287_de_a16;
|
|
|
|
|
x86_2386_opcodes_de_a32 = ops_2386_fpu_287_de_a32;
|
|
|
|
|
x86_2386_opcodes_df_a16 = ops_2386_fpu_287_df_a16;
|
|
|
|
|
x86_2386_opcodes_df_a32 = ops_2386_fpu_287_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
}
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
timing_rr = 2; /* register dest - register src */
|
|
|
|
|
timing_rm = 6; /* register dest - memory src */
|
|
|
|
|
timing_mr = 7; /* memory dest - register src */
|
|
|
|
|
timing_mm = 6; /* memory dest - memory src */
|
|
|
|
|
if (cpu_s->cpu_type >= CPU_386DX) {
|
|
|
|
|
timing_rml = 6; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 7; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 6; /* memory dest - memory src */
|
|
|
|
|
} else {
|
|
|
|
|
timing_rml = 8; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 11; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 10; /* memory dest - memory src */
|
|
|
|
|
}
|
|
|
|
|
timing_bt = 4; /* branch taken */
|
|
|
|
|
timing_bnt = 3; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 0;
|
|
|
|
|
timing_int_rm = 37;
|
|
|
|
|
timing_int_v86 = 59;
|
|
|
|
|
timing_int_pm = 99;
|
|
|
|
|
timing_int_pm_outer = 119;
|
|
|
|
|
timing_iret_rm = 22;
|
|
|
|
|
timing_iret_v86 = 60;
|
|
|
|
|
timing_iret_pm = 38;
|
|
|
|
|
timing_iret_pm_outer = 82;
|
|
|
|
|
timing_call_rm = 17;
|
|
|
|
|
timing_call_pm = 34;
|
|
|
|
|
timing_call_pm_gate = 52;
|
|
|
|
|
timing_call_pm_gate_inner = 86;
|
|
|
|
|
timing_retf_rm = 18;
|
|
|
|
|
timing_retf_pm = 32;
|
|
|
|
|
timing_retf_pm_outer = 68;
|
|
|
|
|
timing_jmp_rm = 12;
|
|
|
|
|
timing_jmp_pm = 27;
|
|
|
|
|
timing_jmp_pm_gate = 45;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_486SLC:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_486_0f, dynarec_ops_386, dynarec_ops_486_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_486_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-08-08 19:39:52 +02:00
|
|
|
x86_setopcodes_2386(ops_2386_386, ops_2386_486_0f);
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 3; /* register dest - memory src */
|
|
|
|
|
timing_mr = 5; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 5; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 7; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 7;
|
|
|
|
|
timing_bt = 5; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 4; /* unknown */
|
|
|
|
|
timing_int_rm = 14;
|
|
|
|
|
timing_int_v86 = 82;
|
|
|
|
|
timing_int_pm = 49;
|
|
|
|
|
timing_int_pm_outer = 77;
|
|
|
|
|
timing_iret_rm = 14;
|
|
|
|
|
timing_iret_v86 = 66;
|
|
|
|
|
timing_iret_pm = 31;
|
|
|
|
|
timing_iret_pm_outer = 66;
|
|
|
|
|
timing_call_rm = 12;
|
|
|
|
|
timing_call_pm = 30;
|
|
|
|
|
timing_call_pm_gate = 41;
|
|
|
|
|
timing_call_pm_gate_inner = 83;
|
|
|
|
|
timing_retf_rm = 13;
|
|
|
|
|
timing_retf_pm = 26;
|
|
|
|
|
timing_retf_pm_outer = 61;
|
|
|
|
|
timing_jmp_rm = 9;
|
|
|
|
|
timing_jmp_pm = 26;
|
|
|
|
|
timing_jmp_pm_gate = 37;
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_486DLC:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_486_0f, dynarec_ops_386, dynarec_ops_486_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_486_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-08-08 19:39:52 +02:00
|
|
|
x86_setopcodes_2386(ops_2386_386, ops_2386_486_0f);
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 3; /* register dest - memory src */
|
|
|
|
|
timing_mr = 3; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 3; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 3; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 5; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 4; /* unknown */
|
|
|
|
|
timing_int_rm = 14;
|
|
|
|
|
timing_int_v86 = 82;
|
|
|
|
|
timing_int_pm = 49;
|
|
|
|
|
timing_int_pm_outer = 77;
|
|
|
|
|
timing_iret_rm = 14;
|
|
|
|
|
timing_iret_v86 = 66;
|
|
|
|
|
timing_iret_pm = 31;
|
|
|
|
|
timing_iret_pm_outer = 66;
|
|
|
|
|
timing_call_rm = 12;
|
|
|
|
|
timing_call_pm = 30;
|
|
|
|
|
timing_call_pm_gate = 41;
|
|
|
|
|
timing_call_pm_gate_inner = 83;
|
|
|
|
|
timing_retf_rm = 13;
|
|
|
|
|
timing_retf_pm = 26;
|
|
|
|
|
timing_retf_pm_outer = 61;
|
|
|
|
|
timing_jmp_rm = 9;
|
|
|
|
|
timing_jmp_pm = 26;
|
|
|
|
|
timing_jmp_pm_gate = 37;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_i486SX_SLENH:
|
|
|
|
|
case CPU_i486DX_SLENH:
|
|
|
|
|
cpu_features = CPU_FEATURE_CR4 | CPU_FEATURE_VME;
|
|
|
|
|
cpu_CR4_mask = CR4_VME | CR4_PVI | CR4_VME;
|
2023-08-10 15:43:16 -04:00
|
|
|
fallthrough;
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_RAPIDCAD:
|
|
|
|
|
case CPU_i486SX:
|
|
|
|
|
case CPU_i486DX:
|
|
|
|
|
case CPU_Am486SX:
|
|
|
|
|
case CPU_Am486DX:
|
|
|
|
|
case CPU_Am486DXL:
|
|
|
|
|
case CPU_ENH_Am486DX:
|
|
|
|
|
/*AMD timing identical to Intel*/
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_486_0f, dynarec_ops_386, dynarec_ops_486_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_486_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-08-08 19:39:52 +02:00
|
|
|
x86_setopcodes_2386(ops_2386_386, ops_2386_486_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 2; /* register dest - memory src */
|
|
|
|
|
timing_mr = 3; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 2; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 3; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 2; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 4;
|
|
|
|
|
timing_int_rm = 26;
|
|
|
|
|
timing_int_v86 = 82;
|
|
|
|
|
timing_int_pm = 44;
|
|
|
|
|
timing_int_pm_outer = 71;
|
|
|
|
|
timing_iret_rm = 15;
|
|
|
|
|
timing_iret_v86 = 36; /* unknown */
|
|
|
|
|
timing_iret_pm = 20;
|
|
|
|
|
timing_iret_pm_outer = 36;
|
|
|
|
|
timing_call_rm = 18;
|
|
|
|
|
timing_call_pm = 20;
|
|
|
|
|
timing_call_pm_gate = 35;
|
|
|
|
|
timing_call_pm_gate_inner = 69;
|
|
|
|
|
timing_retf_rm = 13;
|
|
|
|
|
timing_retf_pm = 17;
|
|
|
|
|
timing_retf_pm_outer = 35;
|
|
|
|
|
timing_jmp_rm = 17;
|
|
|
|
|
timing_jmp_pm = 19;
|
|
|
|
|
timing_jmp_pm_gate = 32;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_Cx486S:
|
|
|
|
|
case CPU_Cx486DX:
|
|
|
|
|
case CPU_STPC:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_STPC)
|
|
|
|
|
x86_setopcodes(ops_386, ops_stpc_0f, dynarec_ops_386, dynarec_ops_stpc_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_c486_0f, dynarec_ops_386, dynarec_ops_c486_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_STPC)
|
|
|
|
|
x86_setopcodes(ops_386, ops_stpc_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_c486_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 3; /* register dest - memory src */
|
|
|
|
|
timing_mr = 3; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 3; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 3; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 3; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 4;
|
|
|
|
|
timing_int_rm = 14;
|
|
|
|
|
timing_int_v86 = 82;
|
|
|
|
|
timing_int_pm = 49;
|
|
|
|
|
timing_int_pm_outer = 77;
|
|
|
|
|
timing_iret_rm = 14;
|
|
|
|
|
timing_iret_v86 = 66; /* unknown */
|
|
|
|
|
timing_iret_pm = 31;
|
|
|
|
|
timing_iret_pm_outer = 66;
|
|
|
|
|
timing_call_rm = 12;
|
|
|
|
|
timing_call_pm = 30;
|
|
|
|
|
timing_call_pm_gate = 41;
|
|
|
|
|
timing_call_pm_gate_inner = 83;
|
|
|
|
|
timing_retf_rm = 13;
|
|
|
|
|
timing_retf_pm = 26;
|
|
|
|
|
timing_retf_pm_outer = 61;
|
|
|
|
|
timing_jmp_rm = 9;
|
|
|
|
|
timing_jmp_pm = 26;
|
|
|
|
|
timing_jmp_pm_gate = 37;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
|
|
|
|
|
if (cpu_s->cpu_type == CPU_STPC)
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_Cx5x86:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_c486_0f, dynarec_ops_386, dynarec_ops_c486_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_c486_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 1; /* register dest - memory src */
|
|
|
|
|
timing_mr = 2; /* memory dest - register src */
|
|
|
|
|
timing_mm = 2;
|
|
|
|
|
timing_rml = 1; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 2; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 2;
|
|
|
|
|
timing_bt = 4; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 0;
|
|
|
|
|
timing_int_rm = 9;
|
|
|
|
|
timing_int_v86 = 82; /* unknown */
|
|
|
|
|
timing_int_pm = 21;
|
|
|
|
|
timing_int_pm_outer = 32;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 26; /* unknown */
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 26;
|
|
|
|
|
timing_call_rm = 4;
|
|
|
|
|
timing_call_pm = 15;
|
|
|
|
|
timing_call_pm_gate = 26;
|
|
|
|
|
timing_call_pm_gate_inner = 35;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 7;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 5;
|
|
|
|
|
timing_jmp_pm = 7;
|
|
|
|
|
timing_jmp_pm_gate = 17;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 2;
|
|
|
|
|
|
|
|
|
|
cpu_cyrix_alignment = 1;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_WINCHIP:
|
|
|
|
|
case CPU_WINCHIP2:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_WINCHIP2)
|
|
|
|
|
x86_setopcodes(ops_386, ops_winchip2_0f, dynarec_ops_386, dynarec_ops_winchip2_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_winchip_0f, dynarec_ops_386, dynarec_ops_winchip_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_WINCHIP2)
|
|
|
|
|
x86_setopcodes(ops_386, ops_winchip2_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_winchip_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 2; /* register dest - memory src */
|
|
|
|
|
timing_mr = 2; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 2; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 2; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 2; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
/*unknown*/
|
|
|
|
|
timing_int_rm = 26;
|
|
|
|
|
timing_int_v86 = 82;
|
|
|
|
|
timing_int_pm = 44;
|
|
|
|
|
timing_int_pm_outer = 71;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 26;
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 26;
|
|
|
|
|
timing_call_rm = 4;
|
|
|
|
|
timing_call_pm = 15;
|
|
|
|
|
timing_call_pm_gate = 26;
|
|
|
|
|
timing_call_pm_gate_inner = 35;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 7;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 5;
|
|
|
|
|
timing_jmp_pm = 7;
|
|
|
|
|
timing_jmp_pm_gate = 17;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 2;
|
|
|
|
|
|
|
|
|
|
cpu_cyrix_alignment = 1;
|
|
|
|
|
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC | CPU_FEATURE_MMX | CPU_FEATURE_MSR | CPU_FEATURE_CR4;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_WINCHIP2)
|
|
|
|
|
cpu_features |= CPU_FEATURE_3DNOW;
|
|
|
|
|
msr.fcr = (1 << 8) | (1 << 9) | (1 << 12) | (1 << 16) | (1 << 19) | (1 << 21);
|
|
|
|
|
if (cpu_s->cpu_type == CPU_WINCHIP2)
|
|
|
|
|
msr.fcr |= (1 << 18) | (1 << 20);
|
|
|
|
|
cpu_CR4_mask = CR4_TSD | CR4_DE | CR4_MCE | CR4_PCE;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2022-02-20 02:26:27 -05:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_WINCHIP2)
|
|
|
|
|
codegen_timing_set(&codegen_timing_winchip2);
|
|
|
|
|
else
|
|
|
|
|
codegen_timing_set(&codegen_timing_winchip);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_P24T:
|
|
|
|
|
case CPU_PENTIUM:
|
|
|
|
|
case CPU_PENTIUMMMX:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMMMX)
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentiummmx_0f, dynarec_ops_386, dynarec_ops_pentiummmx_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentium_0f, dynarec_ops_386, dynarec_ops_pentium_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMMMX)
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentiummmx_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentium_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 2; /* register dest - memory src */
|
|
|
|
|
timing_mr = 3; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 2; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 3; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 0; /* branch taken */
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMMMX)
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
else
|
|
|
|
|
timing_bnt = 2; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 6;
|
|
|
|
|
timing_int_rm = 11;
|
|
|
|
|
timing_int_v86 = 54;
|
|
|
|
|
timing_int_pm = 25;
|
|
|
|
|
timing_int_pm_outer = 42;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 27; /* unknown */
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 27;
|
|
|
|
|
timing_call_rm = 4;
|
|
|
|
|
timing_call_pm = 4;
|
|
|
|
|
timing_call_pm_gate = 22;
|
|
|
|
|
timing_call_pm_gate_inner = 44;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 4;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 3;
|
|
|
|
|
timing_jmp_pm = 3;
|
|
|
|
|
timing_jmp_pm_gate = 18;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC | CPU_FEATURE_MSR | CPU_FEATURE_CR4 | CPU_FEATURE_VME;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMMMX)
|
|
|
|
|
cpu_features |= CPU_FEATURE_MMX;
|
|
|
|
|
cpu_CR4_mask = CR4_VME | CR4_PVI | CR4_TSD | CR4_DE | CR4_PSE | CR4_MCE | CR4_PCE;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
codegen_timing_set(&codegen_timing_pentium);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_Cx6x86:
|
|
|
|
|
case CPU_Cx6x86L:
|
|
|
|
|
case CPU_CxGX1:
|
|
|
|
|
case CPU_Cx6x86MX:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_Cx6x86MX) {
|
|
|
|
|
# ifdef USE_DYNAREC
|
2023-05-07 00:24:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_sf_fpu_686_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_sf_fpu_686_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_sf_fpu_686_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_sf_fpu_686_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_sf_fpu_686_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_sf_fpu_686_df_a32;
|
|
|
|
|
} else {
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_fpu_686_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_fpu_686_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_fpu_686_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_fpu_686_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_686_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_686_df_a32;
|
|
|
|
|
}
|
2024-08-08 20:25:03 -04:00
|
|
|
# endif /* USE_DYNAREC */
|
2023-04-29 18:56:57 +02:00
|
|
|
if (fpu_softfloat) {
|
Implement Cyrix EMMI extensions and 4 FPU instructions
PADDSIW, PSUBSIW, PMULHRW (named PMULHRWC in the code as recognized by some assemblers), PMULHRIW, PDISTIB, PMACHRIW, PAVEB, PMAGW, PMVZB, PMVNZB, PMVLZB, PMVGEZB, FTSTP, FRINT2, FRINEAR, FRICHOP are implemented for Cyrix 6x86MX. Cyrix 6x86(L) only has the last 4 instructions.
2025-03-06 00:54:28 +06:00
|
|
|
x86_opcodes_d9_a16 = ops_sf_fpu_cyrix_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_sf_fpu_cyrix_d9_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
x86_opcodes_da_a16 = ops_sf_fpu_686_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_sf_fpu_686_da_a32;
|
Implement Cyrix EMMI extensions and 4 FPU instructions
PADDSIW, PSUBSIW, PMULHRW (named PMULHRWC in the code as recognized by some assemblers), PMULHRIW, PDISTIB, PMACHRIW, PAVEB, PMAGW, PMVZB, PMVNZB, PMVLZB, PMVGEZB, FTSTP, FRINT2, FRINEAR, FRICHOP are implemented for Cyrix 6x86MX. Cyrix 6x86(L) only has the last 4 instructions.
2025-03-06 00:54:28 +06:00
|
|
|
x86_opcodes_db_a16 = ops_sf_fpu_cyrix_686_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_sf_fpu_cyrix_686_db_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_sf_fpu_cyrix_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_sf_fpu_cyrix_dd_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_sf_fpu_cyrix_686_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_sf_fpu_cyrix_686_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
} else {
|
Implement Cyrix EMMI extensions and 4 FPU instructions
PADDSIW, PSUBSIW, PMULHRW (named PMULHRWC in the code as recognized by some assemblers), PMULHRIW, PDISTIB, PMACHRIW, PAVEB, PMAGW, PMVZB, PMVNZB, PMVLZB, PMVGEZB, FTSTP, FRINT2, FRINEAR, FRICHOP are implemented for Cyrix 6x86MX. Cyrix 6x86(L) only has the last 4 instructions.
2025-03-06 00:54:28 +06:00
|
|
|
x86_opcodes_d9_a16 = ops_fpu_cyrix_d9_a16;
|
|
|
|
|
x86_opcodes_d9_a32 = ops_fpu_cyrix_d9_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
x86_opcodes_da_a16 = ops_fpu_686_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_fpu_686_da_a32;
|
Implement Cyrix EMMI extensions and 4 FPU instructions
PADDSIW, PSUBSIW, PMULHRW (named PMULHRWC in the code as recognized by some assemblers), PMULHRIW, PDISTIB, PMACHRIW, PAVEB, PMAGW, PMVZB, PMVNZB, PMVLZB, PMVGEZB, FTSTP, FRINT2, FRINEAR, FRICHOP are implemented for Cyrix 6x86MX. Cyrix 6x86(L) only has the last 4 instructions.
2025-03-06 00:54:28 +06:00
|
|
|
x86_opcodes_db_a16 = ops_fpu_cyrix_686_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_fpu_cyrix_686_db_a32;
|
|
|
|
|
x86_opcodes_dd_a16 = ops_fpu_cyrix_dd_a16;
|
|
|
|
|
x86_opcodes_dd_a32 = ops_fpu_cyrix_dd_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_fpu_cyrix_686_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_fpu_cyrix_686_df_a32;
|
2023-04-29 18:56:57 +02:00
|
|
|
}
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# ifdef USE_DYNAREC
|
|
|
|
|
if (cpu_s->cpu_type == CPU_Cx6x86MX)
|
|
|
|
|
x86_setopcodes(ops_386, ops_c6x86mx_0f, dynarec_ops_386, dynarec_ops_c6x86mx_0f);
|
|
|
|
|
else if (cpu_s->cpu_type == CPU_Cx6x86L)
|
2025-03-05 21:52:17 +01:00
|
|
|
x86_setopcodes(ops_386, ops_c6x86l_0f, dynarec_ops_386, dynarec_ops_c6x86l_0f);
|
2022-09-20 01:00:45 -04:00
|
|
|
else
|
2023-08-10 15:43:16 -04:00
|
|
|
x86_setopcodes(ops_386, ops_c6x86_0f, dynarec_ops_386, dynarec_ops_c6x86_0f);
|
2022-09-20 01:00:45 -04:00
|
|
|
# else
|
|
|
|
|
if (cpu_s->cpu_type == CPU_Cx6x86MX)
|
|
|
|
|
x86_setopcodes(ops_386, ops_c6x86mx_0f);
|
|
|
|
|
else if (cpu_s->cpu_type == CPU_Cx6x86L)
|
2025-03-05 21:52:17 +01:00
|
|
|
x86_setopcodes(ops_386, ops_c6x86l_0f);
|
2022-09-20 01:00:45 -04:00
|
|
|
else
|
2023-08-10 15:43:16 -04:00
|
|
|
x86_setopcodes(ops_386, ops_c6x86_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
# endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
|
|
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 1; /* register dest - memory src */
|
|
|
|
|
timing_mr = 2; /* memory dest - register src */
|
|
|
|
|
timing_mm = 2;
|
|
|
|
|
timing_rml = 1; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 2; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 2;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_CxGX1) {
|
|
|
|
|
timing_bt = 4; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
} else {
|
|
|
|
|
timing_bt = 0; /* branch taken */
|
|
|
|
|
timing_bnt = 2; /* branch not taken */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Make the CxGX1 share the timings with most other Cyrix C6x86's due to the real
|
|
|
|
|
ones still being unknown. */
|
|
|
|
|
timing_int_rm = 9;
|
|
|
|
|
timing_int_v86 = 46;
|
|
|
|
|
timing_int_pm = 21;
|
|
|
|
|
timing_int_pm_outer = 32;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 26;
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 26;
|
|
|
|
|
timing_call_rm = 3;
|
|
|
|
|
timing_call_pm = 4;
|
|
|
|
|
timing_call_pm_gate = 15;
|
|
|
|
|
timing_call_pm_gate_inner = 26;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 4;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 1;
|
|
|
|
|
timing_jmp_pm = 4;
|
|
|
|
|
timing_jmp_pm_gate = 14;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 2;
|
|
|
|
|
|
|
|
|
|
cpu_cyrix_alignment = 1;
|
|
|
|
|
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC;
|
|
|
|
|
if (cpu_s->cpu_type >= CPU_CxGX1)
|
|
|
|
|
cpu_features |= CPU_FEATURE_MSR | CPU_FEATURE_CR4;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_Cx6x86MX)
|
|
|
|
|
cpu_features |= CPU_FEATURE_MMX;
|
|
|
|
|
if (cpu_s->cpu_type >= CPU_CxGX1)
|
|
|
|
|
cpu_CR4_mask = CR4_TSD | CR4_DE | CR4_PCE;
|
|
|
|
|
|
|
|
|
|
# ifdef USE_DYNAREC
|
|
|
|
|
codegen_timing_set(&codegen_timing_686);
|
2024-08-08 20:25:03 -04:00
|
|
|
# endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
|
|
|
|
|
if ((cpu_s->cpu_type == CPU_Cx6x86L) || (cpu_s->cpu_type == CPU_Cx6x86MX))
|
|
|
|
|
ccr4 = 0x80;
|
|
|
|
|
else if (CPU_Cx6x86)
|
|
|
|
|
CPUID = 0; /* Disabled on powerup by default */
|
|
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2024-08-08 20:25:03 -04:00
|
|
|
#ifdef USE_AMD_K5
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K5:
|
|
|
|
|
case CPU_5K86:
|
2024-08-25 19:08:30 -04:00
|
|
|
#ifdef USE_DYNAREC
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentiummmx_0f, dynarec_ops_386, dynarec_ops_pentiummmx_0f);
|
|
|
|
|
#else
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentiummmx_0f);
|
|
|
|
|
#endif /* USE_DYNAREC */
|
|
|
|
|
|
|
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 2; /* register dest - memory src */
|
|
|
|
|
timing_mr = 3; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 2; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 3; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 0; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 6;
|
|
|
|
|
timing_int_rm = 11;
|
|
|
|
|
timing_int_v86 = 54;
|
|
|
|
|
timing_int_pm = 25;
|
|
|
|
|
timing_int_pm_outer = 42;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 27; /* unknown */
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 27;
|
|
|
|
|
timing_call_rm = 4;
|
|
|
|
|
timing_call_pm = 4;
|
|
|
|
|
timing_call_pm_gate = 22;
|
|
|
|
|
timing_call_pm_gate_inner = 44;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 4;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 3;
|
|
|
|
|
timing_jmp_pm = 3;
|
|
|
|
|
timing_jmp_pm_gate = 18;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC | CPU_FEATURE_MSR | CPU_FEATURE_CR4 | CPU_FEATURE_VME | CPU_FEATURE_MMX;
|
2024-08-25 20:20:21 -04:00
|
|
|
cpu_CR4_mask = CR4_TSD | CR4_DE | CR4_MCE | CR4_PGE;
|
2024-08-25 19:08:30 -04:00
|
|
|
|
|
|
|
|
#ifdef USE_DYNAREC
|
|
|
|
|
codegen_timing_set(&codegen_timing_k5);
|
|
|
|
|
#endif /* USE_DYNAREC */
|
|
|
|
|
break;
|
|
|
|
|
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_AMD_K5 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K6:
|
|
|
|
|
case CPU_K6_2:
|
|
|
|
|
case CPU_K6_2C:
|
|
|
|
|
case CPU_K6_3:
|
|
|
|
|
case CPU_K6_2P:
|
|
|
|
|
case CPU_K6_3P:
|
2020-04-10 01:08:52 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type >= CPU_K6_2)
|
|
|
|
|
x86_setopcodes(ops_386, ops_k62_0f, dynarec_ops_386, dynarec_ops_k62_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_k6_0f, dynarec_ops_386, dynarec_ops_k6_0f);
|
2021-04-10 07:18:47 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type >= CPU_K6_2)
|
|
|
|
|
x86_setopcodes(ops_386, ops_k62_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_k6_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-11-06 04:50:13 +01:00
|
|
|
if ((cpu_s->cpu_type == CPU_K6_2P) || (cpu_s->cpu_type == CPU_K6_3P)) {
|
2022-12-20 19:25:51 -05:00
|
|
|
x86_opcodes_3DNOW = ops_3DNOWE;
|
2022-11-26 16:58:31 +01:00
|
|
|
#ifdef USE_DYNAREC
|
2022-11-06 04:50:13 +01:00
|
|
|
x86_dynarec_opcodes_3DNOW = dynarec_ops_3DNOWE;
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-11-06 04:50:13 +01:00
|
|
|
}
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 2; /* register dest - memory src */
|
|
|
|
|
timing_mr = 3; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 2; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 3; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 0; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 6;
|
|
|
|
|
timing_int_rm = 11;
|
|
|
|
|
timing_int_v86 = 54;
|
|
|
|
|
timing_int_pm = 25;
|
|
|
|
|
timing_int_pm_outer = 42;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 27; /* unknown */
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 27;
|
|
|
|
|
timing_call_rm = 4;
|
|
|
|
|
timing_call_pm = 4;
|
|
|
|
|
timing_call_pm_gate = 22;
|
|
|
|
|
timing_call_pm_gate_inner = 44;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 4;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 3;
|
|
|
|
|
timing_jmp_pm = 3;
|
|
|
|
|
timing_jmp_pm_gate = 18;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC | CPU_FEATURE_MSR | CPU_FEATURE_CR4 | CPU_FEATURE_VME | CPU_FEATURE_MMX;
|
|
|
|
|
if (cpu_s->cpu_type >= CPU_K6_2)
|
|
|
|
|
cpu_features |= CPU_FEATURE_3DNOW;
|
2022-11-06 04:50:13 +01:00
|
|
|
if ((cpu_s->cpu_type == CPU_K6_2P) || (cpu_s->cpu_type == CPU_K6_3P))
|
|
|
|
|
cpu_features |= CPU_FEATURE_3DNOWE;
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_CR4_mask = CR4_VME | CR4_PVI | CR4_TSD | CR4_DE | CR4_PSE | CR4_MCE;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_K6)
|
|
|
|
|
cpu_CR4_mask |= CR4_PCE;
|
2024-01-29 23:37:31 +05:00
|
|
|
else if (cpu_s->cpu_type >= CPU_K6_2C)
|
|
|
|
|
cpu_CR4_mask |= CR4_PGE;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2020-06-13 12:32:09 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
codegen_timing_set(&codegen_timing_k6);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_PENTIUMPRO:
|
|
|
|
|
case CPU_PENTIUM2:
|
|
|
|
|
case CPU_PENTIUM2D:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
/* TODO: Perhaps merge the three opcode tables with some instructions UD#'ing depending on
|
|
|
|
|
CPU type. */
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUM2D)
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentium2d_0f, dynarec_ops_386, dynarec_ops_pentium2d_0f);
|
|
|
|
|
else if (cpu_s->cpu_type == CPU_PENTIUM2)
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentium2_0f, dynarec_ops_386, dynarec_ops_pentium2_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentiumpro_0f, dynarec_ops_386, dynarec_ops_pentiumpro_0f);
|
2023-05-07 00:24:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_sf_fpu_686_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_sf_fpu_686_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_sf_fpu_686_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_sf_fpu_686_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_sf_fpu_686_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_sf_fpu_686_df_a32;
|
|
|
|
|
} else {
|
|
|
|
|
x86_dynarec_opcodes_da_a16 = dynarec_ops_fpu_686_da_a16;
|
|
|
|
|
x86_dynarec_opcodes_da_a32 = dynarec_ops_fpu_686_da_a32;
|
|
|
|
|
x86_dynarec_opcodes_db_a16 = dynarec_ops_fpu_686_db_a16;
|
|
|
|
|
x86_dynarec_opcodes_db_a32 = dynarec_ops_fpu_686_db_a32;
|
|
|
|
|
x86_dynarec_opcodes_df_a16 = dynarec_ops_fpu_686_df_a16;
|
|
|
|
|
x86_dynarec_opcodes_df_a32 = dynarec_ops_fpu_686_df_a32;
|
|
|
|
|
}
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUM2D)
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentium2d_0f);
|
|
|
|
|
else
|
|
|
|
|
x86_setopcodes(ops_386, ops_pentium2_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2023-04-29 18:56:57 +02:00
|
|
|
if (fpu_softfloat) {
|
|
|
|
|
x86_opcodes_da_a16 = ops_sf_fpu_686_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_sf_fpu_686_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_sf_fpu_686_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_sf_fpu_686_db_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_sf_fpu_686_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_sf_fpu_686_df_a32;
|
|
|
|
|
} else {
|
|
|
|
|
x86_opcodes_da_a16 = ops_fpu_686_da_a16;
|
|
|
|
|
x86_opcodes_da_a32 = ops_fpu_686_da_a32;
|
|
|
|
|
x86_opcodes_db_a16 = ops_fpu_686_db_a16;
|
|
|
|
|
x86_opcodes_db_a32 = ops_fpu_686_db_a32;
|
|
|
|
|
x86_opcodes_df_a16 = ops_fpu_686_df_a16;
|
|
|
|
|
x86_opcodes_df_a32 = ops_fpu_686_df_a32;
|
|
|
|
|
}
|
2022-09-20 01:00:45 -04:00
|
|
|
|
|
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 2; /* register dest - memory src */
|
|
|
|
|
timing_mr = 3; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 2; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 3; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 0; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int = 6;
|
|
|
|
|
timing_int_rm = 11;
|
|
|
|
|
timing_int_v86 = 54;
|
|
|
|
|
timing_int_pm = 25;
|
|
|
|
|
timing_int_pm_outer = 42;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 27; /* unknown */
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 27;
|
|
|
|
|
timing_call_rm = 4;
|
|
|
|
|
timing_call_pm = 4;
|
|
|
|
|
timing_call_pm_gate = 22;
|
|
|
|
|
timing_call_pm_gate_inner = 44;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 4;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 3;
|
|
|
|
|
timing_jmp_pm = 3;
|
|
|
|
|
timing_jmp_pm_gate = 18;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 3;
|
|
|
|
|
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC | CPU_FEATURE_MSR | CPU_FEATURE_CR4 | CPU_FEATURE_VME;
|
|
|
|
|
if (cpu_s->cpu_type >= CPU_PENTIUM2)
|
|
|
|
|
cpu_features |= CPU_FEATURE_MMX;
|
2022-12-01 22:33:55 +05:00
|
|
|
cpu_CR4_mask = CR4_VME | CR4_PVI | CR4_TSD | CR4_DE | CR4_PSE | CR4_MCE | CR4_PAE | CR4_PCE | CR4_PGE;
|
2024-12-21 20:37:26 +05:00
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUM2D) {
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_CR4_mask |= CR4_OSFXSR;
|
2024-12-21 20:37:26 +05:00
|
|
|
cpu_features |= CPU_FEATURE_PSE36;
|
|
|
|
|
}
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
codegen_timing_set(&codegen_timing_p6);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_CYRIX3S:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_winchip2_0f, dynarec_ops_386, dynarec_ops_winchip2_0f);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#else
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_setopcodes(ops_386, ops_winchip2_0f);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
timing_rr = 1; /* register dest - register src */
|
|
|
|
|
timing_rm = 2; /* register dest - memory src */
|
|
|
|
|
timing_mr = 2; /* memory dest - register src */
|
|
|
|
|
timing_mm = 3;
|
|
|
|
|
timing_rml = 2; /* register dest - memory src long */
|
|
|
|
|
timing_mrl = 2; /* memory dest - register src long */
|
|
|
|
|
timing_mml = 3;
|
|
|
|
|
timing_bt = 2; /* branch taken */
|
|
|
|
|
timing_bnt = 1; /* branch not taken */
|
|
|
|
|
|
|
|
|
|
timing_int_rm = 26; /* unknown */
|
|
|
|
|
timing_int_v86 = 82;
|
|
|
|
|
timing_int_pm = 44;
|
|
|
|
|
timing_int_pm_outer = 71;
|
|
|
|
|
timing_iret_rm = 7;
|
|
|
|
|
timing_iret_v86 = 26;
|
|
|
|
|
timing_iret_pm = 10;
|
|
|
|
|
timing_iret_pm_outer = 26;
|
|
|
|
|
timing_call_rm = 4;
|
|
|
|
|
timing_call_pm = 15;
|
|
|
|
|
timing_call_pm_gate = 26;
|
|
|
|
|
timing_call_pm_gate_inner = 35;
|
|
|
|
|
timing_retf_rm = 4;
|
|
|
|
|
timing_retf_pm = 7;
|
|
|
|
|
timing_retf_pm_outer = 23;
|
|
|
|
|
timing_jmp_rm = 5;
|
|
|
|
|
timing_jmp_pm = 7;
|
|
|
|
|
timing_jmp_pm_gate = 17;
|
|
|
|
|
|
|
|
|
|
timing_misaligned = 2;
|
|
|
|
|
|
|
|
|
|
cpu_features = CPU_FEATURE_RDTSC | CPU_FEATURE_MMX | CPU_FEATURE_MSR | CPU_FEATURE_CR4 | CPU_FEATURE_3DNOW;
|
2023-11-01 23:37:50 +05:00
|
|
|
msr.fcr = (1 << 7) | (1 << 8) | (1 << 9) | (1 << 12) | (1 << 16) | (1 << 18) | (1 << 19) | (1 << 20) | (1 << 21);
|
|
|
|
|
cpu_CR4_mask = CR4_TSD | CR4_DE | CR4_MCE | CR4_PCE | CR4_PGE;
|
2022-09-20 01:00:45 -04:00
|
|
|
|
|
|
|
|
cpu_cyrix_alignment = 1;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
#ifdef USE_DYNAREC
|
2022-09-20 01:00:45 -04:00
|
|
|
codegen_timing_set(&codegen_timing_winchip);
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2020-04-10 20:01:26 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
default:
|
2023-08-08 15:38:40 +02:00
|
|
|
fatal("cpu_set : unknown CPU type %" PRIu64 "\n", cpu_s->cpu_type);
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
switch (fpu_type) {
|
2022-09-20 01:00:45 -04:00
|
|
|
case FPU_NONE:
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case FPU_8087:
|
|
|
|
|
x87_timings = x87_timings_8087;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case FPU_287:
|
|
|
|
|
x87_timings = x87_timings_287;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case FPU_287XL:
|
|
|
|
|
case FPU_387:
|
|
|
|
|
x87_timings = x87_timings_387;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case FPU_487SX:
|
|
|
|
|
default:
|
|
|
|
|
x87_timings = x87_timings_486;
|
|
|
|
|
x87_concurrency = x87_concurrency_486;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
2021-03-24 19:52:44 +01:00
|
|
|
|
2024-02-02 05:25:40 +01:00
|
|
|
cpu_use_exec = 0;
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
if (is386) {
|
2022-08-18 17:23:41 -03:00
|
|
|
#if defined(USE_DYNAREC) && !defined(USE_GDBSTUB)
|
2024-02-02 05:25:40 +01:00
|
|
|
if (cpu_use_dynarec) {
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_exec = exec386_dynarec;
|
2024-02-02 05:25:40 +01:00
|
|
|
cpu_use_exec = 1;
|
|
|
|
|
} else
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* defined(USE_DYNAREC) && !defined(USE_GDBSTUB) */
|
2023-08-11 13:00:04 -04:00
|
|
|
/* Use exec386 for CPU_IBM486SLC because it can reach 100 MHz. */
|
2024-04-24 06:06:09 +02:00
|
|
|
if ((cpu_s->cpu_type == CPU_IBM486SLC) || (cpu_s->cpu_type == CPU_IBM486BL) ||
|
2024-04-25 19:10:40 +02:00
|
|
|
cpu_iscyrix || (cpu_s->cpu_type > CPU_486DLC) || cpu_override_interpreter) {
|
2023-08-11 13:00:04 -04:00
|
|
|
cpu_exec = exec386;
|
2024-02-02 05:25:40 +01:00
|
|
|
cpu_use_exec = 1;
|
|
|
|
|
} else
|
2023-08-11 13:00:04 -04:00
|
|
|
cpu_exec = exec386_2386;
|
2021-04-10 07:18:47 +02:00
|
|
|
} else if (cpu_s->cpu_type >= CPU_286)
|
2023-08-08 19:39:52 +02:00
|
|
|
cpu_exec = exec386_2386;
|
2021-04-10 07:18:47 +02:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_exec = execx86;
|
2023-07-16 03:43:54 +02:00
|
|
|
mmx_init();
|
2022-03-16 00:33:01 -03:00
|
|
|
gdbstub_cpu_init();
|
2020-06-15 04:11:12 -06:00
|
|
|
}
|
2021-03-14 19:41:52 -03:00
|
|
|
|
2021-04-22 04:27:50 +02:00
|
|
|
void
|
|
|
|
|
cpu_close(void)
|
|
|
|
|
{
|
|
|
|
|
cpu_inited = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-14 19:41:52 -03:00
|
|
|
void
|
|
|
|
|
cpu_set_isa_speed(int speed)
|
|
|
|
|
{
|
|
|
|
|
if (speed) {
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_isa_speed = speed;
|
2021-06-03 05:02:22 +02:00
|
|
|
} else if (cpu_busspeed >= 8000000)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_isa_speed = 8000000;
|
2021-06-03 05:02:22 +02:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_isa_speed = cpu_busspeed;
|
2021-03-14 19:41:52 -03:00
|
|
|
|
2023-11-06 06:07:43 +01:00
|
|
|
pc_speed_changed();
|
|
|
|
|
|
2021-03-14 19:41:52 -03:00
|
|
|
cpu_log("cpu_set_isa_speed(%d) = %d\n", speed, cpu_isa_speed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cpu_set_pci_speed(int speed)
|
|
|
|
|
{
|
|
|
|
|
if (speed)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_pci_speed = speed;
|
2021-03-14 19:41:52 -03:00
|
|
|
else if (cpu_busspeed < 42500000)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_pci_speed = cpu_busspeed;
|
2021-03-14 19:41:52 -03:00
|
|
|
else if (cpu_busspeed < 84000000)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_pci_speed = cpu_busspeed / 2;
|
2021-03-14 19:41:52 -03:00
|
|
|
else if (cpu_busspeed < 120000000)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_pci_speed = cpu_busspeed / 3;
|
2021-03-14 19:41:52 -03:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_pci_speed = cpu_busspeed / 4;
|
2021-03-14 19:41:52 -03:00
|
|
|
|
|
|
|
|
if (cpu_isa_pci_div)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_set_isa_pci_div(cpu_isa_pci_div);
|
2021-03-14 19:41:52 -03:00
|
|
|
else if (speed)
|
2022-09-20 01:00:45 -04:00
|
|
|
pc_speed_changed();
|
2021-03-14 19:41:52 -03:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
pci_burst_time = cpu_s->rspeed / cpu_pci_speed;
|
2021-03-14 19:41:52 -03:00
|
|
|
pci_nonburst_time = 4 * pci_burst_time;
|
|
|
|
|
|
|
|
|
|
cpu_log("cpu_set_pci_speed(%d) = %d\n", speed, cpu_pci_speed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cpu_set_isa_pci_div(int div)
|
|
|
|
|
{
|
|
|
|
|
cpu_isa_pci_div = div;
|
|
|
|
|
|
|
|
|
|
cpu_log("cpu_set_isa_pci_div(%d)\n", cpu_isa_pci_div);
|
|
|
|
|
|
|
|
|
|
if (cpu_isa_pci_div)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_set_isa_speed(cpu_pci_speed / cpu_isa_pci_div);
|
2021-03-14 19:41:52 -03:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_set_isa_speed(0);
|
2021-03-14 19:41:52 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cpu_set_agp_speed(int speed)
|
|
|
|
|
{
|
|
|
|
|
if (speed) {
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_agp_speed = speed;
|
|
|
|
|
pc_speed_changed();
|
|
|
|
|
} else if (cpu_busspeed < 84000000)
|
|
|
|
|
cpu_agp_speed = cpu_busspeed;
|
2021-03-14 19:41:52 -03:00
|
|
|
else if (cpu_busspeed < 120000000)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_agp_speed = cpu_busspeed / 1.5;
|
2021-03-14 19:41:52 -03:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_agp_speed = cpu_busspeed / 2;
|
2021-03-14 19:41:52 -03:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
agp_burst_time = cpu_s->rspeed / cpu_agp_speed;
|
2021-03-14 19:41:52 -03:00
|
|
|
agp_nonburst_time = 4 * agp_burst_time;
|
|
|
|
|
|
|
|
|
|
cpu_log("cpu_set_agp_speed(%d) = %d\n", speed, cpu_agp_speed);
|
|
|
|
|
}
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
char *
|
|
|
|
|
cpu_current_pc(char *bufp)
|
|
|
|
|
{
|
|
|
|
|
static char buff[10];
|
|
|
|
|
|
|
|
|
|
if (bufp == NULL)
|
2022-09-20 01:00:45 -04:00
|
|
|
bufp = buff;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
|
|
|
|
sprintf(bufp, "%04X:%04X", CS, cpu_state.pc);
|
|
|
|
|
|
2023-06-26 22:31:03 -04:00
|
|
|
return bufp;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
cpu_CPUID(void)
|
|
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
switch (cpu_s->cpu_type) {
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_i486SX_SLENH:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x756e6547; /* GenuineIntel */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x49656e69;
|
|
|
|
|
ECX = 0x6c65746e;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
|
|
|
|
EDX = CPUID_VME;
|
|
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_i486DX_SLENH:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x756e6547; /* GenuineIntel */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x49656e69;
|
|
|
|
|
ECX = 0x6c65746e;
|
|
|
|
|
} else if (EAX == 1) {
|
2023-10-13 06:00:38 +02:00
|
|
|
if ((CPUID == 0x0436) && (cr0 & (1 << 29)))
|
|
|
|
|
EAX = 0x0470;
|
|
|
|
|
else
|
|
|
|
|
EAX = CPUID;
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = ECX = 0;
|
|
|
|
|
EDX = CPUID_FPU | CPUID_VME;
|
|
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_ENH_Am486DX:
|
|
|
|
|
if (!EAX) {
|
2024-02-01 21:08:28 +05:00
|
|
|
EAX = 0x00000001;
|
|
|
|
|
EBX = 0x68747541;/* AuthenticAMD */
|
2022-09-20 01:00:45 -04:00
|
|
|
ECX = 0x444D4163;
|
|
|
|
|
EDX = 0x69746E65;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-02-01 21:08:28 +05:00
|
|
|
EDX = CPUID_FPU;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_WINCHIP:
|
|
|
|
|
if (!EAX) {
|
2024-02-01 21:08:28 +05:00
|
|
|
EAX = 0x00000001;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (msr.fcr2 & (1 << 14)) {
|
|
|
|
|
EBX = msr.fcr3 >> 32;
|
|
|
|
|
ECX = msr.fcr3 & 0xffffffff;
|
|
|
|
|
EDX = msr.fcr2 >> 32;
|
|
|
|
|
} else {
|
|
|
|
|
EBX = 0x746e6543; /* CentaurHauls */
|
|
|
|
|
ECX = 0x736c7561;
|
|
|
|
|
EDX = 0x48727561;
|
|
|
|
|
}
|
|
|
|
|
} else if (EAX == 1) {
|
2024-01-26 16:58:45 +05:00
|
|
|
EAX = ((msr.fcr2 & 0x0ff0) ? ((msr.fcr2 & 0x0ff0) | (CPUID & 0xf00f)) : CPUID);
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_has_feature(CPU_FEATURE_CX8))
|
|
|
|
|
EDX |= CPUID_CMPXCHG8B;
|
|
|
|
|
if (msr.fcr & (1 << 9))
|
|
|
|
|
EDX |= CPUID_MMX;
|
|
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_WINCHIP2:
|
|
|
|
|
switch (EAX) {
|
|
|
|
|
case 0:
|
2024-02-01 21:08:28 +05:00
|
|
|
EAX = 0x00000001;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (msr.fcr2 & (1 << 14)) {
|
|
|
|
|
EBX = msr.fcr3 >> 32;
|
|
|
|
|
ECX = msr.fcr3 & 0xffffffff;
|
|
|
|
|
EDX = msr.fcr2 >> 32;
|
|
|
|
|
} else {
|
|
|
|
|
EBX = 0x746e6543; /* CentaurHauls */
|
|
|
|
|
ECX = 0x736c7561;
|
|
|
|
|
EDX = 0x48727561;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
2024-01-26 16:58:45 +05:00
|
|
|
EAX = ((msr.fcr2 & 0x0ff0) ? ((msr.fcr2 & 0x0ff0) | (CPUID & 0xf00f)) : CPUID);
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_has_feature(CPU_FEATURE_CX8))
|
|
|
|
|
EDX |= CPUID_CMPXCHG8B;
|
|
|
|
|
if (msr.fcr & (1 << 9))
|
|
|
|
|
EDX |= CPUID_MMX;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = 0x80000005;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = CPUID;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_has_feature(CPU_FEATURE_CX8))
|
|
|
|
|
EDX |= CPUID_CMPXCHG8B;
|
|
|
|
|
if (msr.fcr & (1 << 9))
|
|
|
|
|
EDX |= CPUID_MMX;
|
|
|
|
|
if (cpu_has_feature(CPU_FEATURE_3DNOW))
|
|
|
|
|
EDX |= CPUID_3DNOW;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x80000002: /* Processor name string */
|
|
|
|
|
EAX = 0x20544449; /* IDT WinChip 2-3D */
|
|
|
|
|
EBX = 0x436e6957;
|
|
|
|
|
ECX = 0x20706968;
|
|
|
|
|
EDX = 0x44332d32;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x80000005: /*Cache information*/
|
|
|
|
|
EBX = 0x08800880; /*TLBs*/
|
|
|
|
|
ECX = 0x20040120; /*L1 data cache*/
|
|
|
|
|
EDX = 0x20020120; /*L1 instruction cache*/
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_P24T:
|
|
|
|
|
case CPU_PENTIUM:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x756e6547; /* GenuineIntel */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x49656e69;
|
|
|
|
|
ECX = 0x6c65746e;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_CMPXCHG8B;
|
2024-01-26 17:02:22 +05:00
|
|
|
if (cpu_s->cpu_type != CPU_P24T)
|
|
|
|
|
EDX |= CPUID_MCE;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2024-08-08 20:25:03 -04:00
|
|
|
#ifdef USE_AMD_K5
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K5:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x68747541; /* AuthenticAMD */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x69746E65;
|
|
|
|
|
ECX = 0x444D4163;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_AMDPGE;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_5K86:
|
2024-02-01 21:08:28 +05:00
|
|
|
switch (EAX) {
|
|
|
|
|
case 0:
|
|
|
|
|
EAX = 0x00000001;
|
|
|
|
|
EBX = 0x68747541; /* AuthenticAMD */
|
|
|
|
|
EDX = 0x69746E65;
|
|
|
|
|
ECX = 0x444D4163;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_PGE;
|
2024-02-01 21:08:28 +05:00
|
|
|
break;
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = 0x80000005;
|
|
|
|
|
EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_PGE;
|
2024-02-01 21:08:28 +05:00
|
|
|
break;
|
|
|
|
|
case 0x80000002: /* Processor name string */
|
|
|
|
|
EAX = 0x2D444D41; /* AMD-K5(tm) Proce */
|
|
|
|
|
EBX = 0x7428354B;
|
|
|
|
|
ECX = 0x5020296D;
|
|
|
|
|
EDX = 0x65636F72;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000003: /* Processor name string */
|
|
|
|
|
EAX = 0x726F7373; /* ssor */
|
|
|
|
|
EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000005: /* Cache information */
|
|
|
|
|
EAX = 0;
|
|
|
|
|
EBX = 0x04800000; /* TLBs */
|
|
|
|
|
ECX = 0x08040120; /* L1 data cache */
|
|
|
|
|
EDX = 0x10040120; /* L1 instruction cache */
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_AMD_K5 */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K6:
|
2024-02-01 21:08:28 +05:00
|
|
|
switch (EAX) {
|
|
|
|
|
case 0:
|
|
|
|
|
EAX = 0x00000001;
|
|
|
|
|
EBX = 0x68747541; /* AuthenticAMD */
|
|
|
|
|
EDX = 0x69746E65;
|
|
|
|
|
ECX = 0x444D4163;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_MMX;
|
2024-02-01 21:08:28 +05:00
|
|
|
break;
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = 0x80000005;
|
|
|
|
|
EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = CPUID + 0x100;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_AMDSEP | CPUID_MMX;
|
2024-02-01 21:08:28 +05:00
|
|
|
break;
|
|
|
|
|
case 0x80000002: /* Processor name string */
|
|
|
|
|
EAX = 0x2D444D41; /* AMD-K6tm w/ mult */
|
|
|
|
|
EBX = 0x6D74364B;
|
|
|
|
|
ECX = 0x202F7720;
|
|
|
|
|
EDX = 0x746C756D;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000003: /* Processor name string */
|
|
|
|
|
EAX = 0x64656D69; /* imedia extension */
|
|
|
|
|
EBX = 0x65206169;
|
|
|
|
|
ECX = 0x6E657478;
|
|
|
|
|
EDX = 0x6E6F6973;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000004: /* Processor name string */
|
|
|
|
|
EAX = 0x73; /* s */
|
|
|
|
|
EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000005: /* Cache information */
|
|
|
|
|
EAX = 0;
|
|
|
|
|
EBX = 0x02800140; /* TLBs */
|
|
|
|
|
ECX = 0x20020220; /* L1 data cache */
|
|
|
|
|
EDX = 0x20020220; /* L1 instruction cache */
|
|
|
|
|
break;
|
|
|
|
|
case 0x8FFFFFFF: /* Easter egg */
|
|
|
|
|
EAX = 0x4778654E; /* NexGenerationAMD */
|
|
|
|
|
EBX = 0x72656E65;
|
|
|
|
|
ECX = 0x6F697461;
|
|
|
|
|
EDX = 0x444D416E;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_K6_2:
|
|
|
|
|
case CPU_K6_2C:
|
|
|
|
|
switch (EAX) {
|
|
|
|
|
case 0:
|
2024-02-01 21:08:28 +05:00
|
|
|
EAX = 0x00000001;
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = 0x68747541; /* AuthenticAMD */
|
|
|
|
|
ECX = 0x444d4163;
|
|
|
|
|
EDX = 0x69746e65;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_MMX;
|
2024-01-29 23:37:31 +05:00
|
|
|
if (cpu_s->cpu_type == CPU_K6_2C)
|
|
|
|
|
EDX |= CPUID_PGE;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = 0x80000005;
|
|
|
|
|
EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = CPUID + 0x100;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_SEP | CPUID_MMX | CPUID_3DNOW;
|
2024-01-29 23:37:31 +05:00
|
|
|
if (cpu_s->cpu_type == CPU_K6_2C)
|
|
|
|
|
EDX |= CPUID_PGE;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000002: /* Processor name string */
|
|
|
|
|
EAX = 0x2d444d41; /* AMD-K6(tm) 3D pr */
|
|
|
|
|
EBX = 0x7428364b;
|
|
|
|
|
ECX = 0x3320296d;
|
|
|
|
|
EDX = 0x72702044;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000003: /* Processor name string */
|
|
|
|
|
EAX = 0x7365636f; /* ocessor */
|
|
|
|
|
EBX = 0x00726f73;
|
|
|
|
|
ECX = 0x00000000;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
2024-02-01 21:08:28 +05:00
|
|
|
case 0x80000005: /* Cache information */
|
2022-09-20 01:00:45 -04:00
|
|
|
EAX = 0;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x02800140; /* TLBs */
|
|
|
|
|
ECX = 0x20020220; /* L1 data cache */
|
|
|
|
|
EDX = 0x20020220; /* L1 instruction cache */
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_K6_3:
|
|
|
|
|
switch (EAX) {
|
|
|
|
|
case 0:
|
2024-02-01 21:08:28 +05:00
|
|
|
EAX = 0x00000001;
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = 0x68747541; /* AuthenticAMD */
|
|
|
|
|
ECX = 0x444d4163;
|
|
|
|
|
EDX = 0x69746e65;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_PGE | CPUID_MMX;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = 0x80000006;
|
|
|
|
|
EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = CPUID + 0x100;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_SEP | CPUID_PGE | CPUID_MMX | CPUID_3DNOW;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000002: /* Processor name string */
|
|
|
|
|
EAX = 0x2d444d41; /* AMD-K6(tm) 3D+ P */
|
|
|
|
|
EBX = 0x7428364b;
|
|
|
|
|
ECX = 0x3320296d;
|
|
|
|
|
EDX = 0x50202b44;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000003: /* Processor name string */
|
|
|
|
|
EAX = 0x65636f72; /* rocessor */
|
|
|
|
|
EBX = 0x726f7373;
|
|
|
|
|
ECX = 0x00000000;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000005: /* Cache information */
|
|
|
|
|
EAX = 0;
|
|
|
|
|
EBX = 0x02800140; /* TLBs */
|
2024-02-01 21:08:28 +05:00
|
|
|
ECX = 0x20020220; /* L1 data cache */
|
|
|
|
|
EDX = 0x20020220; /* L1 instruction cache */
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000006: /* L2 Cache information */
|
|
|
|
|
EAX = EBX = EDX = 0;
|
|
|
|
|
ECX = 0x01004220;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_K6_2P:
|
|
|
|
|
case CPU_K6_3P:
|
|
|
|
|
switch (EAX) {
|
|
|
|
|
case 0:
|
2024-02-01 21:08:28 +05:00
|
|
|
EAX = 0x00000001;
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = 0x68747541; /* AuthenticAMD */
|
|
|
|
|
ECX = 0x444d4163;
|
|
|
|
|
EDX = 0x69746e65;
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_PGE | CPUID_MMX;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = 0x80000007;
|
|
|
|
|
EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = CPUID + 0x100;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_SEP | CPUID_MMX | CPUID_PGE | CPUID_3DNOW | CPUID_3DNOWE;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000002: /* Processor name string */
|
|
|
|
|
EAX = 0x2d444d41; /* AMD-K6(tm)-III P */
|
|
|
|
|
EBX = 0x7428364b;
|
|
|
|
|
ECX = 0x492d296d;
|
|
|
|
|
EDX = 0x50204949;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000003: /* Processor name string */
|
|
|
|
|
EAX = 0x65636f72; /* rocessor */
|
|
|
|
|
EBX = 0x726f7373;
|
|
|
|
|
ECX = 0x00000000;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000005: /* Cache information */
|
|
|
|
|
EAX = 0;
|
|
|
|
|
EBX = 0x02800140; /* TLBs */
|
|
|
|
|
ECX = 0x20020220; /* L1 data cache */
|
|
|
|
|
EDX = 0x20020220; /* L1 instruction cache */
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000006: /* L2 Cache information */
|
|
|
|
|
EAX = EBX = EDX = 0;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_K6_3P)
|
|
|
|
|
ECX = 0x01004220;
|
|
|
|
|
else
|
|
|
|
|
ECX = 0x00804220;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000007: /* PowerNow information */
|
|
|
|
|
EAX = EBX = ECX = 0;
|
|
|
|
|
EDX = 7;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_PENTIUMMMX:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x756e6547; /* GenuineIntel */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x49656e69;
|
|
|
|
|
ECX = 0x6c65746e;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_MMX;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_Cx6x86:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x69727943; /* CyrixInstead */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x736e4978;
|
|
|
|
|
ECX = 0x64616574;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
|
|
|
|
EDX = CPUID_FPU;
|
|
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_Cx6x86L:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x69727943; /* CyrixInstead */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x736e4978;
|
|
|
|
|
ECX = 0x64616574;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
|
|
|
|
EDX = CPUID_FPU | CPUID_CMPXCHG8B;
|
|
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_CxGX1:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x69727943; /* CyrixInstead */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x736e4978;
|
|
|
|
|
ECX = 0x64616574;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR | CPUID_CMPXCHG8B;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_Cx6x86MX:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000001;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x69727943; /* CyrixInstead */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x736e4978;
|
|
|
|
|
ECX = 0x64616574;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR | CPUID_CMPXCHG8B | CPUID_CMOV | CPUID_MMX;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_PENTIUMPRO:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000002;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x756e6547; /* GenuineIntel */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x49656e69;
|
|
|
|
|
ECX = 0x6c65746e;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_PAE | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_MTRR | CPUID_PGE | CPUID_MCA | CPUID_SEP | CPUID_CMOV;
|
2025-04-11 20:27:41 +02:00
|
|
|
/*
|
|
|
|
|
Return anything non-zero in bits 32-63 of the BIOS signature MSR
|
|
|
|
|
to indicate there has been an update.
|
|
|
|
|
*/
|
|
|
|
|
msr.bbl_cr_dx[3] = 0xffffffff00000000ULL;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else if (EAX == 2) {
|
2024-01-29 23:44:26 +05:00
|
|
|
EAX = 0x03020101; /* Instruction TLB: 4 KB pages, 4-way set associative, 32 entries
|
|
|
|
|
Instruction TLB: 4 MB pages, fully associative, 2 entries
|
|
|
|
|
Data TLB: 4 KB pages, 4-way set associative, 64 entries */
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = ECX = 0;
|
2024-01-29 23:44:26 +05:00
|
|
|
EDX = 0x06040a42; /* 2nd-level cache: 256 KB, 4-way set associative, 32-byte line size
|
|
|
|
|
1st-level data cache: 8 KB, 2-way set associative, 32-byte line size
|
|
|
|
|
Data TLB: 4 MB pages, 4-way set associative, 8 entries
|
|
|
|
|
1st-level instruction cache: 8 KB, 4-way set associative, 32-byte line size */
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_PENTIUM2:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000002;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x756e6547; /* GenuineIntel */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x49656e69;
|
|
|
|
|
ECX = 0x6c65746e;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_PAE | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_MMX | CPUID_MTRR | CPUID_PGE | CPUID_MCA | CPUID_SEP | CPUID_CMOV;
|
2024-12-22 04:09:55 +01:00
|
|
|
/*
|
|
|
|
|
Return anything non-zero in bits 32-63 of the BIOS signature MSR
|
|
|
|
|
to indicate there has been an update.
|
|
|
|
|
*/
|
|
|
|
|
msr.bbl_cr_dx[3] = 0xffffffff00000000ULL;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else if (EAX == 2) {
|
2023-11-05 07:20:25 +05:00
|
|
|
EAX = 0x03020101; /* Instruction TLB: 4 KB pages, 4-way set associative, 32 entries
|
2021-10-17 02:38:26 +05:00
|
|
|
Instruction TLB: 4 MB pages, fully associative, 2 entries
|
|
|
|
|
Data TLB: 4 KB pages, 4-way set associative, 64 entries */
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = ECX = 0;
|
2023-11-05 07:20:25 +05:00
|
|
|
EDX = 0x0c040843; /* 2nd-level cache: 512 KB, 4-way set associative, 32-byte line size
|
|
|
|
|
1st-level data cache: 16 KB, 4-way set associative, 32-byte line size
|
|
|
|
|
Data TLB: 4 MB pages, 4-way set associative, 8 entries
|
|
|
|
|
1st-level instruction cache: 16 KB, 4-way set associative, 32-byte line size */
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_PENTIUM2D:
|
|
|
|
|
if (!EAX) {
|
|
|
|
|
EAX = 0x00000002;
|
2024-02-01 21:08:28 +05:00
|
|
|
EBX = 0x756e6547; /* GenuineIntel */
|
2022-09-20 01:00:45 -04:00
|
|
|
EDX = 0x49656e69;
|
|
|
|
|
ECX = 0x6c65746e;
|
|
|
|
|
} else if (EAX == 1) {
|
|
|
|
|
EAX = CPUID;
|
|
|
|
|
EBX = ECX = 0;
|
2024-12-21 20:37:26 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_VME | CPUID_DE | CPUID_PSE | CPUID_TSC | CPUID_MSR | CPUID_PAE | CPUID_MCE | CPUID_CMPXCHG8B | CPUID_MMX | CPUID_MTRR | CPUID_PGE | CPUID_MCA | CPUID_SEP | CPUID_FXSR | CPUID_CMOV | CPUID_PSE36;
|
2024-12-22 04:09:55 +01:00
|
|
|
/*
|
|
|
|
|
Return anything non-zero in bits 32-63 of the BIOS signature MSR
|
|
|
|
|
to indicate there has been an update.
|
|
|
|
|
*/
|
|
|
|
|
msr.bbl_cr_dx[3] = 0xffffffff00000000ULL;
|
2022-09-20 01:00:45 -04:00
|
|
|
} else if (EAX == 2) {
|
2023-11-05 07:20:25 +05:00
|
|
|
EAX = 0x03020101; /* Instruction TLB: 4 KB pages, 4-way set associative, 32 entries
|
2021-10-17 02:38:26 +05:00
|
|
|
Instruction TLB: 4 MB pages, fully associative, 2 entries
|
|
|
|
|
Data TLB: 4 KB pages, 4-way set associative, 64 entries */
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = ECX = 0;
|
2021-10-17 02:38:26 +05:00
|
|
|
if (cpu_f->package == CPU_PKG_SLOT2) /* Pentium II Xeon Drake */
|
2023-11-05 07:20:25 +05:00
|
|
|
EDX = 0x0c040844; /* 2nd-level cache: 1 MB, 4-way set associative, 32-byte line size
|
|
|
|
|
1st-level data cache: 16 KB, 4-way set associative, 32-byte line size
|
|
|
|
|
Data TLB: 4 MB pages, 4-way set associative, 8 entries
|
|
|
|
|
1st-level instruction cache: 16 KB, 4-way set associative, 32-byte line size */
|
2021-10-17 02:38:26 +05:00
|
|
|
else if (!strncmp(cpu_f->internal_name, "celeron", 7)) { /* Celeron */
|
|
|
|
|
if (CPUID >= 0x660) /* Mendocino */
|
2023-11-05 07:20:25 +05:00
|
|
|
EDX = 0x0c040841; /* 2nd-level cache: 128 KB, 4-way set associative, 32-byte line size */
|
2021-10-17 02:38:26 +05:00
|
|
|
else /* Covington */
|
2023-11-05 07:20:25 +05:00
|
|
|
EDX = 0x0c040840; /* No 2nd-level cache */
|
2021-10-17 02:38:26 +05:00
|
|
|
} else /* Pentium II Deschutes and OverDrive */
|
2023-11-05 07:20:25 +05:00
|
|
|
EDX = 0x0c040843; /* 2nd-level cache: 512 KB, 4-way set associative, 32-byte line size */
|
2022-09-20 01:00:45 -04:00
|
|
|
} else
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_CYRIX3S:
|
|
|
|
|
switch (EAX) {
|
|
|
|
|
case 0:
|
2024-02-01 21:08:28 +05:00
|
|
|
EAX = 0x00000001;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (msr.fcr2 & (1 << 14)) {
|
|
|
|
|
EBX = msr.fcr3 >> 32;
|
|
|
|
|
ECX = msr.fcr3 & 0xffffffff;
|
|
|
|
|
EDX = msr.fcr2 >> 32;
|
|
|
|
|
} else {
|
|
|
|
|
EBX = 0x746e6543; /* CentaurHauls */
|
|
|
|
|
ECX = 0x736c7561;
|
|
|
|
|
EDX = 0x48727561;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
2024-01-26 16:58:45 +05:00
|
|
|
EAX = ((msr.fcr2 & 0x0ff0) ? ((msr.fcr2 & 0x0ff0) | (CPUID & 0xf00f)) : CPUID);
|
2022-09-20 01:00:45 -04:00
|
|
|
EBX = ECX = 0;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_MMX | CPUID_MTRR;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_has_feature(CPU_FEATURE_CX8))
|
|
|
|
|
EDX |= CPUID_CMPXCHG8B;
|
2023-11-01 23:37:50 +05:00
|
|
|
if (msr.fcr & (1 << 7))
|
|
|
|
|
EDX |= CPUID_PGE;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = 0x80000005;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = CPUID;
|
2024-01-15 06:22:38 +05:00
|
|
|
EDX = CPUID_FPU | CPUID_DE | CPUID_TSC | CPUID_MSR | CPUID_MCE | CPUID_MMX | CPUID_MTRR | CPUID_3DNOW;
|
2022-09-20 01:00:45 -04:00
|
|
|
if (cpu_has_feature(CPU_FEATURE_CX8))
|
|
|
|
|
EDX |= CPUID_CMPXCHG8B;
|
2023-11-01 23:37:50 +05:00
|
|
|
if (msr.fcr & (1 << 7))
|
|
|
|
|
EDX |= CPUID_PGE;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
case 0x80000002: /* Processor name string */
|
|
|
|
|
EAX = 0x20414956; /* VIA Samuel */
|
|
|
|
|
EBX = 0x756d6153;
|
|
|
|
|
ECX = 0x00006c65;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
|
|
|
|
case 0x80000005: /* Cache information */
|
|
|
|
|
EBX = 0x08800880; /* TLBs */
|
|
|
|
|
ECX = 0x40040120; /* L1 data cache */
|
|
|
|
|
EDX = 0x40020120; /* L1 instruction cache */
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
EAX = EBX = ECX = EDX = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
void
|
|
|
|
|
cpu_ven_reset(void)
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
memset(&msr, 0, sizeof(msr));
|
|
|
|
|
|
|
|
|
|
switch (cpu_s->cpu_type) {
|
2023-11-06 06:07:43 +01:00
|
|
|
case CPU_WINCHIP:
|
|
|
|
|
case CPU_WINCHIP2:
|
2024-02-04 17:19:12 +05:00
|
|
|
msr.fcr = (1 << 8) | (1 << 9) | (1 << 12) | (1 << 16) | (1 << 19) | (1 << 21);
|
|
|
|
|
msr.mcr_ctrl = 0xf8000000;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_WINCHIP2) {
|
|
|
|
|
msr.fcr |= (1 << 18) | (1 << 20);
|
|
|
|
|
msr.mcr_ctrl |= (1 << 17);
|
|
|
|
|
}
|
2023-11-06 06:07:43 +01:00
|
|
|
break;
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K6_2P:
|
|
|
|
|
case CPU_K6_3P:
|
|
|
|
|
case CPU_K6_3:
|
|
|
|
|
case CPU_K6_2C:
|
|
|
|
|
msr.amd_psor = (cpu_s->cpu_type >= CPU_K6_3) ? 0x008cULL : 0x018cULL;
|
2023-08-10 15:43:16 -04:00
|
|
|
fallthrough;
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K6_2:
|
2024-08-08 20:25:03 -04:00
|
|
|
#ifdef USE_AMD_K5
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K5:
|
|
|
|
|
case CPU_5K86:
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_AMD_K5 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K6:
|
|
|
|
|
msr.amd_efer = (cpu_s->cpu_type >= CPU_K6_2C) ? 2ULL : 0ULL;
|
|
|
|
|
break;
|
|
|
|
|
|
2025-03-19 03:12:36 +01:00
|
|
|
case CPU_Cx6x86MX:
|
|
|
|
|
ccr0 = 0x00;
|
|
|
|
|
ccr1 = 0x00;
|
|
|
|
|
ccr2 = 0x00;
|
|
|
|
|
ccr3 = 0x00;
|
|
|
|
|
ccr4 = 0x80;
|
|
|
|
|
ccr5 = 0x00;
|
|
|
|
|
ccr6 = 0x00;
|
|
|
|
|
memset(arr, 0x00, 24);
|
|
|
|
|
memset(rcr, 0x00, 3);
|
|
|
|
|
cyrix.arr[3].base = 0x00;
|
|
|
|
|
cyrix.arr[3].size = 0; /* Disabled */
|
|
|
|
|
cyrix.smhr &= ~SMHR_VALID;
|
|
|
|
|
CPUID = cpu_s->cpuid_model;
|
|
|
|
|
reg_30 = 0xff;
|
|
|
|
|
break;
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_PENTIUMPRO:
|
|
|
|
|
case CPU_PENTIUM2:
|
|
|
|
|
case CPU_PENTIUM2D:
|
|
|
|
|
msr.mtrr_cap = 0x00000508ULL;
|
2025-04-02 16:27:10 -03:00
|
|
|
|
|
|
|
|
/* 4 GB cacheable space on Deschutes 651h and later (including the 1632h
|
2025-04-02 16:55:57 -03:00
|
|
|
Overdrive) according to the Pentium II Processor Specification Update.
|
|
|
|
|
Covington 651h (no L2 cache) reports the same 512 MB value as Klamath. */
|
|
|
|
|
if (CPUID >= (!strncmp(cpu_f->internal_name, "celeron", 7) ? 0x660 : 0x651))
|
2025-04-02 16:27:10 -03:00
|
|
|
msr.bbl_cr_ctl3 |= 0x00300000;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2023-11-06 06:07:43 +01:00
|
|
|
|
|
|
|
|
case CPU_CYRIX3S:
|
2023-11-06 06:51:44 +01:00
|
|
|
msr.fcr = (1 << 7) | (1 << 8) | (1 << 9) | (1 << 12) | (1 << 16) | (1 << 18) | (1 << 19) |
|
2023-11-01 23:37:50 +05:00
|
|
|
(1 << 20) | (1 << 21);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
|
|
|
|
}
|
2020-01-16 20:49:58 +01:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
void
|
|
|
|
|
cpu_RDMSR(void)
|
|
|
|
|
{
|
2024-12-03 17:48:07 +01:00
|
|
|
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1))
|
2024-10-15 23:54:57 +02:00
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
else switch (cpu_s->cpu_type) {
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_IBM386SLC:
|
|
|
|
|
case CPU_IBM486SLC:
|
|
|
|
|
case CPU_IBM486BL:
|
|
|
|
|
EAX = EDX = 0;
|
|
|
|
|
switch (ECX) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Processor Operation Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1000:
|
|
|
|
|
EAX = msr.ibm_por & ((cpu_s->cpu_type > CPU_IBM386SLC) ? 0xffeff : 0xfeff);
|
|
|
|
|
break;
|
|
|
|
|
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Cache Region Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1001:
|
2024-02-04 21:39:07 +05:00
|
|
|
EAX = msr.ibm_crcr & 0xffffffff;
|
|
|
|
|
EDX = (msr.ibm_crcr >> 32) & 0x0000ffff;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
|
|
|
|
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Processor Operation Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1002:
|
|
|
|
|
if ((cpu_s->cpu_type > CPU_IBM386SLC) && cpu_s->multi)
|
|
|
|
|
EAX = msr.ibm_por2 & 0x3f000000;
|
|
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
|
|
|
|
|
/* Processor Control Register */
|
|
|
|
|
case 0x1004:
|
|
|
|
|
if (cpu_s->cpu_type > CPU_IBM486SLC)
|
|
|
|
|
EAX = msr.ibm_pcr & 0x00d6001a;
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_WINCHIP:
|
|
|
|
|
case CPU_WINCHIP2:
|
|
|
|
|
EAX = EDX = 0;
|
|
|
|
|
switch (ECX) {
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Pentium Processor Parity Reversal Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x02:
|
|
|
|
|
EAX = msr.tr1;
|
|
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Pentium Processor New Feature Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x0e:
|
|
|
|
|
EAX = msr.tr12;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
|
|
|
|
EAX = tsc & 0xffffffff;
|
|
|
|
|
EDX = tsc >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Performance Monitor - Control and Event Select */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11:
|
|
|
|
|
EAX = msr.cesr;
|
|
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Performance Monitor - Event Counter 0 */
|
|
|
|
|
case 0x12:
|
|
|
|
|
EAX = msr.pmc[0] & 0xffffffff;
|
|
|
|
|
EDX = msr.pmc[0] >> 32;
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 1 */
|
|
|
|
|
case 0x13:
|
|
|
|
|
EAX = msr.pmc[1] & 0xffffffff;
|
|
|
|
|
EDX = msr.pmc[1] >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x107:
|
|
|
|
|
EAX = msr.fcr;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register 2 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x108:
|
|
|
|
|
EAX = msr.fcr2 & 0xffffffff;
|
|
|
|
|
EDX = msr.fcr2 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register 4 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10a:
|
|
|
|
|
EAX = cpu_multi & 3;
|
|
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Memory Configuration Register Control */
|
|
|
|
|
case 0x120:
|
|
|
|
|
EAX = msr.mcr_ctrl;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x131:
|
|
|
|
|
case 0x142 ... 0x145:
|
|
|
|
|
case 0x147:
|
|
|
|
|
case 0x150:
|
|
|
|
|
case 0x151:
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_CYRIX3S:
|
|
|
|
|
EAX = EDX = 0;
|
|
|
|
|
switch (ECX) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Type */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x01:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
|
|
|
|
EAX = tsc & 0xffffffff;
|
|
|
|
|
EDX = tsc >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* EBL_CR_POWERON - Processor Hard Power-On Configuration */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x2a:
|
|
|
|
|
EAX = 0xc4000000;
|
|
|
|
|
EDX = 0;
|
|
|
|
|
if (cpu_dmulti == 3)
|
|
|
|
|
EAX |= ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 3.5)
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 4)
|
|
|
|
|
EAX |= ((0 << 25) | (0 << 24) | (1 << 23) | (0 << 22));
|
|
|
|
|
else if (cpu_dmulti == 4.5)
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (0 << 22));
|
|
|
|
|
else if (cpu_dmulti == 5)
|
|
|
|
|
EAX |= 0;
|
|
|
|
|
else if (cpu_dmulti == 5.5)
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (0 << 22));
|
|
|
|
|
else if (cpu_dmulti == 6)
|
|
|
|
|
EAX |= ((1 << 25) | (0 << 24) | (1 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 6.5)
|
|
|
|
|
EAX |= ((1 << 25) | (1 << 24) | (1 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 7)
|
|
|
|
|
EAX |= ((1 << 25) | (0 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
else
|
|
|
|
|
EAX |= ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
if (cpu_busspeed >= 84000000)
|
|
|
|
|
EAX |= (1 << 19);
|
|
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* PERFCTR0 - Performance Counter Register 0 - aliased to TSC */
|
|
|
|
|
case 0xc1:
|
|
|
|
|
EAX = tsc & 0xffffffff;
|
|
|
|
|
EDX = (tsc >> 32) & 0xff;
|
|
|
|
|
break;
|
|
|
|
|
/* PERFCTR1 - Performance Counter Register 1 */
|
|
|
|
|
case 0xc2:
|
2024-02-05 17:03:10 +05:00
|
|
|
EAX = msr.perfctr[1] & 0xffffffff;
|
|
|
|
|
EDX = msr.perfctr[1] >> 32;
|
2024-02-04 17:19:12 +05:00
|
|
|
break;
|
|
|
|
|
/* BBL_CR_CTL3 - L2 Cache Control Register 3 */
|
|
|
|
|
case 0x11e:
|
|
|
|
|
EAX = 0x800000; /* L2 cache disabled */
|
|
|
|
|
break;
|
|
|
|
|
/* EVNTSEL0 - Performance Counter Event Select 0 - hardcoded */
|
|
|
|
|
case 0x186:
|
|
|
|
|
EAX = 0x470079;
|
|
|
|
|
break;
|
|
|
|
|
/* EVNTSEL1 - Performance Counter Event Select 1 */
|
|
|
|
|
case 0x187:
|
2024-02-05 17:03:10 +05:00
|
|
|
EAX = msr.evntsel[1] & 0xffffffff;
|
|
|
|
|
EDX = msr.evntsel[1] >> 32;
|
2024-02-04 17:19:12 +05:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1107:
|
|
|
|
|
EAX = msr.fcr;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register 2 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1108:
|
|
|
|
|
EAX = msr.fcr2 & 0xffffffff;
|
|
|
|
|
EDX = msr.fcr2 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* ECX & 0: MTRRphysBase0 ... MTRRphysBase7
|
|
|
|
|
ECX & 1: MTRRphysMask0 ... MTRRphysMask7 */
|
|
|
|
|
case 0x200 ... 0x20f:
|
2022-09-20 01:00:45 -04:00
|
|
|
if (ECX & 1) {
|
|
|
|
|
EAX = msr.mtrr_physmask[(ECX - 0x200) >> 1] & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_physmask[(ECX - 0x200) >> 1] >> 32;
|
|
|
|
|
} else {
|
|
|
|
|
EAX = msr.mtrr_physbase[(ECX - 0x200) >> 1] & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_physbase[(ECX - 0x200) >> 1] >> 32;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix64K_00000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x250:
|
|
|
|
|
EAX = msr.mtrr_fix64k_8000 & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix64k_8000 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_80000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x258:
|
|
|
|
|
EAX = msr.mtrr_fix16k_8000 & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix16k_8000 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_A0000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x259:
|
|
|
|
|
EAX = msr.mtrr_fix16k_a000 & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix16k_a000 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix4K_C0000 ... MTRRfix4K_F8000 */
|
|
|
|
|
case 0x268 ... 0x26f:
|
2022-09-20 01:00:45 -04:00
|
|
|
EAX = msr.mtrr_fix4k[ECX - 0x268] & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix4k[ECX - 0x268] >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRdefType */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x2ff:
|
|
|
|
|
EAX = msr.mtrr_deftype & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_deftype >> 32;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2024-08-08 20:25:03 -04:00
|
|
|
#ifdef USE_AMD_K5
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K5:
|
|
|
|
|
case CPU_5K86:
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_AMD_K5 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K6:
|
|
|
|
|
case CPU_K6_2:
|
|
|
|
|
case CPU_K6_2C:
|
|
|
|
|
case CPU_K6_3:
|
|
|
|
|
case CPU_K6_2P:
|
|
|
|
|
case CPU_K6_3P:
|
2024-02-04 21:39:07 +05:00
|
|
|
EAX = 0;
|
|
|
|
|
/* EDX is left unchanged when reading this MSR! */
|
|
|
|
|
if (ECX != 0x82)
|
|
|
|
|
EDX = 0;
|
2022-09-20 01:00:45 -04:00
|
|
|
switch (ECX) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Address Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00000000:
|
2024-02-04 21:39:07 +05:00
|
|
|
EAX = msr.mcar & 0xffffffff;
|
|
|
|
|
EDX = msr.mcar >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Type Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00000001:
|
2024-02-04 21:39:07 +05:00
|
|
|
EAX = msr.mctr & 0xffffffff;
|
|
|
|
|
EDX = msr.mctr >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Test Register 12 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x0000000e:
|
|
|
|
|
EAX = msr.tr12;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00000010:
|
|
|
|
|
EAX = tsc & 0xffffffff;
|
|
|
|
|
EDX = tsc >> 32;
|
|
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Array Access Register */
|
|
|
|
|
case 0x00000082:
|
|
|
|
|
if (cpu_s->cpu_type > CPU_5K86)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
EAX = msr.amd_aar & 0xffffffff;
|
|
|
|
|
/* EDX is left unchanged! */
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Hardware Configuration Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00000083:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.amd_hwcr & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_hwcr >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Write Allocate Top-of-Memory and Control Register */
|
|
|
|
|
case 0x00000085:
|
|
|
|
|
if (cpu_s->cpu_type != CPU_5K86)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
EAX = msr.amd_watmcr & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_watmcr >> 32;
|
|
|
|
|
break;
|
|
|
|
|
/* Write Allocate Programmable Memory Range Register */
|
|
|
|
|
case 0x00000086:
|
|
|
|
|
if (cpu_s->cpu_type != CPU_5K86)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
EAX = msr.amd_wapmrr & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_wapmrr >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Extended Feature Enable Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000080:
|
|
|
|
|
EAX = msr.amd_efer & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_efer >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSCALL Target Address Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000081:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
|
2024-02-01 18:34:58 +05:00
|
|
|
EAX = msr.amd_star & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_star >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Write-Handling Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000082:
|
|
|
|
|
EAX = msr.amd_whcr & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_whcr >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* UC/WC Cacheability Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000085:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2C)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
|
|
|
|
|
EAX = msr.amd_uwccr & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_uwccr >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Enhanced Power Management Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000086:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2P)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
|
|
|
|
|
EAX = msr.amd_epmr & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_epmr >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Processor State Observability Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000087:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2C)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
|
|
|
|
|
EAX = msr.amd_psor & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_psor >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Page Flush/Invalidate Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000088:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2C)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
|
|
|
|
|
EAX = msr.amd_pfir & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_pfir >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Level-2 Cache Array Access Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000089:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_3)
|
|
|
|
|
goto amd_k_invalid_rdmsr;
|
|
|
|
|
|
|
|
|
|
EAX = msr.amd_l2aar & 0xffffffff;
|
|
|
|
|
EDX = msr.amd_l2aar >> 32;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
2021-04-10 07:18:47 +02:00
|
|
|
amd_k_invalid_rdmsr:
|
2022-09-20 01:00:45 -04:00
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_P24T:
|
|
|
|
|
case CPU_PENTIUM:
|
|
|
|
|
case CPU_PENTIUMMMX:
|
2024-01-26 22:06:05 +05:00
|
|
|
EAX = EDX = 0;
|
2024-02-03 21:39:40 +05:00
|
|
|
/* Filter out the upper 27 bits when ECX value is over 0x80000000, as per:
|
|
|
|
|
Ralf Brown, Pentium Model-Specific Registers and What They Reveal.
|
|
|
|
|
https://www.cs.cmu.edu/~ralf/papers/highmsr.html
|
|
|
|
|
But leave the bit 31 intact to be able to handle both low and high
|
|
|
|
|
MSRs in a single switch block. */
|
|
|
|
|
switch (ECX & (ECX > 0x7fffffff ? 0x8000001f : 0x7fffffff)) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Address */
|
2024-02-03 21:39:40 +05:00
|
|
|
case 0x00000000:
|
|
|
|
|
case 0x80000000:
|
|
|
|
|
EAX = msr.mcar & 0xffffffff;
|
|
|
|
|
EDX = msr.mcar >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Type */
|
2024-02-03 21:39:40 +05:00
|
|
|
case 0x00000001:
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
EAX = msr.mctr & 0xffffffff;
|
|
|
|
|
EDX = msr.mctr >> 32;
|
|
|
|
|
msr.mctr &= ~0x1; /* clear the machine check pending bit */
|
|
|
|
|
break;
|
|
|
|
|
/* TR1 - Parity Reversal Test Register */
|
|
|
|
|
case 0x00000002:
|
|
|
|
|
case 0x80000002:
|
|
|
|
|
EAX = msr.tr1;
|
|
|
|
|
break;
|
|
|
|
|
/* TR2 - Instruction Cache End Bit */
|
|
|
|
|
case 0x00000004:
|
|
|
|
|
case 0x80000004:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMMMX)
|
|
|
|
|
goto pentium_invalid_rdmsr;
|
|
|
|
|
EAX = msr.tr2;
|
|
|
|
|
break;
|
|
|
|
|
/* TR3 - Cache Test Data */
|
|
|
|
|
case 0x00000005:
|
|
|
|
|
case 0x80000005:
|
|
|
|
|
EAX = msr.tr3;
|
|
|
|
|
break;
|
|
|
|
|
/* TR4 - Cache Test Tag */
|
|
|
|
|
case 0x00000006:
|
|
|
|
|
case 0x80000006:
|
|
|
|
|
EAX = msr.tr4;
|
|
|
|
|
break;
|
|
|
|
|
/* TR5 - Cache Test Control */
|
|
|
|
|
case 0x00000007:
|
|
|
|
|
case 0x80000007:
|
|
|
|
|
EAX = msr.tr5;
|
|
|
|
|
break;
|
|
|
|
|
/* TR6 - TLB Test Command */
|
|
|
|
|
case 0x00000008:
|
|
|
|
|
case 0x80000008:
|
|
|
|
|
EAX = msr.tr6;
|
|
|
|
|
break;
|
|
|
|
|
/* TR7 - TLB Test Data */
|
|
|
|
|
case 0x00000009:
|
|
|
|
|
case 0x80000009:
|
|
|
|
|
EAX = msr.tr7;
|
|
|
|
|
break;
|
|
|
|
|
/* TR9 - Branch Target Buffer Tag */
|
|
|
|
|
case 0x0000000b:
|
|
|
|
|
case 0x8000000b:
|
|
|
|
|
EAX = msr.tr9;
|
|
|
|
|
break;
|
|
|
|
|
/* TR10 - Branch Target Buffer Target */
|
|
|
|
|
case 0x0000000c:
|
|
|
|
|
case 0x8000000c:
|
|
|
|
|
EAX = msr.tr10;
|
|
|
|
|
break;
|
|
|
|
|
/* TR11 - Branch Target Buffer Control */
|
|
|
|
|
case 0x0000000d:
|
|
|
|
|
case 0x8000000d:
|
|
|
|
|
EAX = msr.tr11;
|
|
|
|
|
break;
|
|
|
|
|
/* TR12 - New Feature Control */
|
|
|
|
|
case 0x0000000e:
|
|
|
|
|
case 0x8000000e:
|
|
|
|
|
EAX = msr.tr12;
|
2024-01-26 22:06:05 +05:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2024-02-03 21:39:40 +05:00
|
|
|
case 0x00000010:
|
|
|
|
|
case 0x80000010:
|
2024-01-26 22:06:05 +05:00
|
|
|
EAX = tsc & 0xffffffff;
|
|
|
|
|
EDX = tsc >> 32;
|
|
|
|
|
break;
|
2024-02-03 21:39:40 +05:00
|
|
|
/* Performance Monitor - Control and Event Select */
|
|
|
|
|
case 0x00000011:
|
|
|
|
|
case 0x80000011:
|
|
|
|
|
EAX = msr.cesr;
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 0 */
|
|
|
|
|
case 0x00000012:
|
|
|
|
|
case 0x80000012:
|
|
|
|
|
EAX = msr.pmc[0] & 0xffffffff;
|
|
|
|
|
EDX = msr.pmc[0] >> 32;
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 1 */
|
|
|
|
|
case 0x00000013:
|
|
|
|
|
case 0x80000013:
|
|
|
|
|
EAX = msr.pmc[1] & 0xffffffff;
|
|
|
|
|
EDX = msr.pmc[1] >> 32;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x00000014:
|
|
|
|
|
case 0x80000014:
|
|
|
|
|
if ((CPUID & 0xfff) <= 0x520)
|
|
|
|
|
goto pentium_invalid_rdmsr;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown, possibly paging-related; initial value is 0004h,
|
|
|
|
|
becomes 0008h once paging is enabled */
|
|
|
|
|
case 0x80000018:
|
|
|
|
|
EAX = ((cr0 & (1 << 31)) ? 0x00000008 : 0x00000004);
|
|
|
|
|
break;
|
|
|
|
|
/* Floating point - last prefetched opcode
|
|
|
|
|
bits 10-8: low three bits of first byte of FP instruction
|
|
|
|
|
bits 7-0: second byte of floating-point instruction */
|
|
|
|
|
case 0x80000019:
|
|
|
|
|
EAX = 0;
|
|
|
|
|
break;
|
|
|
|
|
/* Floating point - last executed non-control opcode */
|
|
|
|
|
case 0x8000001a:
|
|
|
|
|
EAX = 0;
|
|
|
|
|
break;
|
|
|
|
|
/* Floating point - last non-control exception opcode - part
|
|
|
|
|
of FSTENV/FSAVE'd environment */
|
|
|
|
|
case 0x8000001b:
|
|
|
|
|
EAX = msr.fp_last_xcpt;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x8000001c:
|
|
|
|
|
EAX = 0x00000004;
|
|
|
|
|
break;
|
|
|
|
|
/* Probe Mode Control */
|
|
|
|
|
case 0x8000001d:
|
|
|
|
|
EAX = msr.probe_ctl;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown, possibly scratchpad register */
|
|
|
|
|
case 0x8000001e:
|
|
|
|
|
EAX = msr.ecx8000001e;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown, possibly scratchpad register */
|
|
|
|
|
case 0x8000001f:
|
|
|
|
|
EAX = msr.ecx8000001f;
|
|
|
|
|
break;
|
|
|
|
|
/* Reserved/Unimplemented */
|
|
|
|
|
case 0x80000003:
|
|
|
|
|
case 0x8000000a:
|
|
|
|
|
case 0x8000000f:
|
|
|
|
|
case 0x80000015 ... 0x80000017:
|
|
|
|
|
EAX = (ECX & 0x1f) * 2;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
pentium_invalid_rdmsr:
|
|
|
|
|
cpu_log("RDMSR: Invalid MSR: %08X\n", ECX);
|
|
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
2024-01-26 22:06:05 +05:00
|
|
|
}
|
|
|
|
|
cpu_log("RDMSR: ECX = %08X, val = %08X%08X\n", ECX, EDX, EAX);
|
|
|
|
|
break;
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_Cx6x86:
|
|
|
|
|
case CPU_Cx6x86L:
|
|
|
|
|
case CPU_CxGX1:
|
|
|
|
|
case CPU_Cx6x86MX:
|
|
|
|
|
switch (ECX) {
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Test Data */
|
|
|
|
|
case 0x03:
|
|
|
|
|
EAX = msr.tr3;
|
|
|
|
|
break;
|
|
|
|
|
/* Test Address */
|
|
|
|
|
case 0x04:
|
|
|
|
|
EAX = msr.tr4;
|
|
|
|
|
break;
|
|
|
|
|
/* Test Command/Status */
|
|
|
|
|
case 0x05:
|
|
|
|
|
EAX = msr.tr5;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
|
|
|
|
EAX = tsc & 0xffffffff;
|
|
|
|
|
EDX = tsc >> 32;
|
|
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Performance Monitor - Control and Event Select */
|
|
|
|
|
case 0x11:
|
|
|
|
|
EAX = msr.cesr;
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 0 */
|
|
|
|
|
case 0x12:
|
|
|
|
|
EAX = msr.pmc[0] & 0xffffffff;
|
|
|
|
|
EDX = msr.pmc[0] >> 32;
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 1 */
|
|
|
|
|
case 0x13:
|
|
|
|
|
EAX = msr.pmc[1] & 0xffffffff;
|
|
|
|
|
EDX = msr.pmc[1] >> 32;
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
cpu_log("RDMSR: ECX = %08X, val = %08X%08X\n", ECX, EDX, EAX);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_PENTIUMPRO:
|
|
|
|
|
case CPU_PENTIUM2:
|
|
|
|
|
case CPU_PENTIUM2D:
|
|
|
|
|
EAX = EDX = 0;
|
2024-01-24 04:56:31 +01:00
|
|
|
/* Per RichardG's probing of a real Deschutes using my RDMSR tool,
|
|
|
|
|
we have discovered that the top 18 bits are filtered out. */
|
|
|
|
|
switch (ECX & 0x00003fff) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Type */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x01:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
|
|
|
|
EAX = tsc & 0xffffffff;
|
|
|
|
|
EDX = tsc >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* IA32_PLATFORM_ID - Platform ID */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x17:
|
2024-02-05 17:03:10 +05:00
|
|
|
if (cpu_s->cpu_type < CPU_PENTIUM2D)
|
2022-09-20 01:00:45 -04:00
|
|
|
goto i686_invalid_rdmsr;
|
|
|
|
|
|
|
|
|
|
if (cpu_f->package == CPU_PKG_SLOT2)
|
2024-02-05 17:03:10 +05:00
|
|
|
EDX |= (1 << 19);
|
2022-09-20 01:00:45 -04:00
|
|
|
else if (cpu_f->package == CPU_PKG_SOCKET370)
|
2024-02-05 17:03:10 +05:00
|
|
|
EDX |= (1 << 20);
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x18:
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* IA32_APIC_BASE - APIC Base Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1B:
|
|
|
|
|
EAX = msr.apic_base & 0xffffffff;
|
|
|
|
|
EDX = msr.apic_base >> 32;
|
|
|
|
|
cpu_log("APIC_BASE read : %08X%08X\n", EDX, EAX);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Unknown (undocumented?) MSR used by the Hyper-V BIOS */
|
2024-01-24 04:56:31 +01:00
|
|
|
case 0x20:
|
|
|
|
|
EAX = msr.ecx20 & 0xffffffff;
|
|
|
|
|
EDX = msr.ecx20 >> 32;
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x21:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMPRO)
|
|
|
|
|
goto i686_invalid_rdmsr;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* EBL_CR_POWERON - Processor Hard Power-On Configuration */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x2a:
|
|
|
|
|
EAX = 0xc4000000;
|
|
|
|
|
EDX = 0;
|
|
|
|
|
if (cpu_dmulti == 2.5)
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 3)
|
|
|
|
|
EAX |= ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 3.5)
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 4)
|
|
|
|
|
EAX |= ((0 << 25) | (0 << 24) | (1 << 23) | (0 << 22));
|
|
|
|
|
else if (cpu_dmulti == 4.5)
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (0 << 22));
|
|
|
|
|
else if (cpu_dmulti == 5)
|
|
|
|
|
EAX |= 0;
|
|
|
|
|
else if (cpu_dmulti == 5.5)
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (0 << 22));
|
|
|
|
|
else if (cpu_dmulti == 6)
|
|
|
|
|
EAX |= ((1 << 25) | (0 << 24) | (1 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 6.5)
|
|
|
|
|
EAX |= ((1 << 25) | (1 << 24) | (1 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 7)
|
|
|
|
|
EAX |= ((1 << 25) | (0 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 7.5)
|
|
|
|
|
EAX |= ((1 << 25) | (1 << 24) | (0 << 23) | (1 << 22));
|
|
|
|
|
else if (cpu_dmulti == 8)
|
|
|
|
|
EAX |= ((1 << 25) | (0 << 24) | (1 << 23) | (0 << 22));
|
|
|
|
|
else
|
|
|
|
|
EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (1 << 22));
|
|
|
|
|
if (cpu_s->cpu_type != CPU_PENTIUMPRO) {
|
|
|
|
|
if (cpu_busspeed >= 84000000)
|
|
|
|
|
EAX |= (1 << 19);
|
|
|
|
|
}
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x32:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMPRO)
|
|
|
|
|
goto i686_invalid_rdmsr;
|
|
|
|
|
break;
|
|
|
|
|
/* TEST_CTL - Test Control Register */
|
|
|
|
|
case 0x33:
|
|
|
|
|
EAX = msr.test_ctl;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x34:
|
|
|
|
|
case 0x3a:
|
|
|
|
|
case 0x3b:
|
|
|
|
|
case 0x50 ... 0x54:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BIOS_UPDT_TRIG - BIOS Update Trigger */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x79:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bios_updt & 0xffffffff;
|
|
|
|
|
EDX = msr.bios_updt >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_D0 ... BBL_CR_D3 - Chunk 0..3 Data Register
|
|
|
|
|
8Bh: BIOS_SIGN - BIOS Update Signature */
|
|
|
|
|
case 0x88 ... 0x8b:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bbl_cr_dx[ECX - 0x88] & 0xffffffff;
|
|
|
|
|
EDX = msr.bbl_cr_dx[ECX - 0x88] >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0xae:
|
|
|
|
|
break;
|
|
|
|
|
/* PERFCTR0 - Performance Counter Register 0 */
|
|
|
|
|
case 0xc1:
|
|
|
|
|
/* PERFCTR1 - Performance Counter Register 1 */
|
|
|
|
|
case 0xc2:
|
|
|
|
|
EAX = msr.perfctr[ECX - 0xC1] & 0xffffffff;
|
|
|
|
|
EDX = msr.perfctr[ECX - 0xC1] >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRcap */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xfe:
|
|
|
|
|
EAX = msr.mtrr_cap & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_cap >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_ADDR - L2 Cache Address Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x116:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bbl_cr_addr & 0xffffffff;
|
|
|
|
|
EDX = msr.bbl_cr_addr >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_DECC - L2 Cache Date ECC Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x118:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bbl_cr_decc & 0xffffffff;
|
|
|
|
|
EDX = msr.bbl_cr_decc >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_CTL - L2 Cache Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x119:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bbl_cr_ctl & 0xffffffff;
|
|
|
|
|
EDX = msr.bbl_cr_ctl >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_TRIG - L2 Cache Trigger Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11a:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bbl_cr_trig & 0xffffffff;
|
|
|
|
|
EDX = msr.bbl_cr_trig >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_BUSY - L2 Cache Busy Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11b:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bbl_cr_busy & 0xffffffff;
|
|
|
|
|
EDX = msr.bbl_cr_busy >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_CTL3 - L2 Cache Control Register 3 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11e:
|
2024-01-25 18:06:47 +05:00
|
|
|
EAX = msr.bbl_cr_ctl3 & 0xffffffff;
|
|
|
|
|
EDX = msr.bbl_cr_ctl3 >> 32;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x131:
|
|
|
|
|
case 0x14e ... 0x151:
|
|
|
|
|
case 0x154:
|
|
|
|
|
case 0x15b:
|
|
|
|
|
case 0x15f:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSENTER_CS - SYSENTER target CS */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x174:
|
|
|
|
|
EAX &= 0xffff0000;
|
|
|
|
|
EAX |= msr.sysenter_cs;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSENTER_ESP - SYSENTER target ESP */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x175:
|
|
|
|
|
EAX = msr.sysenter_esp;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSENTER_EIP - SYSENTER target EIP */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x176:
|
|
|
|
|
EAX = msr.sysenter_eip;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MCG_CAP - Machine Check Global Capability */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x179:
|
|
|
|
|
EAX = 0x00000105;
|
|
|
|
|
EDX = 0x00000000;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MCG_STATUS - Machine Check Global Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x17a:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MCG_CTL - Machine Check Global Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x17b:
|
|
|
|
|
EAX = msr.mcg_ctl & 0xffffffff;
|
|
|
|
|
EDX = msr.mcg_ctl >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* EVNTSEL0 - Performance Counter Event Select 0 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x186:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* EVNTSEL1 - Performance Counter Event Select 1 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x187:
|
2024-02-05 17:03:10 +05:00
|
|
|
EAX = msr.evntsel[ECX - 0x186] & 0xffffffff;
|
|
|
|
|
EDX = msr.evntsel[ECX - 0x186] >> 32;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x1d3:
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* DEBUGCTLMSR - Debugging Control Register */
|
2023-08-07 03:29:10 +02:00
|
|
|
case 0x1d9:
|
2024-02-05 17:03:10 +05:00
|
|
|
EAX = msr.debug_ctl;
|
|
|
|
|
break;
|
|
|
|
|
/* LASTBRANCHFROMIP - address from which a branch was last taken */
|
|
|
|
|
case 0x1db:
|
|
|
|
|
/* LASTBRANCHTOIP - destination address of the last taken branch instruction */
|
|
|
|
|
case 0x1dc:
|
|
|
|
|
/* LASTINTFROMIP - address at which an interrupt last occurred */
|
|
|
|
|
case 0x1dd:
|
|
|
|
|
/* LASTINTTOIP - address to which the last interrupt caused a branch */
|
|
|
|
|
case 0x1de:
|
2023-08-07 03:29:10 +02:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* ROB_CR_BKUPTMPDR6 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1e0:
|
2024-02-05 17:03:10 +05:00
|
|
|
EAX = msr.rob_cr_bkuptmpdr6;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* ECX & 0: MTRRphysBase0 ... MTRRphysBase7
|
|
|
|
|
ECX & 1: MTRRphysMask0 ... MTRRphysMask7 */
|
|
|
|
|
case 0x200 ... 0x20f:
|
2022-09-20 01:00:45 -04:00
|
|
|
if (ECX & 1) {
|
|
|
|
|
EAX = msr.mtrr_physmask[(ECX - 0x200) >> 1] & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_physmask[(ECX - 0x200) >> 1] >> 32;
|
|
|
|
|
} else {
|
|
|
|
|
EAX = msr.mtrr_physbase[(ECX - 0x200) >> 1] & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_physbase[(ECX - 0x200) >> 1] >> 32;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix64K_00000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x250:
|
|
|
|
|
EAX = msr.mtrr_fix64k_8000 & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix64k_8000 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_80000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x258:
|
|
|
|
|
EAX = msr.mtrr_fix16k_8000 & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix16k_8000 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_A0000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x259:
|
|
|
|
|
EAX = msr.mtrr_fix16k_a000 & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix16k_a000 >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix4K_C0000 ... MTRRfix4K_F8000 */
|
|
|
|
|
case 0x268 ... 0x26f:
|
2022-09-20 01:00:45 -04:00
|
|
|
EAX = msr.mtrr_fix4k[ECX - 0x268] & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_fix4k[ECX - 0x268] >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Page Attribute Table */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x277:
|
2024-02-05 17:03:10 +05:00
|
|
|
if (cpu_s->cpu_type < CPU_PENTIUM2D)
|
|
|
|
|
goto i686_invalid_rdmsr;
|
2022-09-20 01:00:45 -04:00
|
|
|
EAX = msr.pat & 0xffffffff;
|
|
|
|
|
EDX = msr.pat >> 32;
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x280:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMPRO)
|
|
|
|
|
goto i686_invalid_rdmsr;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRdefType */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x2ff:
|
|
|
|
|
EAX = msr.mtrr_deftype & 0xffffffff;
|
|
|
|
|
EDX = msr.mtrr_deftype >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC0_CTL - Machine Check 0 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x400:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC1_CTL - Machine Check 1 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x404:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC2_CTL - Machine Check 2 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x408:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC4_CTL - Machine Check 4 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x40c:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC3_CTL - Machine Check 3 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x410:
|
|
|
|
|
EAX = msr.mca_ctl[(ECX - 0x400) >> 2] & 0xffffffff;
|
|
|
|
|
EDX = msr.mca_ctl[(ECX - 0x400) >> 2] >> 32;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC0_STATUS - Machine Check 0 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x401:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC0_ADDR - Machine Check 0 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x402:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC1_STATUS - Machine Check 1 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x405:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC1_ADDR - Machine Check 1 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x406:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC2_STATUS - Machine Check 2 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x409:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC2_ADDR - Machine Check 2 Address */
|
|
|
|
|
case 0x40a:
|
|
|
|
|
/* MC4_STATUS - Machine Check 4 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x40d:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC4_ADDR - Machine Check 4 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x40e:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC3_STATUS - Machine Check 3 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x411:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC3_ADDR - Machine Check 3 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x412:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Unknown */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x570:
|
|
|
|
|
EAX = msr.ecx570 & 0xffffffff;
|
|
|
|
|
EDX = msr.ecx570 >> 32;
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown, possibly debug registers? */
|
|
|
|
|
case 0x1000 ... 0x1007:
|
|
|
|
|
/* Unknown, possibly control registers? */
|
|
|
|
|
case 0x2000:
|
|
|
|
|
case 0x2002 ... 0x2004:
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
default:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
i686_invalid_rdmsr:
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_log("RDMSR: Invalid MSR: %08X\n", ECX);
|
|
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
2020-04-18 18:03:02 +02:00
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_log("RDMSR %08X %08X%08X\n", ECX, EDX, EAX);
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
void
|
|
|
|
|
cpu_WRMSR(void)
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
uint64_t temp;
|
|
|
|
|
|
|
|
|
|
cpu_log("WRMSR %08X %08X%08X\n", ECX, EDX, EAX);
|
|
|
|
|
|
2024-12-03 17:48:07 +01:00
|
|
|
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1))
|
2024-10-15 23:54:57 +02:00
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
else switch (cpu_s->cpu_type) {
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_IBM386SLC:
|
|
|
|
|
case CPU_IBM486SLC:
|
2024-02-04 21:39:07 +05:00
|
|
|
case CPU_IBM486BL:
|
2022-09-20 01:00:45 -04:00
|
|
|
switch (ECX) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Processor Operation Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1000:
|
|
|
|
|
msr.ibm_por = EAX & ((cpu_s->cpu_type > CPU_IBM386SLC) ? 0xffeff : 0xfeff);
|
|
|
|
|
cpu_cache_int_enabled = (EAX & (1 << 7));
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Cache Region Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1001:
|
2024-02-04 21:39:07 +05:00
|
|
|
msr.ibm_crcr = EAX | ((uint64_t) (EDX & 0x0000ffff) << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Processor Operation Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1002:
|
|
|
|
|
if ((cpu_s->cpu_type > CPU_IBM386SLC) && cpu_s->multi)
|
|
|
|
|
msr.ibm_por2 = EAX & 0x3f000000;
|
|
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Processor Control Register */
|
|
|
|
|
case 0x1004:
|
|
|
|
|
if (cpu_s->cpu_type > CPU_IBM486SLC)
|
|
|
|
|
msr.ibm_pcr = EAX & 0x00d6001a;
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_WINCHIP:
|
|
|
|
|
case CPU_WINCHIP2:
|
|
|
|
|
switch (ECX) {
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Pentium Processor Parity Reversal Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x02:
|
|
|
|
|
msr.tr1 = EAX & 2;
|
|
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Pentium Processor New Feature Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x0e:
|
2024-02-04 17:19:12 +05:00
|
|
|
msr.tr12 = EAX & 0x248;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
2024-06-18 20:05:44 +06:00
|
|
|
timer_set_new_tsc(EAX | ((uint64_t) EDX << 32));
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Performance Monitor - Control and Event Select */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11:
|
|
|
|
|
msr.cesr = EAX & 0xff00ff;
|
|
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Performance Monitor - Event Counter 0 */
|
|
|
|
|
case 0x12:
|
|
|
|
|
msr.pmc[0] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 1 */
|
|
|
|
|
case 0x13:
|
|
|
|
|
msr.pmc[1] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x107:
|
|
|
|
|
msr.fcr = EAX;
|
|
|
|
|
if (EAX & (1 << 9))
|
|
|
|
|
cpu_features |= CPU_FEATURE_MMX;
|
|
|
|
|
else
|
|
|
|
|
cpu_features &= ~CPU_FEATURE_MMX;
|
|
|
|
|
if (EAX & (1 << 1))
|
|
|
|
|
cpu_features |= CPU_FEATURE_CX8;
|
|
|
|
|
else
|
|
|
|
|
cpu_features &= ~CPU_FEATURE_CX8;
|
|
|
|
|
if ((EAX & (1 << 20)) && cpu_s->cpu_type >= CPU_WINCHIP2)
|
|
|
|
|
cpu_features |= CPU_FEATURE_3DNOW;
|
|
|
|
|
else
|
|
|
|
|
cpu_features &= ~CPU_FEATURE_3DNOW;
|
|
|
|
|
if (EAX & (1 << 29))
|
|
|
|
|
CPUID = 0;
|
|
|
|
|
else
|
|
|
|
|
CPUID = cpu_s->cpuid_model;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register 2 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x108:
|
|
|
|
|
msr.fcr2 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register 3 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x109:
|
|
|
|
|
msr.fcr3 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* Memory Configuration Register 0..7 */
|
|
|
|
|
case 0x110 ... 0x117:
|
|
|
|
|
temp = ECX - 0x110;
|
|
|
|
|
if (cpu_s->cpu_type == CPU_WINCHIP2) {
|
|
|
|
|
if (EAX & 0x1f)
|
|
|
|
|
msr.mcr_ctrl |= (1 << (temp + 9));
|
|
|
|
|
else
|
|
|
|
|
msr.mcr_ctrl &= ~(1 << (temp + 9));
|
|
|
|
|
}
|
|
|
|
|
msr.mcr[temp] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
/* Memory Configuration Register Control */
|
|
|
|
|
case 0x120:
|
|
|
|
|
msr.mcr_ctrl = EAX & ((cpu_s->cpu_type == CPU_WINCHIP2) ? 0x1df : 0x1f);
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x131:
|
|
|
|
|
case 0x142 ... 0x145:
|
|
|
|
|
case 0x147:
|
|
|
|
|
case 0x150:
|
|
|
|
|
case 0x151:
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_CYRIX3S:
|
|
|
|
|
switch (ECX) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Type */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x01:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
2024-06-18 20:05:44 +06:00
|
|
|
timer_set_new_tsc(EAX | ((uint64_t) EDX << 32));
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-04 17:19:12 +05:00
|
|
|
/* PERFCTR0 - Performance Counter Register 0 - aliased to TSC */
|
|
|
|
|
case 0xc1:
|
|
|
|
|
break;
|
|
|
|
|
/* PERFCTR0 - Performance Counter Register 1 */
|
|
|
|
|
case 0xc2:
|
2024-02-05 17:03:10 +05:00
|
|
|
msr.perfctr[1] = EAX | ((uint64_t) EDX << 32);
|
2024-02-04 17:19:12 +05:00
|
|
|
break;
|
|
|
|
|
/* BBL_CR_CTL3 - L2 Cache Control Register 3 */
|
|
|
|
|
case 0x11e:
|
|
|
|
|
/* EVNTSEL0 - Performance Counter Event Select 0 - hardcoded */
|
|
|
|
|
case 0x186:
|
|
|
|
|
break;
|
|
|
|
|
/* EVNTSEL1 - Performance Counter Event Select 1 */
|
|
|
|
|
case 0x187:
|
2024-02-05 17:03:10 +05:00
|
|
|
msr.evntsel[1] = EAX | ((uint64_t) EDX << 32);
|
2024-02-04 17:19:12 +05:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1107:
|
|
|
|
|
msr.fcr = EAX;
|
|
|
|
|
if (EAX & (1 << 1))
|
|
|
|
|
cpu_features |= CPU_FEATURE_CX8;
|
|
|
|
|
else
|
|
|
|
|
cpu_features &= ~CPU_FEATURE_CX8;
|
2023-11-01 23:37:50 +05:00
|
|
|
if (EAX & (1 << 7))
|
|
|
|
|
cpu_CR4_mask |= CR4_PGE;
|
|
|
|
|
else
|
|
|
|
|
cpu_CR4_mask &= ~CR4_PGE;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register 2 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1108:
|
|
|
|
|
msr.fcr2 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Feature Control Register 3 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1109:
|
|
|
|
|
msr.fcr3 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* ECX & 0: MTRRphysBase0 ... MTRRphysBase7
|
|
|
|
|
ECX & 1: MTRRphysMask0 ... MTRRphysMask7 */
|
|
|
|
|
case 0x200 ... 0x20f:
|
2022-09-20 01:00:45 -04:00
|
|
|
if (ECX & 1)
|
|
|
|
|
msr.mtrr_physmask[(ECX - 0x200) >> 1] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
else
|
|
|
|
|
msr.mtrr_physbase[(ECX - 0x200) >> 1] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix64K_00000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x250:
|
|
|
|
|
msr.mtrr_fix64k_8000 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_80000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x258:
|
|
|
|
|
msr.mtrr_fix16k_8000 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_A0000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x259:
|
|
|
|
|
msr.mtrr_fix16k_a000 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix4K_C0000 ... MTRRfix4K_F8000 */
|
|
|
|
|
case 0x268 ... 0x26f:
|
2022-09-20 01:00:45 -04:00
|
|
|
msr.mtrr_fix4k[ECX - 0x268] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRdefType */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x2ff:
|
|
|
|
|
msr.mtrr_deftype = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2024-08-08 20:25:03 -04:00
|
|
|
#ifdef USE_AMD_K5
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K5:
|
|
|
|
|
case CPU_5K86:
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_AMD_K5 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_K6:
|
|
|
|
|
case CPU_K6_2:
|
|
|
|
|
case CPU_K6_2C:
|
|
|
|
|
case CPU_K6_3:
|
|
|
|
|
case CPU_K6_2P:
|
|
|
|
|
case CPU_K6_3P:
|
|
|
|
|
switch (ECX) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Address Register */
|
2024-02-04 21:39:07 +05:00
|
|
|
case 0x00000000:
|
|
|
|
|
if (cpu_s->cpu_type > CPU_5K86)
|
|
|
|
|
msr.mcar = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Type Register */
|
2024-02-04 21:39:07 +05:00
|
|
|
case 0x00000001:
|
|
|
|
|
if (cpu_s->cpu_type > CPU_5K86)
|
|
|
|
|
msr.mctr = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Test Register 12 */
|
2024-02-04 21:39:07 +05:00
|
|
|
case 0x0000000e:
|
|
|
|
|
msr.tr12 = EAX & 0x8;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2024-02-04 21:39:07 +05:00
|
|
|
case 0x00000010:
|
2024-06-18 20:05:44 +06:00
|
|
|
timer_set_new_tsc(EAX | ((uint64_t) EDX << 32));
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Array Access Register */
|
|
|
|
|
case 0x00000082:
|
|
|
|
|
if (cpu_s->cpu_type > CPU_5K86)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
msr.amd_aar = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Hardware Configuration Register */
|
2024-02-04 21:39:07 +05:00
|
|
|
case 0x00000083:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.amd_hwcr = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Write Allocate Top-of-Memory and Control Register */
|
|
|
|
|
case 0x00000085:
|
|
|
|
|
if (cpu_s->cpu_type != CPU_5K86)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
msr.amd_watmcr = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
/* Write Allocate Programmable Memory Range Register */
|
|
|
|
|
case 0x00000086:
|
|
|
|
|
if (cpu_s->cpu_type != CPU_5K86)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
msr.amd_wapmrr = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Extended Feature Enable Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000080:
|
|
|
|
|
temp = EAX | ((uint64_t) EDX << 32);
|
2024-10-01 09:56:40 +02:00
|
|
|
if (temp & ~0x1fULL)
|
2022-09-20 01:00:45 -04:00
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
else
|
|
|
|
|
msr.amd_efer = temp;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSCALL Target Address Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000081:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
|
2024-02-01 18:34:58 +05:00
|
|
|
msr.amd_star = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Write-Handling Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000082:
|
|
|
|
|
msr.amd_whcr = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* UC/WC Cacheability Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000085:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2C)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
|
|
|
|
|
msr.amd_uwccr = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Enhanced Power Management Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000086:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2P)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
|
|
|
|
|
msr.amd_epmr = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Processor State Observability Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000087:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2C)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
|
|
|
|
|
msr.amd_psor = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Page Flush/Invalidate Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000088:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_2C)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
|
|
|
|
|
msr.amd_pfir = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Level-2 Cache Array Access Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xc0000089:
|
|
|
|
|
if (cpu_s->cpu_type < CPU_K6_3)
|
|
|
|
|
goto amd_k_invalid_wrmsr;
|
|
|
|
|
|
|
|
|
|
msr.amd_l2aar = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
2021-04-10 07:18:47 +02:00
|
|
|
amd_k_invalid_wrmsr:
|
2022-09-20 01:00:45 -04:00
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_P24T:
|
|
|
|
|
case CPU_PENTIUM:
|
|
|
|
|
case CPU_PENTIUMMMX:
|
2024-01-26 22:06:05 +05:00
|
|
|
cpu_log("WRMSR: ECX = %08X, val = %08X%08X\n", ECX, EDX, EAX);
|
2024-02-03 21:39:40 +05:00
|
|
|
/* Filter out the upper 27 bits when ECX value is over 0x80000000, as per:
|
|
|
|
|
Ralf Brown, Pentium Model-Specific Registers and What They Reveal.
|
|
|
|
|
https://www.cs.cmu.edu/~ralf/papers/highmsr.html
|
|
|
|
|
But leave the bit 31 intact to be able to handle both low and high
|
|
|
|
|
MSRs in a single switch block. */
|
|
|
|
|
switch (ECX & (ECX > 0x7fffffff ? 0x8000001f : 0x7fffffff)) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Address */
|
2024-02-03 21:39:40 +05:00
|
|
|
case 0x00000000:
|
|
|
|
|
case 0x80000000:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Type */
|
2024-02-03 21:39:40 +05:00
|
|
|
case 0x00000001:
|
|
|
|
|
case 0x80000001:
|
|
|
|
|
break;
|
|
|
|
|
/* TR1 - Parity Reversal Test Register */
|
|
|
|
|
case 0x00000002:
|
|
|
|
|
case 0x80000002:
|
|
|
|
|
msr.tr1 = EAX & 0x3fff;
|
|
|
|
|
break;
|
|
|
|
|
/* TR2 - Instruction Cache End Bit */
|
|
|
|
|
case 0x00000004:
|
|
|
|
|
case 0x80000004:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMMMX)
|
|
|
|
|
goto pentium_invalid_wrmsr;
|
|
|
|
|
msr.tr2 = EAX & 0xf;
|
|
|
|
|
break;
|
|
|
|
|
/* TR3 - Cache Test Data */
|
|
|
|
|
case 0x00000005:
|
|
|
|
|
case 0x80000005:
|
|
|
|
|
msr.tr3 = EAX;
|
|
|
|
|
break;
|
|
|
|
|
/* TR4 - Cache Test Tag */
|
|
|
|
|
case 0x00000006:
|
|
|
|
|
case 0x80000006:
|
|
|
|
|
msr.tr4 = EAX & ((cpu_s->cpu_type == CPU_PENTIUMMMX) ? 0xffffff1f : 0xffffff07);
|
|
|
|
|
break;
|
|
|
|
|
/* TR5 - Cache Test Control */
|
|
|
|
|
case 0x00000007:
|
|
|
|
|
case 0x80000007:
|
|
|
|
|
msr.tr5 = EAX & ((cpu_s->cpu_type == CPU_PENTIUMMMX) ? 0x87fff : 0x7fff);
|
|
|
|
|
break;
|
|
|
|
|
/* TR6 - TLB Test Command */
|
|
|
|
|
case 0x00000008:
|
|
|
|
|
case 0x80000008:
|
|
|
|
|
msr.tr6 = EAX & 0xffffff07;
|
|
|
|
|
break;
|
|
|
|
|
/* TR7 - TLB Test Data */
|
|
|
|
|
case 0x00000009:
|
|
|
|
|
case 0x80000009:
|
|
|
|
|
msr.tr7 = EAX & ((cpu_s->cpu_type == CPU_PENTIUMMMX) ? 0xfffffc7f : 0xffffff9c);
|
|
|
|
|
break;
|
|
|
|
|
/* TR9 - Branch Target Buffer Tag */
|
|
|
|
|
case 0x0000000b:
|
|
|
|
|
case 0x8000000b:
|
|
|
|
|
msr.tr9 = EAX & ((cpu_s->cpu_type == CPU_PENTIUMMMX) ? 0xffffffff : 0xffffffc3);
|
|
|
|
|
break;
|
|
|
|
|
/* TR10 - Branch Target Buffer Target */
|
|
|
|
|
case 0x0000000c:
|
|
|
|
|
case 0x8000000c:
|
|
|
|
|
msr.tr10 = EAX;
|
|
|
|
|
break;
|
|
|
|
|
/* TR11 - Branch Target Buffer Control */
|
|
|
|
|
case 0x0000000d:
|
|
|
|
|
case 0x8000000d:
|
|
|
|
|
msr.tr11 = EAX & ((cpu_s->cpu_type >= CPU_PENTIUMMMX) ? 0x3001fcf : 0xfcf);
|
|
|
|
|
break;
|
|
|
|
|
/* TR12 - New Feature Control */
|
|
|
|
|
case 0x0000000e:
|
|
|
|
|
case 0x8000000e:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMMMX)
|
|
|
|
|
temp = EAX & 0x38034f;
|
|
|
|
|
else if ((CPUID & 0xfff) >= 0x52b)
|
|
|
|
|
temp = EAX & 0x20435f;
|
|
|
|
|
else if ((CPUID & 0xfff) >= 0x520)
|
|
|
|
|
temp = EAX & 0x20035f;
|
|
|
|
|
else
|
|
|
|
|
temp = EAX & 0x20030f;
|
|
|
|
|
msr.tr12 = temp;
|
2024-01-26 22:06:05 +05:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2024-02-03 21:39:40 +05:00
|
|
|
case 0x00000010:
|
|
|
|
|
case 0x80000010:
|
2024-06-18 20:05:44 +06:00
|
|
|
timer_set_new_tsc(EAX | ((uint64_t) EDX << 32));
|
2024-01-26 22:06:05 +05:00
|
|
|
break;
|
2024-02-03 21:39:40 +05:00
|
|
|
/* Performance Monitor - Control and Event Select */
|
|
|
|
|
case 0x00000011:
|
|
|
|
|
case 0x80000011:
|
|
|
|
|
msr.cesr = EAX & 0x3ff03ff;
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 0 */
|
|
|
|
|
case 0x00000012:
|
|
|
|
|
case 0x80000012:
|
|
|
|
|
msr.pmc[0] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 1 */
|
|
|
|
|
case 0x00000013:
|
|
|
|
|
case 0x80000013:
|
|
|
|
|
msr.pmc[1] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x00000014:
|
|
|
|
|
case 0x80000014:
|
|
|
|
|
if ((CPUID & 0xfff) <= 0x520)
|
|
|
|
|
goto pentium_invalid_wrmsr;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown, possibly paging-related; initial value is 0004h,
|
|
|
|
|
becomes 0008h once paging is enabled */
|
|
|
|
|
case 0x80000018:
|
|
|
|
|
/* Floating point - last prefetched opcode
|
|
|
|
|
bits 10-8: low three bits of first byte of FP instruction
|
|
|
|
|
bits 7-0: second byte of floating-point instruction */
|
|
|
|
|
case 0x80000019:
|
|
|
|
|
/* Floating point - last executed non-control opcode */
|
|
|
|
|
case 0x8000001a:
|
|
|
|
|
break;
|
|
|
|
|
/* Floating point - last non-control exception opcode - part
|
|
|
|
|
of FSTENV/FSAVE'd environment */
|
|
|
|
|
case 0x8000001b:
|
|
|
|
|
EAX = msr.fp_last_xcpt & 0x7ff;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x8000001c:
|
|
|
|
|
break;
|
|
|
|
|
/* Probe Mode Control */
|
|
|
|
|
case 0x8000001d:
|
|
|
|
|
EAX = msr.probe_ctl & 0x7;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown, possibly scratchpad register */
|
|
|
|
|
case 0x8000001e:
|
|
|
|
|
msr.ecx8000001e = EAX;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown, possibly scratchpad register */
|
|
|
|
|
case 0x8000001f:
|
|
|
|
|
msr.ecx8000001f = EAX;
|
|
|
|
|
break;
|
|
|
|
|
/* Reserved/Unimplemented */
|
|
|
|
|
case 0x80000003:
|
|
|
|
|
case 0x8000000a:
|
|
|
|
|
case 0x8000000f:
|
|
|
|
|
case 0x80000015 ... 0x80000017:
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
pentium_invalid_wrmsr:
|
|
|
|
|
cpu_log("WRMSR: Invalid MSR: %08X\n", ECX);
|
|
|
|
|
x86gpf(NULL, 0);
|
2024-01-26 22:06:05 +05:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
2022-09-20 01:00:45 -04:00
|
|
|
case CPU_Cx6x86:
|
|
|
|
|
case CPU_Cx6x86L:
|
|
|
|
|
case CPU_CxGX1:
|
|
|
|
|
case CPU_Cx6x86MX:
|
|
|
|
|
cpu_log("WRMSR: ECX = %08X, val = %08X%08X\n", ECX, EDX, EAX);
|
|
|
|
|
switch (ECX) {
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Test Data */
|
|
|
|
|
case 0x03:
|
|
|
|
|
msr.tr3 = EAX;
|
2025-03-14 15:34:37 +01:00
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Test Address */
|
|
|
|
|
case 0x04:
|
|
|
|
|
msr.tr4 = EAX;
|
2025-03-14 15:34:37 +01:00
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Test Command/Status */
|
|
|
|
|
case 0x05:
|
|
|
|
|
msr.tr5 = EAX & 0x008f0f3b;
|
2025-03-14 15:34:37 +01:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
2024-06-18 20:05:44 +06:00
|
|
|
timer_set_new_tsc(EAX | ((uint64_t) EDX << 32));
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-04 21:39:07 +05:00
|
|
|
/* Performance Monitor - Control and Event Select */
|
|
|
|
|
case 0x11:
|
|
|
|
|
msr.cesr = EAX & 0x7ff07ff;
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 0 */
|
|
|
|
|
case 0x12:
|
|
|
|
|
msr.pmc[0] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
/* Performance Monitor - Event Counter 1 */
|
|
|
|
|
case 0x13:
|
|
|
|
|
msr.pmc[1] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CPU_PENTIUMPRO:
|
|
|
|
|
case CPU_PENTIUM2:
|
|
|
|
|
case CPU_PENTIUM2D:
|
2024-01-24 04:56:31 +01:00
|
|
|
/* Per RichardG's probing of a real Deschutes using my RDMSR tool,
|
|
|
|
|
we have discovered that the top 18 bits are filtered out. */
|
|
|
|
|
switch (ECX & 0x00003fff) {
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x00:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Machine Check Exception Type */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x01:
|
|
|
|
|
if (EAX || EDX)
|
|
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Time Stamp Counter */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x10:
|
2024-06-18 20:05:44 +06:00
|
|
|
timer_set_new_tsc(EAX | ((uint64_t) EDX << 32));
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x18:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* IA32_APIC_BASE - APIC Base Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1b:
|
|
|
|
|
cpu_log("APIC_BASE write: %08X%08X\n", EDX, EAX);
|
2023-08-10 15:43:16 -04:00
|
|
|
#if 0
|
|
|
|
|
msr.apic_base = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
#endif
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Unknown (undocumented?) MSR used by the Hyper-V BIOS */
|
2024-01-24 04:56:31 +01:00
|
|
|
case 0x20:
|
|
|
|
|
msr.ecx20 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x21:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMPRO)
|
|
|
|
|
goto i686_invalid_wrmsr;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* EBL_CR_POWERON - Processor Hard Power-On Configuration */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x2a:
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x32:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMPRO)
|
|
|
|
|
goto i686_invalid_wrmsr;
|
|
|
|
|
break;
|
|
|
|
|
/* TEST_CTL - Test Control Register */
|
|
|
|
|
case 0x33:
|
|
|
|
|
msr.test_ctl = EAX;
|
|
|
|
|
break;
|
|
|
|
|
/* Unknown */
|
|
|
|
|
case 0x34:
|
|
|
|
|
case 0x3a:
|
|
|
|
|
case 0x3b:
|
|
|
|
|
case 0x50 ... 0x54:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BIOS_UPDT_TRIG - BIOS Update Trigger */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x79:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.bios_updt = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_D0 ... BBL_CR_D3 - Chunk 0..3 Data Register
|
|
|
|
|
8Bh: BIOS_SIGN - BIOS Update Signature */
|
|
|
|
|
case 0x88 ... 0x8b:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.bbl_cr_dx[ECX - 0x88] = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0xae:
|
|
|
|
|
break;
|
|
|
|
|
/* PERFCTR0 - Performance Counter Register 0 */
|
|
|
|
|
case 0xc1:
|
|
|
|
|
/* PERFCTR1 - Performance Counter Register 1 */
|
|
|
|
|
case 0xc2:
|
|
|
|
|
msr.perfctr[ECX - 0xC1] = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRcap */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0xfe:
|
|
|
|
|
msr.mtrr_cap = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_ADDR - L2 Cache Address Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x116:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.bbl_cr_addr = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_DECC - L2 Cache Date ECC Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x118:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.bbl_cr_decc = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_CTL - L2 Cache Control Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x119:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.bbl_cr_ctl = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_TRIG - L2 Cache Trigger Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11a:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.bbl_cr_trig = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_BUSY - L2 Cache Busy Register */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11b:
|
2024-01-25 18:06:47 +05:00
|
|
|
msr.bbl_cr_busy = EAX | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* BBL_CR_CTL3 - L2 Cache Control Register 3 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x11e:
|
2025-04-02 16:27:10 -03:00
|
|
|
msr.bbl_cr_ctl3 = (msr.bbl_cr_ctl3 & 0x02f00000) | (EAX & ~0x02f00000) | ((uint64_t) EDX << 32);
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x131:
|
|
|
|
|
case 0x14e ... 0x151:
|
|
|
|
|
case 0x154:
|
|
|
|
|
case 0x15b:
|
|
|
|
|
case 0x15f:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSENTER_CS - SYSENTER target CS */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x174:
|
|
|
|
|
msr.sysenter_cs = EAX & 0xFFFF;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSENTER_ESP - SYSENTER target ESP */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x175:
|
|
|
|
|
msr.sysenter_esp = EAX;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* SYSENTER_EIP - SYSENTER target EIP */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x176:
|
|
|
|
|
msr.sysenter_eip = EAX;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MCG_CAP - Machine Check Global Capability */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x179:
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MCG_STATUS - Machine Check Global Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x17a:
|
|
|
|
|
if (EAX || EDX)
|
|
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MCG_CTL - Machine Check Global Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x17b:
|
|
|
|
|
msr.mcg_ctl = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* EVNTSEL0 - Performance Counter Event Select 0 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x186:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* EVNTSEL1 - Performance Counter Event Select 1 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x187:
|
2024-02-05 17:03:10 +05:00
|
|
|
msr.evntsel[ECX - 0x186] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
|
|
|
|
case 0x1d3:
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* DEBUGCTLMSR - Debugging Control Register */
|
2023-08-07 03:29:10 +02:00
|
|
|
case 0x1d9:
|
2024-02-05 17:03:10 +05:00
|
|
|
msr.debug_ctl = EAX;
|
2023-08-07 03:29:10 +02:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* ROB_CR_BKUPTMPDR6 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x1e0:
|
2024-02-05 17:03:10 +05:00
|
|
|
msr.rob_cr_bkuptmpdr6 = EAX;
|
2022-09-20 01:00:45 -04:00
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* ECX & 0: MTRRphysBase0 ... MTRRphysBase7
|
|
|
|
|
ECX & 1: MTRRphysMask0 ... MTRRphysMask7 */
|
|
|
|
|
case 0x200 ... 0x20f:
|
2022-09-20 01:00:45 -04:00
|
|
|
if (ECX & 1)
|
|
|
|
|
msr.mtrr_physmask[(ECX - 0x200) >> 1] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
else
|
|
|
|
|
msr.mtrr_physbase[(ECX - 0x200) >> 1] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix64K_00000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x250:
|
|
|
|
|
msr.mtrr_fix64k_8000 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_80000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x258:
|
|
|
|
|
msr.mtrr_fix16k_8000 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix16K_A0000 */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x259:
|
|
|
|
|
msr.mtrr_fix16k_a000 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRfix4K_C0000 ... MTRRfix4K_F8000 */
|
|
|
|
|
case 0x268 ... 0x26f:
|
2022-09-20 01:00:45 -04:00
|
|
|
msr.mtrr_fix4k[ECX - 0x268] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Page Attribute Table */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x277:
|
2024-02-05 17:03:10 +05:00
|
|
|
if (cpu_s->cpu_type < CPU_PENTIUM2D)
|
|
|
|
|
goto i686_invalid_wrmsr;
|
2022-09-20 01:00:45 -04:00
|
|
|
msr.pat = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown */
|
|
|
|
|
case 0x280:
|
|
|
|
|
if (cpu_s->cpu_type == CPU_PENTIUMPRO)
|
|
|
|
|
goto i686_invalid_wrmsr;
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MTRRdefType */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x2ff:
|
|
|
|
|
msr.mtrr_deftype = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC0_CTL - Machine Check 0 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x400:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC1_CTL - Machine Check 1 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x404:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC2_CTL - Machine Check 2 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x408:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC4_CTL - Machine Check 4 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x40c:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC3_CTL - Machine Check 3 Control */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x410:
|
|
|
|
|
msr.mca_ctl[(ECX - 0x400) >> 2] = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC0_STATUS - Machine Check 0 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x401:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC0_ADDR - Machine Check 0 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x402:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC1_STATUS - Machine Check 1 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x405:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC1_ADDR - Machine Check 1 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x406:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC2_STATUS - Machine Check 2 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x409:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC2_ADDR - Machine Check 2 Address */
|
|
|
|
|
case 0x40a:
|
|
|
|
|
/* MC4_STATUS - Machine Check 4 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x40d:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC4_ADDR - Machine Check 4 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x40e:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC3_STATUS - Machine Check 3 Status */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x411:
|
2024-02-01 18:34:58 +05:00
|
|
|
/* MC3_ADDR - Machine Check 3 Address */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x412:
|
|
|
|
|
if (EAX || EDX)
|
|
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
2024-02-01 18:34:58 +05:00
|
|
|
/* Unknown */
|
2022-09-20 01:00:45 -04:00
|
|
|
case 0x570:
|
|
|
|
|
msr.ecx570 = EAX | ((uint64_t) EDX << 32);
|
|
|
|
|
break;
|
2024-02-05 17:03:10 +05:00
|
|
|
/* Unknown, possibly debug registers? */
|
|
|
|
|
case 0x1000 ... 0x1007:
|
|
|
|
|
/* Unknown, possibly control registers? */
|
|
|
|
|
case 0x2000:
|
|
|
|
|
case 0x2002 ... 0x2004:
|
|
|
|
|
break;
|
2022-09-20 01:00:45 -04:00
|
|
|
default:
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
i686_invalid_wrmsr:
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_log("WRMSR: Invalid MSR: %08X\n", ECX);
|
|
|
|
|
x86gpf(NULL, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
static void
|
2023-08-10 15:43:16 -04:00
|
|
|
cpu_write(uint16_t addr, uint8_t val, UNUSED(void *priv))
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
if (addr == 0xf0) {
|
2022-09-20 01:00:45 -04:00
|
|
|
/* Writes to F0 clear FPU error and deassert the interrupt. */
|
|
|
|
|
if (is286)
|
|
|
|
|
picintc(1 << 13);
|
|
|
|
|
else
|
|
|
|
|
nmi = 0;
|
2025-03-19 03:12:36 +01:00
|
|
|
} else if ((addr < 0xf1) && !(addr & 1))
|
2022-09-20 01:00:45 -04:00
|
|
|
cyrix_addr = val;
|
2025-03-19 03:12:36 +01:00
|
|
|
else if (addr < 0xf1) switch (cyrix_addr) {
|
|
|
|
|
default:
|
|
|
|
|
if (cyrix_addr >= 0xc0)
|
|
|
|
|
fatal("Writing unimplemented Cyrix register %02X\n", cyrix_addr);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x30: /* ???? */
|
|
|
|
|
reg_30 = val;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xc0: /* CCR0 */
|
|
|
|
|
ccr0 = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0xc1: { /* CCR1 */
|
|
|
|
|
uint8_t old = ccr1;
|
|
|
|
|
if ((ccr3 & CCR3_SMI_LOCK) && !in_smm)
|
|
|
|
|
val = (val & ~(CCR1_USE_SMI | CCR1_SMAC | CCR1_SM3)) | (ccr1 & (CCR1_USE_SMI | CCR1_SMAC | CCR1_SM3));
|
|
|
|
|
ccr1 = val;
|
|
|
|
|
if ((old ^ ccr1) & (CCR1_SMAC)) {
|
|
|
|
|
if (ccr1 & CCR1_SMAC)
|
|
|
|
|
smram_backup_all();
|
|
|
|
|
smram_recalc_all(!(ccr1 & CCR1_SMAC));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
} case 0xc2: /* CCR2 */
|
|
|
|
|
ccr2 = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0xc3: /* CCR3 */
|
|
|
|
|
if ((ccr3 & CCR3_SMI_LOCK) && !in_smm)
|
|
|
|
|
val = (val & ~(CCR3_NMI_EN)) | (ccr3 & CCR3_NMI_EN) | CCR3_SMI_LOCK;
|
|
|
|
|
ccr3 = val;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xc4 ... 0xcc:
|
|
|
|
|
if (ccr5 & 0x20)
|
|
|
|
|
arr[cyrix_addr - 0xc4] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0xcd:
|
|
|
|
|
if ((ccr5 & 0x20) || (!(ccr3 & CCR3_SMI_LOCK) || in_smm)) {
|
|
|
|
|
arr[cyrix_addr - 0xc4] = val;
|
|
|
|
|
cyrix.arr[3].base = (cyrix.arr[3].base & ~0xff000000) | (val << 24);
|
|
|
|
|
cyrix.smhr &= ~SMHR_VALID;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0xce:
|
|
|
|
|
if ((ccr5 & 0x20) || (!(ccr3 & CCR3_SMI_LOCK) || in_smm)) {
|
|
|
|
|
arr[cyrix_addr - 0xc4] = val;
|
|
|
|
|
cyrix.arr[3].base = (cyrix.arr[3].base & ~0x00ff0000) | (val << 16);
|
|
|
|
|
cyrix.smhr &= ~SMHR_VALID;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0xcf:
|
|
|
|
|
if ((ccr5 & 0x20) || (!(ccr3 & CCR3_SMI_LOCK) || in_smm)) {
|
|
|
|
|
arr[cyrix_addr - 0xc4] = val;
|
|
|
|
|
cyrix.arr[3].base = (cyrix.arr[3].base & ~0x0000f000) | ((val & 0xf0) << 8);
|
|
|
|
|
if ((val & 0xf) == 0xf)
|
|
|
|
|
cyrix.arr[3].size = 1ULL << 32; /* 4 GB */
|
|
|
|
|
else if (val & 0xf)
|
|
|
|
|
cyrix.arr[3].size = 2048 << (val & 0xf);
|
|
|
|
|
else
|
|
|
|
|
cyrix.arr[3].size = 0; /* Disabled */
|
|
|
|
|
cyrix.smhr &= ~SMHR_VALID;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0xd0 ... 0xdb:
|
|
|
|
|
if (((ccr3 & 0xf0) == 0x10) && (ccr5 & 0x20))
|
|
|
|
|
arr[cyrix_addr - 0xc4] = val;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xdc ... 0xe3:
|
|
|
|
|
if ((ccr3 & 0xf0) == 0x10)
|
|
|
|
|
rcr[cyrix_addr - 0xdc] = val;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xe8: /* CCR4 */
|
|
|
|
|
if ((ccr3 & 0xf0) == 0x10) {
|
|
|
|
|
ccr4 = val;
|
|
|
|
|
if (cpu_s->cpu_type >= CPU_Cx6x86) {
|
|
|
|
|
if (val & 0x80)
|
|
|
|
|
CPUID = cpu_s->cpuid_model;
|
2022-09-20 01:00:45 -04:00
|
|
|
else
|
2025-03-19 03:12:36 +01:00
|
|
|
CPUID = 0;
|
2022-09-20 01:00:45 -04:00
|
|
|
}
|
2025-03-19 03:12:36 +01:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0xe9: /* CCR5 */
|
|
|
|
|
if ((ccr3 & 0xf0) == 0x10)
|
|
|
|
|
ccr5 = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0xea: /* CCR6 */
|
|
|
|
|
if ((ccr3 & 0xf0) == 0x10)
|
|
|
|
|
ccr6 = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0xeb: /* CCR7 */
|
|
|
|
|
ccr7 = val & 5;
|
|
|
|
|
break;
|
|
|
|
|
}
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
2021-04-10 07:18:47 +02:00
|
|
|
static uint8_t
|
2023-08-10 15:43:16 -04:00
|
|
|
cpu_read(uint16_t addr, UNUSED(void *priv))
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
{
|
2025-03-16 18:37:32 +01:00
|
|
|
uint8_t ret = 0xff;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
2025-03-16 18:37:32 +01:00
|
|
|
if (addr == 0xf007)
|
|
|
|
|
ret = 0x7f;
|
|
|
|
|
else if ((addr < 0xf0) && (addr & 1)) switch (cyrix_addr) {
|
2025-03-19 03:12:36 +01:00
|
|
|
default:
|
|
|
|
|
if (cyrix_addr >= 0xc0)
|
|
|
|
|
fatal("Reading unimplemented Cyrix register %02X\n", cyrix_addr);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x30: /* ???? */
|
|
|
|
|
ret = reg_30;
|
|
|
|
|
break;
|
|
|
|
|
|
2025-03-16 18:37:32 +01:00
|
|
|
case 0xc0:
|
|
|
|
|
ret = ccr0;
|
|
|
|
|
break;
|
|
|
|
|
case 0xc1:
|
|
|
|
|
ret = ccr1;
|
|
|
|
|
break;
|
|
|
|
|
case 0xc2:
|
|
|
|
|
ret = ccr2;
|
|
|
|
|
break;
|
|
|
|
|
case 0xc3:
|
|
|
|
|
ret = ccr3;
|
|
|
|
|
break;
|
2025-03-19 03:12:36 +01:00
|
|
|
|
|
|
|
|
case 0xc4 ... 0xcc:
|
|
|
|
|
if (ccr5 & 0x20)
|
|
|
|
|
ret = arr[cyrix_addr - 0xc4];
|
|
|
|
|
break;
|
|
|
|
|
case 0xcd ... 0xcf:
|
|
|
|
|
if ((ccr5 & 0x20) || (!(ccr3 & CCR3_SMI_LOCK) || in_smm))
|
|
|
|
|
ret = arr[cyrix_addr - 0xc4];
|
|
|
|
|
break;
|
|
|
|
|
case 0xd0 ... 0xdb:
|
|
|
|
|
if (((ccr3 & 0xf0) == 0x10) && (ccr5 & 0x20))
|
|
|
|
|
ret = arr[cyrix_addr - 0xc4];
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xdc ... 0xe3:
|
|
|
|
|
if ((ccr3 & 0xf0) == 0x10)
|
|
|
|
|
ret = rcr[cyrix_addr - 0xdc];
|
|
|
|
|
break;
|
|
|
|
|
|
2025-03-16 18:37:32 +01:00
|
|
|
case 0xe8:
|
2025-03-19 03:12:36 +01:00
|
|
|
if ((ccr3 & 0xf0) == 0x10)
|
|
|
|
|
ret = ccr4;
|
2025-03-16 18:37:32 +01:00
|
|
|
break;
|
|
|
|
|
case 0xe9:
|
2025-03-19 03:12:36 +01:00
|
|
|
if ((ccr3 & 0xf0) == 0x10)
|
|
|
|
|
ret = ccr5;
|
2025-03-16 18:37:32 +01:00
|
|
|
break;
|
|
|
|
|
case 0xea:
|
2025-03-19 03:12:36 +01:00
|
|
|
if ((ccr3 & 0xf0) == 0x10)
|
|
|
|
|
ret = ccr6;
|
2025-03-16 18:37:32 +01:00
|
|
|
break;
|
|
|
|
|
case 0xeb:
|
|
|
|
|
ret = ccr7;
|
|
|
|
|
break;
|
|
|
|
|
case 0xfe:
|
|
|
|
|
ret = cpu_s->cyrix_id & 0xff;
|
|
|
|
|
break;
|
|
|
|
|
case 0xff:
|
|
|
|
|
ret = cpu_s->cyrix_id >> 8;
|
|
|
|
|
break;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
2025-03-19 03:12:36 +01:00
|
|
|
|
2025-03-16 18:37:32 +01:00
|
|
|
return ret;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
#ifdef USE_DYNAREC
|
|
|
|
|
x86_setopcodes(const OpFn *opcodes, const OpFn *opcodes_0f,
|
2022-09-20 01:00:45 -04:00
|
|
|
const OpFn *dynarec_opcodes, const OpFn *dynarec_opcodes_0f)
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
{
|
2022-09-20 01:00:45 -04:00
|
|
|
x86_opcodes = opcodes;
|
|
|
|
|
x86_opcodes_0f = opcodes_0f;
|
|
|
|
|
x86_dynarec_opcodes = dynarec_opcodes;
|
2021-04-10 07:18:47 +02:00
|
|
|
x86_dynarec_opcodes_0f = dynarec_opcodes_0f;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
x86_setopcodes(const OpFn *opcodes, const OpFn *opcodes_0f)
|
|
|
|
|
{
|
2023-08-11 13:00:04 -04:00
|
|
|
x86_opcodes = opcodes;
|
2021-04-10 07:18:47 +02:00
|
|
|
x86_opcodes_0f = opcodes_0f;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|
2024-08-08 20:25:03 -04:00
|
|
|
#endif /* USE_DYNAREC */
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
|
2023-08-08 19:39:52 +02:00
|
|
|
void
|
|
|
|
|
x86_setopcodes_2386(const OpFn *opcodes, const OpFn *opcodes_0f)
|
|
|
|
|
{
|
2023-08-11 13:00:04 -04:00
|
|
|
x86_2386_opcodes = opcodes;
|
2023-08-08 19:39:52 +02:00
|
|
|
x86_2386_opcodes_0f = opcodes_0f;
|
|
|
|
|
}
|
|
|
|
|
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
void
|
|
|
|
|
cpu_update_waitstates(void)
|
|
|
|
|
{
|
2021-04-10 07:18:47 +02:00
|
|
|
cpu_s = (CPU *) &cpu_f->cpus[cpu_effective];
|
|
|
|
|
|
|
|
|
|
if (is486)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_prefetch_width = 16;
|
2021-04-10 07:18:47 +02:00
|
|
|
else
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_prefetch_width = cpu_16bitbus ? 2 : 4;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
|
|
|
|
if (cpu_cache_int_enabled) {
|
2022-09-20 01:00:45 -04:00
|
|
|
/* Disable prefetch emulation */
|
|
|
|
|
cpu_prefetch_cycles = 0;
|
2021-04-10 07:18:47 +02:00
|
|
|
} else if (cpu_waitstates && (cpu_s->cpu_type >= CPU_286 && cpu_s->cpu_type <= CPU_386DX)) {
|
2022-09-20 01:00:45 -04:00
|
|
|
/* Waitstates override */
|
|
|
|
|
cpu_prefetch_cycles = cpu_waitstates + 1;
|
|
|
|
|
cpu_cycles_read = cpu_waitstates + 1;
|
|
|
|
|
cpu_cycles_read_l = (cpu_16bitbus ? 2 : 1) * (cpu_waitstates + 1);
|
|
|
|
|
cpu_cycles_write = cpu_waitstates + 1;
|
|
|
|
|
cpu_cycles_write_l = (cpu_16bitbus ? 2 : 1) * (cpu_waitstates + 1);
|
2021-04-10 07:18:47 +02:00
|
|
|
} else if (cpu_cache_ext_enabled) {
|
2022-09-20 01:00:45 -04:00
|
|
|
/* Use cache timings */
|
|
|
|
|
cpu_prefetch_cycles = cpu_s->cache_read_cycles;
|
|
|
|
|
cpu_cycles_read = cpu_s->cache_read_cycles;
|
|
|
|
|
cpu_cycles_read_l = (cpu_16bitbus ? 2 : 1) * cpu_s->cache_read_cycles;
|
|
|
|
|
cpu_cycles_write = cpu_s->cache_write_cycles;
|
|
|
|
|
cpu_cycles_write_l = (cpu_16bitbus ? 2 : 1) * cpu_s->cache_write_cycles;
|
2021-04-10 07:18:47 +02:00
|
|
|
} else {
|
2022-09-20 01:00:45 -04:00
|
|
|
/* Use memory timings */
|
|
|
|
|
cpu_prefetch_cycles = cpu_s->mem_read_cycles;
|
|
|
|
|
cpu_cycles_read = cpu_s->mem_read_cycles;
|
|
|
|
|
cpu_cycles_read_l = (cpu_16bitbus ? 2 : 1) * cpu_s->mem_read_cycles;
|
|
|
|
|
cpu_cycles_write = cpu_s->mem_write_cycles;
|
|
|
|
|
cpu_cycles_write_l = (cpu_16bitbus ? 2 : 1) * cpu_s->mem_write_cycles;
|
2021-04-10 07:18:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is486)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_prefetch_cycles = (cpu_prefetch_cycles * 11) / 16;
|
2021-04-10 07:18:47 +02:00
|
|
|
|
|
|
|
|
cpu_mem_prefetch_cycles = cpu_prefetch_cycles;
|
|
|
|
|
|
2021-06-03 05:02:22 +02:00
|
|
|
if (cpu_s->rspeed <= 8000000)
|
2022-09-20 01:00:45 -04:00
|
|
|
cpu_rom_prefetch_cycles = cpu_mem_prefetch_cycles;
|
Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
|
|
|
}
|