Compare commits

..
Author SHA1 Message Date
pcem-maintainer
78d0618363 Xi 8088: add the UMB dip switch and allow the programming of the BIOS flash memory
Some checks failed
C/C++ CI / Ubuntu 64bit (gcc) (push) Has been cancelled
C/C++ CI / Windows 32bits (MSYS2) (push) Has been cancelled
C/C++ CI / Windows 64bits (MSYS2) (push) Has been cancelled
2021-07-04 18:32:57 -03:00
pcem-maintainer
0ac4af52a3 Add .gitignore file to make repository management easier 2021-07-04 13:45:47 -03:00
pcem-maintainer
169d690834 Remove some debug messages from release builds. Closes #42 2021-07-04 13:35:05 -03:00
pcem-maintainer
ff0828dc7d
Merge pull request #40 from greatpsycho/master
Add create 1.2MB floppy image.
Add missed Zenith Data SupersPort source to compile.
2021-06-29 22:20:26 -03:00
greatpsycho
7a26bb4f1c
Merge branch 'sarah-walker-pcem:master' into master 2021-06-29 21:42:36 +09:00
pcem-maintainer
c70a1acfd4 Merge pull request #33 from leilei-/3dfx
Voodoo: Emulation of dither subtraction (interpreter only)
2021-06-28 04:57:51 -03:00
pcem-maintainer
958de5ecc0 Merge pull request #36 from pcem-maintainer/master
Remove AWARD 286 BIOS turbo hack
2021-06-28 04:57:32 -03:00
pcem-maintainer
974f663d92 Remove AWARD 286 BIOS turbo hack
CPU clock control is now implemented in the C&T SCAT chipset.
2021-06-28 04:57:13 -03:00
greatpsycho
351b23ed95 Update Makefile
Add missed Zenith Data SupersPort source.
2021-06-20 13:12:08 +09:00
greatpsycho
f99dc0dd71
Update wx-createdisc.cc
Add 1.2MB floppy image format.
2021-06-20 13:02:24 +09:00
leilei-
0322c0f936 Voodoo: Emulation of dither subtraction (interpreter only) 2021-06-15 01:12:53 -04:00
sarah-walker-pcem
95a24e5ba8
Merge pull request #27 from MaddTheSane/patch-3
Declare HAVE_UNISTD_H for FreeBSD and Linux
2021-06-10 19:28:27 +01:00
sarah-walker-pcem
4488890386
Merge pull request #26 from MaddTheSane/patch-2
Update x86seg.c. Evaluates the bitwise operator first.
This fixes a warning in Clang: "logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]"
2021-06-10 18:28:43 +01:00
SarahW
b22cc53122 config: If configure dialog opened with an unavailable model selected
(eg ROMs not present), force an available model instead. Fixes new
model creation when only one ROM set available.
2021-06-10 08:08:17 +01:00
SarahW
e781f6b4a2 midi_alsa: Increase maximum sysex message to 65536 bytes, and cap regular
messages at 3 bytes. Fixes out-of-bounds corruption and crashes.
2021-06-09 20:04:17 +01:00
C.W. Betts
bfa73972b1
Declare HAVE_UNISTD_H for FreeBSD and Linux
This should quiet warnings about undefined functions in the slirp source files.
2021-06-08 15:24:21 -06:00
C.W. Betts
b62acab9ae
Update x86seg.c
Evaluates the bitwise operator first.
Fixes a warning in Clang: "logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]"
2021-06-08 15:08:20 -06:00
SarahW
84b9af3e05 Use correct value for Y swap origin on Voodoo Banshee/3. Fixes issues
sometimes seen when running in low resolutions, ie below 640x480.
2021-06-07 19:51:30 +01:00
SarahW
e069ec7338 Banshee: disable SVGA video processing (set svga->fb_only) when video
processor is enabled. Fixes corrupt desktop introduced by recent SVGA
mapping changes.
2021-06-04 08:13:35 +01:00
SarahW
5f772fdf70 Correct path to default NVR files on Linux 2021-06-03 20:36:30 +01:00
SarahW
2e037b5076 FSCALE should always return 0.0 if ST(0) input is 0.0, regardless of
value of ST(1); this might otherwise return infinity or NaN if not
trapped. Fixes fade-in on MDK2.
2021-06-02 21:13:39 +01:00
SarahW
0ad51dd73b Add status window text for GUS 2021-05-31 09:31:50 +01:00
SarahW
be74288b5e Stricter logic when adding/removing IO handlers. Fixes crashes with
GA686BX when triggering power events when using older BIOSes (tested
with 02/10/1999 BIOS).
2021-05-31 08:17:37 +01:00
SarahW
51516c0bb1 Correct top-of-stack value stored by FSTENV. Fixes rendering in
CNCD - Inside
2021-05-30 15:23:11 +01:00
SarahW
e8d6266df6 GUS should set DMA TC IRQ flag even when IRQ disabled. Fixes sound in
CNCD - Inside when DMA sample transfer enabled.
Also cleaned up GUS IRQ handling a bit.
2021-05-29 21:50:44 +01:00
SarahW
6b80e58487 Fix BY16 addressing on Cirrus Logic cards. 2021-05-29 09:31:21 +01:00
SarahW
231d235d8f Fix bugs in Paradise banking. Fixes further Windows 3.x corruption. 2021-05-29 09:18:04 +01:00
SarahW
092be3e9d4 Rework (S)VGA memory addressing. Support correct chain-4 mapping, as well
as MA13/14 remapping for non-CGA modes. Fixes corruption on Windows 3.x
when using Paradise drivers, also fixes corruption in Titan.
2021-05-29 09:08:34 +01:00
SarahW
f9cdcfa6b6 Add preprocessor variable to override version number on title bar.
Modify github workflow to set version number to current git SHA, and
append to artifact name.
2021-05-28 21:33:22 +01:00
sarah-walker-pcem
669fa4d8cd
Merge pull request #20 from JosepMaJAZ/JosepMaJAZ-githubactions
Use GitHub Actions to compile PCem
2021-05-26 08:30:18 +01:00
JosepMaJAZ
d2f399ac5f fixed incorrect 64bits npcap lib. fixed missing source subdirs content 2021-05-26 04:35:05 +02:00
JosepMaJAZ
3ea00897c8 Compression retouches 2021-05-26 03:39:17 +02:00
JosepMaJAZ
6c063e3fcc First attempt at multi-os build 2021-05-26 03:22:19 +02:00
sarah-walker-pcem
f47f6ffb25
Merge pull request #15 from MaddTheSane/patch-1
Configure: pick up flags from the command line
2021-05-25 20:38:31 +01:00
sarah-walker-pcem
5da96ac8d6
Merge pull request #14 from MaddTheSane/MacSupp
Mac support changes
2021-05-25 20:37:56 +01:00
C.W. Betts
14d199b004 Partially revert 1eb1cc5e5b: it broke the Windows build.
Go back to using SDL2 in front of SDL2 header includes.
2021-05-24 16:20:43 -06:00
C.W. Betts
4ebf9ec427 macOS: Have the support directory be in Application support. 2021-05-22 11:43:49 -06:00
C.W. Betts
366529ca35 macOS: Fix OpenGL 3 support. 2021-05-22 11:35:59 -06:00
SarahW
c82cd208c1 CGA-class cards mirror CRTC between ports 3d0 and 3d7. Fixes scrolling
in Prohibition.
2021-05-21 22:15:21 +01:00
C.W. Betts
3dd4fda614 Minor style changes. 2021-05-21 01:11:56 -06:00
SarahW
5fb1e464f0 Merge branch 'master' of https://github.com/sarah-walker-pcem/pcem 2021-05-20 22:04:23 +01:00
SarahW
0d46e719eb FDC commands 8d and cd appear to be synonyms for "format track" (officially
documented as 0d and 4d). Fixes formatting on AMI BIOSes.
2021-05-20 22:03:28 +01:00
C.W. Betts
ea0867860f
Configure: pick up flags from the command line
Allow configure to pick up CFLAGS and CXXFLAGS from the command line.

Note: configure will need to be regenerated.
2021-05-19 16:37:42 -06:00
C.W. Betts
04e4a14edc Define HAVE_UNISTD_H on Darwin/macOS: Fixes a compiler failure due to missing function prototype. 2021-05-19 16:19:31 -06:00
C.W. Betts
e2f01a7e8a How did that sneak in? 2021-05-19 16:13:08 -06:00
C.W. Betts
1eb1cc5e5b Include SDL2 CFlags in with the general CFlags: this fixes SDL2 build failures on macOS.
Regenerate auto-conf/etc.
Fix the SDL2 includes.
2021-05-19 16:09:11 -06:00
C.W. Betts
20d7014e4a macOS: Rename the window only on the main thread: macOS doesn't like non-main threads modifying the UI. 2021-05-19 15:49:03 -06:00
C.W. Betts
33da24d0e2 macOS: Add support for Apple Silicon and usage of the MAP_JIT flag. 2021-05-19 15:48:33 -06:00
C.W. Betts
f63b06f5f6 MacOS lacks 64-bit-specific offset bits for file functions:
Use plain off_t-based functions if HAS_OFF64T is false.
2021-05-19 15:23:17 -06:00
sarah-walker-pcem
40a48a4c7c Update issue templates 2021-05-16 09:06:00 +01:00
sarah-walker-pcem
feda966ff8
Merge pull request #1 from JmaJeremy/patch-1
typo in linux build command
2021-03-03 19:47:03 +00:00
SarahW
55e84c338b Back out display and cursor skew changes from commit ed30e171. Fixes offset
display on some SVGA cards.
2021-02-08 20:21:52 +00:00
SarahW
9687a85943 Add keyboard controller SMI fix to Itautec Infoway. Patch from EluanCM. 2021-02-08 19:59:08 +00:00
Jeremy Andrews
54ae48c174
typo in linux build command
missing "-build" from "--enable-release-build" option of "./configure"
2021-01-16 10:17:33 -05:00
SarahW
13f53a2568 Update documentation for v17. 2020-12-01 19:49:05 +00:00
SarahW
ad6b1406e8 Update version number to v17. 2020-12-01 19:47:00 +00:00
SarahW
df1d53c75c Add missing break in switch in et4000_kasan_out(). Patch from Greatpsycho. 2020-12-01 17:26:41 +00:00
SarahW
e27e37179f Guard fatal()s in Banshee/V3 code in !RELEASE_BUILD 2020-12-01 16:04:19 +00:00
SarahW
4adb34078d Implement non-poly lines in Banshee/V3 blitter. 2020-12-01 15:21:44 +00:00
SarahW
8635bc5184 Update README.md with new machines + video cards for v17 2020-12-01 15:20:49 +00:00
SarahW
3a7336913d Add some keyboard controller behaviour on Intel Advanced/EV and ZP that
fixes SMI hangs on Windows 95 OSR2.
2020-11-30 22:30:12 +00:00
SarahW
cd7b41f73a Correct Banshee subsystem ID. 2020-11-30 22:29:51 +00:00
SarahW
fe96629ced SMI : Fix 'NOTFLAT' status when leaving SMI, set oldcpl on enter/leave. 2020-11-30 22:29:03 +00:00
SarahW
1dbb94e989 Implement true 128k VGA mappings on ET4000 and TVGA cards (the only
cards I believe that support them). Fixes Majic 12 - Wish.
2020-11-27 16:27:54 +00:00
SarahW
97dd2aa4bf Implement Banshee/V3 line stippling, including previously missing
registers. Fixes Lotus Smartsuite 97 installation.
2020-11-26 20:52:50 +00:00
SarahW
e8e0cf453c Add TESTED.md 2020-11-26 18:26:23 +00:00
SarahW
2ad5b83d6e Add README.md documentation revamp. Patch from gen_angry. 2020-11-26 08:42:14 +00:00
SarahW
0ec9c6e728 Remove C99 declarations in for loops from MiniVHD. Patch from Greatpsycho. 2020-11-26 08:39:54 +00:00
SarahW
15fd983fa9 Don't fatal() on unknown Banshee/V3 3D reg read. Fixes Spearhead. 2020-11-26 08:29:14 +00:00
SarahW
969266a09c Fix uninitialised variable in ati18800_in(). 2020-11-25 20:21:51 +00:00
SarahW
6f8401c72c ATI 28800 (VGA Charger) was selecting the wrong dot clock for VGA
standard graphics modes. In the absence of better information or a
board to test with, I am currently assuming the table I used as
reference was incorrect. Changing timings to allow for correct
refresh rate.
2020-11-23 21:57:15 +00:00
SarahW
57fb74a4a3 Fix Voodoo recompiler chromakey for rgbselect != texture RGB. Fixes
rendering issues in Manx TT.
2020-11-22 22:03:21 +00:00
SarahW
81a8873d59 Fix Banshee/V3 cursor vertical clipping. 2020-11-22 17:11:13 +00:00
SarahW
e518b4312b Handle unaligned LFB reads/writes on Banshee/V3. Fixes UI glitches in
Red Alert 2.
2020-11-22 14:28:57 +00:00
SarahW
d4dc2e9441 Load VGA latches even on 'fast' chained mode byte reads. Fixes missing
logos on Amnesia.
2020-11-22 12:48:24 +00:00
SarahW
8fa271dca9 Remove inclusion of minivhd_utils.h in wx-config.c. Patch from shermanp. 2020-11-21 20:58:32 +00:00
SarahW
744583433e MiniVHD: Fix multi sector writes. Patch from sards3. 2020-11-21 20:57:28 +00:00
SarahW
22e7faaabc MiniVHD: Add convenience functions to public API. Patch from shermanp. 2020-11-21 20:56:11 +00:00
SarahW
c7e5dd93b4 Remove duplicate typedef from minivhd_internal.h. Patch from shermanp. 2020-11-21 20:55:05 +00:00
SarahW
e791bf372b Fix EOF in MiniVHD files. Patch from shermanp. 2020-11-21 20:51:09 +00:00
SarahW
cada868428 Tweak accesses to S3 system control and extension registers. Fixes
banking on some versions of UNIVBE (eg as used by Pro Pinball : The
Web).
2020-11-21 20:45:56 +00:00
SarahW
302d05c02a Build fixes for MiniVHD. Patch from shermanp. 2020-11-21 09:47:52 +00:00
SarahW
87524de18b Implement Voodoo CMDFIFO JSR/RET. Fixed "Bad CMDFIFO0" seen sometimes,
particularly when running OpenGL games windowed.
2020-11-21 09:44:46 +00:00
SarahW
39713ccdc4 Don't fatal() on unknown Voodoo 1/2 register reads; we probably have
all the important ones covered by now. Fixes Frogger 2.
2020-11-20 20:51:19 +00:00
SarahW
f72da770f1 Don't fatal() on "triangle_setup wrong order". These usually means one
of the vertices is not valid.
2020-11-20 20:41:41 +00:00
SarahW
0cbe6ae918 Ensure that any cycles spent when entering IRQ/NMI in interpreter are
accounted for in the TSC, and by extension the timer system.
2020-11-19 22:17:05 +00:00
SarahW
8053c8a523 Ensure that any cycles spent when entering IRQ/NMI in dynarec are accounted
for in the TSC, and by extension the timer system. Fixes slowdown and
stuttering music in Museum Madness.
2020-11-19 22:09:41 +00:00
SarahW
6b96f56632 Fix off-by-one issue on Banshee/V3 RGB565 overlay render. 2020-11-19 19:46:49 +00:00
SarahW
49ba35733e Implement Banshee/V3 CLUT lookup on 16-bit RGB overlay. 2020-11-19 19:38:34 +00:00
SarahW
e15f66b349 Add specific warning message when creating differencing VHD. Patch from shermanp. 2020-11-18 20:43:07 +00:00
SarahW
6cbce169f5 Ensure Voodoo 1/2 keep params copy of buffer row widths updated. 2020-11-18 20:39:41 +00:00
SarahW
088354f607 Mask off source address correctly for Banshee/V3 RGB565 tiled overlay 2020-11-18 20:00:55 +00:00
SarahW
035f6b348c Fix horizontal scaling of unfiltered Banshee/V3 overlay. 2020-11-18 19:49:58 +00:00
SarahW
aef6ea93e6 More changes to Banshee/V3 half mode. 2020-11-18 19:48:37 +00:00
SarahW
09a7b468c3 Move Voodoo colour/aux buffer tiled mode flags to params structure. Fixed
crash in 3DMark 2001 demo mode.
2020-11-17 21:43:30 +00:00
SarahW
8cfb60608e Increase size of Voodoo dirty_line array to 2048 lines, and add some
bounds checking before accessing. Fixes crash running 3DMark 2001 on
Voodoo 3.
2020-11-17 08:32:12 +00:00
SarahW
5c20fe7c57 Implement Banshee half mode on non-tiled surfaces. Fixes low res VESA
modes.
2020-11-16 20:05:44 +00:00
SarahW
d6bf0baed0 Close all devices on emulation shutdown. 2020-11-16 19:34:58 +00:00
SarahW
4459c7175d Close all IDE drives on IDE device destruction. 2020-11-16 19:34:28 +00:00
SarahW
d5dbe302b5 Implement CPU clock control on SCAT. Patch from Greatpsycho. 2020-11-16 17:59:57 +00:00
SarahW
fbb5904b52 Rework AudioPCI IO port handling to avoid potential conflict between
native and CODEC ports. Fixes AudioPCI with Windows XP.
2020-11-15 16:56:43 +00:00
SarahW
142301adbf Don't enable SCAT shadow RAM if SCAT configured for less than 1 MB of
low memory. Fixes Hyundai Super-286TR with 1 MB RAM configured.
2020-11-15 13:44:23 +00:00
SarahW
a89347d415 Add Amstrad PC5086 emulation. Patch from davide78. 2020-11-15 11:11:41 +00:00
SarahW
95e6819f02 Remove use of _wfopen_s in minivhd. 2020-11-15 09:02:32 +00:00
SarahW
322b25a4dc VHD build fixes. Patch from shermanp. 2020-11-15 08:58:59 +00:00
SarahW
5ae201b7e7 Disable Banshee lazy overlay update when vertical scaling enabled. Fixes
artifacts in low resolution modes (where the lazy update has little
benefit anyway).
2020-11-14 19:34:00 +00:00
SarahW
9bea8c138a Intel Advanced ZP/EV derived systems don't seem to support Cyrix 6x86
CPUs (executes MSR and CPUID instructions without any preceeding checks).
Removed these CPUs from those systems.
2020-11-14 19:34:00 +00:00
SarahW
49bdd9534f Add X11 cursor mode to Banshee/V3. 2020-11-14 19:34:00 +00:00
SarahW
ed37bc4e24 Fix Banshee/V3 mappings following write of PCI command register. Fixes hang
following monitor suspend/wakeup.
2020-11-14 19:33:59 +00:00
SarahW
86a5b13f46 Add dirty updating for Voodoo Banshee/3 overlay. 2020-11-14 19:33:59 +00:00
SarahW
a366d977aa Added Voodoo Banshee/3 screen filter. Patch from leilei. 2020-11-14 19:33:59 +00:00
SarahW
91e165a6d6 Reduce level of Voodoo Banshee/3 logging. 2020-11-14 19:33:59 +00:00
SarahW
0469ab60cb Implement penalties for segment load on Pentium Pro. 2020-11-14 19:33:59 +00:00
SarahW
5c3069c561 Add W83977TF SuperIO chip for Gigabyte GA686BX. 2020-11-14 19:33:58 +00:00
SarahW
c598f88f67 Implement Banshee/V3 vidProcCfg half mode. Fixes low res 16 bpp modes. 2020-11-14 19:33:58 +00:00
SarahW
4683d674b6 Implement PIIX SMI gate. Fixes some issues seen on Shuttle HOT-433
when power management disabled in BIOS, which results in the BIOS
failing to initialise and relocate the SMI handler but still advertise
APM availability.
2020-11-14 19:33:58 +00:00
SarahW
a01cc90866 Tweak search range when codegen looking for start uOP for given
instruction. Fixes range when unrolling LOOP instruction pointing
to itself (which could skip initial cycle count update), fixes
Windows 98 boot on 6x86 chips.
2020-11-14 19:33:58 +00:00
SarahW
624f1cfcfc Set raw limits on LLDT & LTR instructions - Cyrix RSLDT/RSTS instructions
no longer corrupt LDT/TR limits.
2020-11-14 19:33:58 +00:00
SarahW
7f206c5484 Clear CR4 mask by default. Fixes issues when switching between CPUs
that implement CR4 and those that don't.
2020-11-14 19:33:57 +00:00
SarahW
c0bc163eaf Implement Cyrix SMM mode. 2020-11-14 19:33:57 +00:00
SarahW
8a5a0fc48c Intel flash chips respond to writes at all addresses. Fixes NVRAM errors
on VS440FX.
2020-11-14 19:33:57 +00:00
SarahW
193645a426 Add mutex to protect Voodoo swap count and pending. Should fix hangs
sometimes changing video mode on Voodoo 3.
2020-11-14 19:33:57 +00:00
SarahW
984437dfa9 Default W83877TF SuperIO to all devices disabled. Fixes FIC VA-503+ IO
port conflicts introduced following APM/ACPI implementation.
2020-11-14 19:33:57 +00:00
SarahW
038a27767a Implement APM/ACPI functionality for MVP3/VT82C586B, including soft
power off.
2020-11-14 19:33:57 +00:00
SarahW
82b1486f6b Implement APM on i430LX and SIO chipset. 2020-11-14 19:33:57 +00:00
SarahW
38cee364d3 Add basic APM functionality for PIIX/PIIX3 and i430FX, i430VX, i430HX
and i440FX chipsets.
2020-11-14 19:33:57 +00:00
SarahW
93756d3f01 SMM fixes 2020-11-14 19:33:56 +00:00
SarahW
00034c1ece Implement API to terminate current emulator session from within main
emulator thread (ie soft power off).
2020-11-14 19:33:56 +00:00
SarahW
8f04c11a76 Implement PIIX4 power management. Soft power off is currently 'implemented'
by killing the emulator.
2020-11-14 19:33:56 +00:00
SarahW
0cbbd22c88 Add emulation of System Management Mode. 2020-11-14 19:33:55 +00:00
SarahW
70ab938439 Update dest x/y at end of Banshee blitter command if required. Fixes
corruption in Windows 2000.
2020-11-14 19:33:55 +00:00
SarahW
f705fd8261 Change Voodoo 3 PCI revision from 3 to 1. 2020-11-14 19:33:55 +00:00
SarahW
9fc93833c4 Disable logging added in previous commit. 2020-11-14 19:33:55 +00:00
SarahW
826389a37a Rework Voodoo texture precalc to support non-split trilinear textures.
Fixes trilinear bugs on Voodoo 3.
2020-11-14 19:33:55 +00:00
SarahW
b40cc2b87e Implement P6 operand & address size prefix penalties. 2020-11-14 19:33:55 +00:00
SarahW
ec9ca6c97b Fix missing immediate markers in opcode_deps[] tables. 2020-11-14 19:33:54 +00:00
SarahW
6ead42d868 Fix off-by-one issue with Voodoo clipping. 2020-11-14 19:33:54 +00:00
SarahW
44433fd020 Reset Banshee/V3 2D blitter coordinates on new command start. Fixes
corruption in Winamp.
2020-11-14 19:33:54 +00:00
SarahW
a19829cf11 Add DDC / plug and play monitor support for Mach64VT2. 2020-11-14 19:33:54 +00:00
SarahW
7e2c6a5344 Add DDC/plug and play monitor support to S3 ViRGE. 2020-11-14 19:33:54 +00:00
SarahW
5eb6f4d168 Implement plug and play monitor support on Voodoo Banshee & 3. 2020-11-14 19:33:54 +00:00
SarahW
c9891895da Implement Voodoo CMDFIFO enable bit. 2020-11-14 19:33:54 +00:00
SarahW
d254f41817 Banshee/Voodoo 3 status returns busy when FIFO thread is busy, regardless
of command/cmdfifo/render thread status. Fixes some 2D races where drivers
start to write to framebuffer while (final) 2D blit command is still
running.
2020-11-14 19:33:53 +00:00
SarahW
086287809b Mark Banshee/Voodoo 3 cards as PCI. 2020-11-14 19:33:53 +00:00
SarahW
114cdd7a15 Add VIA Cyrix III CPUs. Note that this is currently limited to 500 MHz,
as Windows 98 won't boot on anything any faster than this. This is most
likely a limitation of the current timer subsystem.
2020-11-14 19:33:53 +00:00
SarahW
2b43125f79 Rename Banshee reference card to match Voodoo 3s. 2020-11-14 19:33:53 +00:00
SarahW
6df66c59fb Add Voodoo 3 emulation. 2020-11-14 19:33:53 +00:00
SarahW
2415d8ad50 Mask Banshee desktop start address correctly. 2020-11-14 19:33:52 +00:00
SarahW
52a79fbb57 Add option for Voodoo to use 4 render threads. 2020-11-14 19:33:52 +00:00
SarahW
dbb10c0894 Don't sample & filter EMU8000 voice if current volume is zero. 2020-11-14 19:33:52 +00:00
SarahW
92e0b78548 Add missing svga_render_null() function. 2020-11-14 19:33:52 +00:00
SarahW
679322882b Add missing svga_render_null() function. 2020-11-14 19:33:51 +00:00
SarahW
f6406c77e5 Add fast path in Banshee overlay render; if overlay is unfiltered and
unscaled then just write straight to destination buffer.
2020-11-14 19:33:51 +00:00
SarahW
2cf57ab8b2 If Banshee video overlay is full screen (as would be the case for
full screen 3D), don't bother rendering the desktop behind it.
2020-11-14 19:33:51 +00:00
SarahW
3e5e519d10 Implement dirty updating on Banshee 16bpp tiled modes 2020-11-14 19:33:51 +00:00
SarahW
e761045e40 Remove unused variables in Banshee. 2020-11-14 19:33:51 +00:00
SarahW
1900499ace Fix "effective clockspeed" display when using Banshee. 2020-11-14 19:33:51 +00:00
SarahW
6a09e9636c Disable a lot of dynarec sanity checks in release builds. 2020-11-14 19:33:51 +00:00
SarahW
25fe224ea9 Add dynarec optimisation for UOP_MOV_IMM, to avoid register allocation
if the destination register won't be immediately used again.
2020-11-14 19:33:50 +00:00
SarahW
0d7103368a Add register rename optimisation to dynarec to eliminate some redundant
UOP_MOVs.
2020-11-14 19:33:50 +00:00
SarahW
cccaf86fd3 Mark some exceptions (mainly v86 related) as 'expected', meaning they
won't cause a code block deletion. This speeds up some v86 code due
to a reduction in code block churning.
2020-11-14 19:33:50 +00:00
SarahW
5a94c78cbb Split up exec386_dynarec() a bit. 2020-11-14 19:33:50 +00:00
SarahW
eb524e6f12 Move trap handling out of main dynarec loop. 2020-11-14 19:33:50 +00:00
SarahW
24d8176594 Reset P6 current ifetch_length on start of code block and on decoder
flush.
2020-11-14 19:33:49 +00:00
SarahW
fb391d2484 Rewrite Voodoo triangle setup vertex selection code. Fixes missing triangles
on Banshee with some D3D games (eg Black & White, Viper Racing)
2020-11-14 19:33:49 +00:00
SarahW
1915149391 Increase Banshee revision to 3, matching my real CL Banshee card. Removes
the need for any fogTable hack, which is in any case inconsistently applied
by drivers and I think may only be needed on pre-production devices.
2020-11-14 19:33:49 +00:00
SarahW
95ccdcae5c Implement bilinear filtering on Banshee video overlay. 2020-11-14 19:33:49 +00:00
SarahW
1ebaa7c640 Banshee 2D blitter should wait for 3D to go idle before starting a
blit. Fixes text in Forsaken.
2020-11-14 19:33:49 +00:00
SarahW
9adb36ece3 Banshee status now returns busy when either of the render threads is
busy. Fixed HUD in Jedi Knight.
2020-11-14 19:33:49 +00:00
SarahW
c9bf81f599 Fix Banshee CMDFIFO base address mask. 2020-11-14 19:33:49 +00:00
SarahW
fccd59ba92 Add Banshee RGB565 undithered overlay format. Currently dithered and
undithered are handled the same.
2020-11-14 19:33:49 +00:00
SarahW
870a19f537 Don't fatal() on unknown Banshee port read/write. Fixes Windows 95
hardware detection.
2020-11-14 19:33:48 +00:00
SarahW
801e560b53 Remove duplicates from Slot 1 CPU list. 2020-11-14 19:33:48 +00:00
SarahW
93c0bc85c7 Mark Banshee mappings as external. Banshee cards now work on GA-686BX. 2020-11-14 19:33:48 +00:00
SarahW
a85f315daf The existing A-Trend Banshee card is AGP, which is not currently emulated.
Replaced with a reference SGRAM PCI card, and added a Creative SDRAM card.
2020-11-14 19:33:48 +00:00
SarahW
2212b9a470 Implement out-of-order CMDFIFO handling on Banshee. 2020-11-14 19:33:31 +00:00
SarahW
8ee4396b4c Fix race condition in Voodoo FIFO code that could cause an 'Unknown fifo
entry' error
2020-11-14 19:33:30 +00:00
SarahW
bb70f4ff0f Re-enable fog on Banshee. 2020-11-14 19:33:30 +00:00
SarahW
21a3a9acec Update Voodoo framebuffer read/write for Banshee. 2020-11-14 19:33:30 +00:00
SarahW
06a07cfcbc Fix off-by-one size error with Banshee overlay. 2020-11-14 19:33:30 +00:00
SarahW
6318624661 Banshee fog table seems to be inverted compared to other Voodoo cards
(hardware bug?). Re-enabled fog.
2020-11-14 19:33:30 +00:00
SarahW
771c5c6ba3 More Banshee host data size tweaking. 2020-11-14 19:33:30 +00:00
SarahW
3040c4e994 Additional Banshee host data size fix. 2020-11-14 19:33:30 +00:00
SarahW
d1f17cd8ae Don't flush Banshee pipeline when reading clipping registers. Fixes
severe slowdown in 3dMark2000 fill rate test.
2020-11-14 19:33:29 +00:00
SarahW
0298d0ffaf Fix uninitialised variable in Banshee texture writes. 2020-11-14 19:33:29 +00:00
SarahW
11b29c7c18 Fix Banshee host data size when source format is 1 bpp. Fixes some
bad icon masks in Windows 98.
2020-11-14 19:33:29 +00:00
SarahW
133f19fe39 Implement Banshee tiled surfaces 2020-11-14 19:33:29 +00:00
SarahW
32900491b7 Update Makefiles 2020-11-14 19:33:29 +00:00
SarahW
19a5dfa579 Added Voodoo Banshee emulation.
Known issues :
- Tiled framebuffer layout is not yet implemented. This causes horizontal
  offsets in some 2D 16bpp stuff (eg FMV in Tomb Raider 2, UI in Expendable)
- Fog is broken and currently disabled for Banshee
- Possibly at least 1 race in 2D blitter emulation
- A few things not yet emulated - overlay filters, some (rarely used) 2D
  blitter functions
2020-11-14 19:33:28 +00:00
SarahW
41238b3c85 Split vid_voodoo.c into multiple source & header files. 2020-11-14 19:33:04 +00:00
SarahW
3cbcf5f575 Optimise Voodoo FIFO processing of framebuffer / texture / register
writes. Speeds up games that write large amounts of data to the FIFO,
eg menus in Expendable.
2020-11-14 19:33:04 +00:00
SarahW
4fe71bdbed The instruction following STI is always executed, even if an interrupt
is pending. Fixes Windows 9x boot broken by SYSENTER commit.
2020-11-14 19:33:03 +00:00
SarahW
5b2087f84d Added Celeron emulation. 2020-11-14 19:33:03 +00:00
SarahW
bf68656e8f Implement CPUID cache register for Pentium Pro/II. 2020-11-14 19:33:03 +00:00
SarahW
b973755ca3 Add hintable NOPs for Pentium Pro and II. 2020-11-14 19:33:03 +00:00
SarahW
7eff4f4ba8 Add SYSENTER and SYSEXIT instructions 2020-11-14 19:33:03 +00:00
SarahW
fda3832e3a Add Gigabyte GA-686BX emulation.
As part of this, add i440BX chipset, PIIX4, and i28F002BC Flash.
2020-11-14 19:33:03 +00:00
SarahW
3c4fa0511e Add Pentium II Overdrive emulation. 2020-11-14 19:33:02 +00:00
SarahW
5ad5764500 Add P6 execution unit timing. OoO behaviour is not very faithful yet. 2020-11-14 19:33:02 +00:00
SarahW
4fd7305d1d Limit P6 pipeline throughput to 3 uOPs/cycle 2020-11-14 19:33:02 +00:00
SarahW
21dbd868e1 Add initial P6 timing model. Currently only basic decoder limits
(4-1-1 rule and 16-byte limit) have been implemented.
2020-11-14 19:33:02 +00:00
SarahW
cf33ab6c39 Add initial implementation of Intel VS440FX motherboard.
As part of this, add dummy Pentium Pro emulation, as well as Intel 440FX
chipset, PC87307 SuperIO and Intel 28FB200BX-T Flash.
2020-11-14 19:33:01 +00:00
SarahW
602d6f1ce6 Add VHD hard disc image support. Patch from shermanp. 2020-11-14 19:12:07 +00:00
SarahW
d1021b5b6b SÂ3: implement RCBASE/DSTBASE, treat clip rectangle as unsigned.
Patch from twilen.
2020-11-14 15:34:27 +00:00
SarahW
87941f2903 Added Kasan Hangulmadang-16 emulation. Patch from Greatpsycho. 2020-11-14 14:20:37 +00:00
SarahW
ed30e17128 Implement VGA byte panning and cursor skew. Patch from Greatpsycho. 2020-11-14 13:38:07 +00:00
SarahW
9bdbcc18c0 Added Samsung SPC-6000A and SPC-6033P. Patch from Greatpsycho. 2020-11-14 12:25:36 +00:00
SarahW
2efda3598b Trident TVGA8900D appears to implement port 0x3db as an alternative
clock select. Fixes pixel clocks & refresh rates on this card.
2020-10-02 17:21:41 +01:00
SarahW
264cfc3a12 Add Trident TVGA9000B emulation. 2020-10-02 17:21:12 +01:00
SarahW
7d4bc7237c Add Compaq Deskpro emulation. 2020-09-30 21:31:33 +01:00
SarahW
9b737f65b1 Fix warnings when compiling codegen_*.c
Patch from davefiddes. Original commit message :

This fixes the following warnings:

codegen_allocator.c:
 - implict function declaration of rand() due to missing stdlib.h

codegen_backend_x86-64.c:
 - implict function declaration of malloc() due to missing stdlib.h
 - unused variables in codegen_backend_init()
 - invalid typecast in use of host_x86_CALL()

codegen_backend_x86-64-uop.c:
 - Remove unused variable declarations in codegen_CALL_FUNC_RESULT(),
   codegen_LOAD_SEG(), codegen_OR_IMM(), codegen_XOR() and codegen_XOR_IMM()
 - Move debug only variable declarations under the debug conditional define in
   codegen_CALL_FUNC_RESULT(), codegen_LOAD_SEG(), codegen_MEM_LOAD_SINGLE(),
   codegen_MEM_LOAD_DOUBLE(), codegen_MEM_STORE_SINGLE(),
   codegen_MEM_STORE_DOUBLE()

codegen_reg.c:
 - Change (int) typecasts to the correct (intptr_t) for small values stored
   in a pointer. This fixes a series of 64-bit compilation warnings.

Tests:
 - Build with no warnings on Fedora 32 with gcc 10.1
 - Boot a Win98 machine with dynamic compilation enabled
2020-07-14 19:54:15 +01:00
SarahW
b5bc47ea2f Fix buffer overflow warnings in OpenGL 3.0 video display file handling
Patch from davefiddes. Original commit message :

This fixes issues reported by gcc 10 with the size of various filename buffers
when concatenating strings into them.

Tests:
 - Build cleanly with gcc 10
 - Run a Pentium MMX Win98 machine and use custom GLSLP shader
2020-07-14 19:42:20 +01:00
SarahW
a52066c75a Fix unused variable in vid_voodoo_codegen_x86-64.h
Patch from davefiddes. Original commit message :

Remove several unused variable references which look like they were required for
earlier versions of the code.

Tests:
 - Clean build on Fedora 32 with gcc 10.1
2020-07-14 19:36:02 +01:00
SarahW
9441cd9446 scamp.c: Fix 64-bit integer-as-pointer use for bank number warning
Patch from davefiddes. Original commit message :

The bank number is stored in a pointer value but is used exclusively as a
bank number integer reference. To do this safely it needs to be an intptr_t.
2020-07-14 19:33:06 +01:00
SarahW
e3fd8698df Remove faulty cyrix special register read access
Patch from davefiddes. Original commit message :

GCC 10.1 reports this line as being logically always false so will never run.
On inspection it may be that this was intended to be:

   if ((cyrix_addr & 0xf0) == 0xc0) return 0xff;

According to the IBM 6X86MX Microprocessor Databook
(http://datasheets.chipdb.org/IBM/x86/6x86MX/mx_full.pdf) this would correspond
to the Address Region 0 - 3 registers but omit Address Region 4 - 7 registers
which doesn't seem to make a lot of sense.

Delete the code as the default response from the function is to return 0xff
and this is what its behviour up until now has been.
2020-07-14 19:30:19 +01:00
SarahW
7570ba4271 Add numeric-keypad alternatives to CTRL-ALT-END/PGUP/PGDN shortcuts.
Patch from tigerforce.
2020-07-14 19:17:25 +01:00
SarahW
bb7dff751e Enable shadow RAM control at A0000-BFFFF on CS8230 chipset (ECS 386/32).
Patch from Greatpsycho.
2020-07-14 19:07:02 +01:00
SarahW
1f63723d9d Add -fcommon to configure.ac. Should fix building on GCC 10.x. 2020-06-20 18:40:53 +01:00
SarahW
c49fcff413 Update autoconf version to v16. 2020-04-19 16:30:54 +01:00
SarahW
d0c7ea56a7 Update version number to v16. 2020-04-19 15:50:51 +01:00
SarahW
adfda61a2f Initialise AT keyboard scancode set properly on reset. 2020-04-18 17:13:24 +01:00
SarahW
bc42a068c0 Don't require gd5434.bin for Itautec Infoway Multimidia; it isn't currently used. 2020-04-18 17:12:58 +01:00
SarahW
d0ea349f3f Some readme.txt updating and reformatting. 2020-04-18 17:12:15 +01:00
SarahW
798eabcac7 Rewrite SVGA status resolution code, should now be less wrong. 2020-04-18 12:06:20 +01:00
SarahW
098fe35462 Tweak Sidewinder Pad timings, now works again (was broken in v15). 2020-04-18 12:05:41 +01:00
SarahW
bbbbefcd91 Remove broken additional SVGA status print from Voodoo status.
Add a newline after the SB status to make SB + Voodoo read better.
2020-04-16 20:06:17 +01:00
SarahW
5e437fc736 Fallback to old MPU behaviour on SB cards. Fixes SB16/AWE32 initialisation on
Windows 3.1.
2020-04-11 14:47:19 +01:00
SarahW
9db376c4d2 Add Aztech guards to SB DSP command 0x09. 2020-04-11 12:24:43 +01:00
SarahW
c90ef0be59 Don't fatal on unknown SB commands. Fixes Seek & Destroy. 2020-04-11 12:24:16 +01:00
SarahW
c5a01772ed Mark Matrox Mystique as DEVICE_NOT_WORKING for v16. 2020-04-10 19:43:44 +01:00
SarahW
dfa6dac4a9 Added missing mono -> 32-bit bitblt on Mystique. Fixes 32-bit colour modes in
Windows 3.1.
2020-04-04 16:01:45 +01:00
SarahW
fb6d107e19 Add bounds checking on Mystique bus master reads. 2020-04-01 18:34:35 +01:00
SarahW
b892c7d874 Pass the correct data to ILOAD from a write to DMAPAD. Fixes Windows 9x desktop
on Matrox drivers 4.12.013.
2020-03-31 14:50:45 +01:00
SarahW
b66c37c8af Don't allow Mystique SRCx/DMAPAD writes to reach ILOAD processing unless a
command is actually in progress. Fixes Incoming with default Windows 98SE driver
2020-03-31 08:55:59 +01:00
SarahW
eb3ccc24f8 Backed out changeset: dc48ccf585b6 2020-03-31 08:24:49 +01:00
SarahW
feaf6d456c Allow CPU to write too much data to Mystique ILOAD (and ignore all superfluous
data). Fixes G-Police on Mystique with default Windows 98 SE driver.
2020-03-30 21:28:00 +01:00
SarahW
bb1f314d9c Mystique DMAPAD register doesn't act like an ILOAD mirror on DMA writes. 2020-03-30 21:03:59 +01:00
SarahW
a017de3c57 Add missing Mystique vsync interrupt. Helps with some Mystique Win9x drivers. 2020-03-30 20:59:40 +01:00
SarahW
12fae4b9ed Mystique fixes :
- Add previously unimplemented XREGs
- Fix CRTC register masking
- Use cursor colours when plotting cursor
- Add little-endian mono ILOAD
Fixes Mystique with BeOS and Redhat 5
2020-03-29 15:21:38 +01:00
SarahW
d60084fb04 PS/2 mouse fixes :
- Don't process pending mouse data when mouse was disabled
- Commands a7/a8 (disable/enable mouse port) now update keyboard controller command
- Implicitly enable mouse when writing data to mouse
Fixes PS/2 mouse with Red Hat 5.0.
2020-03-28 17:23:57 +00:00
SarahW
0116512d39 Fixed recompiled version of JMP far indirect. Fixes Red Hat 3.0.3. 2020-03-18 20:19:11 +00:00
SarahW
56a3ab7020 Fix missing read handling for SCAMP registers. Fixes boot on some RAM sizes on
Commodore SL386SX-25.
2020-03-15 22:33:18 +00:00
SarahW
4ee83be7b5 Don't add keyboard waitstates on AT or XT Model 286. Fixes POST of these
machines at 6 MHz.
2020-03-15 14:54:54 +00:00
SarahW
61a5ca2f39 Fix alphabetical ordering in model and video menu. 2020-03-15 14:53:48 +00:00
SarahW
68ea5ec3bd Rewrite !WXGTK memory spinner code to fix issues with up/down on some machines. 2020-03-14 21:33:38 +00:00
SarahW
ab11e20bb1 Temporary hack to restrict minimum window size on Windows. This prevents some
nasty behaviour relating to menu wrapping and window movement/sizing.
2020-03-14 18:44:43 +00:00
SarahW
7d9f1f58c3 Remove superfluous CRTC R17 adjustment on TGUI cards. Fixes 1280x1024 on TGUI9400. 2020-03-14 11:37:35 +00:00
SarahW
4e51641f29 Remove superfluous CRTC R17 adjustment on ATI 28800. Fixes 800x600 modes on 28800
cards. Patch from Greatpsycho.
2020-03-14 11:37:04 +00:00
SarahW
9b92305913 Added Itautec Infoway Multim?dia emulation. Patch from EluanCM. 2020-03-12 18:14:41 +00:00
SarahW
a113e4546f Added Hyundai Super-286TR emulation. Patch from EluanCM. 2020-03-12 18:14:07 +00:00
SarahW
dcf354688d Support serial UART without FIFO. Patch from EluanCM. 2020-03-12 18:12:47 +00:00
SarahW
1181b13c2d Added Aztech Sound Galaxy Pro 16 AB (Washington, AZ2316A) and Aztech Sound
Galaxy Nova 16 Extra (Clinton, AZ1605) emulation. Patch from EluanCM.
Clinton is currently marked as DEVICE_NOT_WORKING due to issues with DOS drivers.
2020-03-11 21:21:09 +00:00
SarahW
47e557e9ce Implement Amstrad reset port 0x66. Fixes CTRL-ALT-DEL on Amstrad machines. 2020-03-10 21:14:57 +00:00
SarahW
62cd992839 Added language select to Amstrad PCs. Patch from JohnElliott. 2020-03-09 19:55:52 +00:00
SarahW
360b514512 Correct blue graphics on MDSI Genius. Patch from JohnElliott. 2020-03-09 19:44:06 +00:00
SarahW
54664b1123 Fix MDA/CGA switch for MDSI Genius. 2020-03-09 19:38:21 +00:00
SarahW
a552c25b32 Added Leading Edge Model M. 2020-03-07 18:01:47 +00:00
SarahW
ee103457fa Add waitstates to AT keyboard read. Fixes keyboard detection on Advanced/EV & ZP. 2020-03-07 14:36:30 +00:00
SarahW
da26a60364 Port diff 1526 to Advanced/EV. 2020-03-07 14:36:03 +00:00
SarahW
07b2574279 Show correct CPU speeds in Advanced/ZP CMOS Setup. Patch from EluanCM. 2020-03-07 14:17:40 +00:00
SarahW
c8638b9b2b Added Samsung SPC-4620P. Patch from Greatpsycho. 2020-03-07 13:47:37 +00:00
SarahW
832717fe66 Added Goldstar GDC-212M. Patch from Greatpsycho. 2020-03-07 13:47:10 +00:00
SarahW
cab6aa43b2 Use pre-translation AT keyboard ID to avoid putting the ID through translation
twice.
2020-03-07 13:46:16 +00:00
SarahW
e3b9ed13fc Pre-386 CPUs don't clear integer registers on soft reset. Patch from Greatpsycho. 2020-03-05 17:22:34 +00:00
SarahW
cac99a8bf4 Added PS/2 mouse command 0xeb (Get Mouse Data). 2020-03-06 22:10:38 +00:00
SarahW
63b14455ba Add keyboard command 0xee (Diagnostic Echo). Fixes keyboard detection in FreeBSD 4.2. 2020-03-06 22:10:18 +00:00
SarahW
57607b537d Added Cyrix MII CPUs. Patch from leilei. 2020-03-05 17:10:29 +00:00
SarahW
38f19f7c9f Better implementation of FDC 'not found' errors - can now distinguish missing
address mark (eg disc not present or track not formatted), sector not found,
wrong cylinder and bad cylinder.
2020-03-04 22:03:08 +00:00
SarahW
2e3444697f FDC seek command always reports ST0 with head 0. Fixes numerous disc access
issues on Windows 98SE/ME.
2020-03-04 22:01:57 +00:00
SarahW
31569b8652 Full FDC command decoding. Prevents unimplemented command 0x2e from succeeding
due to alias with command 0x0e; this would cause a newer FDC that is actually
emulated to be detected. Also allows unlock command (0x94) to execute properly.
2020-03-04 22:01:15 +00:00
SarahW
a51b0e97f6 Do not reset FDC status when write to 3F2 has bit 2 set, only when bit 2 changes. 2020-03-04 21:58:34 +00:00
SarahW
25fc4d438d FDC cleanup. 2020-03-04 21:58:07 +00:00
SarahW
702d856d2c Fix missing parameters on FDC dump registers command. 2020-03-04 21:57:40 +00:00
SarahW
11904d765a FDC multi-track commands do not literally access multiple tracks. Limited read/
write data to a single track/cylinder.
2020-03-04 21:57:20 +00:00
SarahW
18cc83b28f Added ECS 386/32 emulation. 2020-03-01 17:20:23 +00:00
SarahW
c93a4eb295 AT/IDE drive status has ready set in between sector transfers in multi-sector
reads. Fixes some early AMI BIOSes.
2020-03-01 17:19:43 +00:00
SarahW
53291432e8 Add CD-ROM drive model configuration. Patch from EluanCM. 2020-02-29 14:04:31 +00:00
SarahW
61bdb5c8ba Added IBM SCSI Adapter with Cache (Spock) emulation. 2020-02-26 22:26:12 +00:00
SarahW
74df0bf145 Revert part of rev 1505 related to clearing STAT_MFULL on reading port 0x60.
Fixes PS/2 8601 errors.
2020-02-18 21:34:20 +00:00
SarahW
32563970c2 Bit 0 of port 3da on Amstrad PC1512 is a toggle bit instead of display enable. 2020-02-18 12:08:53 +00:00
SarahW
00f65675af Add delay to keyboard AT reset response.
A few other keyboard / PS2 mouse fixes.
Based on patch from EluanCM.
2020-02-10 20:51:26 +00:00
SarahW
868ef093a9 Route IRQ 2 to IRQ 9 on Xi8088. Patch from EluanCM. 2020-02-09 17:56:16 +00:00
SarahW
a77fd1e7f5 8087 FNINIT initialises control word to 0x3ff. Fixes FPU detection on Xi8088. 2020-02-09 17:55:28 +00:00
SarahW
11c1996539 Use AT scancodes on Xi8088. Patch from EluanCM. 2020-02-09 14:22:00 +00:00
SarahW
e997985326 Add additional guards in scsi_hd.c. Patch from EluanCM. 2020-02-09 13:01:37 +00:00
SarahW
cda00d95cf Fix SB Pro mixer compatibility registers. Patch from EluanCM. 2020-02-09 13:00:39 +00:00
SarahW
a0a6b0faa8 Fix serial IRQs on ACC3221. Patch from EluanCM. 2020-02-09 12:59:46 +00:00
SarahW
1540da6ada Add IRQ 12 setting to NE2000. Patch from EluanCM. 2020-02-09 12:48:09 +00:00
SarahW
8870334114 Add IBM PS/1 Model 2133 (EMEA 451) emulation. Currently displays a cache error
on boot, but otherwise seems to work fine.
2020-02-09 12:17:06 +00:00
SarahW
adf4a2de93 Fix MOV TRx, reg encoding on non-Pentium machines. 2020-02-09 09:07:34 +00:00
SarahW
68a2d8cb3c Added Cirrus Logic GD5428 emulation.
As part of this, added emulation of the GD5428-based IBM 1MB SVGA Adapter/A,
along with support for external graphics cards on MCA platforms, adding the
ability to override the onboard VGA controller.
2020-02-01 16:30:34 +00:00
SarahW
10f98a85b4 Added x87_timings.c/h missing from rev 1492. 2020-01-25 08:14:27 +00:00
SarahW
ea4dd4047c Added FENI/FDISI for 8087. 2020-01-24 20:33:59 +00:00
SarahW
4875f24b53 Added initial attempt at instruction timings for 8087/287/387.
Also added 287XL using 387 timings.
2020-01-24 20:33:35 +00:00
SarahW
0e8926936d Added FPU support for pre-486 CPUs.
This commit does not include timings for 8087, 80287 or 80387 FPUs, these will
be added later. It also does not restrict the use of 486 and later FPU
instructions.
2020-01-22 20:53:13 +00:00
SarahW
bbef0fd1cd Added discrete AVGA2 card. 2020-01-20 18:22:50 +00:00
SarahW
cbcc5d126a Fix read latch address on AVGA2/Cirrus Logic cards. 2020-01-20 18:04:29 +00:00
SarahW
60472b3a66 Add emulation of SCAMP DRAM controls. This primarily emulates the mirroring
effects of the controller programmed to the wrong DRAM size, which is required
for the Commodore SL386SX to be able to detect memory size correctly.
2020-01-19 21:26:50 +00:00
SarahW
b72aa2117b Mystique fixes :
- MGA mode disables all VGA data processing on reads / writes
- MGA mode forces 8 pixels per character
- DMAPAD acts as an ILOAD mirror during ILOAD operations, same as SRCx
- Handle signed X coordinates better in blit operations
- Add more MMIO registers
- Don't fatal on ILOAD reads when blitter not busy
Fixes Windows XP with Mystique.
2020-01-18 15:50:46 +00:00
SarahW
e6949e7599 Fix broken mappings in Cirrus Logic cards. 2020-01-17 19:00:00 +00:00
SarahW
5bf090f874 Added pthread mutex implementation for non-Windows hosts. 2020-01-16 20:30:35 +00:00
SarahW
3d0986fb73 Don't map Mystique memory ranges when base addresses are zero. Fixes boot of FIC
VA-503 BIOS with Mystique selected.
2020-01-16 19:52:53 +00:00
SarahW
483c7db709 Added Matrox Mystique emulation. This is a work in progress, and has a few known
issues :
- Only YUV supported for scaled ILOAD operations
- Several BLTMOD formats missing
- Bad texturing in Actua Soccer
- Flickering in Croc (broken vsync waiting?)
- Turok doesn't swap buffers correctly
- Some missing features
2020-01-15 22:17:36 +00:00
SarahW
22977a4ff7 Reset purgable page list on reset. Fixes crashes when switching between machines. 2020-01-15 20:00:04 +00:00
SarahW
a140d26315 Fix some offset size checks in instruction generation code. 2020-01-15 19:59:33 +00:00
SarahW
5c8e1aecc2 Added emulation of Commodore SL386SX-25 (PC Player II).
As part of this, added emulation of the onboard AVGA2, and fixed a couple of
bugs in the Cirrus Logic extended write modes.
Currently chipset (VLSI SCAMP) is missing EMS emulation.
2019-12-20 17:19:25 +00:00
SarahW
f56f5e76e6 Fix latching in svga_read_linear(). Fixes Jazz Jackrabbit on Cirrus Logic cards. 2019-12-20 17:01:53 +00:00
SarahW
2489fd9c6e Add ATI EGA Wonder 800+ emulation. 2019-12-19 11:24:08 +00:00
SarahW
2c6b130ec8 Update Makefile.in 2019-05-19 17:41:11 +01:00
SarahW
e676e6b9e0 Update version number to v15. 2019-05-19 17:38:31 +01:00
SarahW
803b48ea1c Fixed direction of AudioPCI sample counters. Fixes stuttering MIDI in some games (eg Theme Hospital). 2019-05-19 08:17:10 +01:00
SarahW
a5b59efb3f readme.txt updates 2019-05-18 19:31:33 +01:00
SarahW
1dd8cf1e81 Move port 0xcf9 handling from i430FX/VX to PIIX, adding reset callback for FX/HX/VX northbridges.
Add IDE reset to port 0xcf9.
Reset IDE error register on reset of non-existent devices.
Fixes IDE related issues on soft reset for ASUS boards.
2019-05-18 17:35:32 +01:00
SarahW
8b46bbe1af Better FDC enabling/disabling on W83877*. Fixes floppy drive on FIC VA-503+ in Windows 9x. 2019-05-18 15:48:43 +01:00
SarahW
b16e3d84bd Fix issues accessing W83877* config registers. Fixes floppy drives on ASUS and FIC boards. 2019-05-18 14:51:14 +01:00
SarahW
cb6422b324 MMX fixes :
- Initialise x87 tags correctly in recompiler
- EMMS/FEMMS now respect cr0 TS bit
- FRSTOR now doesn't force all non-uint64 tags to valid
Fixes Heaven 7 with AudioPCI
2019-05-18 14:05:30 +01:00
SarahW
b84fefacb7 Add K6 CPUs to Socket 7 motherboards. 2019-05-17 21:32:07 +01:00
SarahW
0b57135b3c Add FDC37C932FR SuperIO for Epox P55-VA. 2019-05-17 21:31:57 +01:00
SarahW
846103d310 Remove some dead comments from ibm.h. 2019-05-17 20:16:10 +01:00
SarahW
08b019eb85 ASUS Socket 7 boards use W83877F for SuperIO. 2019-05-17 20:15:56 +01:00
SarahW
60058283eb Disable FDC when enabling W83877TF config registers at 0x3f0, to prevent bus conflicts. Fixes duplicate FDC/COM/LPT ports on VA-503+. 2019-05-17 20:15:09 +01:00
SarahW
e6df3901d9 Rename Award 430VX PCI to Shuttle HOT-557. 2019-05-17 17:40:54 +01:00
SarahW
a4b33a6353 Correct memory limits on Socket 7 boards. 430VX boards support 8-128 MB. While the 430HX chipset supports up to 512 MB, the real ASUS P55T2P4 only supports up to 256 MB. 2019-05-17 17:40:12 +01:00
SarahW
4b061cdcf4 Fixed typo when reading SR[17] on Cirrus Logic cards. 2019-05-17 17:04:01 +01:00
SarahW
a9509e04ee Cirrus GD5429 doesn't support PCI, so don't look at the PCI command register when updating mappings. Fixes GD5429 on PCI systems. 2019-05-17 17:03:38 +01:00
SarahW
c39dc641a6 Reset Cirrus Logic hidden DAC counter on accesses to 3c7/3c8/3c9. 2019-05-16 22:07:57 +01:00
SarahW
e2c7bf02ab Add support for 64x64 cursors to Cirrus Logic cards (used by OS/2 Warp). 2019-05-16 22:05:18 +01:00
SarahW
12f8751e5c Fix read of Cirrus Logic cursor position registers. OS/2 Warp now detects CL cards correctly. 2019-05-16 21:52:07 +01:00
SarahW
51341c5ca6 Support CD-ROM commands with zero allocation length. Fixes 'Device failed to request command' on PB570. 2019-05-15 19:51:57 +01:00
SarahW
de3bb62e0c Interpreter now updates TSC every instruction. Fixes Desert Strike. 2019-05-14 20:32:32 +01:00
SarahW
1f57a70a21 Slow down sector read/write speed on AT Fixed Disk Adapter. Fixes OS/2 v1.0 hard drive formatter. 2019-05-13 19:39:56 +01:00
SarahW
a1e2ee3218 Set eviction/mask entries in pages[] array for remapped pages. Fixes crashes on PS/2 and possibly some other models. 2019-05-13 17:49:33 +01:00
SarahW
388229aeb5 Rework bit depth selection on SDAC to add a few missing cases. 2019-05-12 18:00:48 +01:00
SarahW
aa933688eb Fix reads of 3C6 on SDAC (Bahamas 64) when not returning command register or RAMDAC ID. 2019-05-12 18:00:19 +01:00
SarahW
51c4a1455e Fix clock selection on S3 Vision864 w/SDAC (Bahamas 64). 2019-05-12 17:59:21 +01:00
SarahW
bd8cade1fb Remove 4 MB option from Bahamas 64; this card only supports up to 2 MB. 2019-05-12 17:58:37 +01:00
SarahW
c682e070a6 Fix x87 tag register when using MMX instructions. Fixes numerous issues when an MMX process is running at the same time as one or more other MMX/FPU processes (usually seen running 3dfx games with AudioPCI). 2019-05-11 18:41:31 +01:00
SarahW
451e80a333 Fall back to interpreter version of FADD if x87 rounding mode is not nearest. Fixes software rendering in Battlezone. 2019-05-11 11:45:08 +01:00
SarahW
83f2869123 Don't unroll a loop if x87 top of stack is different at the start and end of the loop. Fixes Battlezone. 2019-05-11 11:44:33 +01:00
SarahW
2b6b14f175 Set BUSY_STAT in ATAPI code. Fixes 'Device failed to request command' error when installing Windows ME. 2019-05-08 21:50:52 +01:00
SarahW
6a27983f17 In Windows IOCTL CD-ROM code, only try reading via SPTI if ReadFile returned success but didn't read all requested data. Fixes Red Alert 2 installer. 2019-05-08 21:49:47 +01:00
SarahW
5ef5fc1f98 Tweak Voodoo swap pending code. Fixes hang in Carmageddon 3DFX version. 2019-05-05 17:08:17 +01:00
SarahW
5e35e48ec7 XMM registers are not preserved across function calls, and should be flushed & discarded by the recompiler prior to calling external functions. Fixes graphics issues in some games (eg World Cup 98 title/menus). 2019-05-05 14:49:10 +01:00
SarahW
e2a9629a89 Fix typo in Makefiles. 2019-05-05 09:22:26 +01:00
SarahW
8a7c3d78e7 Fix timer bugs in Windows Sound System emulation. 2019-05-04 18:26:14 +01:00
SarahW
cfd2e4e14c Fix gameport timing when no joystick plugged in. Fixes phantom joystick in some games (eg Rayman, The Lion King, Zone 66). 2019-05-04 16:02:55 +01:00
SarahW
12439b7c62 Add 82091AA AIP SuperIO for Packard Bell PB520R. Fixes floppy drives and duplicate ports in Windows 95. 2019-05-04 15:53:46 +01:00
SarahW
7be2eb53e2 Restore correct CS on abort while processing a CALL to a non-conforming code segment. Fixes OS/2 Warp. 2019-05-02 21:54:08 +01:00
SarahW
277b4c3988 Mask PC correctly on IRET to V86 mode. Fixes Windows NT 3.51 installer. 2019-05-02 19:55:29 +01:00
SarahW
49f2f34249 Fixed CTRL-ALT-DEL menu option broken by recent keyboard changes. 2019-05-01 21:38:28 +01:00
SarahW
66b0b9c926 Use inline assembly routine for x87 comparisons on x86-64. Fixes Unreal. 2019-05-01 20:18:13 +01:00
SarahW
abb5184ed4 Loading SS in v86 mode (but not real mode) does reset the stack size. Fixes DOS programs in Windows 9x. 2019-04-30 21:47:17 +01:00
SarahW
b98a6d63b1 Fix up offset calculations in x86-64 absolute address opcode generation, and add pointer to RAM array in NO_IMMEDIATES blocks. Fixes crashes/segfaults with x86-64 recompiler. 2019-04-30 21:20:00 +01:00
SarahW
57be2ef8d4 Add ability to change AT keyboard scancode and disable translation. Fixes keyboard in Solaris 8. 2019-04-28 18:35:11 +01:00
SarahW
4476fee2ec Loading SS in real mode does not change stack size. Fixes Solaris 8 bootup. 2019-04-28 18:34:33 +01:00
SarahW
16a86adbf8 Force implicit dependency on previous register version when accessing a partial register. Fixes graphics issues in Windows 95 on Packard Bell PB410A using built-in HT216 video. 2019-04-28 10:04:30 +01:00
SarahW
16bc3bb6ec Don't call addreadlookup() from get_phys() unless the address being translated is in RAM. Fixes Windows 95 install on Packard Bell PB410. 2019-04-27 18:31:22 +01:00
SarahW
8cb5c5eff2 Fixed register typo in 0x81 NO_IMMEDIATES ADC/SBB. Fixes SB audio in Worms. 2019-04-27 12:47:45 +01:00
SarahW
6560782b73 Fix missing text cursor on PC1512. 2019-04-26 17:55:33 +01:00
SarahW
b9e7f1b9d6 Correct fixed horizontal timing on PC1512 video. Fixes refresh rate. 2019-04-26 17:48:22 +01:00
SarahW
f7e8aa652e Fix pixel clock on HT216-32. 2019-04-26 17:32:14 +01:00
SarahW
5d9b14ac4a Fix pixel clocks on ATI-28800, ET4000 and Trident graphics cards. 2019-04-26 17:28:01 +01:00
SarahW
9aca6a8cb8 Don't double-add the T1000/T1200 video device. Fixes T1000/T1200 video. 2019-04-26 17:06:38 +01:00
SarahW
650b8cb5da Fix waitstate on accessing timer on timer registers on Premiere/PCI and Packard Bell PB520R. 2019-04-26 15:16:33 +01:00
SarahW
3508059f16 Make RTC/NVR a normal device instead of a special thing. Fixes nvr_recalc() being called on systems without NVR, which could cause timer crashes. 2019-04-26 14:59:34 +01:00
SarahW
58e42fda81 Don't enable RTC clock on speed change if RTC timer not enabled. Fixes crash when changing configuration with XT models. 2019-04-26 09:02:55 +01:00
SarahW
c876f1376d Remove obsolete linux/osx Makefiles. Users of those platforms should use autoreconf; ./configure; make instead. 2019-04-25 08:17:40 +01:00
SarahW
22ebbec201 Makefile.am fixes. 2019-04-25 08:14:51 +01:00
SarahW
c8f012f7f9 Makefile fixes. 2019-04-24 21:25:52 +01:00
SarahW
2f19e036f2 Disable fflush in pclog() accidentally enable in a previous commit. 2019-04-24 17:49:54 +01:00
SarahW
b3f61c09c0 Clamp 286/386 prefetch queue size. 2019-04-24 17:49:28 +01:00
SarahW
1242754343 Fix IM-1024 timing. 2019-04-24 17:48:00 +01:00
SarahW
f23dc883fc Merge from trunk 2019-04-24 12:51:38 +01:00
SarahW
38b9ada47b Fix incorrect op/uop separation for PUNPCKH* on x86 backend. 2019-04-24 12:28:39 +01:00
SarahW
9ee37e424e Rename codegen_backend.c to codegen_block.c 2019-04-24 12:15:26 +01:00
pcem_emulator
faa3d45f9e Merged in darkfm_uy/pcem (pull request #7)
Slight fixes to make FreeBSD compilation easier
2019-04-24 11:06:37 +00:00
SarahW
1db2fc6908 Use mmap() to allocate Voodoo recompiler memory on Linux instead of malloc() + mprotect(). Based on patch from Martin_Riarte. 2019-04-23 21:23:14 +01:00
SarahW
fb32dfceca Added Image Manager 1024 emulation. Patch from John Elliott. 2019-04-23 20:44:26 +01:00
SarahW
443ae04fa3 Add Bull Micral 45 emulation. Patch from dns2k. 2019-04-23 17:00:05 +01:00
Koutakun
406334d9d2 It also does not configure properly if
install-sh isn't executable
2019-04-18 22:39:25 -03:00
Koutakun
f250788427 Slight fixes to make FreeBSD compilation easier 2019-04-18 22:01:33 -03:00
SarahW
50e7de5214 Merge from trunk 2019-04-18 20:46:38 +01:00
SarahW
4b7328f06e Add cassette emulation to IBM PCjr. 2019-04-17 20:37:48 +01:00
SarahW
84a098bc98 Add read-only cassette emulation to IBM 5150 PC. Patch from JohnElliott. 2019-04-17 20:37:23 +01:00
SarahW
750d7021e4 Fix warning in laserxt.c 2019-04-17 18:47:39 +01:00
SarahW
4851a2fa9b Add software turbo control to Laser Turbo XT. Patch from Greatpsycho. 2019-04-17 18:36:02 +01:00
SarahW
081701a3c8 Allow access to Korean font ROM on ATI Korean VGA when Korean character display mode isn't activated. Patch from Greatpsycho. 2019-04-17 18:22:22 +01:00
SarahW
077304fb83 Disable memory > 640kb on XT systems when EGA/VGA cards in use. Patch from Greatpsycho. 2019-04-17 18:17:35 +01:00
SarahW
0a5198828a Latch Voodoo vertices at the start of triangle_setup() before sorting to prevent any races. 2019-04-17 18:04:05 +01:00
SarahW
1f5fc45c04 Amstrad changes :
- Add PPC512/640 emulation
- Add TV display type to Sinclair PC200
- Add font selection to PC1512
- Add disc change line to PC200
Patch from JohnElliott
2019-04-15 19:48:41 +01:00
SarahW
18a293d5cc Flush MMU cache on CPU soft reset. Fixes hang on reset under some configurations. 2019-04-14 21:40:32 +01:00
SarahW
d527736d21 ARM64 fixes - mask off immediate data in UOP_MOV_IMM to the destination size, and add UOP_MOVZX_REG_PTR_16 to uop list. 2019-04-14 17:03:07 +01:00
SarahW
f7c7f46712 Add missing ARM64 file to Makefile.am 2019-04-14 15:38:45 +01:00
SarahW
f4074eaacd Add better immediate handling to ARM64 backend. 2019-04-14 15:38:13 +01:00
SarahW
9a49a75eaf IDE soft reset should also reset ATAPI devices. Should fix at least some 'Device failed to request command' errors. 2019-04-14 13:47:20 +01:00
SarahW
de177759f7 Fix EA calculations on 3DNow PREFETCH instruction 2019-04-11 20:58:07 +01:00
SarahW
e2cddb8759 Fix Mach64 pixel clock. 2019-04-10 22:13:25 +01:00
SarahW
c0a7fcb343 Correct code present mask when using 16-bit addressing. Fixes graphics issues on Windows 9x with VGA 16-colour driver. 2019-04-10 22:05:26 +01:00
SarahW
c79074c980 Fix timer bug in AudioPCI. 2019-04-10 20:31:31 +01:00
SarahW
73c20a723f Clear integer registers on CPU reset. Fixes hang on reboot on VA-503+. 2019-04-10 20:28:45 +01:00
SarahW
b2e236e720 Mark FINIT as ending a code block. Fixes crash in Armoured Fist II. 2019-04-09 22:19:39 +01:00
SarahW
a5fc447950 Implement non-extended-ALU extended writes on HT216-32. Fixes Windows 3.1 built-in Video 7 drivers. 2019-04-08 20:04:38 +01:00
SarahW
d49aab7782 Reworked HT216-32 banking code. Fixes graphics errors in Windows 3.x. 2019-04-07 21:54:47 +01:00
SarahW
3fd56facb6 Fixed Makefile typo introduced in 1211. 2019-04-05 17:25:34 +01:00
SarahW
35962551dd Added emulation of Packard Bell PB410A, along with the built-in Headland HT216-32 video. 2019-04-03 21:32:48 +01:00
SarahW
fc369826a4 Fix start address when calculating block size. Fixes rendering issues in Wolfenstein 3D. 2019-04-02 20:40:40 +01:00
SarahW
8a91051e25 SST flash now keeps local copy of flash data to write back on device close. Prevents flash corruption when switching models and PCem loads the new BIOS before writing out the old flash. 2019-04-01 21:38:21 +01:00
SarahW
7f99cb7fb1 Use correct value for MAX_INSTRUCTION_COUNT. 2019-04-01 21:24:32 +01:00
SarahW
a0ab14f56f When unrolling a loop, set op_32, ea_seg and ssegs to the correct values at the start of the loop. Fixes mode setting on Bahamas 64 and most likely some other bugs. 2019-04-01 21:23:09 +01:00
SarahW
7a68bca85f Fixed some ARM64 build warnings. 2019-03-31 18:23:34 +01:00
SarahW
3890ffdff0 Fixed multiple definition of REG_SP in ARM64 backend. Fixes build warnings, also fixes Windows 3.x. 2019-03-31 18:23:21 +01:00
SarahW
584e67845b Added ROL, ROR and NOP uops to ARM and ARM64 backends. 2019-03-31 18:21:56 +01:00
SarahW
e3d5309e23 Added SST 39SF010 flash for VA-503+. 2019-03-31 11:29:07 +01:00
SarahW
78572ba468 Added register barriers to LOOPE and LOOPNE. Fixes crash in Age of Empires II. 2019-03-30 21:01:20 +00:00
SarahW
12d73e8a95 Fix zero sized recompiled shifts. Fixes hang in Gunmetal. 2019-03-30 19:45:29 +00:00
SarahW
e8f39da459 Add recompiled versions of ROL and ROR. 2019-03-30 16:10:00 +00:00
SarahW
e2a1ae696f Added lazy flags for ROL and ROR. 2019-03-30 14:41:02 +00:00
SarahW
8b197e22da Improved interpreter implementations of ROL and ROR. 2019-03-29 21:06:01 +00:00
SarahW
b77bce1efd Clear page_mask2 when the second page in a block is inaccessible. 2019-03-28 20:38:33 +00:00
SarahW
efef231d7d Restore correct CS value when aborting in stack operations in CALL far instructions. 2019-03-28 20:37:55 +00:00
SarahW
56a01a0e04 Provide dummy timing for unknown (usually illegal) opcodes in K6 timing code. 2019-03-26 22:02:00 +00:00
SarahW
61722f120c Fix block mask calculation. Fixes rendering errors in Blood. 2019-03-25 19:59:46 +00:00
SarahW
7e099c277e Added basic loop unrolling. Blocks that end in a JMP, LOOP or conditional branch to a previous instruction in the block will be unrolled up to 10 times. 2019-03-25 19:07:51 +00:00
SarahW
b35cf7de09 Fix codegen timing flush at end of a block. 2019-03-22 20:31:57 +00:00
SarahW
52f5f43d82 Fix PC value following FSTCW/FSTSW. 2019-03-22 20:31:29 +00:00
SarahW
4b99070fc0 Flush accumulators before call to non-recompiled instruction. 2019-03-16 15:47:49 +00:00
SarahW
cd9e228b6d Move CODEBLOCK_IN_DIRTY_LIST check to after checking if block needs to be flushed. Improves performance in Eradicator. 2019-03-16 15:46:48 +00:00
SarahW
ab124776a0 Rework self modifying code handling.
Code blocks now have a varying level of granularity in the page and dirty masks.
Most blocks have 64-byte granularity, but blocks that are repeatedly modified
drop to 1-byte granularity. This reduces the maximum size of the affected block
significantly, but reduces recompilation due to data located too close to code.

If the block is still marked as dirty, then it is recompiled without any
immediate instruction parameters being baked into the recompiled code, instead
being fetched from the RAM array as needed. This severely reduces recompilation
rates on some SMC-heavy games, eg Duke Nukem 3D, System Shock, Screamer etc,
giving a major speedup.
2019-03-16 14:53:26 +00:00
SarahW
063ffb4eab Update Makefile.mingw-wx-sdl2. 2019-02-14 19:39:47 +00:00
SarahW
01e86135ab Tweak FDC command timing and add register access waitstates. Fixes floppy in Windows 98 with VA-503. 2019-02-13 22:12:53 +00:00
SarahW
a73081f0bd Fix ARM and ARM64 build errors. 2019-02-13 21:11:27 +00:00
SarahW
3f2d9ecf87 Optimise out redundant uOPs, where the output register is never read. 2019-02-10 12:32:25 +00:00
SarahW
84622584e2 Move CPU tables to separate file. 2019-02-08 21:34:02 +00:00
SarahW
ce4436054d Replace cpu_has* flags with single cpu_features variable and cpu_has_feature() getter. 2019-02-08 21:22:53 +00:00
SarahW
03b5a44aca More CPU sanitisation. 2019-02-08 21:17:56 +00:00
SarahW
2554952658 Remove unused checkio_perm() macro. 2019-02-08 19:36:30 +00:00
SarahW
5b58b202a1 More CPU sanitisation. 2019-02-07 22:10:34 +00:00
SarahW
1b8a1e79af Move common 386+ functions and variables out of 386.c and 386_dynarec.c and into new 386_common.c. 2019-02-07 22:09:59 +00:00
SarahW
dd68b19f0a Second CPU sanitising pass. 2019-02-07 21:53:44 +00:00
SarahW
1af0b660b3 First pass at sanitising CPU headers. 2019-02-07 21:30:53 +00:00
SarahW
2735920f58 De-duplicate allocation code in mem_init(). 2019-02-07 20:34:06 +00:00
SarahW
3c2dbf063e Remove unused and superfluous variables from mem.c. 2019-02-07 20:23:14 +00:00
SarahW
5edc23a602 Reduce number of massive static arrays in mem.c. 2019-02-07 20:21:39 +00:00
SarahW
87031d4d09 Remove readmemb386l() and writememb386l(). 2019-02-07 20:18:03 +00:00
SarahW
d4d6a26283 Added recompiled versions of ADC and SBC. 2019-02-06 21:07:45 +00:00
SarahW
222071b742 ADC and SBC now use lazy flags. 2019-02-05 21:54:38 +00:00
SarahW
b105445a52 Correct Voodoo hvRetrace register. Fixes intermittent hangs on Voodoo mode setting. 2019-02-04 21:32:25 +00:00
SarahW
d66731f85a In codegen_ir_compile(), rearrange order of register lookups and order barrier flushing to reduce pointless writes of temporary registers. 2019-02-03 21:35:24 +00:00
SarahW
095cf53265 Added segment limit checking to some instructions. 2019-02-03 17:48:11 +00:00
SarahW
4c523a5fe2 Split x86 and x86-64 ops files into main/FPU/SSE files. 2019-02-02 19:20:42 +00:00
SarahW
9a6376dbf9 Clear codeblock physical addresses when resetting codegen. Fixes out-of-bounds accesses to the pages[] array during reset. 2019-02-02 13:46:06 +00:00
SarahW
2ccf771cf3 Cleaned up exec386_dynarec() a bit. 2019-02-01 20:11:08 +00:00
SarahW
9060f4552f Remove fake 3-operand instructions in x86-64 backend. 2019-01-28 21:56:57 +00:00
SarahW
e822460f33 Fix missing function prototypes in codegen_backend_x86-64_ops.h. 2019-01-28 21:22:03 +00:00
SarahW
9283ab5fef Hide fatal()s in codegen_backend_x86-64_uops.c behind a RECOMPILER_DEBUG #define. 2019-01-28 21:21:47 +00:00
SarahW
b018dc1005 Remove fake 3-operand instructions in x86 backend. 2019-01-28 21:08:01 +00:00
SarahW
f0225d2710 Hide fatal()s in codegen_backend_x86_uops.c behind a RECOMPILER_DEBUG #define. 2019-01-28 20:30:08 +00:00
SarahW
ca89a51478 Remove redundant oldcs variable - when processing an exception, oldcs and CS are the same. 2019-01-28 20:00:49 +00:00
SarahW
427aa72a15 Don't set cpu_state.oldpc at the start of every iteration of the recompiler main loop. 2019-01-28 19:25:09 +00:00
SarahW
6e5336ae56 When compiling with CODEBLOCK_STATIC_TOP, update TOP register with immediate moves rather than add/sub. 2019-01-28 17:40:28 +00:00
SarahW
32d4f4c765 Fix incorrect PC size detection on LOOP/LOOPE/LOOPNE/JCXZ/JECXZ. Fixes Heaven 7. 2019-01-27 22:21:06 +00:00
SarahW
889ca7f3f2 Remove test-USE32-and-mask-PC operation from interpreter as well. 2019-01-27 21:22:35 +00:00
SarahW
ee186dbb0d Remove test-USE32-and-mask-PC operation following code block execution. Instead, ensure that all recompiled instructions mask PC correctly. 2019-01-27 20:54:22 +00:00
SarahW
7b3b6a745d Remove pointless NULL check against block in recompiler loop. 2019-01-27 20:52:59 +00:00
SarahW
6c65c34bd3 Don't clear trap at the start of the recompiler loop; instead, clear it when actually taking a trap. 2019-01-27 20:52:37 +00:00
SarahW
93b42d43d5 Remove pointless setting of cpu_state.op32 and cycdiff at start of recompiler main loop. 2019-01-27 20:52:02 +00:00
SarahW
c3250ca63e Don't set oldcpl at the start of each instruction; instead, only set it following a successful CS load. 2019-01-27 20:51:13 +00:00
SarahW
d461bc7cda Fix invalid page check in get_phys_noabrt(). 2019-01-24 20:36:20 +00:00
SarahW
c1f0b7c35d Use readlookup cache in get_phys(). 2019-01-22 21:41:00 +00:00
SarahW
ec18c8a2fb Implement more intelligent out-of-memory algorithm. 2019-01-21 21:52:32 +00:00
SarahW
bf392ffd3a Maintain a list of free code blocks, and allocate new blocks from the list rather than evicting at random.
Also maintain a list of memory pages with dirty code blocks that can be evicted. This allows the recompiler to evict dirty blocks in preference to freeing usable blocks when the free list is empty.
Increase the number of available code blocks on x86.
Increase the non-ARM code allocator memory to 128 MB.
This reduces the amount of code block churning when running software with a lot of code, eg Windows XP.
2019-01-19 21:54:14 +00:00
SarahW
c07a3b5311 Free currently allocated memory blocks on CPU reset. Prevents memory leaks when resetting. 2019-01-19 18:08:45 +00:00
SarahW
9c595f4b9b Add CMPXCHG8B to the K6 timing model. 2019-01-19 18:06:14 +00:00
SarahW
57579cdd07 Add dummy USB and ACPI implementations to VT82C586B. Windows 2000 and XP now work on FIC VA-503+. 2019-01-19 18:05:27 +00:00
SarahW
13087d0031 Added missing codegen allocator files 2019-01-17 18:05:27 +00:00
SarahW
178c9d5c15 Don't write back temporary registers if they won't be read again. 2019-01-16 21:54:10 +00:00
SarahW
cc4118fca0 Remove duplicate i430hx.c in Makefile.am 2019-01-16 18:33:27 +00:00
SarahW
140903f4cb Tweaked S3 ViRGE clipping. Based on patch from rene. 2019-01-15 21:33:24 +00:00
SarahW
2c5824f2cd Added ASUS P/I-P55T2P4 emulation, along with i430HX chipset emulation. Patch from Martin_Riarte. 2019-01-15 20:00:17 +00:00
SarahW
1ddcbdaf4c Added emulation of CGA 3d8h bit 3 (display enable). 2019-01-13 22:12:39 +00:00
SarahW
ac886c420f Increase ARMv7 and v8 code block count to the normal default of 16384, now that this no longer leads to a massive increase in memory usage. 2019-01-13 12:58:07 +00:00
SarahW
8998024225 Move GPF and early exit routines out of individual code blocks and into the common helper block. 2019-01-13 12:57:32 +00:00
SarahW
f4f9695ca9 Added Zenith Data SupersPort. Based on patch from Tux. 2019-01-12 18:33:19 +00:00
SarahW
9efd6705ae Added ASUS P/I-P55TVP4 and Epox P55-VA. Patch from Martin_Riarte. 2019-01-12 17:24:33 +00:00
SarahW
d32157306d Use consistent capitalisation of TGUI 9400CXi BIOS file name. Patch from Martin_Riarte. 2019-01-12 16:54:32 +00:00
SarahW
7fcb437f29 Fixed index into RTC days_in_month tables. Patch from Tale. 2019-01-12 16:49:44 +00:00
SarahW
966e74261b Update Makefile.am. 2019-01-12 15:17:11 +00:00
SarahW
68464d6e81 Fix 3DNow build issues on ARM platforms. 2019-01-12 15:16:03 +00:00
SarahW
66fba50e06 Add new codegen memory allocator. This allows the recompiler to allocate memory from a central pool as required. This central pool is by default 64 MB on x86, x86-64 and ARMv8, and 32 MB on ARMv7.
The current design does not allow for ARMv8 literal pools, therefore these have been removed.
2019-01-12 15:15:43 +00:00
SarahW
56a4d5cf83 Use correct rounding mode on x86 and x86-64 recompiled versions of PF2ID. Fixes rendering errors on Unreal 3DNow! software renderer 2019-01-10 21:33:29 +00:00
SarahW
8ee9b07ab2 Added decoder length limitations to K6 timing model 2019-01-06 14:23:23 +00:00
SarahW
3c7d1b1204 Ensure that taken jump/branch instructions do not count as 0 cycles. Fixes Windows 95 hang with K6. 2019-01-06 13:46:17 +00:00
SarahW
1953f4afb9 Use mmap() to allocate codeblock memory on x86-64 when not running on Windows. 2018-12-19 22:25:47 +00:00
SarahW
c86b919ed8 Fix writemem functions on x86-64 when !WIN64. 2018-12-19 22:24:40 +00:00
SarahW
93a5925f02 Use MOVZX on x86-64 when loading a word sized function parameter. Fixes issues when built with LLVM and -O3. 2018-12-19 22:23:59 +00:00
SarahW
b26432caa8 When allocating a read register, prioritise registers that will not be used again. 2018-12-17 19:40:09 +00:00
SarahW
e8483acea5 Search through all host integer and FP registers when allocating registers. 2018-12-17 19:36:54 +00:00
SarahW
e26abe7a1f Added recompiled versions of 3DNow instructions - PF2ID, PFADD, PFCMPEQ, PFCMPGE, PFCMPGT, PFMAX, PFMIN, PFMUL, PFRCP, PFRCPIT1, PFRCPIT2, PFRSQRT, PFRSQIT1, PFSUB, PFSUBR and PI2FD. 2018-12-14 21:59:03 +00:00
SarahW
cfd4ac3a4f Added initial timing model for K6 CPUs. 2018-12-09 22:17:11 +00:00
SarahW
fd10fdd372 Fix ATCLK timings on Winchip 2 CPUs. 2018-12-06 20:02:51 +00:00
SarahW
a9541dadea Added preliminary emulation of AMD K6 CPUs. 2018-12-06 20:02:35 +00:00
SarahW
7ec6f1e4ce Added Winchip 2 timing model. 2018-12-05 20:54:56 +00:00
SarahW
9b8b6c2c70 Add Winchip 2A CPUs. 2018-12-04 21:35:51 +00:00
SarahW
ca39b51803 Fix address calculation on PCMPEQD and PCMPGTD. 2018-12-04 21:35:26 +00:00
SarahW
da2d819ed4 Added WinChip 2 emulation, along with (currently non-recompiled) 3DNow! instruction emulation. 2018-12-03 21:59:41 +00:00
SarahW
5043cff3f9 Move SFF-8038i IDE bus mastering code out of PIIX files.
Add bus mastering to VT82C586B emulation.
2018-12-02 15:46:28 +00:00
SarahW
99ca11d148 Added initial emulation of FIC VA-503+ (Super 7).
This includes preliminary emulation of the VIA MVP3 northbridge, VT82C586B 'PIPC' southbridge, and Winbond W83877TF SuperIO chip.
2018-12-02 12:38:31 +00:00
SarahW
d5f07a8594 Fix bad use of flags variable in wx-sdl2-display.c. 2018-11-30 13:19:16 +00:00
SarahW
43b5b83644 Reduce codeblock_hash table to uint16_t. 2018-11-30 13:18:56 +00:00
SarahW
9ff1c7f409 Further reductions to codeblock_t size - replace link pointers with uint16_t block indicies, shrink ins to uint8_t, remove endpc. codeblock_t now fits in a 64-byte cacheline on 32-bit platforms. 2018-11-29 20:05:12 +00:00
SarahW
2007c25177 Start reducing size of codeblock_t structure.
Re-arrange all variables needed to run a block to fit in a single cache line.
2018-11-28 20:29:48 +00:00
SarahW
d63176e472 Move dynarec code memory out of codeblock structure. 2018-11-28 18:43:40 +00:00
SarahW
356f406b22 Fix codegen pointer register reads. 2018-11-28 18:41:53 +00:00
SarahW
335cea3ee1 Added recompiled versions of PUSHF and PUSHFD. 2018-11-28 15:19:21 +00:00
SarahW
5df3f6caef Added recompiled versions of PUSHA and POPA. 2018-11-28 11:50:24 +00:00
SarahW
e012420f90 Added recompiled versions of CLC, CLD, CLI, CMC, STC, STD and STI. 2018-11-28 09:58:50 +00:00
SarahW
a4d3aa1912 Move flags and eflags variables into cpu_struct. 2018-11-28 09:42:04 +00:00
SarahW
c1565eb42f Fix partial register handling - removes pointless loads when writing to non-32-bit registers (eg FPU or MMX). 2018-11-27 19:43:01 +00:00
SarahW
92ab0ee8ef Fix flags on 8-bit memory INC/DEC. 2018-11-27 10:15:18 +00:00
SarahW
e7d33dd76a Fixed Makefiles broken by rev 1197. 2018-11-27 09:39:06 +00:00
SarahW
c034381797 Added Trigem Korean VGA emulation. Patch from Greatpsycho. 2018-11-26 17:36:47 +00:00
SarahW
07035c97c8 Added recompiled versions of FABS, FCHS, FSQRT and FTST. 2018-11-26 17:00:00 +00:00
SarahW
856f0b4471 ARM64 MMX fixes 2018-11-25 17:59:38 +00:00
SarahW
6341caf318 ARM MMX fixes 2018-11-24 20:35:33 +00:00
SarahW
2a19183d83 Added debug code to log execution rate of non-recompiled instructions. 2018-11-24 20:16:52 +00:00
SarahW
086422b79f Added recompiled versions of PMULLW, PMULHW and PMADDWD. 2018-11-24 12:52:08 +00:00
SarahW
77af266ab2 Added recompiled versions of PACK* and PUNPCK * 2018-11-23 18:34:30 +00:00
SarahW
a991bc3249 Added recompiled versions of PCMP* 2018-11-23 15:17:21 +00:00
SarahW
e43a2a6be0 Added recompiled versions of PSLL*, PSLR* and PSAR* with immediate shifts. 2018-11-22 18:43:36 +00:00
SarahW
35b9e0811b Added recompiled versions of PADD* and PSUB*. 2018-11-22 15:57:44 +00:00
SarahW
78c604c731 Added recompiled versions of PAND, PANDN, POR and PXOR 2018-11-21 20:51:34 +00:00
SarahW
76115568f2 Added recompiled versions of MOVD and MOVQ. 2018-11-21 17:02:20 +00:00
SarahW
f545d9d57f Rename FPU stack-based integer mirror registers, to avoid confusion with non-stack-based MMX registers. 2018-11-21 12:44:47 +00:00
SarahW
59d5ce4a50 Reduce keyboard scancode and state arrays from int to uint8_t. Patch from Tale. 2018-11-20 10:50:21 +00:00
SarahW
e0fd70b4a2 Correct keyboard scancode set used for key repeat. Patch from Tale. 2018-11-20 10:44:38 +00:00
SarahW
e557bda696 Fixed DIP switch value for AMA932J's built-in OTI067. Fixes colour/black and white switch. Patch from Greatpsycho. 2018-11-20 10:40:38 +00:00
SarahW
fa4ccece48 Fixed pixel clock on S3 ViRGE. 2018-11-20 09:40:54 +00:00
SarahW
964b20e820 Added recompiled versions of FLD1 and FLDZ. 2018-11-14 21:43:22 +00:00
SarahW
0055238ade Added recompiled versions of FCOM, FCOMP, FCOMPP, FICOM, FICOM, FUCOM, FUCOMP and FUCOMPP. 2018-11-14 21:42:20 +00:00
SarahW
4155b283ab Added Sigma Designs Color 400 emulation. Patch from John Elliott. 2018-11-13 18:53:55 +00:00
SarahW
5167ba5b2d Added Tulip AT Compact. Patch from dns2kv2. 2018-11-12 21:05:40 +00:00
SarahW
461cb221ca Implemented experimental Headland HT102 chipset based EMS support.
Added Trigem 266M and AMA-932J machines.
Patch from Greatpsycho.
2018-11-12 20:32:53 +00:00
SarahW
8dc7b2ef36 SCAT chipset improvements :
- Implemented ROMCS enable feature.
- Fixed RAM write protect register setting wasn't properly applied.
- Implemented Encoded RAS mode emulation on 82C235 revision A and 82C386 chipset.
- Implemented of experimental memory bank interleaved addressing emulation on
  82C836 chipset and removed hardcoded memory configuration setting. KMX-C-02's
  BIOS now automatically detects DRAM configuration and set DRAM configuration
  register value correctly.
- Improved accuracy of 82C235 chipset's memory bank addressing. GW-286CT GEAR
  BIOS now set DRAM configuration register correctly when Dynamic Memory Resizing
  is enabled.
- Changed Award286 clone and Samsung SPC-4200P's chipset revision to rev A.
- SCAT revision D chipset now set high ROM mapping size to 128KB.
Patch from Greatpsycho
2018-11-12 20:16:32 +00:00
SarahW
b814bcc80d Added recompiled versions of FSTCW and FSTSW. 2018-10-25 21:43:32 +01:00
SarahW
87191dde55 Added recompiled versions of FIST and FISTP. 2018-10-25 20:54:33 +01:00
SarahW
589f50e479 Added recompiled version of FILDq. 2018-10-22 21:23:09 +01:00
SarahW
bce9ad4f3d Added recompiled versions of FFREE, FLD, FST, FSTP and FXCH. 2018-10-21 16:22:20 +01:00
SarahW
6d8af5df4a Added recompiled versions of memory variants of F[I]ADD, F[I]DIV, F[I]DIVR, F[I]MUL, F[I]SUB and F[I]SUBR. 2018-10-20 20:03:28 +01:00
SarahW
8a516df476 Added recompiled versions of FLD, FILD, FST and FSTP. 2018-10-17 19:47:04 +01:00
SarahW
e17a94a409 FDIVP/FDIVRP should pop the stack when a divide by zero occurs and the exception is masked. Fixes software rendering on Need for Speed III. 2018-10-09 22:10:29 +01:00
SarahW
829c74f2d5 Don't write back unchanged registers on flush + invalidate. 2018-10-09 14:07:49 +01:00
SarahW
d9e38fe37c Fix masking of FPU top-of-stack in several places. Fixes DOS Quake. 2018-10-09 13:51:05 +01:00
SarahW
305b6cc4fd Added recompiled register versions of FADDP, FDIVP, FDIVRP, FMULP, FSUBP and FSUBRP. 2018-10-08 21:44:30 +01:00
SarahW
78996b3e5c Added recompiled register versions of FADD, FDIV, FDIVR, FMUL, FSUB and FSUBR. 2018-10-07 22:02:31 +01:00
SarahW
dbb01ef9e2 Cleaned up x87 tag register handling. 2018-10-01 21:02:40 +01:00
SarahW
e9ff110021 Fixed flags on register->register ADD/SUB opcode 00/01/28/29. Fixes rendering in Need For Speed II. 2018-09-30 17:30:28 +01:00
SarahW
94fe85b17e Fixed video clock on Cirrus Logic cards. 2018-09-29 17:43:02 +01:00
SarahW
592b07be63 Added recompiled versions of JMP indirect, JMP far, RETF, LxS, XLAT and LEAVE. 2018-09-29 17:42:44 +01:00
SarahW
1aadfd436d Added recompiled versions of CBW, CDQ, CWD, CWDE and MOVSX. 2018-09-23 21:45:12 +01:00
SarahW
8a19e56340 Added recompiled versions of INC and DEC. 2018-09-12 20:16:27 +01:00
SarahW
787aad9598 Reset EGA/VGA character scanline counter when hitting split screen start line. 2018-08-31 08:46:38 +01:00
SarahW
0d687a4f6c Implement horizontal soft panning on EGA/VGA text modes. 2018-08-31 08:44:00 +01:00
SarahW
ad50530ded Force display redraw on writes to EGA/VGA attribute register 0x13 (soft panning). 2018-08-31 08:41:25 +01:00
SarahW
3332897886 Added recompiled versions of Jcc, JCXZ, LOOP, LOOPE and LOOPNE. 2018-08-30 22:26:33 +01:00
SarahW
872a2da788 Added recompiled versions of SHL, SHR, SAR, SHLD and SHRD. 2018-08-16 21:44:41 +01:00
SarahW
2783471daa Clamp SVGA display on/off timings to a minimum of 1 usec. Fixes hang on Windows XP boot with ViRGE/DX. 2018-08-08 22:15:21 +01:00
SarahW
4846616924 Handle REP prefixed instructions without a dedicated REP instruction handler properly in the recompiler. Fixes Windows XP setup. 2018-08-08 22:14:52 +01:00
SarahW
9bba93e0be Added recompiled versions of LEA, MOV seg, MOVZX, NEG, NOP, NOT, PUSH imm, TEST and XCHG. 2018-08-08 22:14:22 +01:00
SarahW
57e5549f48 Remove final remnants of ARM literal pool, and expand work register set to 7 registers. 2018-08-05 16:24:48 +01:00
SarahW
f1df9be8f6 Added recompiled versions of JMP, CALL, RET, PUSH and POP. 2018-08-05 16:24:15 +01:00
SarahW
4ada3382b4 Fix inconsistent size of ide_fn array. 2018-08-03 19:44:35 +01:00
SarahW
a9d46d95ec Use MOVW/MOVT to load immediates on ARM instead of a literal pool. 2018-08-02 22:09:57 +01:00
SarahW
42d62925c3 Fix compiler warnings on ARM builds. 2018-08-02 22:09:18 +01:00
SarahW
a7d006b637 Rewrote timer code.
The new code is based on timestamps, rather than delays. This eliminates the
need to update every timer in timer_process(), which cost a non-trivial amount
of CPU time on low-end machines.

This involved changes to every user of the timer code, so this change almost
certainly introduces bugs.
2018-08-02 22:06:10 +01:00
SarahW
ab359ca9c5 Removed rogue CPU_BLOCK_END() from ropMOV_r_b() 2018-07-27 22:25:03 +01:00
SarahW
e64271f5bb Added recompiled versions of mem->reg, reg->mem and imm->mem versions of ADD, AND, CMP, OR, SUB and XOR. 2018-07-27 22:24:34 +01:00
SarahW
cf508b050f End block when register version hits a maximum count. 2018-07-25 20:18:03 +01:00
SarahW
5ca2533f3c Increase ARM64 work registers from 5 to 10. 2018-07-25 20:17:42 +01:00
SarahW
f27b7f757a Add recompiled versions of mem->reg, reg->mem and imm->mem versions of MOV. 2018-07-25 20:16:58 +01:00
SarahW
91143d3c68 Move CPU segment structures into cpu_state structure. 2018-07-22 12:56:03 +01:00
SarahW
4e7a13f452 Corrected effective address for POP 0x8f. Windows 95 now works on recompiler. 2018-07-18 22:19:09 +01:00
SarahW
0f0a1c3223 Perform NULL segment checks upfront in opcode handlers, rather than on every memory access.
This removes the need to pass the segment to readmem*l()/writemem*l().
2018-07-18 22:10:18 +01:00
SarahW
648aa0e3e8 Added recompiled versions of 8 and 16 bit immediate->reg and reg->reg versions of MOV, ADD, SUB, CMP, AND, OR and XOR. 2018-07-17 22:08:25 +01:00
SarahW
e4e0f76d5c De-duplicate ARM literal pools. 2018-07-08 16:36:26 +01:00
SarahW
fc27be592c Added recompiled versions of immediate->reg and reg->reg versions of MOV, ADD, SUB, CMP, AND, OR and XOR. 2018-07-08 16:36:11 +01:00
SarahW
67804322b6 Add codegen_accumulate.c to Makefile.am. 2018-07-06 17:54:17 +01:00
SarahW
ced37ac545 Hacked in quick ARM64 UOP_AND_IMM handling of immediate 0xffff. 2018-07-06 17:53:58 +01:00
SarahW
d666c0aeb9 ARM64 UOP_ADD_IMM can now generate SUB instructions to better handle negative data. 2018-07-06 17:53:11 +01:00
SarahW
dc2afee957 ARM UOP_ADD_IMM can now generate SUB instructions to better handle negative data. 2018-07-06 17:52:33 +01:00
SarahW
774f4201ee Recompiler now handles instruction and cycle counting. 2018-07-06 17:51:22 +01:00
SarahW
93ec6b0692 Recompiler now handles FPU prefixes. 2018-07-06 17:50:32 +01:00
SarahW
94fea237b4 Implemented effective address compilation. 2018-06-28 22:06:42 +01:00
SarahW
ee3f9210dc Implemented basic register allocation.
Mainly handles 'virtual' registers at the moment (eg current and last PC values, segment override status, etc).
2018-06-23 19:04:36 +01:00
SarahW
03fe25d818 First stage of dynamic recompiler rewrite.
Basic IR generation calls C implementation of all instructions.
Backend generation implemented for x86, x86-64, ARM and ARM64.
2018-06-17 20:26:15 +01:00
SarahW
e6dce0920b Disable SDL thread naming on Windows. Fixes running PCem through GDB. 2018-06-05 18:22:47 +01:00
SarahW
e44ca65ad6 Removed old bitrotted Win32 port. 2018-06-04 22:08:38 +01:00
SarahW
b62127f7a8 Move BIOS loading out of mem.c. 2018-06-04 22:03:45 +01:00
SarahW
8ac2157f87 Fixed AT systems broken by rev 1184. 2018-06-04 21:38:18 +01:00
SarahW
cbf4b9f813 Configurable MAC address. Patch from Tux. 2018-06-04 21:02:36 +01:00
SarahW
38e842d88d Load BASIC on Generic XT clone if present. Patch from Greatpsycho. 2018-06-04 20:20:05 +01:00
SarahW
82fcbd99de Allow 704kb on Generic XT clone when MDA/CGA/Hercules are in use. Patch from Greatpsycho. 2018-06-04 20:19:47 +01:00
SarahW
2955df2c5a Fixed strncpy() length when parsing command line. 2018-06-04 20:06:11 +01:00
Greg V
e3f801c2e8 Disable lfs on FreeBSD
It has the off64_t type, but none of the legacy *64 functions.
2018-05-18 02:52:11 +03:00
Greg V
f002abe258 Add dummy cdrom ioctl module for other OSes 2018-05-18 02:51:33 +03:00
Greg V
d5b7a69ff6 Respect the WX_CONFIG_PATH variable
The configure script takes a --with-wx-config argument, we should respect it.
It is very necessary for FreeBSD, which installs wx configs under more specific names such as 'wxgtk2u-3.0-config'.
2018-05-18 02:48:43 +03:00
SarahW
d70382380e Update version number in configure/configure.ac for v14 release. 2018-04-20 14:16:22 +01:00
SarahW
429f49abd1 Update version number and readme for v14 release. 2018-04-20 14:14:10 +01:00
SarahW
7ce5c0c356 More readme.txt updates. 2018-04-20 11:19:51 +01:00
SarahW
8a1cef9851 Tweak DIV timing for Cyrix 486es. Improves Cyrix 486 CPU speed detection on SiS496/497. 2018-04-20 10:58:43 +01:00
SarahW
d489dddeee Tweak 486 prefetch timing when cache disabled, to account for burst accesses. Improves CPU speed detection on SiS496/497. 2018-04-20 10:58:12 +01:00
SarahW
270b6d733a Updates to readme.txt 2018-04-19 22:12:21 +01:00
SarahW
a33f719808 Fix up ROM presence detection on Elonex PC-425X and Packard Bell PB520R and PB570. 2018-04-19 22:05:02 +01:00
SarahW
d4f56b1f27 Correct names of Toshiba laptops. 2018-04-19 22:01:27 +01:00
SarahW
1a28e657b5 NCR PC4i shipped with 256kb RAM as minimum. 2018-04-19 22:01:01 +01:00
SarahW
056eefb196 Reset internal cache status correctly on soft CPU reset. Fixes CPU speed detection on Elonex PC-425X. 2018-04-19 22:00:33 +01:00
SarahW
3d388564c1 Clear carry flag on DIV/IDIV on non-Cyrix processors. Fixes CPU type detection on Elonex PC-425X. 2018-04-19 22:00:09 +01:00
SarahW
e4ddbd8441 Remove waitstates from PIT register accesses. Fixes speed issues with Desert Strike. 2018-04-18 21:10:01 +01:00
SarahW
0b964d51c1 Mark Epson PC AX2e as having PS/2 mouse. Fixes 8602 error. 2018-04-18 20:59:18 +01:00
SarahW
de3379a19f Tweaked XT keyboard code a bit. Fixes Keyboard Error reported by AMI XT clone. 2018-04-18 20:59:01 +01:00
SarahW
51db026b90 SB 2.0 mirrors the OPL2 at ports 2x0/2x1 when CMS/Gameblaster chips are not present. Fixes music in Syndicate. 2018-04-18 16:05:01 +01:00
SarahW
7644c771de Voodoo 2D blitter now marks destination areas as dirty when writing to the front buffer. Fixes FMV in Urban Chaos. 2018-04-17 17:17:39 +01:00
SarahW
1107fc4f28 Force full display redraw on window resize and enter/leave fullscreen. 2018-04-16 17:29:42 +01:00
SarahW
796f401b71 SCSI CD-ROM should not fail on START_STOP_UNIT command with Start set and LoEj clear. Fixes Solaris 4.2 with AHA-1542C. 2018-04-15 20:39:26 +01:00
SarahW
5bfd5aa823 Write SCSI status to AHA-1542C/BusLogic CCB and BusLogic malibox following command completion. Fixes Windows 2000 with BusLogic. 2018-04-15 20:38:39 +01:00
SarahW
3feeea3bbe All bits of BusLogic ISR register are read/write. Fixes BusLogic detection on Solaris 2.4. 2018-04-15 20:37:55 +01:00
SarahW
37c8a16478 Reset AHA-1542/BusLogic mailbox pointers on mailbox initialisation command. Fixes Solaris 2.4 with AHA-1542. 2018-04-15 20:37:08 +01:00
SarahW
20e255ceb7 Don't process Sound Blaster 16-bit transfers when DMA disabled. Fixes Visual Player 2.0. 2018-04-13 21:16:33 +01:00
SarahW
9dc02e7185 Implemented Trio32-only host data mode. Fixes text in Windows 3.1. 2018-04-12 21:31:01 +01:00
SarahW
4cea5cc59f Implemented Trio64 polygon fill commands. Fixes issues with Paintbrush on Windows 3.1. 2018-04-12 21:26:45 +01:00
SarahW
8300b3a7e2 Speed up AT keyboard controller. Fixes OS/2 v1.x PS/2 mouse driver on PS/2 systems. 2018-04-11 20:16:08 +01:00
SarahW
bd06b5a1cc Add segment limit checking to opcode F6 (16-bit version) as temporary workaround for hang when opening Windows 9x DOS box on Diamond Stealth 32. 2018-04-11 17:37:41 +01:00
SarahW
4ba11c5a13 Always decode CRTC index bit 5 on VGA compatibles. Fixes Joe Montana Football. 2018-04-11 17:00:58 +01:00
SarahW
d6b74b945b Clear _mem_exec array when clearing out old memory mappings. Patch from Greatpsycho. 2018-04-11 15:25:30 +01:00
SarahW
0fe9b99953 SB16/AWE32 support SB2/Pro style high speed DMA commands, contrary to Creative Labs documentation. Fixes sound in Earthworm Jim. 2018-04-11 15:22:35 +01:00
SarahW
4263bc8227 Added monitor type configuration to Plantronics Colorplus. Plantronics now doesn't inherit settings from the last emulated CGA system. 2018-04-10 17:21:18 +01:00
SarahW
138430ad8f Fixes to Trio64 read mask handling. Fixes some graphics issues in OS/2 Warp. 2018-04-10 16:20:48 +01:00
SarahW
38fa1cbfd1 Trio64 maps 32-bits to colour & mask registers even when 32-bit registers are disabled. Fixes bad colours in OS/2 Warp in 32-bit colour mode. 2018-04-10 16:20:17 +01:00
SarahW
25ac99a6ef Clamp CD-ROM command data to the allocation length. Fixes some emulator deaths when DMA enabled. 2018-04-08 21:38:48 +01:00
SarahW
031f64c1a3 Invalid CPUID instructions should return zero in EBX/ECX/EDX. Fixes CPU type test and subsequent invalid 3DNow! instruction execution in NFL Blitz 2000. 2018-04-08 17:16:04 +01:00
SarahW
7ffb019962 CL-GD54xx now defaults to 8 bpp correctly when enhanced RAMDAC modes not set. 2018-04-08 12:42:22 +01:00
SarahW
82ad526745 PIIX zero length transfer represents 64 kbytes. Fixes CD-ROM on BeOS. 2018-04-08 07:56:48 +01:00
SarahW
1ff836bfc1 Shortened time between ATAPI packet command starting and requesting command data. Fixes CD-ROM on BeOS. 2018-04-08 07:56:12 +01:00
SarahW
e411652b27 Don't kill the emulator on an unknown ZIP drive SCSI/ATAPI command. 2018-04-07 14:03:34 +01:00
SarahW
edea3bf26a Fixed data padding on ZIP drive SCSI/ATAPI commands. Fixes NT4 with ATAPI ZIP. 2018-04-07 14:03:15 +01:00
SarahW
8ce9832c16 Tweaked SB DSP write data ready timing. Fixes SB16 detection on Windows 98. 2018-04-05 20:54:50 +01:00
SarahW
8186a884d7 S3 BitBlt commands don't update current X/Y registers at the end of a blit. Fixes some S3 graphics issues in OS/2. 2018-04-04 21:25:47 +01:00
SarahW
b840d79691 Force S3 blitter busy bit to be high for a while after the start of a command, to compensate for timing variations between main and blitter threads. Fixes S3 blitter lockups on OS/2. 2018-04-04 21:25:00 +01:00
SarahW
9f8eed95c2 Implement read & write masks on S3 blitter. Fixes text rendering on OS/2 and XFree86 with S3 cards. 2018-04-04 21:24:04 +01:00
SarahW
cb60383e55 Update NE2000 IRQ status on writes to IMR. Fixes problems with RTL8029 when level-sensitive IRQs are in use. 2018-04-02 21:07:57 +01:00
SarahW
51874cf2a8 Tweaked AudioPCI resampling filter gain to reduce clipping. 2018-03-28 21:10:08 +01:00
SarahW
a4b8eba56b Add better rounded value for FLDLN2. Fixes rendering in Zone Raiders. 2018-03-28 20:33:18 +01:00
SarahW
63e3913c31 Implement IBM MCA ESDI controller command status properly. Fixes appalling I/O performance on OS/2 v2.0. 2018-03-25 18:03:45 +01:00
SarahW
ade27bf526 Fix MMU accesses to remapped memory. Fixes OS/2 v2.0 on PS/2 Model 70, and possibly other machines. 2018-03-25 18:03:05 +01:00
SarahW
fb14e1881f Moved post-rev1065 0x3da code to OTI-037C specific code. Restored pre-rev1065 generic SVGA 0x3da code. Fixes PS/2 VGA self test. 2018-03-24 19:50:26 +00:00
SarahW
e3052075a7 Fixed custom resolution setting sometimes being ignored. 2018-03-24 18:18:18 +00:00
SarahW
2505dee5e8 Fix minor bug in Pentium prefix timing. 2018-03-24 16:59:00 +00:00
SarahW
1b7a821eff Improve Cyrix 6x86 prefix timing. 2018-03-24 16:58:45 +00:00
SarahW
0209adc35e Improve Cyrix 6x86 AGI timing. 2018-03-24 16:58:32 +00:00
SarahW
6412d01deb Added level-sensitive IRQs on PIIX and SiS497. Fixes hanging audio with AudioPCI on Windows 2000. 2018-03-24 15:29:10 +00:00
SarahW
cb4c92c0f2 Fixed ViRGE blitter memory masking when only 2MB video memory available. 2018-03-21 21:53:33 +00:00
SarahW
977b798eda Fixed ViRGE cursor colour handling. 2018-03-21 21:53:04 +00:00
SarahW
a5bbd87a2d ViRGE 256kb wrapping is disabled when enhanced mappings are in use. Fixes ViRGE on XFree86. 2018-03-21 21:52:07 +00:00
SarahW
593c3f2b2f Removed non-existent CRTC R50 handling from ViRGE. 2018-03-21 21:51:06 +00:00
SarahW
b164fe1e4f Add ATAPI Read Format Capacities command to Zip drive - fixes various Linuxes when Zip enabled. 2018-03-20 22:11:42 +00:00
SarahW
63b431cc9e Fix S3 Vision864 & Trio cursor colours in XFree86. 2018-03-20 22:10:52 +00:00
SarahW
fc7ac47954 Various fixes to SDAC RAMDAC emulation. Fixes Paradise Bahamas 64 with Xfree86, UNIVBE RAMDAC detection, and probably others. 2018-03-20 22:09:50 +00:00
SarahW
2e90e5fd4c This patch implements user-defined character handling on ATI Korean VGA. Patch from Greatpsycho. 2018-03-20 18:04:37 +00:00
SarahW
6c4dcce66e Add stdint.h to wx-createdisc.cc. Patch from JohnElliott. 2018-03-20 17:55:18 +00:00
SarahW
9309c2aefb Implemented T1000/T1200 non-volatile RAM. Patch from JohnElliott. 2018-03-20 17:55:04 +00:00
SarahW
f4db376aab Added 56x CD-ROM speed. 2018-03-20 17:49:55 +00:00
SarahW
a9ae16b0bf Corrected read value of SB16 mixer register 0xa. Fixes SimCity 2000 SB16 detection. 2018-03-19 18:05:44 +00:00
SarahW
98a9c975f4 Added command line option to specify floppy disc images. 2018-03-18 17:27:54 +00:00
SarahW
7915a72604 CD-ROM capabilities now reflect audio level control. 2018-03-17 12:27:15 +00:00
SarahW
48853d3725 Added missing CD-ROM mode select functionality. 2018-03-17 12:26:51 +00:00
SarahW
a22b735da0 Added configurable CD-ROM speed. 2018-03-17 11:39:33 +00:00
SarahW
db5a5ea13f Fixed typo in ide_atapi.c. 2018-03-16 18:22:00 +00:00
SarahW
6602368cc4 Implemented ATAPI DMA transfer modes. 2018-03-15 19:36:30 +00:00
SarahW
1d5afd1d9a Added AudioPCI info to status window. 2018-03-13 22:08:32 +00:00
SarahW
2e395d2ce8 Implement proper resampling on AudioPCI. 2018-03-13 21:51:40 +00:00
SarahW
74b8047f2f Fixed crackling audio on AudioPCI. 2018-03-13 20:46:08 +00:00
SarahW
5762431260 Don't add ROM waitstates on slow CPUs (<= 8 MHz). Fixes IBM AT. 2018-03-12 20:52:07 +00:00
SarahW
7e23388ed0 Results from keyboard controller commands take priority over pending key presses/releases. Fixes keyboard hang on KMX-C-02. 2018-03-12 20:31:01 +00:00
SarahW
3c656caa48 Added software turbo control to Generic XT clone, DTK XT clone, AMI XT clone and Phoenix XT clone. 2018-03-11 17:59:05 +00:00
SarahW
b530bdafea Cleaned up turbo handling. 2018-03-11 16:43:32 +00:00
SarahW
4f0fe705c5 Add missing tooltip for 'Configure Host' button. Patch from ecksemmess. 2018-03-11 15:51:12 +00:00
SarahW
2567c30353 Added ATI Korean VGA emulation. Patch from Greatpsycho. 2018-03-11 15:46:24 +00:00
SarahW
2f5f4a5b47 Fixed double IO mapping of Mono VGA registers. 2018-03-11 14:29:56 +00:00
SarahW
c8e6fc7ce3 Added PS/2 Model 70 (type 3 & 4) emulation. 2018-03-11 11:45:30 +00:00
SarahW
8546ce14f0 Added waitstates on instruction fetch from ROM. 2018-03-11 11:03:20 +00:00
SarahW
4182b10e10 Refactored DMA code. 2018-03-11 09:43:54 +00:00
SarahW
a076741c6a Add OS X CD-ROM support. 2018-03-06 21:59:22 +00:00
SarahW
bab6695b2c CD-ROM emulation now reads multiple sectors at once. 2018-03-04 13:59:39 +00:00
SarahW
8e52c00ffc Autoconf setup now sets build flags for C++. 2018-03-04 13:58:45 +00:00
SarahW
319a929a20 Changed wx_sendmessage() param1 to LONG_PARAM. Fixes crashed on 64-bit builds. 2018-03-04 13:58:02 +00:00
SarahW
919f2dd45d Implemented CMPXCHG8B on Winchip. Patch from nerd73. 2018-03-03 21:32:56 +00:00
SarahW
c07b76dc8e ATAPI sector accesses can not be split over multiple transfers. Fixes Windows XP installer. 2018-03-03 21:32:24 +00:00
SarahW
f59e405737 Include stdint.h in wx-createdisc.cc. 2018-03-02 22:01:13 +00:00
SarahW
77a969f9cc Don't attempt to register PCI devices on systems that don't have PCI. Fixes warnings on startup. 2018-03-02 21:58:45 +00:00
SarahW
0d36eeaabe SCSI now supports 7 devices.
Reworked hard drive / CD-ROM / Zip configuration functions a bit.
2018-03-02 21:54:20 +00:00
SarahW
c298e706a4 Added flash size and turbo switches to Xi8088. Patch from EluanCM. 2018-02-28 21:36:15 +00:00
SarahW
8d7a6c03eb Fixed MDA/CGA switch on Xi8088. Patch from EluanCM. 2018-02-28 21:27:14 +00:00
SarahW
b75c8376e6 Hard drive creation dialogue can now accept size in MB instead of/as well as specifying C/H/S settings. 2018-02-28 18:38:45 +00:00
SarahW
59aad3eaaf Support IDE hard drives up to 127 GB. 2018-02-27 22:00:24 +00:00
SarahW
b7193df5ac Add meaningful process indicator to hard drive image creation. 2018-02-27 21:59:09 +00:00
SarahW
4ba95a1853 Apply ISA timing delays to RTC accesses. Fixes hang when booting Ontrack Disk Manager. 2018-02-26 22:06:17 +00:00
SarahW
c14c22169d MegaPC uses a jumper to disable onboard video instead of doing it automatically. 2018-02-26 20:38:51 +00:00
SarahW
8193605469 Treat zero ATAPI maximum transfer as 65534. Fixes crash sometimes when booting PB570. 2018-02-26 19:52:10 +00:00
SarahW
d28a908839 Video card can now be changed on Amstrad MegaPC. 2018-02-25 15:13:45 +00:00
SarahW
78adae497f Video card can now be changed on Acer 386SX25/N, Packard Bell PB520R, and Packard Bell PB570. 2018-02-25 11:47:01 +00:00
SarahW
9bdfc9348f Video card can now be changed on Amstrad PC1640, PC2086, PC3086, and Sinclair PC200. 2018-02-24 22:27:32 +00:00
SarahW
3a369bd3f6 Configuration dialog now shows 'Built-in video' for machines with build in video. 2018-02-24 18:29:47 +00:00
SarahW
31dff3a509 Added Xi8088 emulation. Patch from EluanCM. 2018-02-24 18:08:36 +00:00
SarahW
f7384bf085 Display warning when a PCI device can not be initialised due to insufficient available PCI slots. 2018-02-24 15:52:28 +00:00
SarahW
ad1889864f Removed obsolete AMIBIOS hack. 2018-02-24 15:44:49 +00:00
SarahW
bcfd38f42e Removed MDA and VGA macros. Replaced with video_is_mda()/video_is_vga()/video_is_ega_vga() functions. 2018-02-24 15:32:47 +00:00
SarahW
636fd9748d Fixed hardcoded memory size on Toshiba T1000/T1200.
Added ability to disable video on T1200.
Patch form John Elliott.
2018-02-24 15:09:03 +00:00
SarahW
ff94c18a91 PIT readback of timer with mode 3 and gate disabled now reads the counter directly rather than converting the emulator timer value. Fixes 101 error on Compaq Portable Plus. 2018-02-24 14:44:24 +00:00
SarahW
d7dfc6a178 Added Compaq Portable Plus emulation. Patch from dns2kv2. 2018-02-24 14:31:37 +00:00
SarahW
dd590d2093 Added Compaq CGA emulation. Patch from John Elliott. 2018-02-24 14:05:38 +00:00
SarahW
0ee7c7a354 Added Oak OTI-037 emulation. Patch from EluanCM. 2018-02-24 11:39:22 +00:00
SarahW
445cf601e8 Corrected PCI IRQ mapping on Packard Bell PB570. 2018-02-23 21:58:30 +00:00
SarahW
ff03442e76 Added fixed PCI device mapping for CL chips on Packard Bell machines. 2018-02-23 21:57:53 +00:00
SarahW
23e5aa2208 Corrected PCI IRQ mapping on Advanced/ZP. 2018-02-23 21:07:47 +00:00
SarahW
55dbe592ad Fixed bus type detection on Cirrus Logic. 2018-02-22 21:04:32 +00:00
SarahW
de4a6e5c2e Fix IO port access to Cirrus Logic blitter. 2018-02-22 21:03:51 +00:00
SarahW
e349e4b14e Fixed Cirrus Logic MMIO mapping. Fixes hang when opening Windows 9x DOS box. 2018-02-21 22:04:54 +00:00
SarahW
cc60e2b2c5 Added Packard Bell PB520r emulation. 2018-02-20 15:55:46 +00:00
SarahW
2c985a6c79 Added CL-GD5434 emulation. 2018-02-20 14:49:29 +00:00
SarahW
84a0f0bacb Added Intel Advanced/ZP emulation. Patch from EluanCM. 2018-02-20 10:34:46 +00:00
SarahW
ce5ae22307 Add Packard Bell PB570 emulation. 2018-02-19 22:09:56 +00:00
SarahW
f62652da3b Implement PC87306 SuperIO on Advanced/EV. 2018-02-19 21:39:05 +00:00
SarahW
1c3bb20044 Support IDE port enable/disable on PIIX. 2018-02-19 21:35:30 +00:00
SarahW
2ff5e86514 Correct PCI ID for 430FX. 2018-02-19 21:33:52 +00:00
SarahW
103ebe5347 Fix hang with long ATAPI transfers. 2018-02-18 12:33:31 +00:00
SarahW
5c9a1e9664 Added CL-GD5430 emulation. 2018-02-18 12:33:09 +00:00
SarahW
456009ef21 Remove DEVICE_NOT_WORKING flag from CL-GD5429. 2018-02-17 16:57:29 +00:00
SarahW
28749fa3dd More fixes to CL-GD5429 blitter pattern mode. 2018-02-17 16:37:45 +00:00
SarahW
15e8c84255 More accurate CL-GD5429 timing. 2018-02-17 13:38:33 +00:00
SarahW
c5d11b5d73 Implemented word & long read/write handlers for CL-GD5429. 2018-02-17 12:58:38 +00:00
SarahW
1a430b574f Implement 256kb wrap on CL-GD5429. 2018-02-17 11:08:46 +00:00
SarahW
796ff2b536 Implemented write mask on CL-GD5429 extended write modes. 2018-02-16 22:21:17 +00:00
SarahW
2f5bbb3b66 Fixed pattern offsets in CL-GD5429 blitter. 2018-02-16 22:21:01 +00:00
SarahW
d713ad4555 Can now configure RAM size on CL-GD5429. 2018-02-16 20:10:39 +00:00
SarahW
6c41e5baa8 Implemented CL-GD5429 VCLK control. 2018-02-15 21:19:59 +00:00
SarahW
93d0db4d9b CL-GD5429 improvements :
- Support >8 bpp on RAMDAC
- Support 16-bit pixel depth on blitter
- Support 16-bit pixel depth on write modes 4/5
- Support blitter on PIO
- Support interlaced modes
- Extended size of graphics controller register array to prevent out-of-bounds accesses
2018-02-15 21:00:12 +00:00
SarahW
25eb84284f Fixed odd/even mode on CL-GD5429. 2018-02-14 18:44:55 +00:00
SarahW
ee759e4d58 Initialise SB16 DSP filter to sensible values on DSP init. 2018-02-14 17:59:50 +00:00
SarahW
96deba1ffa Fixed out-of-bounds access in SB16/AWE32 DSP filter. 2018-02-14 17:52:19 +00:00
SarahW
4cc15d9b7e Added Elonex PC-425X emulation. 2018-02-12 20:06:00 +00:00
SarahW
72c2cb6f7d Added basic emulation of ACC Micro 2036 chipset (used by Packard Bell Legend 300SX). 2018-02-12 15:55:25 +00:00
SarahW
1d4b9af7e2 Added Compaq Portable II. Patch from dns2kv2. 2018-02-12 13:40:17 +00:00
SarahW
788402b879 Added Thomson TO16 PC. Patch from dns2kv2. 2018-02-12 13:24:00 +00:00
SarahW
e5b38d7e68 Added NCR PC4i. Patch from dns2kv2. 2018-02-12 12:45:29 +00:00
SarahW
90c8d0939c Added Packard Bell Legend 300SX. Patch from dns2kv2. 2018-02-12 12:37:21 +00:00
SarahW
75ec50cfd7 Implemented dynamic low-pass filter for SB16/AWE32 DSP playback. 2018-02-12 12:00:32 +00:00
SarahW
0e7c28261d Sound Blaster ADPCM playback now counts the reference byte into the sample length. Fixes clicking/popping in Monster Bash. 2018-02-11 18:16:36 +00:00
SarahW
f0889fd981 Fix automake include path for Windows. 2018-02-11 15:45:41 +00:00
SarahW
1d93b73e3a Implement configurable hardware cursor size on TGUI9440. 2018-02-11 15:40:41 +00:00
SarahW
245ad1cd42 Fix TGUI9440 cursor in interlaced modes. 2018-02-11 15:37:25 +00:00
SarahW
2df886b1d8 Only offset TGUI9440 blitter CPU data when CPU source is mono. Fixes some corruption in Windows 3.x. 2018-02-11 15:36:59 +00:00
SarahW
c88fb61aab Fix SVGA decode mask for Trident TGUI9440. 2018-02-11 14:47:53 +00:00
SarahW
32f794adc4 Added Trident TGUI9400CXi emulation. 2018-02-11 14:21:27 +00:00
SarahW
cdf42681af Removed redundant CD-ROM Disabled option. 2018-02-10 12:48:07 +00:00
SarahW
c3b876524d Clear sound_cd_event in CD audio thread. Patch from ja've. 2018-02-10 12:46:09 +00:00
SarahW
2f73338081 Changes to autoconf/automake scripts to improve MSYS2 compatibility. Patch from darksabre76. 2018-02-10 11:30:26 +00:00
SarahW
91acf47488 FDC seek commands on non-existant drives should still complete. Fixes hangs in some Windows 9x startups. 2018-02-10 11:08:09 +00:00
SarahW
7ddc01baf7 Added guards against accessing out-of-bounds floppy drives. 2018-02-04 20:35:34 +00:00
SarahW
36ba814c00 Added romfread function to work around warnings from ignoring fread return value. Patch from John Elliott. 2018-02-01 18:06:41 +00:00
SarahW
8f04b6b9a4 Added Toshiba T1200 emulation. Patch from John Elliott. 2018-01-31 21:53:23 +00:00
SarahW
0ca43d37d4 Emulated EGA/VGA CRTC register 8 (Preset Row Scan Register). 2018-01-31 21:20:26 +00:00
SarahW
475f51ba0f Video timing improvements :
- Separated read and write timings
- Added timings for onboard video chips
- Updated timings based on VIDSPEED testing
2018-01-31 21:09:11 +00:00
SarahW
26fb271fdc Paradise now supports SVGA word accesses. 2018-01-31 20:03:14 +00:00
SarahW
ca4d8e9ffe Mach64 now supports SVGA word/longword accesses. 2018-01-31 20:02:54 +00:00
SarahW
b9f196d641 ISA timing now based on integer ATCLK instead of fixed point division. 2018-01-31 20:01:18 +00:00
SarahW
3b335f32aa Add default video timing option. Patch from leilei. 2018-01-27 14:56:14 +00:00
SarahW
604dce908b SCAT improvements :
- Improved ROMCS mapping on top address area.
- Changed SCAT chipset revision.
- DMA wait control state register is now writable.
Patch from Greatpsycho.
2018-01-27 13:52:43 +00:00
SarahW
966e787a25 FDC Sense Interrupt Status doesn't send track number when no interrupt pending. Fixes floppy drive on early Linux kernels. 2018-01-26 21:31:37 +00:00
SarahW
25087bf4ec Strip RPCemu support code out of ide.c. 2018-01-21 16:39:00 +00:00
SarahW
1dd96251c4 Reduce amount of debug output from Zip drive emulation. 2018-01-21 16:19:50 +00:00
SarahW
d65368c0c0 Add SCSI Write and Verify command to Zip drive. 2018-01-21 16:19:27 +00:00
SarahW
0e37f08cb5 Add menu option to create blank disc image. 2018-01-21 16:13:41 +00:00
SarahW
5fd2fd40aa Add Iomega Zip drive emulation. 2018-01-21 16:05:39 +00:00
SarahW
6ecdd2efd0 Unify ATAPI and SCSI CD-ROM code. 2018-01-21 15:59:29 +00:00
SarahW
bc690b3d2f CD-ROM fixes :
- Fixed track handling in is_track_audio()
- ioctl_readtoc() First Track field returns first track in the TOC, not the first track specified by the command
- SCSI CD-ROM code now looks at correct cd_status variable
- SCSI CD-ROM now identifies as SCSI compliant
Fixes CD audio via QCD with Adaptec SCSI card + ASPI drivers.
2018-01-16 20:05:56 +00:00
SarahW
0fe4a83740 Added Realtek RTL8029AS emulation. 2018-01-11 21:59:44 +00:00
SarahW
c40a421700 Added Toshiba T1000 emulation. Patch from John Elliott. 2018-01-10 20:44:31 +00:00
SarahW
be7bb04c6b Implemented Sound Blaster DSP busy cycling when playing DMA audio. Fixes stalls in Wing Commander : Privateer when sound enabled. 2018-01-10 18:48:11 +00:00
SarahW
3c431794f0 Cleared null count bit in PIT status byte. Fixes Wing Commander III, Wings of Fury and probably other Origin games. 2018-01-09 20:07:27 +00:00
SarahW
f1ee3cddba Fixed Cyrix I/O registers broken by commit 994. 2018-01-09 18:39:22 +00:00
SarahW
2957dae2d5 Fixes to x86_was_reset handling. Based on patch from Greatpsycho. 2018-01-08 21:10:46 +00:00
SarahW
4d29b1c71f Move CPU type set to before memory initialisation. Patch from Greatpsycho. 2018-01-08 20:57:04 +00:00
SarahW
5416c948a3 Don't push exception error code on triple fault reset. Patch from Greatpsycho. 2018-01-08 20:54:47 +00:00
SarahW
f336dd9589 Implemented IDT limit checking on real mode interrupts. Patch from Greatpsycho. 2018-01-08 20:54:19 +00:00
SarahW
6798ebf0a6 Correct address mask on 286/386SX systems. Patch from Greatpsycho. 2018-01-08 20:52:45 +00:00
SarahW
e070341f80 Correct high ROM mapping on 286/386SX systems. Patch from Greatpsycho. 2018-01-08 20:51:57 +00:00
SarahW
b60eff610d Fix IDT limit on reset. Patch from Greatpsycho. 2018-01-08 20:51:06 +00:00
SarahW
8a5b552a9a Correct CS:IP initialisation on 286+ reset. Patch from Greatpsycho. 2018-01-08 20:50:48 +00:00
SarahW
40ddf31d30 Update version numbers and documentation for v13.1 release. 2017-12-17 09:03:19 +00:00
SarahW
496b3884ab Fixed out-of-bounds array accesses in Toshiba 3100e video code - fixes display when using profile guided optimisation. 2017-12-16 21:14:05 +00:00
SarahW
5adac80648 Fixed a couple of uninitialised variables. 2017-12-16 21:13:17 +00:00
SarahW
d28cdb49e7 Sound output gain now controls listener gain instead of source gain. Fixes gain control when using OpenAL Soft. 2017-12-16 17:56:50 +00:00
SarahW
d75a973bf6 Updated ancient Linux documentation. 2017-12-16 17:28:07 +00:00
SarahW
a602cb0580 Tweaked recompiler block lookup. Fixes massive slowdown seen on some Windows 9x installations at startup & possibly some other slowdowns. 2017-12-16 17:26:42 +00:00
SarahW
fd1fc444dd Fixed SN76489 white noise that was broken in rev 975. 2017-12-14 22:09:53 +00:00
SarahW
c0048bc24f Fixed handling of configurations with full stops in the name. 2017-12-14 18:49:09 +00:00
pcem_emulator
25a332f556 Merged in teepean/pcem-msys2 (pull request #4)
Fix compilation with MSYS2
2017-12-14 18:28:48 +00:00
pcem_emulator
9c4f206d0d Merged in darkfm_uy/pcem (pull request #5)
Fixed for compilation with gcc 7.2.1 by including <stdint.h> to ip_input.c
2017-12-14 18:27:54 +00:00
SarahW
ac5c9a923d Fix test for extra divide on SN76489 and clones. Fixes music in King's Quest III. 2017-12-14 18:24:40 +00:00
Salvador Pardi?as
f0a12dcac2 Fixed for compilation with gcc 7.2.1 by including <stdint.h> to ip_input.c 2017-12-12 14:51:59 -03:00
SarahW
1e0b7d3632 Update version number for v13 release. 2017-12-11 20:34:09 +00:00
SarahW
e6d3d05d85 Update readme.txt for v13 release. 2017-12-11 20:33:54 +00:00
SarahW
5c9b74a0ec Fix uninitialised variable in wx-hostconfig.c 2017-12-11 20:33:31 +00:00
SarahW
74adbca249 Add ./configure option to create release build. 2017-12-11 16:43:29 +00:00
SarahW
68853090ab Remove unnecessary fatal()s from Voodoo x86-64 recompiler. 2017-12-11 16:33:10 +00:00
SarahW
baf6b83cfd Improved pthread code. 2017-12-11 16:32:48 +00:00
SarahW
9ac6f975e2 Fixes to Linux CDROM IOCTL handling. 2017-12-11 16:32:23 +00:00
SarahW
6447d4d91a Fix automatic mouse type selection when changing model in configuration dialogue. 2017-12-11 10:44:43 +00:00
SarahW
1edbb679f0 Emulate memory spinner granularity on systems that don't implement wxSpinCtrl->SetIncrement(). 2017-12-11 09:06:19 +00:00
SarahW
2ebbec2863 Fixed put_backslash() function - PCem now correctly reads default CMOS RAM files. 2017-12-10 22:22:12 +00:00
SarahW
a957e87da4 Olivetti GO481 now only available if the BIOS is present. 2017-12-10 17:42:02 +00:00
SarahW
04cbcfb587 Added Pentium 133 to Advanced/EV CPU list. 2017-12-10 17:34:36 +00:00
SarahW
6cdb91a804 Fix timer usage on WD1007V-SE1 ESDI controller. Fixes OS/2 v1.0 installation. 2017-12-10 12:36:40 +00:00
SarahW
45b627dfcd Fix timer usage in AT MFM controller. Fixes OS/2 v1.0 installation. 2017-12-10 12:25:23 +00:00
SarahW
30017ea58b Fix LPT port accesses on Amstrad machines - Amstrad machines work again. 2017-12-09 22:10:43 +00:00
SarahW
cb7b54bc8a Correct path of Western Digital WD1007V-SE1 ROM image. 2017-12-09 22:09:30 +00:00
Teemu N?tkinniemi
5205f372e1 Fix compilation with MSYS2 2017-12-09 18:59:36 +00:00
SarahW
882da6537d Stop disc drive on write protect error. Fixes Hitchhiker's Guide booter. 2017-12-09 15:48:21 +00:00
SarahW
640c6a61e2 Added output volume control. 2017-12-08 20:39:36 +00:00
SarahW
ae37557c3d Speed up IBM ESDI adapter a bit. 2017-12-08 20:12:13 +00:00
SarahW
f9670eb707 Fix return data on IBM ESDI adapter Get Device Config command. 2017-12-08 20:12:05 +00:00
SarahW
3f6e5282c6 Added Get Device Status command to IBM ESDI adapter. 2017-12-08 20:11:50 +00:00
SarahW
cd8e5dbd54 IBM ESDI adapter now handles out-of-range reads/writes. 2017-12-08 20:11:29 +00:00
SarahW
f5009ef43c Fix HD indicator LED on IBM ESDI adapter. 2017-12-08 20:10:59 +00:00
SarahW
50a3aaf1a8 Added dma.stat_rq variable required by rev 950. 2017-12-08 19:13:46 +00:00
SarahW
a8e72802a1 Implement PS/2 DMA status register - fixes OS/2 v1.3 on PS/2 machines. 2017-12-07 22:26:57 +00:00
SarahW
6555ecd3e3 Disable NMI masking on PS/2 MCA machines - fixes '103' POST error. 2017-12-07 22:26:19 +00:00
SarahW
12d3ac4377 Fix PIIX IDE bus mastering initialisation. Ubuntu 10.04 boots again. 2017-12-06 22:14:51 +00:00
SarahW
c3a127f01c Fixed alignment check in x86-64 recompiler. Fixes crash in Windows 95 setup. 2017-12-04 22:15:30 +00:00
SarahW
8af8ab7e8a Don't fatal() on AHA-1542C/BT-545S when SCSI device fails to request a command. 2017-12-04 18:25:42 +00:00
SarahW
0db852eb92 Fix call through NULL pointer when using 53c400-based SCSI cards. 2017-12-04 18:24:37 +00:00
SarahW
75cdefe0b4 Return 0 for block decoded I/O address on Mach64 GX. Fixes hang in OS/2 Warp install when using this card. 2017-12-03 21:41:09 +00:00
SarahW
e6d20ca199 Fixed PIT readback command, and timing synchronisation when loading a timer. Fixes Sound Blaster detection in Lemmings 2. 2017-12-03 12:55:53 +00:00
SarahW
5c3ae2556a Don't mute Sound Blaster DSP output when DMA disabled. Fixes use of SB Direct Output. 2017-12-02 18:04:04 +00:00
SarahW
e12eb0ff0d Don't mirror VRAM at 1 MB for Phoenix Trio64 with 1 MB. Fixes memory size detection.
This is most likely a difference in memory mapping between FPM and EDO Trio64 configurations.
2017-11-28 19:47:46 +00:00
SarahW
2f1514d3b2 Dynarec now jumps straight to GPF handler if it hits a NULL selector instead of relying on interpreter code to detect the GPF. Fixes hang in Windows 98 SE upgrade setup. 2017-11-27 21:09:42 +00:00
SarahW
f0b213fef0 Mask ViRGE source colour to current destination colour depth. Fixes chroma transparency in Beasts and Bumpkins. 2017-11-26 17:46:21 +00:00
SarahW
ae52810cc8 Separate Voodoo command written count from main thread and FIFO thread. Fixes hangs in some games. 2017-11-26 17:01:35 +00:00
SarahW
542eb75483 Fixed bug in Voodoo recompiler breaking cc_localselect_override. Fixes colours in Return Fire II. 2017-11-23 21:11:43 +00:00
SarahW
e80921f29d Fix Voodoo caching of textures ending at the exact end of texture memory. Fixes FMV in Return to Castle Wolfenstein. 2017-11-22 21:00:42 +00:00
SarahW
a1fc8da064 Fixed clipping rectangle on Voodoo, Return Fire II now works. 2017-11-20 20:48:27 +00:00
SarahW
4af811699e Fix dynarec timer granularity to 5us. Fixed speed issues in Tubular Worlds. 2017-11-19 21:55:49 +00:00
SarahW
97ac443f70 More fixes/improvements to T3100e. Patch from John Elliott. 2017-11-19 21:30:42 +00:00
SarahW
717d815604 Tweak flat DS/SS dynarec optimisation, should reduce block churn when routines are called both with and without flat DS/SS.
Fixed incorrect STACK32 flag when entering V86 mode that was hidden by block churn.
Protected and V86 mode status now considered when selecting block.
2017-11-15 21:55:27 +00:00
SarahW
13496ba7b9 Implement IDE Check Power Mode command. Fixes Windows NT4 with SP4 or later. 2017-11-13 21:56:44 +00:00
SarahW
a16fdb195e Adaptec/BusLogic cards now pad out command with zeros if command length is longer than stated in the CCB. Fixes Windows NT 4.0 installation (sends 10 byte instead of 12 for READ CD). 2017-11-12 12:53:22 +00:00
SarahW
a8ce4ebc86 Voodoo now clamps texture caching to valid LOD levels. 2017-11-11 20:50:51 +00:00
SarahW
0634cba224 Added autoconf test for off64_t and related calls. 2017-11-11 20:48:03 +00:00
SarahW
43eabc727c Added OS X support to build system. 2017-11-11 20:23:01 +00:00
SarahW
64cb5f580f Recompiler now works on Mac OS X. 2017-11-11 20:21:20 +00:00
SarahW
e8919433b2 Fix OpenAL include path on Mac OS X. 2017-11-11 20:20:35 +00:00
SarahW
7c9bb73b57 Voodoo x86-64 recompiler now works correctly with addresses above 4GB. 2017-11-11 20:20:16 +00:00
SarahW
170cf99ffb Fix out-of-bounds array access in Mouse Systems mouse emulation. 2017-11-11 20:16:40 +00:00
SarahW
4c42cc1596 Implement Headland fast reset. Fixes AMI 386SX clone. 2017-11-06 22:10:32 +00:00
SarahW
f2e1e307c6 Don't write directly to PC speaker state when writing PIT control byte. Fixes engine cacophony in Hard Drivin' II. 2017-11-06 21:38:07 +00:00
SarahW
bb4fbdd9c2 Fixed >32 bit shifts on 808x CPUs. Fixes Titus the Fox. 2017-11-05 17:17:58 +00:00
SarahW
b97d525e0c Fix 8-bit RAMDAC palette handling. 2017-11-05 15:42:04 +00:00
SarahW
5af136bc61 Disable NE2000 debug output by default. 2017-11-05 15:00:10 +00:00
SarahW
363fc1b01c Improve NE2000 interrupt handling. 2017-11-05 14:53:19 +00:00
SarahW
bc4f98d814 Changes to LaserXT/3 :
- Changed LaserXT/3 processor to 8086.
- Changed LaserXT/3's minimum memory size to 512KB and granularity to 128KB.
- Changed EMS size granularity to 256KB on Laser Turbo XT and 512KB on LaserXT/3. Base memory size is calculated automatically.
- The mem_set_mem_state() function call for above of 1MB is called only when the memory size is more than 1024KB.
Patch from Greatpsycho.
2017-11-04 13:45:39 +00:00
SarahW
3fa1e23cf5 Fixed bugs in Voodoo recompiler. Fixes Descent Freespace. 2017-11-04 12:38:40 +00:00
SarahW
d497fb04fc Increase size of Voodoo texture cache to account for split LODs. Fixes crashes on emulator exit with some games (eg Powerslide). 2017-11-03 21:17:24 +00:00
SarahW
c14bacd783 Added support for multiple texture base addresses on Voodoo. Fixes bad textures in Powerslide. 2017-11-03 21:16:49 +00:00
SarahW
0e028ca64c Fixed typo in Voodoo recompiler, fixes crash in Powerslide. 2017-11-03 21:09:41 +00:00
SarahW
e388086943 Fixed a number of issues in Voodoo recompiler, fixes dark rendering in MiG-29 Fulcrum. 2017-10-29 16:07:46 +00:00
SarahW
65a9d17674 Toshiba T3100e improvements :
* Enables [Fn]+key combinations (using right-Ctrl or right-Alt as [Fn]). In particular:
* Implements switching the built-in display adapter between the 'internal' plasma display ([Fn]+[Home]) and an 'external' CGA monitor ([Fn]+[End])
* Allows the video font to be toggled between thin and thick ([Fn]+[Right arrow]).
* Implements the four hardware fonts of the original, selectable in BIOS setup.
* Implements CRTC register 12h (attribute mapping and display type)
Patch from John Elliott
2017-10-28 16:03:44 +01:00
SarahW
4747d90702 Fix PCI mapping on ET4000W32/p. 2017-10-28 15:07:24 +01:00
SarahW
c0f948931a Added segment limit checking to opcodes A0 & A1. Fixes all hanging with Trio64 in Windows 95. 2017-10-27 22:15:42 +01:00
SarahW
4974c9cfb1 Use standard VGA RAMDAC on Trio32/64 instead of SDAC - the internal Trio RAMDAC does not implement any extended registers. 2017-10-25 21:09:03 +01:00
SarahW
7d484e0928 Mask off accesses to SDAC extended registers. Fixes out-of-bounds register writes causing corruption seen sometimes in Windows 95. 2017-10-25 20:53:32 +01:00
SarahW
4a489dab1b Remove 512kb configuration from Trio64 - this is not actually supported by the chip. 2017-10-22 12:41:38 +01:00
SarahW
39a68d757b Rework video memory handling to cater for open bus and VRAM address wrapping. Fixes more hangs with Trio64 and Windows 95. 2017-10-22 12:41:10 +01:00
SarahW
da6e537b31 Add S3 Enhanced Mode Mappings address override. Fixes some hangs with Trio64 and Windows 95. 2017-10-22 12:40:09 +01:00
SarahW
3f29d38288 Reset CPU on all AT commands that pulse bit 0, not just 0xf0. Fixes XENIX286. Patch from Greatpsycho. 2017-10-22 12:39:28 +01:00
SarahW
ed000e77c8 Only set IFULL immediately following keyboard selftest on Toshiba T3100e. Fixes Samsung SPC systems. Patch from Greatpsycho. 2017-10-22 12:38:45 +01:00
SarahW
0d5d7ac005 Removed Allegro port. 2017-10-19 21:19:18 +01:00
SarahW
f4fe56edb2 Reworked TGUI code to avoid altering memory mappings outside of main thread. 2017-10-19 21:01:11 +01:00
SarahW
0dfc69af24 When loading config file specified on the command line, use the correct CMOS RAM files. 2017-10-18 20:16:24 +01:00
SarahW
6b7682105b Corrected read of SB Pro mixer registers on SB16. Fixes sound in One Must Fall, Jazz Jackrabbit and probably other games. 2017-10-18 20:03:56 +01:00
SarahW
1e75653c5c Fixed CMS/Game Blaster detection. 2017-10-17 21:39:37 +01:00
SarahW
9a2f541898 Corrected T3100e font ROM loading. Patch from John Elliott. 2017-10-17 20:38:45 +01:00
SarahW
8b4ab935d2 SCAT fixes. Patch from Greatpsycho. 2017-10-16 19:42:31 +01:00
SarahW
c71963727a Recompiler now uses logical address of 0xffffffff rather than 0 to represent invalid block. Fixes some Unixes when recompiler enabled. 2017-10-15 21:32:01 +01:00
SarahW
5f0d43f782 Prefetch simulation no longer counts prefixes when prefetch calculation disabled (eg when CPU cache enabled). Fixes hang on reset on 486+ CPUs. 2017-10-15 21:29:49 +01:00
SarahW
3ba03410fd MMU now handles CPL on read-only pages correctly. Fixes AT&T SVR4 2.1. 2017-10-15 21:28:52 +01:00
SarahW
5d5fa1402a Added Toshiba T3100e emulation. Patch from John Elliott. 2017-10-14 14:20:38 +01:00
SarahW
c28490cc2f Added Epson PC AX, AX2e and AX3 models. Patch from dns2kv2. 2017-10-14 12:31:47 +01:00
SarahW
72691e5585 Implemented a few missing AudioPCI registers - now works with Windows ME WDM drivers. 2017-10-14 11:54:56 +01:00
SarahW
af2f3180e8 Added Ensoniq AudioPCI / Sound Blaster PCI 128 emulation. 2017-10-13 22:51:52 +01:00
SarahW
2611d27e91 Disable LPT if port is set to 0. 2017-10-13 22:43:14 +01:00
SarahW
132a2eb110 Add NMI support to dynamic recompiler. 2017-10-13 22:42:59 +01:00
SarahW
56b9c33780 Add PS/1 XTIDE variant to HDD controller list. 2017-10-12 18:31:43 +01:00
SarahW
a3ae6a6eed Added IBM XT Model 286 emulation. 2017-10-11 22:09:26 +01:00
SarahW
a44fcb196b NVR files now stored per-config. 2017-10-11 21:36:41 +01:00
SarahW
9f2b58b7c4 Added new SCAT chipset machines - GW-286CT GEAR, Samsung SPC-4216P and KMX-C-02. Patch from Greatpsycho. 2017-10-11 20:56:33 +01:00
SarahW
c532d874a1 Added Linux MIDI output via ALSA. 2017-10-11 20:26:47 +01:00
SarahW
95c04340cf wx/SDL2 port now initialises MIDI correctly (currently Windows only). 2017-10-10 19:36:15 +01:00
SarahW
3489af10c4 Fixed Windows-isms in wx-joystickconfig.cc. 2017-10-10 18:42:23 +01:00
SarahW
539f0bc150 Add joystick support to wx GUI. 2017-10-09 22:04:22 +01:00
SarahW
72c6716f49 Fix missing icons in wx GUI. 2017-10-08 09:46:05 +01:00
SarahW
ecbdad6b1a Added SCSI CD-ROM emulation. 2017-10-07 17:07:20 +01:00
SarahW
b5c8ad4bd6 Adaptec/BusLogic SCSI improvements - more commands, a few bug fixes 2017-10-07 16:59:32 +01:00
SarahW
5d5b4dce8a Fixed typo in ncr5380_reset(). 2017-10-03 17:31:14 +01:00
SarahW
64b1aa89ff Fixed header includes in scsi.c. 2017-10-01 16:29:22 +01:00
SarahW
2c2e325f60 Added emulation of Adaptec AHA-1542C and BusLogic BT-545S SCSI adapters. 2017-10-01 16:26:12 +01:00
SarahW
50a874c287 Added SCSI hard drive emulation.
Added NCR 58c400-based SCSI adapters :
- Longshine LCS-6821N
- Ranco RT1000B
- Trantor T130B
2017-10-01 16:08:54 +01:00
SarahW
06f7cd3c6c Hard disc controllers can now be selected on all machines.
Added device configuration for hard disc controller to Wx GUI.
2017-10-01 15:42:32 +01:00
SarahW
4ca6d67f87 Sound Blaster improvements :
- Implemented audio recording on SB16 & AWE32 (MIDI only)
- Mixer improvements
- SB 2.0 CD mixer can be emulated
- DSP tweaks, mainly for SB Pro. Implemented speaker on/off and limited high speed DMA to SB 2.0 & Pro
- A few other things
Patch from JosepMa.
2017-09-09 14:58:07 +01:00
SarahW
9283d0e1b0 Added Atari PC3 emulation. Patch from dns2k. 2017-09-09 11:45:02 +01:00
SarahW
96905fa3de Fixes to AWE32 chorus emulation. Patch from JosepMa. 2017-09-05 21:06:20 +01:00
SarahW
ebf7faaae7 Marked dac_iir() as inline. 2017-09-02 07:59:08 +01:00
SarahW
17ea1ace1c Tweaked timing system on 286+ interpreted CPUs - improves DAC sound quality. 2017-09-01 17:08:37 +01:00
SarahW
970882c7ac Swap default LPT1 and LPT2 port assignments. 2017-09-01 11:34:36 +01:00
SarahW
d3232adef5 Add LPT device emulation framework.
Move long-broken DAC and Sound Source emulation to new framework.
Add stereo DAC emulation.
2017-09-01 11:34:20 +01:00
SarahW
a3a60211b0 Fixed off-by-one error in 16-bit autoinit DMA. 2017-08-31 16:19:34 +01:00
SarahW
b349bdc141 Improved SB16 tone controls. Patch from JosepMa. 2017-08-31 15:14:44 +01:00
SarahW
b1f4748eaf Fixed colour compare in EGA/VGA - fixes graphics issues in Crystal Dream II. 2017-08-31 14:26:54 +01:00
SarahW
4cea3c7b04 Numerous improvements to AWE32 emulation. Patch from JosepMa. 2017-08-31 14:09:01 +01:00
SarahW
9b84ce5218 Add IO configuration to Commodore PC 30 III. 2017-08-23 20:17:32 +01:00
SarahW
47f9a66859 Fixed issue when serial ports mapped at unusual addresses - fixes joystick on 430VX model. 2017-08-21 21:31:40 +01:00
SarahW
25620bdc63 Add copy button to wx GUI. Patch from bit. 2017-08-21 19:48:51 +01:00
SarahW
75a483f1a6 Fixed Windows CD-ROM configuration in xx GUI. Patch from bit. 2017-08-21 19:37:23 +01:00
SarahW
5d1b2e4f83 Added video 'Alternative update-lock' option that may help performance on some machines. Patch from bit. 2017-08-21 19:25:50 +01:00
SarahW
f9bd0b844f More SCAT improvements. Patch from Greatpsycho. 2017-08-21 18:20:08 +01:00
SarahW
9dbedefc5f Improvements to Acermate 386SX25/N :
- Implemented serial & parallel port configuration
- Implemented shadow RAM
- OTI-067 now configured as on-board device rather than separate card
2017-08-20 21:49:33 +01:00
SarahW
980fd2dcfa Fixed serial port configuration on WD76C10 (Amstrad MegaPC). 2017-08-20 14:48:00 +01:00
SarahW
668a0dd18d Re-implemented UM8669F emulation. 2017-08-17 21:59:51 +01:00
SarahW
b0215f309a Voodoo output now works when only the secondary card has output enabled. 2017-08-16 20:09:00 +01:00
SarahW
bb64507b7b Fix strncat() use in voodoo_add_status_info(). 2017-08-16 19:38:24 +01:00
SarahW
9eae781645 Fixes to shader rendering. Patch from bit. 2017-08-15 21:15:29 +01:00
SarahW
76119cc00d Fixed bug in MOVQ with 16-bit addressing. Patch from JosepMa. 2017-08-15 20:54:27 +01:00
SarahW
6589952e9a Fixed Voodoo 2 non-SLI TMU config. 2017-08-15 20:53:15 +01:00
SarahW
9a63308ffd Added Voodoo SLI emulation. 2017-08-15 20:26:06 +01:00
SarahW
b9055d9aff Fixed detail factor clamping in Voodoo recompiler. Fixes texture issues in Jane's WWII Fighters. 2017-08-10 21:50:08 +01:00
SarahW
ae04fd4ba1 Unknown Voodoo registers writes with CMDFIFO enabled now log warnings rather than fatal()ing. Jane's WWII Fighters now runs. 2017-08-10 21:49:44 +01:00
SarahW
9be26e5e0d Middle button now doesn't release mouse when emulating a 3 button mouse on wxWidgets GUI. 2017-08-09 18:09:07 +01:00
SarahW
3816e3b679 Mouse Systems mouse now sends data when serial interrupt disabled. Fixed Visi On. 2017-08-09 18:02:36 +01:00
SarahW
5b90fdf0c2 Tweak Olivetti GO481 name. 2017-08-09 17:54:42 +01:00
SarahW
94448b885b Added Olivetti GO481 graphics card (PVGA1A). Patch from ruben_balea. 2017-08-08 22:04:22 +01:00
pcem_emulator
24c552ca38 Network support added to Linux build. 2017-08-08 21:59:53 +01:00
SarahW
7b081739bf Network card configuration added to wxWidgets GUI. 2017-08-08 21:32:39 +01:00
SarahW
5a957e5d00 SLiRP 64-bit fixes. Originally written by Gleb Natapov for QEMU. 2017-08-08 21:19:36 +01:00
SarahW
03749ab0fb Added network configuration to wxWidgets GUI. 2017-08-06 12:39:53 +01:00
SarahW
ec6ba93665 Fixed build warnings in wxWidgets GUI. 2017-08-05 20:05:35 +01:00
SarahW
54d260846f Mask off top bits of VGA palette data. Fixes palette in Amulets & Armor. 2017-08-04 22:05:54 +01:00
SarahW
d47ab5df6b Add Mouse Systems mouse emulation. 2017-08-02 20:08:04 +01:00
SarahW
7ec1adb65f SCAT memory changes. Patch from Greatpsycho. 2017-08-01 13:53:13 +01:00
SarahW
807ee15f49 wxWidgets/SDL2 port now supports setting custom screen resolution. Patch from bit. 2017-08-01 11:59:20 +01:00
SarahW
0c63c99b71 mingw-wx-sdl2 makefile now builds if wxrc.exe doesn't exist. Patch from bit. 2017-08-01 11:55:29 +01:00
SarahW
427b93340f Fix timer_freq value on wxWidgets/SDL2 port. Patch from bit. 2017-08-01 11:54:12 +01:00
SarahW
eb1db1aa72 wxWidgets config manager now selects last run configuration after shutting down emulated machine. Patch from bit. 2017-08-01 11:52:49 +01:00
SarahW
bbeca53281 Fix position of Voodoo configuration button in networking builds. 2017-08-01 08:38:20 +01:00
SarahW
961490cca9 Added network configuration dialogue. 2017-07-31 21:45:08 +01:00
SarahW
6697e31929 Added NE2000 network support.
NE2000 emulation originally from Bochs, ported by SA1988.
SLiRP originally from QEMU, ported by neozeed.
2017-07-31 10:10:36 +01:00
pcem_emulator
2881d35680 Changes to wxWidgets/SDL2 port :
- Updated UI
- OpenGL 3.0 with GLSL/GLSLP-support
- Improvements to Windows version
- Minor changes/bugfixes
Patch from bit.
2017-07-30 10:39:27 +01:00
SarahW
354d52754c Indentation fixes. Patch from basic2004. 2017-07-30 08:31:03 +01:00
SarahW
40d7e02006 Fixed recompiler bug introduced by REP rework - Windows XP installer works again. 2017-07-28 20:30:10 +01:00
SarahW
197b5127e2 Fixed typo in menu. 2017-07-26 20:40:08 +01:00
SarahW
e93fb011b4 Removed unnecessary calls to midi_close()/midi_init() in resetpchard(). 2017-07-25 18:09:12 +01:00
SarahW
9946bf2b73 Fixed task switch to V86 mode. 2017-07-24 19:36:46 +01:00
SarahW
7e8ea2b6d5 Fixed REP instructions with trap flag enabled. 2017-07-24 18:45:50 +01:00
SarahW
f078dab499 Fixed invalid opcode value in REP instruction tables. 2017-07-24 17:54:26 +01:00
SarahW
a883399781 Added AGI stalls to 486 and later CPUs.
Reworked codegen timing a bit - split timing tables into CPU-specific and generic files.
A few other timing tweaks.
2017-07-23 17:41:24 +01:00
SarahW
a96e87527e Reorganised REP instructions. 2017-07-20 21:06:21 +01:00
SarahW
bb4eb4c3b0 Fixed path in Windows new config file dialog. 2017-07-19 20:09:36 +01:00
SarahW
b6b9aab6dc Fix access to undefined variable in x86 task switch code. 2017-07-19 19:47:00 +01:00
SarahW
904ac54446 Move A20 gate initialisation to mem.c. Patch from Greatpsycho. 2017-07-19 19:35:44 +01:00
SarahW
8b433633c0 Implement port 0x70 NMI mask. Patch from Greatpsycho. 2017-07-19 19:35:01 +01:00
SarahW
c6a98090bf Tweaks to EGA monochrome palettes. Patch from basic2004. 2017-07-18 21:53:31 +01:00
SarahW
47b4e1da1c Reworked EGA plotting code a bit.
Tweaked EGA odd/even handling - 640x350x4 with 64kb video memory now works.
2017-07-18 21:48:14 +01:00
SarahW
80a411b85f EGA now supports < 256kb video memory. 2017-07-18 21:47:25 +01:00
SarahW
c9d4459e6b Fix EGA cursor when cursor end = line 0. 2017-07-17 21:04:41 +01:00
SarahW
a489f543fb Add EGA display type configuration. 2017-07-17 21:04:07 +01:00
SarahW
7a0398dd07 Add EGA status information. 2017-07-17 21:02:53 +01:00
SarahW
b90b5b7d7d Ignore 0 line blits. 2017-07-17 20:59:42 +01:00
SarahW
7531b95e83 Fixed A20 reset issues. Patch from Greatpsycho. 2017-07-17 19:38:02 +01:00
SarahW
dc511447df Added Page Size Extension (4MB pages) to Pentium CPUs. 2017-07-16 21:24:09 +01:00
SarahW
e7afbb1a26 Re-ordered HDD controller menu to be more logical. 2017-07-16 16:55:11 +01:00
SarahW
9521237b0b Added Samsung SPC-4200P emulation.
IDE Drive Diagnostics command now doesn't complete immediately (required by SPC-4200P BIOS).
Patch from Greatpsycho.
2017-07-16 16:17:59 +01:00
SarahW
51ed6ea341 Protected mode improvements :
- LTR now sets TSS state to busy
- LMSW preserves ET bit in CR0
- Fixed PC size in 16-bit system segment on CALL/JMP
Patch from Greatpsycho
2017-07-16 15:51:19 +01:00
SarahW
29bef61a3e Eject floppy drives on reset - fixes loaded discs persisting through config changes. 2017-07-16 15:31:32 +01:00
SarahW
5c97ee3422 Fixed corruption on large (>4GB) drives. 2017-07-10 21:10:04 +01:00
SarahW
935b621560 Add LARGEFILE defines to esdi_at.c. 2017-07-10 20:53:28 +01:00
SarahW
d8a94b22e6 Handle D3D buffer locking failures more gracefully. Patch from JosepMa. 2017-07-09 18:51:39 +01:00
SarahW
b18891f62e Added paths.c/h files missing from rev 789. 2017-07-09 18:17:46 +01:00
SarahW
c9f29583ff Re-ordered model menu to be more logical. 2017-07-06 21:41:59 +01:00
SarahW
807b710a5d Improvements to path handling. Patch from bit. 2017-07-06 21:25:10 +01:00
SarahW
1d4c9ab4e8 More SCAT improvements. Patch from Greatpsycho. 2017-07-06 20:26:48 +01:00
SarahW
c05689a9ec More task switching fixes. Patch from Greatpsycho. 2017-07-06 18:41:51 +01:00
SarahW
1e90a84e90 Tweaks to hard drive image parameter finding. Patch from Greatpsycho. 2017-07-05 21:54:48 +01:00
SarahW
2ac22b03d5 Fixes to task switching. Patch from Greatpsycho. 2017-07-05 21:40:02 +01:00
SarahW
5d6c3fb9ea Added WD1007V-SE1 ESDI emulation. 2017-07-05 21:00:50 +01:00
SarahW
6484baaf9f Abstracted hard disc image handling to separate file. 2017-07-02 18:10:36 +01:00
SarahW
c760a93e1a Re-enabled recompiled CLI/STI with VME. 2017-06-30 21:02:28 +01:00
SarahW
1f33b52451 Added VME emulation to Intel DX4, Pentium and Pentium MMX.
Temporarily disabled recompilation of CLI and STI.
2017-06-30 20:42:19 +01:00
SarahW
8fbebead19 CHECK_READ()/CHECK_WRITE() now handle code segments. Patch from Greatpsycho. 2017-06-20 19:32:58 +01:00
SarahW
4c94ab07c9 286 LOADALL can not change PE bit in MSW register when in protected mode. Patch from Greatpsycho. 2017-06-20 19:32:12 +01:00
SarahW
16b4894b44 Opcode C6/1-7 and C7/1-7 treated as illegal on 286+ CPUs. Patch from Greatpsycho. 2017-06-20 19:31:48 +01:00
SarahW
4446a6cdaf Implemented 16-bit task switching. Patch from Greatpsycho. 2017-06-19 19:55:59 +01:00
pcem_emulator
0928b4fbdf Sound buffer length now configurable in wxWidgets GUI. Patch from bit. 2017-06-18 21:03:22 +01:00
pcem_emulator
e61d25eedd Fixed --config parameter with wxWidgets GUI. Patch from bit. 2017-06-18 20:51:07 +01:00
pcem_emulator
03f7302cf8 Clean up duplicate definitions in cdrom-image.cc. Patch from bit. 2017-06-18 20:50:20 +01:00
pcem_emulator
bfef4889a7 Fix build error with wxWidgets GUI introducted in rev 772. 2017-06-18 20:49:52 +01:00
SarahW
7234e2c3be Several 286/386SX models can now have less than 1MB of RAM.
Memory remapping code restructured.
Patch from Greatpsycho.
2017-06-18 20:15:46 +01:00
SarahW
fb4e1f0715 Implemented Pentium FPU latencies. 2017-06-18 15:48:20 +01:00
SarahW
59b5cf50dd Buffer IDE multiple-sector read commands. 2017-06-17 08:03:35 +01:00
SarahW
69f0f7b01c Implemented 16-bit DMA support for GUS. 2017-06-16 20:46:11 +01:00
SarahW
d5335ccb27 Fixed typos breaking 16-bit DMA. 2017-06-16 20:45:13 +01:00
SarahW
dac7f3406c Pentium timing improvements - decoder & pairing limitations on instructions with immediate & displacement, 7 byte limitation on Pentium MMX decoding. 2017-06-16 18:26:54 +01:00
SarahW
182d22cb95 Fix unused variable in vid_voodoo.c. 2017-06-13 21:33:18 +01:00
SarahW
3a7c4687d6 Reduce self modifying code granularity from 64 bytes to 16. 2017-06-13 21:05:10 +01:00
SarahW
03a63ecb88 Fixed typo in x86-64 MEM_CHECK_WRITE_W()/L() functions - Windows XP boots on x86-64 recompiler again. 2017-06-13 20:34:45 +01:00
SarahW
6692f708ad Increased PS/2 ESDI sector buffer size. 2017-06-12 18:16:02 +01:00
SarahW
6e51e8975e Sound buffer size now configurable. 2017-06-10 21:00:23 +01:00
SarahW
5788188ce9 Correct DBOPL OPL3 volume balancing.
Correct OPL mixing on AWE32.
2017-06-07 19:10:16 +01:00
SarahW
a31ab58d64 More D3D error checking. Patch from ruben_balea 2017-06-07 18:03:21 +01:00
SarahW
9687b218d1 Direct3D code now fatals out instead of crashing if D3D device can not be created. 2017-06-07 17:59:21 +01:00
SarahW
8aa5c86386 DirectDraw code now falls back to backbuffer in system memory if it can't allocate backbuffer in video memory. 2017-06-07 17:56:32 +01:00
SarahW
f928b153e2 Added NukedOPL files 2017-06-07 17:46:45 +01:00
SarahW
099b7a21d1 Added NukedOPL emulator for OPL3. Based on patch from Battler. 2017-06-06 21:53:30 +01:00
SarahW
472a76892a Added EMS support to Laser XT machines. Patch from Greatpsycho. 2017-06-05 20:43:47 +01:00
SarahW
8c56b71184 Enable scrollbar in configuration manager dialogue. 2017-06-04 21:30:07 +01:00
SarahW
d7b10fd12f Load IBM BIOS on Laser XT systems if available. Patch from Greatpsycho. 2017-06-04 17:58:56 +01:00
SarahW
45bd0db00c Corrected EuroPC CPU options. Patch from ecksemmess. 2017-06-04 17:47:13 +01:00
SarahW
7af491d719 Added monochrome green/amber/white monitor selection for CGA, MDA and Hercules. Patch from basic2004. 2017-06-04 17:39:39 +01:00
SarahW
fbd0f01967 Corrected intensity in Hercules graphics mode. 2017-06-04 16:48:19 +01:00
SarahW
3b4392bcf8 Implemented data misalignment penalties on 486 and later CPUs. 2017-06-04 16:41:33 +01:00
SarahW
4faab6f75c Correct fix for SB DSP command 0xf8. 2017-06-03 10:03:07 +01:00
SarahW
ff26a772b2 Corrected test on SB DSP command 0xf8. 2017-06-03 07:50:31 +01:00
SarahW
fa9d9381b7 Clear flat DS/SS status on segment load during block. Fixes LBA 2. 2017-06-02 22:01:09 +01:00
SarahW
12e8cb6700 Fixed readback of invalid SB Pro mixer registers. Fixes SBCHECK.EXE. 2017-06-02 21:14:27 +01:00
SarahW
3630bc2f17 Add undocumented 0xF8 Sound Blaster DSP command. Fixes TEST-SBP.EXE. 2017-06-02 20:41:43 +01:00
SarahW
71055ef19c Sound Blaster volume balancing and filter changes. Patch from James-F. 2017-06-02 19:46:00 +01:00
SarahW
617cfd7ef2 Added preliminary IRQ support for ATI Mach64, S3 Vision864/Trio32/Trio64, and S3 ViRGE. 2017-06-01 21:51:02 +01:00
SarahW
d38c51c0d6 Improved PCI configuration registers on i430LX, i430FX, i430VX and PIIX. 2017-06-01 20:43:34 +01:00
SarahW
6bd87d5718 PCI changes :
- Each machine now specifies what PCI device IDs are used as generic card slots
- Implemented IRQ handling
- Added SIO chip to allow IRQ routing for Premiere/PCI
2017-06-01 20:37:09 +01:00
SarahW
3724b442fc Fixed blit thread hang with DirectDraw when blitting a zero line frame. 2017-06-01 18:28:17 +01:00
pcem_emulator
23b2ae0d9d wxWidgets GUI can now be built through autoconf (use '--enable-wx'). 2017-05-29 16:24:08 +01:00
pcem_emulator
7fe91626d6 Added new GUI based on wxWidgets. Patch from bit. 2017-05-29 15:38:48 +01:00
SarahW
a2f44b8ea7 Add support for BIN/CUE images. Patch from bit, BIN/CUE handling from DOSBox. 2017-05-29 13:56:19 +01:00
SarahW
828224d148 Fixed more uninitialised variables. 2017-05-29 12:13:45 +01:00
pcem_emulator
fd36feae52 Removed Allegro paletteised blitting code. 2017-05-28 18:21:17 +01:00
SarahW
3c514a445f Removed palettised blitting code. 2017-05-28 17:45:42 +01:00
SarahW
3d69f092c9 Fixed infinite loop in Windows GUI when selecting File->Exit. 2017-05-25 21:25:42 +01:00
SarahW
8cd767091a Fixed stack size bug introducted in rev 729. 2017-05-25 18:06:40 +01:00
SarahW
3fb4eae1b0 Fix a couple of uninitialised variables. 2017-05-24 21:51:03 +01:00
SarahW
083ca3d4a2 Slight optimisation when DS/SS are 'flat' (base=0, limit=4G). 2017-05-24 21:50:37 +01:00
SarahW
3f4361b265 Fix loading of disc images at startup. 2017-05-21 11:05:40 +01:00
SarahW
34679d4273 Tweaked S3 PIXTRANS register. Fixes text rendering in Line Wars II and problems with some S3 drivers. 2017-05-18 20:56:59 +01:00
SarahW
85e7829244 Fixed CD-ROM initialisation broken by config changes. 2017-05-17 19:13:23 +01:00
SarahW
c518e3d137 File extension for new configs or hard disc images is now appended if user doesn't specify one. 2017-05-16 21:20:21 +01:00
SarahW
db2ce0b1e2 Add config manager file to makefiles. 2017-05-16 21:04:04 +01:00
SarahW
183350c82f Merge with new_config 2017-05-16 20:59:24 +01:00
SarahW
9791f4283d Add default NVR files for PS/2 models. 2017-05-15 18:06:20 +01:00
SarahW
411dbe5745 Fix disc indicator on Direct3D. 2017-05-11 21:25:28 +01:00
SarahW
a54e6575d3 Partially implement Dell System 200 chipset. Fixes POST errors and HIMEM.SYS. 2017-05-11 21:18:34 +01:00
SarahW
7c63ce6368 Mark video memory mappings as external. Patch from Greatpsycho. 2017-05-07 10:38:28 +01:00
SarahW
e09d483cf5 Fixed typo in 808x cycle count. Patch from hOMER247. 2017-05-06 18:36:09 +01:00
795 changed files with 200776 additions and 50840 deletions

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Emulator configuration**
- Machine: [e.g. IBM AT, AMI 486 clone etc]
- CPU:
- Graphics/sound cards:
- Installed OS
**Host machine**
- OS: [e.g. Windows 10, Ubuntu 18.04 etc]
- Emulator version
- Any other relevant information
**Additional context**
Add any other context about the problem here.

201
.github/workflows/c-cpp.yml vendored Normal file
View file

@ -0,0 +1,201 @@
name: C/C++ CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 64bit (gcc)
os: ubuntu-latest
args: --enable-networking --enable-release-build CFLAGS="-DPCEM_BUILD_VERSION=${GITHUB_SHA::8}"
artifacts_name: PCem-Ubuntu-${{ github.head_ref }}-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.tar.bz2
installdeps: >-
libsdl2-dev
libopenal-dev
libwxgtk3.0-gtk3-dev
libncap-dev
- name: Windows 32bits (MSYS2)
os: windows-latest
compiler: MINGW32
args: --enable-networking --enable-release-build CFLAGS="-DPCEM_BUILD_VERSION=${GITHUB_SHA::8}"
artifacts_name: PCem-Windows-MINGW32-${{ github.head_ref }}-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-i686-ntldd-git
mingw-w64-i686-toolchain
mingw-w64-i686-SDL2
mingw-w64-i686-openal
mingw-w64-i686-wxWidgets
- name: Windows 64bits (MSYS2)
os: windows-latest
compiler: MINGW64
args: --enable-networking --enable-release-build CFLAGS="-DPCEM_BUILD_VERSION=${GITHUB_SHA::8}"
artifacts_name: PCem-Windows-MINGW64-${{ github.head_ref }}-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-x86_64-ntldd-git
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-openal
mingw-w64-x86_64-wxWidgets
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2
with:
path: temp
fetch-depth: 0
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
# You may pin to the exact commit or the version.
# uses: msys2/setup-msys2@a43b8403533fffe0c157dd8498f021ddec66bff7
uses: msys2/setup-msys2@v2
with:
# Variant of the environment to set by default: MSYS, MINGW32, MINGW64, UCRT64 or CLANG64
msystem: ${{ matrix.compiler }}
# Retrieve and extract base installation from upstream GitHub Releases
release: false # optional, default is true
# Update MSYS2 installation through pacman
update: false
# Install packages after installation through pacman
install: ${{ matrix.installdeps }}
- name: npcap download (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
wget https://nmap.org/npcap/dist/npcap-sdk-1.05.zip
unzip -d npcap-sdk-1.05/ npcap-sdk-1.05.zip
cd npcap-sdk-1.05
cp -r Include/* /mingw32/include/
cp -r Include/* /mingw64/include/
cp -r Lib/*.lib /mingw32/lib/
cp -r Lib/x64/*.lib /mingw64/lib/
- name: Setup ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.installdeps }}
# Copy all the sources to the dist folder, before we start generating intermediate files.
- name: prepare-package (Windows32)
if: runner.os == 'Windows' && matrix.compiler == 'MINGW32'
shell: msys2 {0}
run: |
mkdir dist
cp -R ./temp/* dist
rm -Rf ./dist/.git
cp /mingw32/bin/libdeflate.dll dist
cp /mingw32/bin/libexpat-1.dll dist
cp /mingw32/bin/libgcc_s_dw2-1.dll dist
cp /mingw32/bin/libjpeg-8.dll dist
cp /mingw32/bin/liblzma-5.dll dist
cp /mingw32/bin/libopenal-1.dll dist
cp /mingw32/bin/libpng16-16.dll dist
cp /mingw32/bin/libstdc++-6.dll dist
cp /mingw32/bin/libtiff-5.dll dist
cp /mingw32/bin/libwebp-7.dll dist
cp /mingw32/bin/libwinpthread-1.dll dist
cp /mingw32/bin/libzstd.dll dist
cp /mingw32/bin/SDL2.dll dist
cp /mingw32/bin/wxbase30u_gcc_custom.dll dist
cp /mingw32/bin/wxbase30u_xml_gcc_custom.dll dist
cp /mingw32/bin/wxmsw30u_adv_gcc_custom.dll dist
cp /mingw32/bin/wxmsw30u_core_gcc_custom.dll dist
cp /mingw32/bin/wxmsw30u_html_gcc_custom.dll dist
cp /mingw32/bin/wxmsw30u_xrc_gcc_custom.dll dist
cp /mingw32/bin/zlib1.dll dist
- name: prepare-package (Windows64)
if: runner.os == 'Windows' && matrix.compiler == 'MINGW64'
shell: msys2 {0}
run: |
mkdir dist
cp -R ./temp/* dist
rm -Rf ./dist/.git
cp /mingw64/bin/libdeflate.dll dist
cp /mingw64/bin/libexpat-1.dll dist
cp /mingw64/bin/libgcc_s_seh-1.dll dist
cp /mingw64/bin/libjpeg-8.dll dist
cp /mingw64/bin/liblzma-5.dll dist
cp /mingw64/bin/libopenal-1.dll dist
cp /mingw64/bin/libpng16-16.dll dist
cp /mingw64/bin/libstdc++-6.dll dist
cp /mingw64/bin/libtiff-5.dll dist
cp /mingw64/bin/libwebp-7.dll dist
cp /mingw64/bin/libwinpthread-1.dll dist
cp /mingw64/bin/libzstd.dll dist
cp /mingw64/bin/SDL2.dll dist
cp /mingw64/bin/wxbase30u_gcc_custom.dll dist
cp /mingw64/bin/wxbase30u_xml_gcc_custom.dll dist
cp /mingw64/bin/wxmsw30u_adv_gcc_custom.dll dist
cp /mingw64/bin/wxmsw30u_core_gcc_custom.dll dist
cp /mingw64/bin/wxmsw30u_html_gcc_custom.dll dist
cp /mingw64/bin/wxmsw30u_xrc_gcc_custom.dll dist
cp /mingw64/bin/zlib1.dll dist
- name: configure (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cd temp
autoreconf -i
./configure ${{ matrix.args }}
- name: make (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cd temp
make -j
- name: package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cp ./temp/src/pcem.exe dist
cd dist
zip -r -9 ${{ matrix.artifacts_path }} *
- name: prepare-package (Linux)
if: runner.os == 'Linux'
run: |
mkdir dist
cp -R ./temp/* dist
rm -Rf ./dist/.git
- name: configure (Linux)
if: runner.os == 'Linux'
run: |
cd temp
autoreconf -i
./configure ${{ matrix.args }}
- name: make (Linux)
if: runner.os == 'Linux'
run: |
cd temp
make -j
- name: package (Linux)
if: runner.os == 'Linux'
run: |
cp ./temp/src/pcem dist
cd dist
tar -cjf ${{ matrix.artifacts_path }} *
- name: "Upload GitHub Actions artifacts"
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifacts_name }}
path: ./dist/${{ matrix.artifacts_path }}

11
.gitignore vendored Normal file
View file

@ -0,0 +1,11 @@
*.o
*.swp
/Makefile
/src/Makefile
autom4te.cache
config.log
config.status
.deps
.dirstamp
/pcem
/src/pcem

View file

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.16.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -89,8 +89,7 @@ build_triplet = @build@
host_triplet = @host@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/allegro.m4 \
$(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@ -134,7 +133,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
cscope distdir distdir-am dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@ -197,12 +196,13 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALLEGRO_CONFIG = @ALLEGRO_CONFIG@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
@ -243,18 +243,36 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
SDL2_CONFIG = @SDL2_CONFIG@
SDL2_FRAMEWORK = @SDL2_FRAMEWORK@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_LIBS = @SDL_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
WX_CFLAGS = @WX_CFLAGS@
WX_CFLAGS_ONLY = @WX_CFLAGS_ONLY@
WX_CONFIG_PATH = @WX_CONFIG_PATH@
WX_CPPFLAGS = @WX_CPPFLAGS@
WX_CXXFLAGS = @WX_CXXFLAGS@
WX_CXXFLAGS_ONLY = @WX_CXXFLAGS_ONLY@
WX_LIBS = @WX_LIBS@
WX_LIBS_STATIC = @WX_LIBS_STATIC@
WX_RESCOMP = @WX_RESCOMP@
WX_VERSION = @WX_VERSION@
WX_VERSION_MAJOR = @WX_VERSION_MAJOR@
WX_VERSION_MICRO = @WX_VERSION_MICRO@
WX_VERSION_MINOR = @WX_VERSION_MINOR@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
allegro_CFLAGS = @allegro_CFLAGS@
allegro_LIBS = @allegro_LIBS@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -326,8 +344,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@ -445,7 +463,10 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@ -510,7 +531,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@ -525,6 +546,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-zstd: distdir
tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@ -536,7 +561,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@ -554,7 +579,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@ -564,9 +589,11 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@ -582,7 +609,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
@ -743,7 +770,7 @@ uninstall-am:
am--refresh check check-am clean clean-cscope clean-generic \
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
distcheck distclean distclean-generic distclean-tags \
dist-zstd distcheck distclean distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \

397
README.md Normal file
View file

@ -0,0 +1,397 @@
# [PCem](https://pcem-emulator.co.uk/)
## Download: [Windows](https://pcem-emulator.co.uk/files/PCemV17Win.zip)/[Linux](https://pcem-emulator.co.uk/files/PCemV17Linux.tar.gz)
Latest version: <b>v17</b> [Changelog](https://pcem-emulator.co.uk/index.html)
PCem is licensed under GPL v2.0, see [COPYING](COPYING) for more details.
You can submit patches on our [forum](https://pcem-emulator.co.uk/phpBB3). Before you do, please note the [guidelines](https://pcem-emulator.co.uk/phpBB3/viewtopic.php?f=3&t=5) for submitting patches.
:exclamation: Note: <b>NO COPYRIGHTED ROM FILES ARE INCLUDED NOR WILL THEY BE. PLEASE DO NOT ASK FOR THEM.</b>
## BSD and Linux supplement (v17)
You will need the following libraries (and their dependencies):
- SDL2
- wxWidgets 3.x
- OpenAL
Open a terminal window, navigate to the PCem directory then enter:
### Linux
```
./configure --enable-release-build
make
```
### BSD
```
./configure --enable-release-build
gmake
```
then `./pcem` to run.
The Linux/BSD versions store BIOS ROM images, configuration files, and other data in `~/.pcem`
configure options are :
```
--enable-release-build : Generate release build. Recommended for regular use.
--enable-debug : Compile with debugging enabled.
--enable-networking : Build with networking support.
--enable-alsa : Build with support for MIDI output through ALSA. Requires libasound.
```
The menu is a pop-up menu in the Linux/BSD port. Right-click on the main window when mouse is not
captured.
CD-ROM support currently only accesses `/dev/cdrom`. It has not been heavily tested.
## Links
### PCem emulates the following hardware (as of v17):
Hardware | Links
--- | ---
Systems | [8088](#8088-based)<br/>[8086](#8086-based)<br/>[286](#286-based)<br/>[386](#386-based)<br/>[486](#486-based)<br/>[Pentium](#pentium-based)<br/>[Super Socket 7](#super-socket-7-based)
Graphics | [Basic](#basic-cards)<br/>[Unaccelerated (S)VGA cards](#unaccelerated-svga-cards)<br/>[2D accelerated SVGA cards](#2d-accelerated-svga-cards)<br/>[3D accelerated SVGA cards](#3d-accelerated-svga-cards)<br/>[3D only cards](#3d-only-cards)
Sound | [Cards](#sound-cards)
HDD Controller | [Cards](#hdd-controller-cards)
Misc | [Cards](#misc-cards)
### [Software Tested](TESTED.md) (list)
- [DOS](TESTED.md#dos)<br/>
- [Windows](TESTED.md#windows)<br/>
- [Windows NT](TESTED.md#windows-nt)<br/>
- [OS/2](TESTED.md#os2)<br/>
- [Linux](TESTED.md#linux)<br/>
- [Applications](TESTED.md#applications)<br/>
- [Games](TESTED.md#games)<br/>
- [Demos](TESTED.md#demos)<br/>
- [Emulators](TESTED.md#emulators)<br/>
<hr>
## Systems
### 8088 based
Release | Machine | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | ---
1981 | <b>IBM PC</b><br/>8088 at 4.77 MHz<br/>16KB - 640KB RAM (min. 64KB) | ibmpc/pc102782.bin<br/>ibmpc/basicc11.f6<br/>ibmpc/basicc11.f8<br/>ibmpc/basicc11.fa<br/>ibmpc/basicc11.fc
1983 | <b>Compaq Portable Plus</b><br/>8088 at 4.77 MHz<br/>128KB - 640KB RAM | compaq_pip/Compaq Portable Plus 100666-001 Rev C.bin
1983 | <b>IBM XT</b><br/>8088 at 4.77 MHz<br/>64KB - 640KB RAM | ibmxt/5000027.u19<br/>ibmxt/1501512.u18
1983 | <b>Leading Edge Model M</b><br/>8088 at 7.16 MHz<br/>128KB - 704KB RAM | leadingedge_modelm/Leading Edge - Model M - BIOS ROM - Version 4.71.bin
1984 | <b>IBM PCjr</b> <i>[[5]](#system-note-5)</i><br/>8088 at 4.77 MHz<br/>64KB - 640KB RAM (min. 128KB)<br/>Built-in 16 colour graphics<br/>3 voice sound<br/>Not generally PC compatible. | ibmpcjr/bios.rom
1984 | <b>Tandy 1000</b> <i>[[5]](#system-note-5)</i><br/>8088 at 4.77 MHz<br/>128KB - 640KB RAM<br/>Built-in 16 colour graphics<br/>3 voice sound | tandy/tandy1t1.020
1985 | <b>NCR PC4i</b><br/>8088 at 4.77 MHz<br/>256KB - 640KB RAM | ncr_pc4i/NCR_PC4i_BIOSROM_1985.BIN
1986 | <b>DTK Clone XT</b><br/>8088 at 8/10 MHz<br/>64KB - 640KB RAM | dtk/dtk_erso_2.42_2764.bin
1986 | <b>Phoenix XT clone</b><br/>8088 at 8/10 MHz<br/>64KB - 640KB RAM | pxxt/000p001.bin
1987 | <b>Tandy 1000HX</b><br/>8088 at 7.16 MHz<br/>256KB - 640KB RAM<br/>Built-in 16 colour graphics<br/>3 voice sound<br/>Has DOS 2.11 in ROM | tandy1000hx/v020000.u12
1987 | <b>Thomson TO16 PC</b><br/>8088 at 9.54 MHz<br/>512KB - 640KB RAM | to16_pc/TO16_103.bin
1987 | <b>Toshiba T1000</b> <i>[[1]](#system-note-1)</i> <i>[[5]](#system-note-5)</i><br/>8088 at 4.77 MHz<br/>512KB - 1024KB RAM<br/>CGA on built-in LCD | t1000/t1000.rom<br/>t1000/t1000font.rom
1987 | <b>VTech Laser Turbo XT</b><br/>8088 at 10 MHz<br/>640KB RAM | ltxt/27c64.bin
1987 | <b>Zenith Data SupersPort</b><br/>8088 at 8 MHz<br/>128KB - 640KB RAM<br/>Built-in LCD video is not currently emulated | zdsupers/z184m v3.1d.10d
1988? | <b>&#169;Anonymous Generic Turbo XT BIOS</b><br/>8088 at 8+ MHz<br/>64KB - 640KB RAM | genxt/pcxt.rom
1988 | <b>Atari PC3</b><br/>8088 at 8 MHz<br/>640KB RAM | ataripc3/AWARD_ATARI_PC_BIOS_3.08.BIN
1988 | <b>Juko XT clone</b> | jukopc/000o001.bin
1988 | <b>Schneider Euro PC</b><br/>8088 at 9.54 MHz<br/>512KB - 640KB RAM | europc/50145<br/>europc/50146
1989 | <b>AMI XT clone</b><br/>8088 at 8+ MHz<br/>64KB - 640KB RAM | amixt/ami_8088_bios_31jan89.bin
2015 | <b>Xi8088</b><br/>8088 at 4.77-13.33 MHz<br/>640KB RAM | xi8088/bios-xi8088.bin
### 8086 based
Release | Machine | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | ---
1984 | <b>Compaq Deskpro</b><br/>8086 at 8 MHz<br/>128KB - 640KB RAM | deskpro/Compaq - BIOS - Revision J - 106265-002.bin
1984 | <b>Olivetti M24</b> <i>[[5]](#system-note-5)</i><br/>8086 at 8 MHz<br/>128KB - 640KB RAM<br/>Built-in enhanced CGA (supports 640x400x2) | olivetti_m24/olivetti_m24_version_1.43_low.bin<br/>olivetti_m24/olivetti_m24_version_1.43_high.bin
1986 | <b>Amstrad PC1512</b> <i>[[5]](#system-note-5)</i><br/>8086 at 8 MHz<br/>512KB - 640KB RAM<br/>Enhanced CGA (supports 640x200x16)<br/>Custom mouse port | pc1512/40043.v1<br/>pc1512/40044.v2<br/>pc1512/40078.ic127
1987 | <b>Amstrad PC1640</b> <i>[[5]](#system-note-5)</i><br/>8086 at 8 MHz<br/>640KB RAM<br/>Built-in Paradise EGA<br/>Custom mouse port | pc1640/40043.v3<br/>pc1640/40044.v3<br/>pc1640/40100
1987 | <b>Toshiba T1200</b> <i>[[1]](#system-note-1)</i> <i>[[5]](#system-note-5)</i><br/>8086 at 9.54 MHz<br/>1MB - 2MB RAM<br/>CGA on built-in LCD | t1200/t1200_019e.ic15.bin<br/>t1200/t1000font.rom
1988 | <b>Amstrad PPC512/640</b> <i>[[5]](#system-note-5)</i><br/>8086 at 8 MHz<br/>512KB - 640KB RAM<br/>Built-in CGA w/ plasma display | ppc512/40107.v2<br/>ppc512/40108.v2<br/>ppc512/40109.bin
1988 | <b>Sinclair PC200/Amstrad PC20</b> <i>[[5]](#system-note-5)</i><br/>8086 at 8 MHz<br/>512KB - 640KB RAM<br/>Built-in CGA (supports TV-out 50hz PAL) | pc200/pc20v2.0<br/>pc200/pc20v2.1<br/>pc200/40109.bin
1988 | <b>VTech Laser XT3</b><br/>8086 at 10 MHz<br/>512KB - 1152KB RAM | lxt3/27c64d.bin
1989 | <b>Amstrad PC2086</b> <i>[[5]](#system-note-5)</i><br/>8086 at 8 MHz<br/>640KB RAM<br/>Built-in VGA | pc2086/40179.ic129<br/>pc2086/40180.ic132<br/>pc2086/40186.ic171
1989 | <b>Tandy 1000SL/2</b> <i>[[5]](#system-note-5)</i><br/>8086 at 9.54 MHz<br/>512KB - 768KB RAM<br/>Built-in 16 colour graphics<br/>4 voice sound | tandy1000sl2/8079047.hu1<br/>tandy1000sl2/8079048.hu2
1990 | <b>Amstrad PC3086</b> <i>[[5]](#system-note-5)</i><br/>8086 at 8 MHz<br/>640KB RAM<br/>Built-in VGA | pc3086/fc00.bin<br/>pc3086/c000.bin
1991 | <b>Amstrad PC5086</b><br/>8086 at 8 MHz<br/>640KB RAM | pc5086/sys_rom.bin
### 286 based
Release | Machine | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | ---
1984 | <b>IBM AT</b><br/>286 at 6 or 8 MHz<br/>256KB - 16MB RAM | ibmat/at111585.0<br/>ibmat/at111585.1
1986 | <b>Compaq Portable II</b><br/>286 at 8 MHz<br/>256KB - 15MB RAM | compaq_pii/109739-001.rom<br/>compaq_pii/109740-001.rom
1986 | <b>IBM XT Model 286</b><br/>286 at 6 MHz<br/>256KB - 16MB RAM | ibmxt286/BIOS_5162_21APR86_U34_78X7460_27256.BIN<br/>ibmxt286/BIOS_5162_21APR86_U35_78X7461_27256.BIN
1986 | <b>Toshiba T3100e</b> <i>[[1]](#system-note-1)</i> <i>[[5]](#system-note-5)</i><br/>286 at 12 MHz<br/>1MB - 5MB RAM<br/>CGA on gas-plasma display | t3100e/t3100e_font.bin<br/>t3100e/t3100e.rom
1987 | <b>IBM PS/2 Model 50</b> <i>[[5]](#system-note-5)</i><br/>286 at 10 MHz<br/>1MB - 16MB RAM<br/>Built-in VGA<br/>MCA bus | i8550021/90x7420.zm13<br/>i8550021/90x7423.zm14<br/>i8550021/90x7426.zm16<br/>i8550021/90x7429.zm18
1988 | <b>Bull Micral 45</b><br/>286 at 12 MHz<br/>1MB - 6MB RAM | bull_micral_45/even.fil<br/>bull_micral_45/odd.fil
1988 | <b>Commodore PC30-III</b><br/>286 at 12 MHz<br/>512KB - 16MB RAM | cmdpc30/commodore pc 30 iii even.bin<br/>cmdpc30/commodore pc 30 iii odd.bin
1988 | <b>IBM PS/2 Model 30-286</b><br/>286 at 10 MHz<br/>1MB - 16MB RAM<br/>Built-in VGA<br/>MCA bus | ibmps2_m30_286/33f5381a.bin
1989 | <b>Epson PC AX</b><br/>286<br/>256KB - 16MB RAM | epson_pcax/EVAX<br/>epson_pcax/ODAX
1989 | <b>Epson PC AX2e</b><br/>286 at 12 MHz<br/>256KB - 16MB RAM | epson_pcax2e/EVAX<br/>epson_pcax2e/ODAX
1990 | <b>AMI 286 clone</b><br/>286 at 8+ MHz<br/>512KB - 16MB RAM | ami286/amic206.bin
1990 | <b>Award 286 clone</b><br/>286 at 8+ MHz<br/>512KB - 16MB RAM | award286/award.bin
1990 | <b>Dell System 200</b><br/>286 at 12 MHz<br/>640KB - 16MB RAM | dells200/dell0.bin<br/>dells200/dell1.bin
1990 | <b>IBM PS/1 Model 2011</b> <i>[[5]](#system-note-5)</i><br/>286 at 10 MHz<br/>512KB - 16MB RAM<br/>Built-in VGA<br/>DOS 4.01 + GUI menu system in ROM | ibmps1/f80000.bin
? | <b>Goldstar GDC-212M</b><br/>286 at 12 MHz<br/>512KB - 4MB RAM | gdc212m/gdc212m_72h.bin
? | <b>GW-286CT GEAR</b><br/>286 at 8+ MHz<br/>512KB - 16MB RAM | gw286ct/2ctc001.bin
? | <b>Hyundai Super-286TR</b><br/>286 at 12 MHz<br/>1MB - 4MB RAM | super286tr/award.bin
? | <b>Samsung SPC-4200P</b><br/>286 at 12 MHz<br/>512KB - 2MB RAM | spc4200p/u8.01
? | <b>Samsung SPC-4216P</b><br/>286 at 12 MHz<br/>1MB - 5MB RAM | spc4216p/phoenix.bin<br/>&nbsp;&nbsp;&nbsp;<i>or</i><br/>spc4216p/7101.u8<br/>spc4216p/ac64.u10
? | <b>Samsung SPC-4620P</b><br/>286 at 12 MHz<br/>1MB - 5MB RAM<br/>Built-in Korean ATI-28800 | spc4620p/31005h.u8<br/>spc4620p/31005h.u10<br/>spc4620p/svb6120a_font.rom<br/>spc4620p/31005h.u8<br/>spc4620p/31005h.u10
? | <b>Tulip AT Compact</b><br/>286<br/>640KB - 16MB RAM | tulip_tc7/tc7be.bin<br/>tulip_tc7/tc7bo.bin
### 386 based
Release | Machine | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | ---
1987 | <b>IBM PS/2 Model 80</b> <i>[[5]](#system-note-5)</i><br/>386DX at 20 MHz<br/>1MB - 12MB RAM<br/>Built-in VGA<br/>MCA bus | i8580111/15f6637.bin<br/>i8580111/15f6639.bin
1988 | <b>ECS 386/32</b><br/>386DX at 20 MHz<br/>1MB - 16MB RAM | ecs386_32/386_32_even.bin<br/>ecs386_32/386_32_odd.bin
1989 | <b>IBM PS/2 Model 70 (type 3)</b> <i>[[5]](#system-note-5)</i><br/>386DX at 25 MHz<br/>2MB - 16MB RAM<br/>Built-in VGA<br/>MCA bus | ibmps2_m70_type3/70-a_even.bin<br/>ibmps2_m70_type3/70-a_odd.bin
1989 | <b>Compaq Deskpro 386</b><br/>386DX at 20 MHz<br/>1MB - 15MB RAM | deskpro386/109592-005.u11.bin<br/>deskpro386/109591-005.u13.bin
1989 | <b>Epson PC AX3</b><br/>386SX at 16 MHz<br/>256KB - 16MB RAM | epson_pcax3/EVAX3<br/>epson_pcax3/ODAX3
1989 | <b>IBM PS/2 Model 55SX</b><br/>386SX at 16 MHz<br/>1MB - 8MB RAM<br/>Built-in VGA<br/>MCA bus | i8555081/33f8146.zm41<br/>i8555081/33f8145.zm40
1990 | <b>DTK 386SX clone</b><br/>386SX<br/>512KB - 16MB RAM | dtk386/3cto001.bin
1990 | <b>IBM PS/1 Model 2121</b> <i>[[5]](#system-note-5)</i><br/>386SX at 20 MHz<br/>1MB - 16MB RAM<br/>Built-in VGA | ibmps1_2121/fc0000.bin
1990 | <b>Samsung SPC-6000A</b><br/>386DX<br/>1MB - 32 MB RAM | spc6000a/3c80.u27<br/>spc6000a/9f80.u26
1992 | <b>Acermate 386SX/25N</b> <i>[[5]](#system-note-5)</i><br/>386SX at 25 MHz<br/>2MB - 16MB RAM<br/>Built-in Oak SVGA | acer386/acer386.bin<br/>acer386/oti067.bin
1992 | <b>Amstrad MegaPC</b> <i>[[2]](#system-note-2)</i> <i>[[5]](#system-note-5)</i><br/>386SX at 25 MHz<br/>1MB - 16MB RAM<br/>Built-in VGA<br/> | megapc/41651-bios lo.u18<br/>megapc/211253-bios hi.u19
1992 | <b>Commodore SL386SX-25</b> <i>[[5]](#system-note-5)</i><br/>386SX at 25 MHz<br/>1MB - 16MB RAM<br/>Built-in AVGA2 | cbm_sl386sx25/f000.bin<br/>cbm_sl386sx25/c000.bin
1992 | <b>Packard Bell Legend 300SX</b><br/>386SX at 16 MHz<br/>1MB - 16MB RAM | pb_l300sx/pb_l300sx.bin
1992 | <b>Samsung SPC-6033P</b><br/>386SX at 33 MHz<br/>2MB - 12 MB RAM | spc6033p/phoenix.bin<br/>spc6033p/svb6120a_font.rom
1994 | <b>AMI 386DX clone</b><br/>386DX at 40 MHz<br/>1MB - 32MB RAM | ami386dx/opt495sx.ami
1994 | <b>AMI 386SX clone</b><br/>386SX at 25 MHz<br/>1MB - 16MB RAM | ami386/ami386.bin
1994 | <b>MR 386DX clone</b><br/>This is a generic 386DX clone with an MR BIOS | mr386dx/opt495sx.mr
? | <b>KMX-C-02</b><br/>386SX<br/>512KB - 16MB RAM | kmxc02/3ctm005.bin
### 486 based
Release | Machine<br/>(+ addl. hardware) | CPU(s) Supported | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | --- | ---
1990 | <b>IBM PS/2 Model 70 (type 4)</b> <i>[[3]](#system-note-3)</i><br/>2MB - 16MB RAM<br/>Built-in VGA<br/>MCA bus | <b>486DX</b> at 25 MHz | ibmps2_m70_type3/70-a_even.bin<br/>ibmps2_m70_type3/70-a_odd.bin
1993 | <b>AMI 486 clone</b><br/>1MB - 32MB RAM | <b>486</b> at 16-66 MHz | ami486/ami486.bin
1993 | <b>Elonex PC-425X</b> <i>[[5]](#system-note-5)</i><br/>1MB - 256MB RAM<br/>Built-in Trident TGUI9440CXi | <b>486SX</b> at 25 MHz | elx_pc425x/elx_pc425x.bin<br/>&nbsp;&nbsp;&nbsp;<i>or</i><br/>elx_pc425x/elx_pc425x_bios.bin<br/>elx_pc425x/elx_pc425x_vbios.bin
1993 | <b>IBM PS/1 Model 2133 (EMEA 451)</b><br/>2MB - 64MB RAM<br/>Built-in Cirrus Logic GD5426 | <b>486SX</b> at 25 MHz | ibmps1_2133/PS1_2133_52G2974_ROM.bin
1993 | <b>Packard Bell PB410A</b> <i>[[5]](#system-note-5)</i><br/>1MB - 64MB RAM<br/>Built-in HT-216 video | <b>486</b> at 25-120 MHz<br/><b>Am5x86</b> at 133-160 MHz<br/><b>Cx5x86</b> at 100-133 MHz<br/><b>Pentium Overdrive</b> at 63-83 MHz | pb410a/PB410A.080337.4ABF.U25.bin
1994 | <b>AMI WinBIOS 486 clone</b><br/>1MB - 32MB RAM | <b>486</b> at 16-66 MHz | win486/ali1429g.amw
1995 | <b>Award SiS 496/497</b><br/>1MB - 64MB RAM | <b>486</b> at 16-120 MHz<br/><b>Am5x86</b> at 133-160 MHz<br/><b>Cx5x86</b> at 100-133 MHz<br/><b>Pentium Overdrive</b> at 63-83 MHz | sis496/sis496-1.awa
### Pentium based
Release | Machine<br/>(+ addl. hardware) | CPU(s) Supported | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | --- | ---
1994 | <b>Intel Premiere/PCI (Batman's Revenge)</b><br/>1MB - 128MB RAM | <b>Pentium</b> at 60-66 MHz<br/><b>Pentium Overdrive</b> at 120-133 MHz | revenge/1009af2_.bi0<br/>revenge/1009af2_.bi1
1995 | <b>Intel Advanced/EV (Endeavor)</b> <i>[[4]](#system-note-4)</i><br/>1MB - 128MB RAM | <b>Pentium</b> at 75-133 MHz<br/><b>Pentium Overdrive</b> at 125-200 MHz | endeavor/1006cb0_.bi0<br/>endeavor/1006cb0_.bi1
1995 | <b>Intel Advanced/ZP (Zappa)</b><br/>1MB - 128MB RAM | <b>Pentium</b> at 75-133 MHz<br/><b>Pentium Overdrive</b> at 125-200 MHz | zappa/1006bs0_.bio<br/>zappa/1006bs0_.bi1
1995 | <b>Packard Bell PB520R (Robin LC)</b> <i>[[5]](#system-note-5)</i><br/>1MB - 128MB RAM<br/>Built-in Cirrus Logic GD-5434 | <b>Pentium</b> at 60-66 MHz<br/><b>Pentium Overdrive</b> at 120-133 MHz | pb520r/1009bc0r.bio<br/>pb520r/1009bc0r.bi1<br/>pb520r/gd5434.bin
1995 | <b>Packard Bell PB570 (Hillary)</b> <i>[[5]](#system-note-5)</i><br/>1MB - 128MB RAM<br/>Built-in Cirrus Logic GD-5430 | <b>Pentium</b> at 75-133 MHz<br/><b>Pentium Overdrive</b> at 125-200 MHz | pb570/1007by0r.bio<br/>pb570/1007by0r.bi1<br/>pb570/gd5430.bin
1996 | <b>ASUS P/I-P55TVP4</b><br/>1MB - 128MB RAM | <b>Pentium</b> at 75-200 MHz<br/><b>Pentium MMX</b> at 166-233 MHz<br/><b>Mobile Pentium MMX</b> at 120-300 MHz<br/><b>Cyrix 6x86</b> at PR90<i>(80 MHz)</i>-PR200<i>(200 MHz)</i><br/><b>Cyrix 6x86MX/MII</b> at PR166<i>(133 MHz)</i>-PR400<i>(285 MHz)</i><br/><b>IDT WinChip</b> at 75-240 MHz<br/><b>IDT Winchip 2</b> at 200-240 MHz<br/><b>IDT Winchip 2A</b> at 200-233 MHz<br/><b>AMD K6</b> at 166-300 MHz<br/><b>AMD K6-2</b> <i>(AFR-66)</i> at 233-300 MHz | p55tvp4/tv5i0204.awd
1996 | <b>ASUS P/I-P55T2P4</b><br/>1MB - 512MB RAM | <b>Pentium</b> at 75-200 MHz<br/><b>Pentium MMX</b> at 166-233 MHz<br/><b>Mobile Pentium MMX</b> at 120-300 MHz<br/><b>Cyrix 6x86</b> at PR90<i>(80 MHz)</i>-PR200<i>(200 MHz)</i><br/><b>Cyrix 6x86MX/MII</b> at PR166<i>(133 MHz)</i>-PR400<i>(285 MHz)</i><br/><b>IDT WinChip</b> at 75-240 MHz<br/><b>IDT Winchip 2</b> at 200-240 MHz<br/><b>IDT Winchip 2A</b> at 200-233 MHz<br/><b>AMD K6</b> at 166-300 MHz<br/><b>AMD K6-2</b> <i>(AFR-66)</i> at 233-300 MHz | p55t2p4/0207_j2.bin
1996 | <b>Award 430VX PCI</b><br/>1MB - 128MB RAM | <b>Pentium</b> at 75-200 MHz<br/><b>Pentium MMX</b> at 166-233 MHz<br/><b>Mobile Pentium MMX</b> at 120-300 MHz<br/><b>Cyrix 6x86</b> at PR90<i>(80 MHz)</i>-PR200<i>(200 MHz)</i><br/><b>Cyrix 6x86MX/MII</b> at PR166<i>(133 MHz)</i>-PR400<i>(285 MHz)</i><br/><b>IDT WinChip</b> at 75-240 MHz<br/><b>IDT Winchip 2</b> at 200-240 MHz<br/><b>IDT Winchip 2A</b> at 200-233 MHz<br/><b>AMD K6</b> at 166-300 MHz<br/><b>AMD K6-2</b> <i>(AFR-66)</i> at 233-300 MHz | 430vx/55xwuq0e.bin
1996 | <b>Itautec Infoway Multimidia</b><br/>8MB - 128MB RAM | <b>Pentium</b> at 75-133 MHz<br/><b>Pentium Overdrive</b> at 125-200 MHz | infowaym/1006bs0_.bio<br/>infowaym/1006bs0_.bi1
1997 | <b>Epox P55-VA</b><br/>1MB - 128MB RAM | <b>Pentium</b> at 75-200 MHz<br/><b>Pentium MMX</b> at 166-233 MHz<br/><b>Mobile Pentium MMX</b> at 120-300 MHz<br/><b>Cyrix 6x86</b> at PR90<i>(80 MHz)</i>-PR200<i>(200 MHz)</i><br/><b>Cyrix 6x86MX/MII</b> at PR166<i>(133 MHz)</i>-PR400<i>(285 MHz)</i><br/><b>IDT WinChip</b> at 75-240 MHz<br/><b>IDT Winchip 2</b> at 200-240 MHz<br/><b>IDT Winchip 2A</b> at 200-233 MHz<br/><b>AMD K6</b> at 166-300 MHz<br/><b>AMD K6-2</b> <i>(AFR-66)</i> at 233-300 MHz | p55va/va021297.bin
### Super Socket 7 based
Release | Machine<br/>(+ addl. hardware) | CPU(s) Supported | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | --- | ---
1998 | <b>FIC VA-503+</b><br/>1MB - 512MB RAM | <b>AMD K6</b> at 166-300 MHz<br/><b>AMD K6-2</b> at 233-550 MHz<br/><b>AMD K6-2+</b> at 450-550 MHz<br/><b>AMD K6-III</b> at 400-450 MHz<br/><b>AMD K6-III+</b> at 400-500 MHz<br/><b>Pentium</b> at 75-200 MHz<br/><b>Pentium MMX</b> at 166-233 MHz<br/><b>Mobile Pentium MMX</b> at 120-300 MHz<br/><b>Cyrix 6x86</b> at PR90<i>(80 MHz)</i>-PR200<i>(200 MHz)</i><br/><b>Cyrix 6x86MX/MII</b> at PR166<i>(133 MHz)</i>-PR400<i>(285 MHz)</i><br/><b>IDT WinChip</b> at 75-240 MHz<br/><b>IDT WinChip2</b> at 200-250 MHz<br/><b>IDT Winchip 2A</b> at PR200<i>(200 MHz)</i>-PR300<i>(250 MHz)</i> | fic_va503p/je4333.bin
### Socket 8 based
Release | Machine<br/>(+ addl. hardware) | CPU(s) Supported | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | --- | ---
1996 | <b>Intel VS440FX</b><br/>8MB - 256 MB RAM | <b>Pentium Pro</b> at 150-200 MHz<br/><b>Pentium II Overdrive</b> at 300-333 MHz | vs440fx/1018CS1_.BI1<br/>vs440fx/1018CS1_.BI2<br/>vs440fx/1018CS1_.BI3<br/>vs440fx/1018CS1_.BIO<br/>vs440fx/1018CS1_.RCV
### Slot 1 based
Release | Machine<br/>(+ addl. hardware) | CPU(s) Supported | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | --- | ---
1998 | <b>Gigabyte GA-686BX</b><br/>8MB - 512MB RAM | <b>Pentium II</b> at 233-450 MHz<br/><b>Celeron</b> at 266-533 MHz<br/><b>Cyrix III</b>at 500 MHz | ga686bx/6BX.F2a
#### Additional Notes
<a name="system-note-1">`[1]`</a> <b>Toshiba Button Mapping</b>:
PCem maps [Fn] to `right-Ctrl` and `right-Alt`. The following functions are supported:
Key Combo | Function
---|---
Fn + Num Lock | toggle numpad
Fn + Home | Internal LCD display
Fn + Page Down | Turbo on
Fn + Right | Toggle LCD font
Fn + End | External CRT display
Fn + SysRQ | Toggle window
<a name="system-note-2">`[2]`</a> <b>Amstrad MegaPC</b> <i>(386SX)</i>: The original machine had a built-in Sega MegaDrive. This is not emulated in PCem.
<a name="system-note-3">`[3]`</a> <b>IBM PS/2 Model 70 (type 4)</b> <i>(486DX)</i>: PCem's FPU emulation is not bit accurate and can not pass IBM's floating point tests. As a result, this machine will always print 12903 and 162 errors on bootup. These can be ignored - F1 will boot the machine.
<a name="system-note-4">`[4]`</a> <b>Intel Advanced/EV (Endeavor)</b> <i>(Pentium)</i>: The real board has a Sound Blaster 16 onboard and optionally an S3 Trio64V+. Neither are emulated as onboard devices.
<a name="system-note-5">`[5]`</a> Some systems have fixed graphics adapters:<br/>
<i>** = Can use external video card.</i><br/>
System | Graphics | Addl. Info | **
--- | --- | --- | :-:
<b>Amstrad MegaPC</b> | Paradise 90C11 | A development of the PVGA1 with 512KB VRAM | &#10004;
<b>Acer 386SX/25N</b> | Oak OTI-067 | Another 512KB SVGA clone | &#10004;
<b>Amstrad PC1512</b> | CGA | Has a new mode (640x200x16) | X
<b>Amstrad PC1640</b> | Paradise EGA | &nbsp; | &#10004;
<b>Amstrad PC2086/PC3086</b> | Paradise PVGA1 | An early SVGA clone with 256KB VRAM | &#10004;
<b>Amstrad PPC512/640</b> | CGA/MDA | Outputs to 640x200 plasma display | &#10004;
<b>Commodore SL386SX-25</b> | AVGA2 | 256KB - 512KB VRAM | X
<b>Elonex PC-425X</b> | Trident TGUI9400CXi | 512KB VRAM | X
<b>IBM PCjr</b> | CGA | Has various new modes: <br/>160x200 x 16<br/>320x200 x 16<br/>640x200 x 4 | X
<b>IBM PS/1 Model 2011</b> | Stock VGA | 256KB VRAM | X
<b>IBM PS/1 Model 2121</b> | Basic (and unknown) SVGA | 256KB VRAM | X
<b>IBM PS/2 machines</b> | Stock VGA | 256KB VRAM | X
<b>Olivetti M24</b> <i>[[6]](#system-note-6)</i>| CGA | Has double-res text modes + 640x400 mode | X
<b>Packard Bell PB410A</b> | Headland HT-216 | &nbsp; | &#10004;
<b>Packard Bell PB520R</b> | Cirrus Logic GD-5434 | &nbsp; | &#10004;
<b>Packard Bell PB570</b> | Cirrus Logic GD-5430 | &nbsp; | &#10004;
<b>Sinclair PC200</b> | CGA | Can output to TV @ 50hz (UK) | &#10004;
<b>Tandy 1000</b> | Clone of PCjr video | Widely supported in 80s games | X
<b>Tandy 1000 SL/2</b> | Improved Tandy 1000 | Has support for 640x200x16 | X
<b>Toshiba T-series</b> | CGA | Outputs to built-in LCD or plasma display | X
<a name="system-note-6">`[6]`</a> <b>Olivetti M24 (display)</b>: I haven't seen a dump of the font ROM for this yet, so if one is not provided the MDA font will be used - which looks slightly odd as it is 14-line instead of 16-line.
<hr>
## Graphics Cards
### Basic cards
Hardware | Addl. Info | ROM file needed<br/>(within ./roms/ folder)
--- | --- | ---
<b>MDA</b> <i>(1981)</i> | 80x25 monochrome text | <i>(none)</i>
<b>CGA</b> <i>(1981)</i> | 40x25 and 80x25 text<br/>320x200 in 4 colours<br/>620x200 in 2 colours<br/>Supports composite output for ~16 colours. | <i>(none)</i>
<b>Hercules</b> <i>(1982)</i> | 80x25 monochrome text<br/>720x348 in monochrome | <i>(none)</i>
<b>Plantronics ColorPlus</b> | An enhanced CGA board with support for 320x200x16 and 640x200x4 | <i>(none)</i>
<b>Wyse WY-700</b> | A CGA-compatible board with support for a 1280x800 mode | <i>(none)</i>
<b>MDSI Genius</b> | Mono portrait board with support for a 728x1008 mode | 8x12.bin
<b>IBM EGA</b> <i>(1984)</i> | Text up to 80x43<br/>Graphics up to 640x350 in 16 colours | ibm_6277356_ega_card_u44_27128.bin
<b>ATI EGA Wonder 800+</b> | An enhanced EGA-compatible board with support for up to 800x600 in 16 colours | ATI EGA Wonder 800+ N1.00.BIN
<b>Hercules InColor</b> | An enhanced Hercules with a custom 720x350 16 colour mode | <i>(none)</i>
### Unaccelerated (S)VGA cards
Hardware | Addl. Info | ROM file needed<br/>(within ./roms/ folder)
--- | --- | ---
<b>ATI Korean VGA</b> | ATI-28800 based.<br/>512KB VRAM<br/>Supports up to 8-bit colour<br/>Korean font support | atikorvga.bin<br/>ati_ksc5601.rom
<b>ATI VGA Edge-16</b> | ATI-18800 based<br/>512KB VRAM<br/>Supports up to 8-bit colour | vgaedge16.vbi
<b>ATI VGA Charger</b> | ATI-28800 based<br/>512KB VRAM<br/>Supports up to 8-bit colour | bios.bin
<b>AVGA2</b> | Also known as Cirrus Logic GD5402<br/>256KB - 512KB VRAM<br/>Supports up to 8-bit colour | avga2vram.vbi
<b>IBM VGA</b> <i>(1987)</i> | 256KB VRAM<br/>Text up to 80x50<br/>Graphics up to 320x200 in 256 colours or 640x480 in 16 colours | ibm_vga.bin
<b>Kasan Hangulmadang-16</b> | ET4000AX based<br/>1MB VRAM<br/>Supports up to 8-bit colour<br/>Korean font support | et4000_kasan16.bin<br/>kasan_ksc5601.rom
<b>OAK OTI-037C</b> | 256KB VRAM<br/>Supports up to 8-bit colour | oti037/bios.bin
<b>OAK OTI-067</b> | 256KB - 512KB VRAM<br/>Supports up to 8-bit colour | oti067/bios.bin
<b>Olivetti GO481 (Paradise PVGA1A)</b> | 256KB VRAM<br/>Supports up to 8-bit colour | oli_go481_lo.bin<br/>oli_go481_hi.bin
<b>Trident 8900D SVGA</b> | 256KB - 1MB VRAM<br/>Supports up to 24-bit colour | trident.bin
<b>Trident 9000B SVGA</b> | 512KB VRAM<br/>Supports up to 8-bit colour | tvga9000b/BIOS.BIN
<b>Trident TGUI9400CXi</b> | 1MB - 2MB VRAM<br/>Supports up to 24-bit colour | 9440.vbi
<b>Trigem Korean VGA</b> | ET4000AX based<br/>1MB VRAM<br/>Supports up to 8-bit colour<br/>Korean font support | tgkorvga.bin<br/>tg_ksc5601.rom
<b>Tseng ET4000AX SVGA</b> | 1MB VRAM<br/>Supports up to 8-bit colour | et4000.bin
### 2D Accelerated SVGA cards
Hardware | Addl. Info | ROM file needed<br/>(within ./roms/ folder)
--- | --- | ---
<b>ATI Graphics Pro Turbo</b> | Mach64GX based<br/>1MB - 4MB VRAM | mach64gx/bios.bin
<b>ATI Video Xpression</b> | Mach64VT2 based<br/>2MB - 4MB VRAM<br/>Has video acceleration | atimach64vt2pci.bin
<b>Cirrus Logic GD-5428</b> | 1MB - 2MB VRAM | Machspeed_VGA_GUI_2100_VLB.vbi
<b>Cirrus Logic GD-5429</b> | 1MB - 2MB VRAM | 5429.vbi
<b>Cirrus Logic GD-5430</b> | 1MB - 2MB VRAM | gd5430/pci.bin
<b>Cirrus Logic GD-5434</b> <i>[[1]](#graphics-note-1)</i> | 2MB - 4MB VRAM | gd5434.bin
<b>Diamond Stealth 32 SVGA</b> | ET4000/W32p based<br/>1MB - 2MB VRAM | et4000w32.bin
<b>IBM 1MB SVGA Adapter/A</b> | Cirrus Logic GD5428 based<br/>1 MB VRAM<br/>Only supported on PS/2 models | SVGA141.ROM
<b>Number Nine 9FX</b> | S3 Trio64 based<br/>1MB - 2MB VRAM | s3_764.bin
<b>Paradise Bahamas 64</b> | S3 Vision864 based<br/>1MB - 4MB VRAM | bahamas64.bin
<b>Phoenix S3 Trio32</b> | S3 Trio32 based<br/>512KB - 2MB VRAM | 86c732p.bin
<b>Phoenix S3 Trio64</b> | S3 Trio64 based<br/>1MB - 4MB VRAM | 86c764x1.bin
<b>Trident TGUI9440</b> | 1MB - 2MB VRAM | 9440.vbi
### 3D Accelerated SVGA cards
Hardware | Addl. Info | ROM file needed<br/>(within ./roms/ folder)
--- | --- | ---
<b>3DFX Voodoo Banshee (reference)</b> | Voodoo Banshee based<br/>8MB - 16MB VRAM | pci_sg.rom
<b>3DFX Voodoo 3 2000</b> | Voodoo 3 based<br/>16MB VRAM | voodoo3_2000/2k11sd.rom
<b>3DFX Voodoo 3 3000</b> | Voodoo 3 based<br/>16MB VRAM | voodoo3_3000/3k12sd.rom
<b>Creative Labs 3D Blaster Banshee</b> | Voodoo Banshee based<br/>16MB VRAM | blasterpci.rom
<b>Diamond Stealth 3D 2000</b> <i>[[2]](#graphics-note-2)</i>| S3 ViRGE/325 based<br/>2MB - 4MB VRAM | s3virge.bin
<b>S3 ViRGE/DX</b> <i>[[3]](#graphics-note-3)</i>| S3 ViRGE/DX based<br/>2MB - 4MB VRAM | 86c375_1.bin
### 3D only cards
Hardware | Addl. Info
--- | ---
<b>3DFX Voodoo Graphics</b> <i>[[4]](#graphics-note-4)</i>| 3D accelerator. Widely supported in late 90s games.
<b>Obsidian SB50</b> <i>[[5]](#graphics-note-5)</i>| Voodoo with 2 TMUs
<b>3DFX Voodoo 2</b> <i>[[6]](#graphics-note-6)</i>| Improved Voodoo Graphics<br/>Higher clocks<br/>2 TMUs<br/>Triangle setup, etc.
#### Additional Notes
<a name="graphics-note-1">`[1]`</a> <b>Cirrus Logic GD-5434</b>: Real chip also supports 1MB configurations, however this is not currently supported in PCem.
<a name="graphics-note-2">`[2]`</a> <b>Diamond Stealth 3D 2000</b>: PCem emulates the ViRGE S3D engine in software. This works with most games I tried, but there may be some issues. The Direct3D drivers for the /325 are fairly poor (often showing as missing triangles), so use of the /DX instead is recommended.
<a name="graphics-note-3">`[3]`</a> <b>S3 ViRGE/DX</b>: The drivers that come with Windows are similar to those for the /325, however better ones do exist (try the 8-21-1997 version). With the correct drivers, many early Direct3D games work okay (if slowly).
<a name="graphics-note-4">`[4]`</a> <b>3DFX Voodoo Graphics</b>: PCem emulates this in software. The emulation is a lot faster than in v10 (thanks to a new dynamic recompiler) and should be capable of hitting Voodoo 1 performance on most machines when two render threads are used. As before, the emulated CPU is the bottleneck for most games. <br/><br/>PCem can emulate 6 and 8 MB configurations, but defaults to 4 MB for compatibility. It can also emulate the screen filter present on the original card, though this does at present have a noticeable performance hit.<br/><br/>Almost everything I've tried works okay, with a very few exceptions - Screamer 2 and Rally have serious issues.
<a name="graphics-note-5">`[5]`</a> <b>Obsidian SB50</b>: Drivers for this are a bit limited - the official drivers don't support 2 TMUs in Direct3D.
<a name="graphics-note-6">`[6]`</a> <b>3DFX Voodoo 2</b>: PCem can emulate both 8 and 12 MB configurations. It can also emulate 6 and 10 MB configurations (with 2MB framebuffer memory), which were never sold into the PC market but do exist for arcade systems.
<hr>
## Sound Cards
Hardware | Notes
--- | ---
<b>PC speaker</b> | The standard beeper on all PCs. Supports samples/RealSound.
<b>Tandy PSG</b> | The Texas Instruments chip in the PCjr and Tandy 1000. Supports 3 voices plus noise. I reused the emulator in B-em for this (slightly modified). PCem emulates the differences between the SN76496 (PCjr and Tandy 1000), and the NCR8496 (currently assigned to the Tandy 1000HX). Maniac Mansion and Zak McKraken will only sound correct on the latter.
<b>Tandy PSSJ</b> | Used on the Tandy 1000SL/2, this clones the NCR8496, adding an addition frequency divider (did any software actually use this?) and an 8-bit DAC.
<b>PS/1 audio card</b> | An SN76496 clone plus an 8-bit DAC. The SN76496 isn't at the same address as PCjr/Tandy, so most software doesn't support it.
<b>Gameblaster</b> | The Creative Labs Gameblaster/Creative Music System, Creative's first sound card introduced in 1987. Has two Philips SAA1099, giving 12 voices of square waves plus 4 noise voices. In stereo!
<b>Adlib</b> | Has a Yamaha YM3812, giving 9 voices of 2 op FM, or 6 voices plus a rhythm section. PCem uses the DOSBox dbopl emulator.
<b>Adlib Gold</b> | OPL3 with YM318Z 12-bit digital section. Possibly some bugs (not a lot of software to test). The surround module is now emulated.
<b>Sound Blaster</b> <i>[[1]](#sound-note-1)</i> | See linked note for more details.
<b>Gravis Ultrasound</b> | 32 voice sample playback. Port address is fixed to 240, IRQ and DMA can be changed from the drivers. Emulation is improved significantly over previous versions.
<b>Windows Sound System</b> | 16-bit digital + OPL3. Note that this only emulates WSS itself, and should not be used with drivers from compatible boards with additional components (eg Turtle Beach Monte Carlo)
<b>Aztech Sound Galaxy Pro 16 AB (Washington)</b> | SB compatible + WSS compatible
<b>Innovation SSI-2001</b> | SID6581. Emulated using resid-fp. Board is fixed to port 280.
<b>Ensoniq AudioPCI (ES1371)<br/>Sound Blaster PCI 128</b> | Basic PCI sound card. Emulates Sound Blaster in software.
### Additional Notes
<a name="sound-note-1">`[1]`</a> <b>Sound Blaster</b>: Several Sound Blasters are emulated.
* SB v1.0 - The original. Limited to 22khz, and no auto-init DMA (can cause crackles sometimes).
* SB v1.5 - Adds auto-init DMA
* SB v2.0 - Upped to 41khz
* SB Pro v1.0 - Stereo with twin OPL2 chips.
* SB Pro v2.0 - Stereo with OPL 3 chip
* SB 16 - 16 bit stereo
* SB AWE32 - SB 16 + wavetable MIDI. This requires a ROM dump from a real AWE32.
All cards are set to Address 220, IRQ 7 and DMA 1 (and High DMA 5). IRQ and DMA can be changed for the SB16 & AWE32 in the drivers. The relevant SET line for autoexec.bat is `SET BLASTER = A220 I7 D1 Tx` - where Tx is T1 for SB v1.0, T3 for SB v2.0, T4 for SB Pro, and T6 for SB16.
AWE32 requires a ROM dump called `awe32.raw`. AWE-DUMP is a utility which can get a dump from a real card. Most EMU8000 functionality should work, however filters are not correct and reverb/chorus effects are not currently emulated.
<hr>
## HDD Controller Cards
Int. | Hardware | Notes | ROM file needed<br/>(within ./roms/ folder)
:-: | --- | --- | ----
MFM | <b>Fixed Disk Adapter (Xebec)</b> | MFM controller originally included in the IBM XT. This controller only supports HD types 0, 2, 13, and 16. | ibm_xebec_62x0822_1985.bin
MFM | <b>DTC 5150X</b> | 8-bit MFM controller.<br/>To configure drive types, run `DEBUG.EXE` and enter `g=c800:5`. | dtc_cxd21a.bin
MFM | <b>AT Fixed Disk Adapter</b> | MFM controller originally included in the IBM AT. Supported by all AT-compatible BIOSes. | <i>(none)</i>
ESDI | <b>Western Digital WD1007V-SE1</b> | 16-bit ESDI controller | 62-000279-061.bin
ESDI | <b>IBM ESDI Fixed Disk Controller</b> | MCA ESDI controller. Only supported on PS/2 models. | 90x8969.bin<br/>90x8970.bin
IDE | <b>Standard IDE</b> | Standard IDE controller. Supported by all AT-compatible BIOSes. Use this if in any doubt! | <i>(none)</i>
IDE | <b>XTIDE</b> | 8-bit IDE controller. The BIOS is available [here](http://code.google.com/p/xtideuniversalbios/). <br/>v2.0.0 beta 1 is the version I've mostly tested. v2.0.0 beta 3 is known to have some issues. | ide_xt.bin
IDE | <b>XTIDE (AT)</b> | 16-bit IDE controller. | ide_at.bin
IDE | <b>XTIDE (PS/1)</b> | IDE controller for the PS/1 model 2033. For this machine you will need BIOS version v1.1.5. The PS/1 is a bit fussy with XTIDE, and I've found that it works best when the XTIDE configuration has 'Full Operating Mode' disabled. | ide_at_1_1_5.bin
SCSI | <b>Longshine LCS-6821N</b> | 8-bit SCSI controller. | Longshine LCS-6821N - BIOS version 1.04.bin
SCSI | <b>Rancho RT1000B</b> | 8-bit SCSI controller. | Rancho_RT1000_RTBios_version_8.10R.bin
SCSI | <b>Trantor T130B</b> | 8-bit SCSI controller. | trantor_t130b_bios_v2.14.bin
SCSI | <b>IBM SCSI Adapter with Cache</b> | MCA SCSI controller. Only supported on PS/2 models. | 92F2244.U68<br/>92F2245.U69
SCSI | <b>Adaptec AHA-1542C</b> | 16-bit SCSI controller. | adaptec_aha1542c_bios_534201-00.bin
SCSI | <b>BusLogic BT-545S</b> | 16-bit SCSI controller. | BusLogic_BT-545S_U15_27128_5002026-4.50.bin
<hr>
## Misc Cards
Hardware | Note
--- | ---
Serial mouse | A Microsoft compatible serial mouse on COM1. Compatible drivers are all over the place for this.
M24 mouse | I haven't seen a DOS mouse driver for this yet but the regular scancode mode works as does the Windows 1.x driver.
PC1512 mouse | The PC1512's perculiar quadrature mouse. You need Amstrad's actual driver for this one.
PS/2 mouse | A standard 2 button PS/2 mouse. As with serial, compatible drivers are common.
Microsoft PS/2 Intellimouse | A PS/2 mouse with mouse wheel.
ATAPI CD-ROM | Works with OAKCDROM.SYS, VDD-IDE.SYS, and the internal drivers of every OS I've tried.

View file

@ -1,31 +0,0 @@
PCem v8.1 Linux supplement
You will need the following libraries :
Allegro 4.x
OpenAL
ALut
and their dependencies.
Open a terminal window, navigate to the PCem directory then enter
./configure
make
then ./pcem to run.
The Linux port is currently entirely unpolished, and mainly exists as a starting point for
anyone who wants to make a better port.
The menu is not available all the time. Press CTRL-ALT-PGDN to open it.
The mouse does not work very well, at least on my machine. This is most likely an Allegro issue.
Fullscreen mode is not present.
Video acceleration is not used at all, so performance is inferior to the Windows version.
CD-ROM support currently only accesses /dev/cdrom. It has not been heavily tested.

330
TESTED.md Normal file
View file

@ -0,0 +1,330 @@
## Software tested (v17):
### DOS
- PC-DOS 1.0
- MS-DOS 2.11
- MS-DOS 3.30
- MS-DOS 4.01
- MS-DOS 5.0
- MS-DOS 6.0
- MS-DOS 6.22
### Windows
- Windows 1.04
- Windows/286 2.11
- Windows/386 2.11
- Windows 3.0
- Windows 3.1
- Windows for Workgroups 3.11
- Windows 95
- Windows 95 OSR2
- Windows 98SE
- Windows ME
### Windows NT
- Windows NT 3.1
- Windows NT 3.51
- Windows NT 4 Workstation (SP6a)
- Windows 2000
- Windows XP
### OS/2
- OS/2 v1.0
- OS/2 v1.1
- OS/2 v1.2
- OS/2 v1.3
- OS/2 v2.1
- OS/2 Warp 3
- OS/2 Warp 4
### Linux
- Corel Linux 1.2
- Mandriva LE 2005
- Red Hat Linux 7.1 (Seawolf)
### BeOS
- BeOS 5.0 Professional Edition
### Applications
- 3DMark 2000
- 3DMark 2001SE
- After Dark 3.06
- Cinemania 1994
- Creative Writer
- Cubasis
- Encarta 1994
- Fasttracker v2.08
- PageMaker 5.0
- PC Paintbrush 1.05
- Photoshop 3.0
- Smartsuite 97
- Visual Basic 3.0
- Visual C++ 6.0
- Word for Windows 2.0
- Winzip 6.2
### Games
- 1602 AD (demo)
- 3D Ultra Pinball Thrillride
- A-10 Tank Killer
- Actua Soccer
- Adventure Pinball Forgotten Island (demo)
- Aladdin
- Alien vs Predator
- Alien vs Predator 2 (demo)
- All New World of Lemmings
- Alone in the Dark
- Alone in the Dark : The New Nightmare (demo)
- Anachronox
- Arkanoid
- Armoured Fist 3 (demo)
- Asteroids (1998)
- B-17 Flying Fortress
- Battle Chess
- Battlezone
- Battlezone II
- Bejeweled
- Beyond Castle Wolfenstein
- Big Red Racing
- Bio Menace
- Black & White
- Brix
- Bugs Bunny Lost In Time (demo)
- Cannon Fodder 2
- Carnivores 2
- Civilization
- Civilization for Windows
- Claw
- Clive Barker's Undying (demo)
- Clockwiser
- Command & Conquer : Red Alert
- Command & Conquer : Red Alert 2
- Command & Conquer : Tiberian Sun (demo)
- Command & Conquer Renegade
- Conquest
- Corridor 7
- Counter-Strike 2D
- Crimson Skies (demo)
- Croc
- Curse of Monkey Island
- Cutthroats (demo)
- Daikatana
- Dawn Patrol
- Day of the Tentacle
- Dance Dance Revolution
- Dead Reckoning (demo)
- Death Drome
- Desert Strike
- Digger
- Dirt Track Racing (demo)
- Disciples (demo)
- Discworld II
- Doom (v1.2)
- Doom II (v1.666)
- Double Dragon
- Drakan (demo)
- Duke Nukem 3D (v1.3D)
- Dune
- DX-Ball 2
- Echelon
- Ecstatica
- Epic Pinball
- Every Extend
- Evolva (demo)
- Expendable
- Eye of the Beholder
- Fallout Tactics (demo)
- Final Fantasy VIII (demo)
- Flashback
- Flight Simulator 5
- Frogger
- Frontier : First Encounters
- Gabriel Knight 3 (demo)
- Giants : Citizen Kabuto
- GLQuake
- Grand Theft Auto 2
- Half-Life
- Halloween Harry
- Heartlight
- Hellbender
- Hexen
- High Heat Baseball 2002 (demo)
- Hitch Hiker's Guide to the Galaxy
- Hocus Pocus
- Homeworld Cataclysm (demo)
- Incoming
- James Pond 2 : Robocod
- Jazz Jackrabbit
- Jazz Jackrabbit 2
- Jill of the Jungle
- King's Quest
- King's Quest II
- King's Quest III
- Lemmings
- Lemmings 2 : The Tribes
- Lode Runner : The Legend Continues
- Lotus III
- Madden 2002 (demo)
- Majesty (demo)
- Maniac Mansion (enhanced)
- Max Payne
- MDK (Direct3D, USA release)
- MechCommander 2
- Mechwarrior 2
- Mechwarrior 3
- Megaman Legends
- Metal Gear Solid
- Microsoft Arcade
- Microsoft Golf 99 (demo)
- Midtown Madness 2 (demo)
- Monaco Grand Prix (demo)
- Monkey Island 2
- Monster Bash
- Monster Truck Madness
- Mortal Kombat
- Mortal Kombat 2
- Mortal Kombat 3
- Motorcross Madness (demo)
- Mystic Towers
- Nascar Heat
- Need for Speed II SE
- Need for Speed III
- Need for Speed : High Stakes
- NHL 2001 (demo)
- No One Lives Forever
- Oddworld : Abe's Exoddus
- One Must Fall 2097
- Oni
- Outlaws
- Pacific Strike
- Pacman Adventures in Time (demo)
- Pharoah (demo)
- Pinball Fantasies
- Pinball Illusions
- Police Quest
- Police Quest 2
- Porrasturvat
- Power Drive
- Prince of Persia
- Prince of Persia 3D (demo)
- Pro Pinball : The Web
- Psycho Pinball
- Quake
- Quake II
- Quake III Arena
- Rayman 2 (demo)
- Red Faction
- Redline Racer
- Rise of the Triad (v1.2)
- Screamer
- Sega Rally 2 (demo)
- Sensible World of Soccer
- Settlers 3 (demo)
- Severance : Blade of Darkness (demo)
- Shadow Company (demo)
- Shadow Warrior
- Shadowman (demo)
- Sid Meier's Alien Crossfire (demo)
- SimCity 2000
- SimCity Classic
- SimTower
- Sink or Swim
- Soldat (1.0.5)
- Sonic CD
- Space Simulator
- Space Strike
- Spider-Man (demo)
- Springy Madness
- Star Trek Hidden Evil (demo)
- Star Trek Voyager Elite Force
- Star Wars Jedi Academy
- Starfleet Command 2 (demo)
- Stargunner
- Starlancer (demo)
- Steel Beasts (demo)
- Stunt Island
- SWAT 3 Elite Edition (demo)
- Syndicate
- System Shock
- Tanktics (demo)
- Terminal Velocity
- The Dig
- The Humans
- The Labyrinth (RealArcade version)
- The Lost Vikings
- The Ultimate Doom (v1.9)
- Theme Hospital
- Theme Park
- Tomb Raider
- Tomb Raider II
- Tomb Raider The Last Revelation (demo)
- Tony Hawk's Pro Skater 2
- Transport Tycoon
- Transport Tycoon Deluxe
- Tropico (demo)
- Turrican 2
- UFO : Enemy Unknown
- Ultimate Ride (demo)
- Unreal
- Unreal Tournament
- Unreal Tournament 2004 (Direct3D)
- Wacky Wheels
- Warlords Battlecry (demo)
- Wheel of Time (demo)
- Wing Commander
- Wing Commander : Privateer
- Wizkid
- Wolfenstein 3D
- World War III : Black Gold (demo)
- Worms
- Worms Armageddon
- X-Com : Terror From The Deep
- Xargon
- Z : Steel Soldiers (demo)
- Zak McKracken
- Zone 66
### Demos
- Cascada - Cronologia
- Coma - Paimen
- Complex - Cyboman 2
- Complex - Dope
- EMF - Verses
- Exceed - Heaven 7
- Future Crew - Second Reality
- Gazebo - Cyboman
- Halcyon - Lifeforms
- Iguana - Heartquake
- Impact Studios - Legend
- Impact Studios - Project Angel
- KFMF - Dance, Move, Shake
- KFMF - Trip
- Logic Design - Fashion
- Majic 12 - Show
- Majic 12 - Wish
- Megabusters - Hellraiser
- Orange - x14
- Renaissance - Amnesia
- Skull - Putre Faction
- Tran - Ambience (flickery)
- Tran - Luminati (flickery)
- Tran - Timeless
- Triton - Crystal Dream
- Triton - Crystal Dream 2
- Ultraforce - Coldcut
- Ultraforce - Vector Demo
- Valhalla - Solstice
- Witan - Witan House
### Emulators
- Beebem v1.02
- BeebInC v0.99f
- CPE v5.2i
- DOSBox 0.74-3
- Fellow 0.33
- KGen98 v0.4b
- PaCifiST v0.48
- SNES9x v0.96
- UltraHLE v1.0.0
- vMac v0.1.9.1
- ZSNES v0.800c

1772
aclocal.m4 vendored

File diff suppressed because it is too large Load diff

View file

@ -1,192 +0,0 @@
# Configure paths for Allegro
# Shamelessly stolen from libxml.a4
# Jon Rafkind 2004-06-06
# Adapted from:
# Configure paths for libXML
# Toshio Kuratomi 2001-04-21
# Adapted from:
# Configure paths for GLIB
# Owen Taylor 97-11-3
dnl AM_PATH_allegro([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for allegro, and define allegro_CFLAGS and allegro_LIBS
dnl
AC_DEFUN([AM_PATH_ALLEGRO],[
AC_ARG_WITH(allegro-prefix,
[ --with-allegro-prefix=PFX Prefix where liballegro is installed (optional)],
ALLEGRO_CONFIG_prefix="$withval", ALLEGRO_CONFIG_prefix="")
AC_ARG_WITH(allegro-exec-prefix,
[ --with-allegro-exec-prefix=PFX Exec prefix where liballegro is installed (optional)],
ALLEGRO_CONFIG_exec_prefix="$withval", ALLEGRO_CONFIG_exec_prefix="")
AC_ARG_ENABLE(allegrotest,
[ --disable-allegrotest Do not try to compile and run a test LIBallegro program],,
enable_allegrotest=yes)
if test x$ALLEGRO_CONFIG_exec_prefix != x ; then
ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --exec-prefix=$ALLEGRO_CONFIG_exec_prefix"
if test x${ALLEGRO_CONFIG+set} != xset ; then
ALLEGRO_CONFIG=$ALLEGRO_CONFIG_exec_prefix/bin/allegro-config
fi
fi
if test x$ALLEGRO_CONFIG_prefix != x ; then
ALLEGRO_CONFIG_args="$ALLEGRO_CONFIG_args --prefix=$ALLEGRO_CONFIG_prefix"
if test x${ALLEGRO_CONFIG+set} != xset ; then
ALLEGRO_CONFIG=$ALLEGRO_CONFIG_prefix/bin/allegro-config
fi
fi
AC_PATH_PROG(ALLEGRO_CONFIG, allegro-config, no)
min_allegro_version=ifelse([$1], ,4.0.0,[$1])
AC_MSG_CHECKING(for Allegro - version >= $min_allegro_version)
no_allegro=""
if test "$ALLEGRO_CONFIG" = "no" ; then
no_allegro=yes
else
allegro_CFLAGS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --cflags`
allegro_LIBS=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --libs`
ALLEGRO_CONFIG_major_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
ALLEGRO_CONFIG_minor_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
ALLEGRO_CONFIG_micro_version=`$ALLEGRO_CONFIG $ALLEGRO_CONFIG_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_allegrotest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $allegro_CFLAGS"
LIBS="$allegro_LIBS $LIBS"
dnl
dnl Now check if the installed liballegro is sufficiently new.
dnl (Also sanity checks the results of allegro-config to some extent)
dnl
rm -f conf.allegrotest
AC_TRY_RUN([
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <allegro.h>
int
main()
{
int allegro_major_version, allegro_minor_version, allegro_micro_version;
int major, minor, micro;
char *tmp_version;
int tmp_int_version;
system("touch conf.allegrotest");
/* Capture allegro-config output via autoconf/configure variables */
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = (char *)strdup("$min_allegro_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string from allegro-config\n", "$min_allegro_version");
free(tmp_version);
exit(1);
}
free(tmp_version);
/* Capture the version information from the header files */
allegro_major_version = ALLEGRO_VERSION;
allegro_minor_version = ALLEGRO_SUB_VERSION;
allegro_micro_version = ALLEGRO_WIP_VERSION;
/* Compare allegro-config output to the Allegro headers */
if ((allegro_major_version != $ALLEGRO_CONFIG_major_version) ||
(allegro_minor_version != $ALLEGRO_CONFIG_minor_version))
{
printf("*** Allegro header files (version %d.%d.%d) do not match\n",
allegro_major_version, allegro_minor_version, allegro_micro_version);
printf("*** allegro-config (version %d.%d.%d)\n",
$ALLEGRO_CONFIG_major_version, $ALLEGRO_CONFIG_minor_version, $ALLEGRO_CONFIG_micro_version);
return 1;
}
/* Compare the headers to the library to make sure we match */
/* Less than ideal -- doesn't provide us with return value feedback,
* only exits if there's a serious mismatch between header and library.
*/
/* TODO:
* This doesnt work!
*/
/* ALLEGRO_TEST_VERSION; */
/* Test that the library is greater than our minimum version */
if (($ALLEGRO_CONFIG_major_version > major) ||
(($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version > minor)) ||
(($ALLEGRO_CONFIG_major_version == major) && ($ALLEGRO_CONFIG_minor_version == minor) &&
($ALLEGRO_CONFIG_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of Allegro (%d.%d.%d) was found.\n",
allegro_major_version, allegro_minor_version, allegro_micro_version);
printf("*** You need a version of Allegro newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** Allegro is always available from http://alleg.sf.net.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the allegro-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of Allegro, but you can also set the ALLEGRO_CONFIG environment to point to the\n");
printf("*** correct copy of allegro-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
return 1;
} END_OF_MAIN()
],, no_allegro=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_allegro" = x ; then
AC_MSG_RESULT(yes (version $ALLEGRO_CONFIG_major_version.$ALLEGRO_CONFIG_minor_version.$ALLEGRO_CONFIG_micro_version))
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ALLEGRO_CONFIG" = "no" ; then
echo "*** The allegro-config script installed by Allegro could not be found"
echo "*** If Allegro was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ALLEGRO_CONFIG environment variable to the"
echo "*** full path to allegro-config."
else
if test -f conf.allegrotest ; then
:
else
echo "*** Could not run Allegro test program, checking why..."
CFLAGS="$CFLAGS $allegro_CFLAGS"
LIBS="$LIBS $allegro_LIBS"
AC_TRY_LINK([
#include <allegro.h>
#include <stdio.h>
], [ allegro_error; return 0;],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Allegro or finding the wrong"
echo "*** version of Allegro. If it is not finding Allegro, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Allegro was incorrectly installed"
echo "*** or that you have moved Allegro since it was installed. In the latter case, you"
echo "*** may want to edit the allegro-config script: $ALLEGRO_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
allegro_CFLAGS=""
allegro_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(allegro_CFLAGS)
AC_SUBST(allegro_LIBS)
rm -f conf.allegrotest
])

4816
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#
AC_PREREQ([2.61])
AC_INIT(PCem, v12, Sarah Walker <pcem-emulator@pcem-emulator.co.uk>, pcem)
AC_INIT(PCem, v17, Sarah Walker <pcem@pcem-emulator.co.uk>, pcem)
AC_CANONICAL_HOST
@ -13,58 +13,185 @@ AM_PROG_CC_C_O
AC_MSG_CHECKING([whether to enable debugging])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [build debug executable]))
if test "$enable_debug" = "yes"; then
CFLAGS="-Wall -O0 -g -D_DEBUG"
AC_MSG_CHECKING([whether to build for release])
AC_ARG_ENABLE(release_build,
AC_HELP_STRING([--enable-release-build], [build for release]))
if test "$enable_release_build" = "yes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AM_CONDITIONAL(RELEASE_BUILD, [test "$enable_release_build" = "yes"])
AC_MSG_CHECKING([whether to enable debugging])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [build debug executable]))
if test "$enable_debug" = "yes"; then
CFLAGS="$CFLAGS -Wall -O0 -g -D_DEBUG -fcommon"
CXXFLAGS="$CXXFLAGS -Wall -O0 -g -D_DEBUG -fcommon"
AC_MSG_RESULT([yes])
else
CFLAGS="$CFLAGS -O3 -fcommon"
CXXFLAGS="$CXXFLAGS -O3 -fcommon"
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([whether to enable networking])
AC_ARG_ENABLE(networking,
AC_HELP_STRING([--enable-networking], [enable networking]))
if test "$enable_networking" = "yes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([whether to use ALSA for MIDI output])
AC_ARG_ENABLE(alsa,
AC_HELP_STRING([--enable-alsa], [use ALSA for MIDI]))
if test "$enable_alsa" = "yes"; then
AC_MSG_RESULT([yes])
else
CFLAGS="-O3"
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([for cpu])
case "${host_cpu}" in
i?86)
CPU=i386
AC_MSG_RESULT(${host_cpu})
;;
x86_64)
CPU=x86_64
AC_MSG_RESULT(${host_cpu})
;;
*)
AC_MSG_ERROR([Unsupported CPU.])
;;
i?86)
CPU=i386
AC_MSG_RESULT(${host_cpu})
;;
x86_64)
CPU=x86_64
AC_MSG_RESULT(${host_cpu})
;;
armv7l)
CPU=arm
AC_MSG_RESULT(${host_cpu})
;;
aarch64)
CPU=arm64
AC_MSG_RESULT(${host_cpu})
;;
*)
AC_MSG_ERROR([Unsupported CPU. ${host_cpu}])
;;
esac
AM_CONDITIONAL(CPU_I386, test "$CPU" = "i386")
AM_CONDITIONAL(CPU_X86_64, test "$CPU" = "x86_64")
AM_CONDITIONAL(CPU_ARM, test "$CPU" = "arm")
AM_CONDITIONAL(CPU_ARM64, test "$CPU" = "arm64")
AC_MSG_CHECKING([for off64_t $CPU])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],[[off64_t n=0;]])],[has_lfs="yes"],[has_lfs="no"])
case "$host" in
*-*-freebsd*) # has off64_t but no fopen64/etc.
has_lfs="no"
;;
esac
AC_MSG_RESULT($has_lfs)
#AC_MSG_CHECKING([for libz])
#AX_CHECK_ZLIB
AM_CONDITIONAL(OS_WIN, test "$OS" = "win")
AM_CONDITIONAL(OS_LINUX, test "$OS" = "linux")
AM_CONDITIONAL(USE_WX, test "$enable_wx" = "yes")
AM_CONDITIONAL(USE_NETWORKING, test "$enable_networking" = "yes")
AM_CONDITIONAL(USE_ALSA, test "$enable_alsa" = "yes")
# Do not run test for Allegro with Win32/MinGW version, as binary builds have
# `allegro-config' missing.
# NOTE: For the following Autoconf macro to be supported, you need to extract
# allegro.m4 from the DOS/Windows Allegro sources (the file is contained
# in `misc') and copy it to this directory or MSYS's `/share/aclocal'.
if test "$OS" != "win"; then
AC_CONFIG_MACRO_DIR([./])
AM_PATH_ALLEGRO(, , AC_MSG_ERROR(building PCem requires Allegro to be installed))
AM_CONDITIONAL(HAS_OFF64T, test "$has_lfs" = "yes")
SDL_VERSION=2.0.1
AM_PATH_SDL2($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
AM_OPTIONS_WXCONFIG
reqwx=3.0.0
AM_PATH_WXCONFIG($reqwx, wxWin=1)
if test "$wxWin" != 1; then
AC_MSG_ERROR([
wxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' or 'wx-config --static --libs' command)
is in LD_LIBRARY_PATH or equivalent variable and
wxWidgets version is $reqwx or above.
])
fi
AC_CHECK_LIB([openal], [alGetError], [], \
[echo "You need to install the OpenAL library."
exit -1])
AC_CHECK_LIB([alut], [alutInit], [], \
[echo "You need to install the ALUT library."
exit -1])
if test "$enable_alsa" == "yes"; then
AC_CHECK_LIB(asound, snd_pcm_open,
[],
[echo "You need to install the ALSA library."
exit -1])
fi
AC_CHECK_LIB([pthread], [pthread_create])
build_macosx="no"
build_linux="no"
build_win="no"
build_other="no"
case "$host" in
*-*-darwin*)
LIBS="$LIBS -framework OpenGL"
LIBS="$LIBS -framework OpenAL"
build_macosx="yes"
CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
;;
*-*-cygwin* | *-*-mingw32*)
AC_CHECK_LIB([opengl32], [main], [], \
[echo "You need to install the OpenGL library."
exit -1])
AC_CHECK_LIB([openal], [alGetError], [], \
[echo "You need to install the OpenAL library."
exit -1])
build_win="yes"
AC_SUBST(SET_MAKE, 'MAKE=mingw32-make')
;;
*-*-linux*)
AC_CHECK_LIB([GL], [glGetError], [], \
[echo "You need to install the OpenGL library."
exit -1])
AC_CHECK_LIB([openal], [alGetError], [], \
[echo "You need to install the OpenAL library."
exit -1])
build_linux="yes"
CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
;;
*-*-freebsd*)
CFLAGS="$CFLAGS -I/usr/local/include"
CXXFLAGS="$CXXFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
AC_CHECK_LIB([GL], [glGetError], [], \
[echo "You need to install the OpenGL library."
exit -1])
AC_CHECK_LIB([openal], [alGetError], [], \
[echo "You need to install the OpenAL library."
exit -1])
build_other="yes"
CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
;;
*)
AC_CHECK_LIB([GL], [glGetError], [], \
[echo "You need to install the OpenGL library."
exit -1])
AC_CHECK_LIB([openal], [alGetError], [], \
[echo "You need to install the OpenAL library."
exit -1])
build_other="yes"
;;
esac
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $WX_LIBS $SDL_LIBS"
AM_CONDITIONAL(OS_LINUX, [test "$build_linux" = "yes"])
AM_CONDITIONAL(OS_WINDOWS, [test "$build_win" = "yes"])
AM_CONDITIONAL(OS_OTHER, [test "$build_other" = "yes"])
AM_CONDITIONAL(OS_MACOSX, [test "$build_macosx" = "yes"])
AC_OUTPUT([Makefile src/Makefile])

0
install-sh Normal file → Executable file
View file

BIN
nvr/aha1542c.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/430vx.nvr Normal file

Binary file not shown.

BIN
nvr/default/acer386.nvr Normal file

Binary file not shown.

BIN
nvr/default/adgold.bin Normal file

Binary file not shown.

BIN
nvr/default/aha1542c.nvr Normal file

Binary file not shown.

BIN
nvr/default/ami286.nvr Normal file

Binary file not shown.

BIN
nvr/default/ami386.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ami486.nvr Normal file

Binary file not shown.

BIN
nvr/default/at.nvr Normal file

Binary file not shown.

BIN
nvr/default/award286.nvr Normal file

Binary file not shown.

BIN
nvr/default/cmdpc30.nvr Normal file

Binary file not shown.

BIN
nvr/default/dell200.nvr Normal file

Binary file not shown.

BIN
nvr/default/deskpro386.nvr Normal file

Binary file not shown.

BIN
nvr/default/endeavor.nvr Normal file

Binary file not shown.

BIN
nvr/default/europc.nvr Normal file

Binary file not shown.

BIN
nvr/default/gw286ct.nvr Normal file

Binary file not shown.

BIN
nvr/default/hot-433.nvr Normal file

Binary file not shown.

BIN
nvr/default/ibmps1_2011.nvr Normal file

Binary file not shown.

BIN
nvr/default/ibmps1_2121.nvr Normal file

Binary file not shown.

BIN
nvr/default/ibmps2_m50.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ibmps2_m60.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ibmps2_m70.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ibmps2_m80.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ibmxt286.nvr Normal file

Binary file not shown.

BIN
nvr/default/kmxc02.nvr Normal file

Binary file not shown.

BIN
nvr/default/megapc.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/pb570.nvr Normal file

Binary file not shown.

BIN
nvr/default/pc1512.nvr Normal file

Binary file not shown.

BIN
nvr/default/pc1640.nvr Normal file

Binary file not shown.

1
nvr/default/pc200.nvr Normal file
View file

@ -0,0 +1 @@
X<EFBFBD><19><19><02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

BIN
nvr/default/pc2086.nvr Normal file

Binary file not shown.

BIN
nvr/default/pc3086.nvr Normal file

Binary file not shown.

BIN
nvr/default/revenge.nvr Normal file

Binary file not shown.

BIN
nvr/default/sis496.nvr Normal file

Binary file not shown.

BIN
nvr/default/spc4200p.nvr Normal file

Binary file not shown.

BIN
nvr/default/spc4216p.nvr Normal file

Binary file not shown.

BIN
nvr/default/tandy1000hx.bin Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/win486.nvr Normal file

Binary file not shown.

BIN
nvr/ibmps2_m50.nvr Normal file

Binary file not shown.

BIN
nvr/ibmps2_m55sx.nvr Normal file

Binary file not shown.

BIN
nvr/ibmps2_m80.nvr Normal file

Binary file not shown.

BIN
nvr/ibmps2_m80_sec.nvr Normal file

Binary file not shown.

1467
readme.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,894 +0,0 @@
PCem v12
PCem is licensed under the GPL, see COPYING for more details.
Changes since v11:
- New machines added - AMI 386DX, MR 386DX
- New graphics cards - Plantronics ColorPlus, Wyse WY-700, Obsidian SB50, Voodoo 2
- CPU optimisations - up to 50% speedup seen
- 3DFX optimisations
- Improved joystick emulation - analogue joystick up to 8 buttons, CH Flightstick Pro, ThrustMaster FCS, SideWinder pad(s)
- Mouse can be selected between serial, PS/2, and IntelliMouse
- Basic 286/386 prefetch emulation - 286 & 386 performance much closer to real systems
- Improved CGA/PCjr/Tandy composite emulation
- Various bug fixes
PCem emulates the following machines:
IBM 5150 PC (1981)
The original PC. This shipped in 1981 with a 4.77mhz 8088, 64k of RAM, and a cassette port.
Disc drives quickly became standard, along with more memory.
ROM files needed:
ibmpc\pc102782.bin
ibmpc\basicc11.f6
ibmpc\basicc11.f8
ibmpc\basicc11.fa
ibmpc\basicc11.fc
IBM 5160 XT (1983)
From a hardware perspective, this is a minor tweak of the original PC. It originally shipped
with 128k of RAM and a 10mb hard disc, both of which could be easily fitted to the 1981 machine.
However, this was targetted as businesses and was more successful than the original.
ROM files needed:
ibmxt\5000027.u19
ibmxt\1501512.u18
IBM PCjr (1984)
A home machine, which had better graphics and sound than most XTs but was not hardware compatible
with the PC.
ROM files needed:
ibmpcjr\bios.rom
IBM AT (1984)
This was the 'next generation' PC, fully 16-bit with an 80286. The original model came with a 6mhz
286, which ran three times as fast as the XT. This model also introduced EGA.
ROM files needed:
ibmat\at111585.0
ibmat\at111585.1
Olivetti M24 (1984)
An enhanced XT clone, also known as the AT&T PC 6300. Has an 8086 CPU, and an unusual 'double-res'
CGA display.
ROM files needed:
olivetti_m24\olivetti_m24_version_1.43_low.bin
olivetti_m24\olivetti_m24_version_1.43_high.bin
Tandy 1000 (1984)
This is a clone of the unsuccessful IBM PCjr, which added better graphics and sound to the XT,
but removed much expandability plus some other hardware (such as the DMA controller). The Tandy
puts back the DMA controller and ISA slots, making it a much more useful machine. Many games
from the late 80s support the Tandy.
ROM files needed:
tandy\tandy1t1.020
Tandy 1000HX (1987)
A Tandy 1000 with a faster 7.16 MHz 8088, and DOS in ROM.
ROM files needed:
tandy1000hx\v020000.u12
Tandy 1000SL/2 (1989)
An enhanced Tandy 1000 with a 9.54 MHz 8086, and enhanced graphics and sound.
ROM files needed:
tandy1000sl2\8079047.hu1
tandy1000sl2\8079048.hu2
DTK Clone XT (1986)
A generic clone XT board.
ROM files needed:
dtk\dtk_erso_2.42_2764.bin
Amstrad PC1512 (1986)
This was Amstrad's first entry into the PC clone market (after the CPC and PCW machines), and
was the first cheap PC available in the UK, selling for only £500. It was a 'turbo' clone,
having an 8mhz 8086, as opposed to an 8088, and had 512k RAM as standard. It also had a
perculiar modification to its onboard CGA controller - the 640x200 mode had 16 colours instead
of the usual 2. This was put to good use by GEM, which shipped with the machine.
Amstrad's CGA implementation has a few oddities, these are emulated as best as possible. This
mainly affects games defining unusual video modes, though 160x100x16 still works (as on the real
machine).
ROM files needed:
pc1512\40043.v1
pc1512\40044.v2
pc1512\40078.ic127
Amstrad PC1640 (1987)
Amstrad's followup to the PC1512, the PC1640 had 640k of RAM and onboard EGA, but was otherwise
mostly the same.
ROM files needed:
pc1640\40043.v3
pc1640\40044.v3
pc1640\40100
Sinclair PC200/Amstrad PC20 (1988)
This was Amstrad's entry to the 16-bit home computer market, intended to compete with the Atari
ST and Commodore Amiga. It's similar to the PC1512, but is based on Amstrad's portable PPC512
system. With stock CGA and PC speaker, it couldn't compare with the ST or Amiga.
ROM files needed:
pc200\pc20v2.0
pc200\pc20v2.1
pc200\40109.bin
Schneider Euro PC (1988)
A German XT clone. An 'all-in-one' system like the Sinclair PC200. I don't know much about this
machine to be honest! This doesn't appear to work with the XTIDE BIOS, so therefore this is the
only model that does not support hard discs.
ROM files needed:
europc\50145
europc\50146
(c)Anonymous Generic Turbo XT BIOS (1988?)
This is a BIOS whose source code was made available on Usenet in 1988. It appears to be an
anonymous BIOS from an XT clone board. It was then heavily modified to fix bugs. The history of
this BIOS (and the source code) is at http://dizzie.narod.ru/bios.txt
ROM files needed:
genxt\pcxt.rom
AMI XT clone (1989)
ROM files needed:
amixt\ami_8088_bios_31jan89.bin
DTK XT clone (1988)
ROM files needed:
dtk\dtk_erso_2.42_2764.bin
VTech Laser Turbo XT (1987)
ROM files needed:
ltxt\27c64.bin
VTech Laser XT3 (1989)
ROM files needed:
lxt3\27c64d.bin
Phoenix XT clone (1986)
ROM files needed:
pxxt\000p001.bin
Juko XT clone (1988)
ROM files needed:
jukopc\000o001.bin
Commodore PC30-III (1988)
A fairly generic 286 clone.
ROM files needed:
cmdpc30\commodore pc 30 iii even.bin
cmdpc30\commodore pc 30 iii odd.bin
Amstrad PC2086 (1989)
The PC2086 is essentially a PC1640 with VGA and 3.5" floppy drives.
ROM files needed:
pc2086\40179.ic129
pc2086\40180.ic132
pc2086\40186.ic171
Amstrad PC3086 (1990)
The PC3086 is a version of the PC2086 with a more standard case.
ROM files needed:
pc3086\fc00.bin
pc3086\c000.bin
Dell System 200 (1990?)
This is a pretty generic 286 clone with a Phoenix BIOS.
ROM files needed:
dells200\dell0.bin
dells200\dell1.bin
AMI 286 clone (1990)
This is a generic 286 clone with an AMI BIOS.
ROM files needed:
ami286\amic206.bin
Award 286 clone (1990)
This is a generic 286 clone with an Award BIOS.
ROM files needed:
award286\award.bin
IBM PS/1 Model 2011 (1990)
This is a 286 with integrated VGA and a basic GUI and DOS 4.01 in ROM.
ROM files needed:
ibmps1\f80000.bin
Compaq Deskpro 386 (1989)
An early 386 system. I don't think this BIOS is from the original 1986 version
(the very first 386 system), but from a 1989 refresh.
ROM files needed:
deskpro386\109592-005.u11.bin
deskpro386\109591-005.u13.bin
IBM PS/1 Model 2121 (1990)
This is a 386SX with integrated VGA.
ROM files needed:
ibmps1_2121\fc0000.bin
Acermate 386SX/25N (1992?)
An integrated 386SX clone, with onboard Oak SVGA and IO.
ROM files needed:
acer386\acer386.bin
acer386\oti067.bin
DTK 386SX clone (1990)
ROM files needed:
dtk386\3cto001.bin
Amstrad MegaPC (1992)
A 386SX clone (otherwise known as the PC7386SX) with a built-in Sega Megadrive. Only the PC section
is emulated, obv.
ROM files needed:
megapc\41651-bios lo.u18
megapc\211253-bios hi.u19
AMI 386SX clone (1994)
This is a generic 386SX clone with an AMI BIOS.
ROM files needed:
ami386\ami386.bin
MR 386DX clone (1994)
This is a generic 386DX clone with an MR BIOS.
ROM files needed:
mr386dx\opt495sx.mr
AMI 386DX clone (1994)
This is a generic 386DX clone with an AMI BIOS. This is the only currently emulated 386DX system
to support an external cache.
ROM files needed:
ami386dx\opt495sx.ami
AMI 486 clone (1993)
This is a generic 486 clone with an AMI BIOS. The BIOS came from my 486SX/25, bought in December
1993.
ROM files needed:
ami486\ami486.bin
AMI WinBIOS 486 clone (1994)
A 486 clone with a newer AMI BIOS.
ROM files needed:
win486\ali1429g.amw
Award SiS 496/497 (1995)
A 486 clone using the SiS 496/497 chipset, with PCI bus and Award BIOS.
ROM files needed:
sis496\sis496-1.awa
Intel Premiere/PCI (Batman's Revenge) (1994)
A Socket 4 based board with 430LX chipset.
ROM files needed:
revenge\1009af2_.bi0
revenge\1009af2_.bi1
Intel Advanced/EV (Endeavor) (1995)
A Socket 5/7 based board with 430FX chipset. The real board has a Sound Blaster Vibra 16 on board,
which is not emulated - use a discrete card instead. Some Advanced/EVs also had a Trio64 on board,
the emulated board does not have this either.
ROM files needed:
endeavor\1006cb0_.bi0
endeavor\1006cb0_.bi1
Award 430VX PCI (1996)
A generic Socket 5/7 board with 430VX chipset.
ROM files needed:
430vx\55xwuq0e.bin
PCem emulates the following graphics adapters :
MDA
The original PC adapter. This displays 80x25 text in monochrome.
Hercules
A clone of MDA, with the addition of a high-resolution 720x348 graphics mode.
CGA
The most common of the original adapters, supporting 40x25 and 80x25 text, and
320x200 in 4 colours, 640x200 in 2 colours, and a composite mode giving 160x200
in 16 colours.
Plantronics ColorPlus
An enhanced CGA board, with support for 320x200x16 and 640x200x4.
Wyse WY-700
A CGA-compatible board, with support for a 1280x800 mode
IBM EGA
The original 1984 IBM EGA card, with 256k VRAM.
ROM files needed:
ibm_6277356_ega_card_u44_27128.bin
Hercules InColor
An enhanced Hercules with a custom 720x350 16 colour mode.
IBM VGA
The original VGA card.
ROM files needed:
ibm_vga.bin
Trident 8900D SVGA
A low cost SVGA board circa 1992/1993. Not the greatest board in it's day, but
it has a reasonable VESA driver and (buggy) 15/16/24-bit colour modes.
ROM files needed:
trident.bin
Trident TGUI9440
A later Trident board with GUI acceleration. Windows 9x doesn't include drivers
for this, so they have to be downloaded and installed separately.
ROM files needed:
9440.vbi
Tseng ET4000AX SVGA
A somewhat better SVGA board than the Trident, here you get better compatibility
and speed (on the real card, not the emulator) in exchange for being limited to
8-bit colour.
ROM files needed:
et4000.bin
Diamond Stealth 32 SVGA
An ET4000/W32p based board, has 15/16/24-bit colour modes, plus acceleration.
ROM files needed:
et4000w32.bin
Paradise Bahamas 64
An S3 Vision864 based board.
ROM files needed:
bahamas64.bin
Number Nine 9FX
An S3 Trio64 based board.
ROM files needed:
s3_764.bin
ATI VGA Edge-16
A basic SVGA clone.
ROM files needed:
vgaedge16.vbi
ATI VGA Charger
A basic SVGA clone, similar to the Edge-16.
ROM files needed:
bios.bin
ATI Graphics Pro Turbo
A Mach64GX based board.
ROM files needed:
mach64gx/bios.bin
OAK OTI-067
A basic SVGA clone.
ROM files needed:
oti067/bios.bin
Diamond Stealth 3D 2000
An S3 ViRGE/325 based board.
PCem emulates the ViRGE S3D engine in software. This works with most games I tried, but
there may be some issues. The Direct3D drivers for the /325 are fairly poor (often showing
as missing triangles), so use of the /DX instead is recommended.
The streams processor (video overlay) is also emulated, however many features are missing.
ROM files needed:
s3virge.bin
S3 ViRGE/DX
An S3 ViRGE/DX based board. The drivers that come with Windows are similar to those for the
/325, however better ones do exist (try the 8-21-1997 version). With the correct drivers,
many early Direct3D games work okay (if slowly).
ROM files needed:
86c375_1.bin
3DFX Voodoo Graphics
3D accelerator. Widely supported in late 90s games.
PCem emulates this in software. The emulation is a lot faster than in v10 (thanks to a new
dynamic recompiler) and should be capable of hitting Voodoo 1 performance on most machines
when two render threads are used. As before, the emulated CPU is the bottleneck for most games.
PCem can emulate 6 and 8 MB configurations, but defaults to 4 MB for compatibility. It can also
emulate the screen filter present on the original card, though this does at present have a
noticeable performance hit.
Almost everything I've tried works okay, with a very few exceptions - Screamer 2 and Rally have
serious issues.
Obsidian SB50
Voodoo Graphics with 2 TMUs. Drivers for this are a bit limited - the official drivers don't
support 2 TMUs in Direct3D.
Voodoo 2
Improved Voodoo Graphics - higher clocks, 2 TMUs, triangle setup etc.
PCem can emulate both 8 and 12 MB configurations. It can also emulate 6 and 10 MB configurations
(with 2MB framebuffer memory), which were never sold into the PC market but do exist for arcade
systems.
Some models have fixed graphics adapters :
IBM PCjr
CGA with various new modes - 160x200x16, 320x200x16, 640x200x4.
Olivetti M24
CGA with double-res text modes and a 640x400 mode. I haven't seen a dump of the font
ROM for this yet, so if one is not provided the MDA font will be used - which looks slightly odd
as it is 14-line instead of 16-line.
Tandy 1000
Clone of PCjr video. Widely supported in 80s games.
Tandy 1000 SL/2
Improvement of Tandy 1000, with support for 640x200x16.
Amstrad PC1512
CGA with a new mode (640x200x16). Only supported in GEM to my knowledge.
Amstrad PC1640
Paradise EGA.
Amstrad PC2086/PC3086
Paradise PVGA1. An early SVGA clone with 256kb VRAM.
IBM PS/1 Model 2011
Stock VGA with 256kb VRAM.
IBM PS/1 Model 2121
Basic (and unknown) SVGA with 256kb VRAM.
Amstrad MegaPC
Paradise 90C11. A development of the PVGA1, with 512kb VRAM.
Acer 386SX/25N
Oak OTI-067. Another 512kb SVGA clone.
PCem emulates the following sound devices :
PC speaker
The standard beeper on all PCs. Supports samples/RealSound.
Tandy PSG
The Texas Instruments chip in the PCjr and Tandy 1000. Supports 3 voices plus
noise. I reused the emulator in B-em for this (slightly modified).
v11 now emulates the differences between the SN76496 (PCjr and Tandy 1000), and the NCR8496
(currently assigned to the Tandy 1000HX). Maniac Mansion and Zak McKraken will only sound
correct on the latter.
Tandy PSSJ
Used on the Tandy 1000SL/2, this clones the NCR8496, adding an addition frequency divider (did any
software actually use this?) and an 8-bit DAC.
PS/1 audio card
An SN76496 clone plus an 8-bit DAC. The SN76496 isn't at the same address as PCjr/Tandy, so most
software doesn't support it.
Gameblaster
The Creative Labs Gameblaster/Creative Music System, Creative's first sound card
introduced in 1987. Has two Philips SAA1099, giving 12 voices of square waves plus 4 noise
voices. In stereo!
Adlib
Has a Yamaha YM3812, giving 9 voices of 2 op FM, or 6 voices plus a rhythm section. PCem
uses the DOSBox dbopl emulator.
Adlib Gold
OPL3 with YM318Z 12-bit digital section. Possibly some bugs (not a lot of software to test).
The surround module is now emulated.
Sound Blaster
Several Sound Blasters are emulated :
SB v1.0 - The original. Limited to 22khz, and no auto-init DMA (can cause crackles sometimes).
SB v1.5 - Adds auto-init DMA
SB v2.0 - Upped to 41khz
SB Pro v1.0 - Stereo, with twin OPL2 chips.
SB Pro v2.0 - Stereo, with OPL 3 chip
SB 16 - 16 bit stereo
SB AWE32 - SB 16 + wavetable MIDI. This requires a ROM dump from a real AWE32.
All are set to Address 220, IRQ 7 and DMA 1 (and High DMA 5). IRQ and DMA can be changed for the
SB16 & AWE32 in the drivers.
The relevant SET line for autoexec.bat is
SET BLASTER = A220 I7 D1 Tx - where Tx is T1 for SB v1.0, T3 for SB v2.0, T4 for SB Pro,
and T6 for SB16.
AWE32 requires a ROM dump called awe32.raw. AWE-DUMP is a utility which can get a dump from a real
card. Most EMU8000 functionality should work, however filters are not correct and reverb/chorus
effects are not currently emulated.
Gravis Ultrasound
32 voice sample playback. Port address is fixed to 240, IRQ and DMA can be changed from the drivers.
Emulation is improved significantly over previous versions.
Windows Sound System
16-bit digital + OPL3. Note that this only emulates WSS itself, and should not be used with drivers
from compatible boards with additional components (eg Turtle Beach Monte Carlo)
Innovation SSI-2001
SID6581. Emulated using resid-fp. Board is fixed to port 280.
Other stuff emulated :
Serial mouse
A Microsoft compatible serial mouse on COM1. Compatible drivers are all over the place for this.
M24 mouse
I haven't seen a DOS mouse driver for this yet, but the regular scancode mode works, as does the
Windows 1.x driver.
PC1512 mouse
The PC1512's perculiar quadrature mouse. You need Amstrad's actual driver for this one.
PS/2 mouse
A standard 2 button PS/2 mouse. As with serial, compatible drivers are common.
Microsoft PS/2 Intellimouse
A PS/2 mouse with mouse wheel.
ATAPI CD-ROM
Works with OAKCDROM.SYS, VDD-IDE.SYS, and the internal drivers of every OS I've tried.
XTIDE :
The XTIDE board is emulated for machines that don't natively support IDE hard discs.
You will need to download the XTIDE BIOS seperately. Of the various versions, ide_at.bin and ide_xt.bin
should be placed in the ROMS directory. ide_xt is used on all XT models, and ide_at is used on the IBM AT
and Commodore PC30-III machines.
The BIOS is available at :
http://code.google.com/p/xtideuniversalbios/
v2.0.0 beta 1 is the version I've mostly tested. v2.0.0 beta 3 is known to have some issues.
For the PS/1, you will need v1.1.5. The PS/1 is a bit fussy with XTIDE, and I've found that it works best
when the XTIDE configuration has 'Full Operating Mode' disabled. This version must be called
ide_at_1_1_5.bin and should also be placed in the ROMS directory.
Notes :
- The time on the PC1512 clock is wrong. The date is correct, though since the PC1512's bios isn't
Y2k compliant, it thinks it's 1988.
- The envelope system on the Gameblaster isn't emulated. The noise may not be right either.
- Some of the more unusual VGA features are not emulated. I haven't found anything that uses them yet.
- On some versions of Windows the AWE32 is not set up correctly, claiming a resource conflict. To correct
this open the relevant item in Device Manager, choose 'Set Configuration Manually' and accept the
options presented.
Software tested:
MS-DOS 1.25
MS-DOS 2.11
MS-DOS 3.31
Compaq DOS 3.31
MS-DOS 5.0
MS-DOS 6.22
DR-DOS 6.0
Windows 1.03
Windows 2.03
Windows/386 2.11
Windows 3.0
Windows 3.1
Windows for Workgroups 3.11
Windows 95
Windows 95 OSR 2
Windows 98
Windows 98 SE
Windows ME
Windows NT 3.51
Windows NT 4
Windows 2000
Windows XP
OS/2 v1.1
OS/2 v1.2
OS/2 v1.3
OS/2 v2.1
OS/2 Warp 3
OS/2 Warp 4
GEM 3.11
Corel Linux 1.2
Ubuntu 10.04 (very slow, does not support serial mouse)
BeOS 5.0 Professional
Adobe Photoshop 3.0.4
CorelDRAW! 2.5 (OS/2)
CorelDRAW! 5.0
FastTracker v2.08
Lotus 1-2-3 2.1 (OS/2)
Microsoft Excel 3.0 (OS/2)
Microsoft Word 1.1 (OS/2)
Microsoft Word for Windows 6.1
Microsoft Works for Windows 3.0
Microsoft Visual Basic 3.0
Microsoft Visual C++ 1.0
Microsoft Visual C++ 6.0
StarOffice 3.1 (OS/2)
Age of Empires
Alien vs Predator (3DFX)
Blake Stone
Breakneck (3DFX)
Caesar III
Civilization
Civilization II
Colin McRae Rally (3DFX)
Colonization
Command & Conquer : Red Alert
Command & Conquer : Red Alert 2
Commander Keen : Goodbye Galaxy
Commander Keen : Invasion of the Vorticons
Croc (3DFX)
Curse of Monkey Island
Dawn Patrol
Deus Ex (3DFX, slow)
Discworld II
Doom
Doom II
Duke Nukem 3D
Dune
Dune II
Epic Pinball
Grand Theft Auto (3DFX)
GTA 2 (3DFX)
Half-Life (3DFX)
Heretic
House of the Dead 2 (3DFX)
Icon
Incoming (3DFX)
Indiana Jones and the Last Crusade
Jetpack
King's Quest (PCjr, Tandy)
King's Quest II (Tandy)
Klotz
Lemmings
Lemmings 2
Little Big Adventure 2
Lotus III
Maniac Mansion
Microsoft Arcade
Monkey Island 2
Mystic Towers
Need for Speed II SE (3DFX)
Need for Speed III (3DFX)
Network Q RAC Rally
Oddworld : Abe's Oddysee
Overlord
Populous : The Beginning (3DFX)
Pro Pinball : Big Race USA
Pro Pinball : The Web
Psycho Pinball
Resident Evil 2 (3DFX)
Rollercoaster Tycoon
Quake (3DFX)
Quake II (3DFX)
Quake III Arena (3DFX)
Scorched Earth
Screamer
Screamer Rally (not 3DFX)
Secret of Monkey Island
SimCity (DOS, OS/2)
SimCity 2000 (DOs, Windows, OS/2)
SimCity 3000
Spear of Destiny
Star Goose
Stargunner
Stunt Island
System Shock
System Shock 2 (3DFX)
Terminal Velocity
The Humans
Theme Hospital
Tomb Raider (3DFX)
Tomb Raider III (3DFX)
Tony Hawk's Pro Skater 2 (3DFX)
Total Annihilation
Transport Tycoon
Turok (3DFX)
Turok 2 (3DFX)
Tyrian
UFO : Enemy Unknown
Unreal (3DFX)
Unreal Tournament (3DFX)
Wacky Wheels
Wing Commander
Wolfenstein 3D
World Cup 98 (3DFX)
Worms
Worms 2
X-Com : Apocalypse
X-Com : Terror From The Deep
X-Wing
Zone 66
Complex - Cyboman 2
EMF - Verses
Future Crew - Second Reality
Gazebo - Cyboman!
KFMF - Trip (3DFX)
Logic Design - Fashion
Orange - X14
Renaissance - Amnesia
Skull - Putrefaction
Tran - Ambience (flickery with a host display at 60 Hz)
Tran - Timeless
Triton - Crystal Dream
Triton - Crystal Dream II (visual artifacts in titles)
Ultraforce - Vectdemo
Witan - Witan House
BeebInC v0.99f
Fellow v0.33
Kgen98 v0.4b
PacifiST v0.48
SNES9x v0.96
vMac v0.1.9.1

158
src/386.c
View file

@ -2,7 +2,6 @@
#include <stdint.h>
#include <stdlib.h>
#include "ibm.h"
#include "386.h"
#include "x86.h"
#include "x87.h"
#include "mem.h"
@ -10,58 +9,18 @@
#include "fdc.h"
#include "pic.h"
#include "timer.h"
#include "nmi.h"
#include "386_common.h"
#include "codegen.h"
#undef CPU_BLOCK_END
#define CPU_BLOCK_END()
extern int codegen_flags_changed;
extern int nmi_enable;
int inscounts[256];
uint32_t oldpc2;
int trap;
extern int cpl_override;
int has_fpu;
extern int fpucount;
uint16_t rds;
uint16_t ea_rseg;
int is486;
int cgate32;
uint8_t romext[32768];
uint8_t *ram,*rom;
uint32_t rmdat32;
#define rmdat rmdat32
#define fetchdat rmdat32
uint32_t backupregs[16];
extern int oddeven;
int inttype;
uint32_t oldcs2;
uint32_t oldecx;
uint32_t *eal_r, *eal_w;
uint16_t *mod1add[2][8];
uint32_t *mod1seg[8];
static inline void fetch_ea_32_long(uint32_t rmdat)
{
eal_r = eal_w = NULL;
easeg = cpu_state.ea_seg->base;
ea_rseg = cpu_state.ea_seg->seg;
if (cpu_rm == 4)
{
uint8_t sib = rmdat >> 8;
@ -88,8 +47,7 @@ static inline void fetch_ea_32_long(uint32_t rmdat)
else if ((sib & 6) == 4 && !cpu_state.ssegs)
{
easeg = ss;
ea_rseg = SS;
cpu_state.ea_seg = &_ss;
cpu_state.ea_seg = &cpu_state.seg_ss;
}
if (((sib >> 3) & 7) != 4)
cpu_state.eaaddr += cpu_state.regs[(sib >> 3) & 7].l << (sib >> 6);
@ -102,8 +60,7 @@ static inline void fetch_ea_32_long(uint32_t rmdat)
if (cpu_rm == 5 && !cpu_state.ssegs)
{
easeg = ss;
ea_rseg = SS;
cpu_state.ea_seg = &_ss;
cpu_state.ea_seg = &cpu_state.seg_ss;
}
if (cpu_mod == 1)
{
@ -134,8 +91,7 @@ static inline void fetch_ea_16_long(uint32_t rmdat)
{
eal_r = eal_w = NULL;
easeg = cpu_state.ea_seg->base;
ea_rseg = cpu_state.ea_seg->seg;
if (!cpu_mod && cpu_rm == 6)
if (!cpu_mod && cpu_rm == 6)
{
cpu_state.eaaddr = getword();
}
@ -157,8 +113,7 @@ static inline void fetch_ea_16_long(uint32_t rmdat)
if (mod1seg[cpu_rm] == &ss && !cpu_state.ssegs)
{
easeg = ss;
ea_rseg = SS;
cpu_state.ea_seg = &_ss;
cpu_state.ea_seg = &cpu_state.seg_ss;
}
cpu_state.eaaddr &= 0xFFFF;
}
@ -181,19 +136,7 @@ static inline void fetch_ea_16_long(uint32_t rmdat)
#define getwordf() ((uint16_t)(fetchdat)); cpu_state.pc+=2
#define getbyte2f() ((uint8_t)(fetchdat>>8)); cpu_state.pc++
#define getword2f() ((uint16_t)(fetchdat>>8)); cpu_state.pc+=2
extern int xout;
int oldi;
uint32_t testr[9];
extern int dontprint;
#undef NOTRM
#define NOTRM if (!(msw & 1) || (eflags & VM_FLAG))\
{ \
x86_int(6); \
return 0; \
}
#define OP_TABLE(name) ops_ ## name
@ -202,13 +145,6 @@ extern int dontprint;
#include "x86_ops.h"
#undef NOTRM
#define NOTRM if (!(msw & 1) || (eflags & VM_FLAG))\
{ \
x86_int(6); \
break; \
}
void exec386(int cycs)
{
uint8_t temp;
@ -216,73 +152,56 @@ void exec386(int cycs)
int tempi;
int cycdiff;
int oldcyc;
int cycle_period = cycs / 2000; /*Use a 5us timing granularity*/
cycles+=cycs;
// output=3;
while (cycles>0)
{
int cycle_period = (timer_target - (uint32_t)tsc) + 1;
x86_was_reset = 0;
cycdiff=0;
oldcyc=cycles;
timer_start_period(cycles << TIMER_SHIFT);
// pclog("%i %02X\n", ins, ram[8]);
while (cycdiff < cycle_period)
{
/* testr[0]=EAX; testr[1]=EBX; testr[2]=ECX; testr[3]=EDX;
testr[4]=ESI; testr[5]=EDI; testr[6]=EBP; testr[7]=ESP;*/
/* testr[8]=flags;*/
// oldcs2=oldcs;
// oldpc2=oldpc;
oldcs=CS;
int ins_cycles = cycles;
cpu_state.oldpc = cpu_state.pc;
oldcpl=CPL;
cpu_state.op32 = use32;
dontprint=0;
cpu_state.ea_seg = &_ds;
cpu_state.ea_seg = &cpu_state.seg_ds;
cpu_state.ssegs = 0;
fetchdat = fastreadl(cs + cpu_state.pc);
if (!cpu_state.abrt)
{
trap = flags & T_FLAG;
opcode = fetchdat & 0xFF;
{
uint8_t opcode = fetchdat & 0xFF;
fetchdat >>= 8;
trap = cpu_state.flags & T_FLAG;
if (output == 3)
{
pclog("%04X(%06X):%04X : %08X %08X %08X %08X %04X %04X %04X(%08X) %04X %04X %04X(%08X) %08X %08X %08X SP=%04X:%08X %02X %04X %i %08X %08X %i %i %02X %02X %02X %02X %02X %f %02X%02X %02X%02X %02X%02X %02X\n",CS,cs,cpu_state.pc,EAX,EBX,ECX,EDX,CS,DS,ES,es,FS,GS,SS,ss,EDI,ESI,EBP,SS,ESP,opcode,flags,ins,0, ldt.base, CPL, stack32, pic.pend, pic.mask, pic.mask2, pic2.pend, pic2.mask, pit.c[0], ram[0xB270+0x3F5], ram[0xB270+0x3F4], ram[0xB270+0x3F7], ram[0xB270+0x3F6], ram[0xB270+0x3F9], ram[0xB270+0x3F8], ram[0x4430+0x0D49]);
pclog("%04X(%06X):%04X : %08X %08X %08X %08X %04X %04X %04X(%08X) %04X %04X %04X(%08X) %08X %08X %08X SP=%04X:%08X %02X %04X %i %08X %08X %i %i %02X %02X %02X %02X %02X\n",CS,cs,cpu_state.pc,EAX,EBX,ECX,EDX,CS,DS,ES,es,FS,GS,SS,ss,EDI,ESI,EBP,SS,ESP,opcode,cpu_state.flags,ins,0, ldt.base, CPL, stack32, pic.pend, pic.mask, pic.mask2, pic2.pend, pic2.mask);
}
cpu_state.pc++;
x86_opcodes[(opcode | cpu_state.op32) & 0x3ff](fetchdat);
if (x86_was_reset)
break;
}
if (!use32) cpu_state.pc &= 0xffff;
if (cpu_state.abrt)
{
flags_rebuild();
// pclog("Abort\n");
// if (CS == 0x228) pclog("Abort at %04X:%04X - %i %i %i\n",CS,pc,notpresent,nullseg,abrt);
/* if (testr[0]!=EAX) pclog("EAX corrupted %08X\n",pc);
if (testr[1]!=EBX) pclog("EBX corrupted %08X\n",pc);
if (testr[2]!=ECX) pclog("ECX corrupted %08X\n",pc);
if (testr[3]!=EDX) pclog("EDX corrupted %08X\n",pc);
if (testr[4]!=ESI) pclog("ESI corrupted %08X\n",pc);
if (testr[5]!=EDI) pclog("EDI corrupted %08X\n",pc);
if (testr[6]!=EBP) pclog("EBP corrupted %08X\n",pc);
if (testr[7]!=ESP) pclog("ESP corrupted %08X\n",pc);*/
/* if (testr[8]!=flags) pclog("FLAGS corrupted %08X\n",pc);*/
tempi = cpu_state.abrt;
tempi = cpu_state.abrt & ABRT_MASK;
cpu_state.abrt = 0;
x86_doabrt(tempi);
if (cpu_state.abrt)
{
cpu_state.abrt = 0;
CS = oldcs;
cpu_state.pc = cpu_state.oldpc;
pclog("Double fault %i\n", ins);
pmodeint(8, 0);
@ -295,34 +214,36 @@ dontprint=0;
}
}
}
cycdiff=oldcyc-cycles;
if (trap)
if (cpu_state.smi_pending)
{
cpu_state.smi_pending = 0;
x86_smi_enter();
}
else if (trap)
{
flags_rebuild();
// oldpc=pc;
// oldcs=CS;
if (msw&1)
{
pmodeint(1,0);
}
else
{
writememw(ss,(SP-2)&0xFFFF,flags);
writememw(ss,(SP-2)&0xFFFF,cpu_state.flags);
writememw(ss,(SP-4)&0xFFFF,CS);
writememw(ss,(SP-6)&0xFFFF,cpu_state.pc);
SP-=6;
addr = (1 << 2) + idt.base;
flags&=~I_FLAG;
flags&=~T_FLAG;
cpu_state.flags &= ~I_FLAG;
cpu_state.flags &= ~T_FLAG;
cpu_state.pc=readmemw(0,addr);
loadcs(readmemw(0,addr+2));
}
}
else if (nmi && nmi_enable)
else if (nmi && nmi_enable && nmi_mask)
{
cpu_state.oldpc = cpu_state.pc;
oldcs = CS;
// pclog("NMI\n");
x86_int(2);
nmi_enable = 0;
@ -332,7 +253,7 @@ dontprint=0;
nmi = 0;
}
}
else if ((flags&I_FLAG) && pic_intpending)
else if ((cpu_state.flags & I_FLAG) && pic_intpending)
{
temp=picinterrupt();
if (temp!=0xFF)
@ -348,14 +269,13 @@ dontprint=0;
}
else
{
writememw(ss,(SP-2)&0xFFFF,flags);
writememw(ss,(SP-2)&0xFFFF,cpu_state.flags);
writememw(ss,(SP-4)&0xFFFF,CS);
writememw(ss,(SP-6)&0xFFFF,cpu_state.pc);
SP-=6;
addr = (temp << 2) + idt.base;
flags&=~I_FLAG;
flags&=~T_FLAG;
oxpc=cpu_state.pc;
cpu_state.flags &= ~I_FLAG;
cpu_state.flags &= ~T_FLAG;
cpu_state.pc=readmemw(0,addr);
loadcs(readmemw(0,addr+2));
// if (temp==0x76) pclog("INT to %04X:%04X\n",CS,pc);
@ -367,6 +287,11 @@ dontprint=0;
ins++;
insc++;
ins_cycles -= cycles;
tsc += ins_cycles;
cycdiff=oldcyc-cycles;
if (timetolive)
{
timetolive--;
@ -375,8 +300,7 @@ dontprint=0;
}
}
tsc += cycdiff;
timer_end_period(cycles << TIMER_SHIFT);
if (TIMER_VAL_LESS_THAN_VAL(timer_target, (uint32_t)tsc))
timer_process();
}
}

View file

@ -1,15 +0,0 @@
extern void cpu_386_flags_extract();
extern void cpu_386_flags_rebuild();
void pmodeint(int num, int soft);
void loadcscall(uint16_t seg);
void loadcsjmp(uint16_t seg, uint32_t oxpc);
void pmoderetf(int is32, uint16_t off);
void pmodeiret(int is32);
void x86_int_sw(int num);
int divl(uint32_t val);
int idivl(int32_t val);
int rep386(int fv);

252
src/386_common.c Normal file
View file

@ -0,0 +1,252 @@
#include "ibm.h"
#include "x86.h"
#include "386_common.h"
#include "x86_flags.h"
#include "codegen.h"
x86seg gdt, ldt, idt, tr;
uint32_t cr2, cr3, cr4;
uint32_t dr[8];
uint16_t sysenter_cs;
uint32_t sysenter_eip, sysenter_esp;
uint32_t use32;
int stack32;
int optype;
int trap;
uint32_t rmdat;
uint32_t *eal_r, *eal_w;
int nmi_enable = 1;
int cpl_override=0;
int fpucount=0;
uint16_t cpu_cur_status = 0;
uint32_t pccache;
uint8_t *pccache2;
void x86_int(int num)
{
uint32_t addr;
// pclog("x86_int %02x %04x:%04x\n", num, CS,pc);
flags_rebuild();
cpu_state.pc=cpu_state.oldpc;
if (msw&1)
{
pmodeint(num,0);
}
else
{
addr = (num << 2) + idt.base;
if ((num << 2) + 3 > idt.limit)
{
if (idt.limit < 35)
{
cpu_state.abrt = 0;
softresetx86();
cpu_set_edx();
pclog("Triple fault in real mode - reset\n");
}
else
x86_int(8);
}
else
{
if (stack32)
{
writememw(ss,ESP-2,cpu_state.flags);
writememw(ss,ESP-4,CS);
writememw(ss,ESP-6,cpu_state.pc);
ESP-=6;
}
else
{
writememw(ss,((SP-2)&0xFFFF),cpu_state.flags);
writememw(ss,((SP-4)&0xFFFF),CS);
writememw(ss,((SP-6)&0xFFFF),cpu_state.pc);
SP-=6;
}
cpu_state.flags &= ~I_FLAG;
cpu_state.flags &= ~T_FLAG;
cpu_state.pc=readmemw(0,addr);
loadcs(readmemw(0,addr+2));
}
}
cycles-=70;
CPU_BLOCK_END();
}
void x86_int_sw(int num)
{
uint32_t addr;
// pclog("x86_int_sw %02x %04x:%04x\n", num, CS,pc);
// pclog("x86_int\n");
flags_rebuild();
cycles -= timing_int;
if (msw&1)
{
pmodeint(num,1);
}
else
{
addr = (num << 2) + idt.base;
if ((num << 2) + 3 > idt.limit)
{
x86_int(13);
}
else
{
if (stack32)
{
writememw(ss,ESP-2,cpu_state.flags);
writememw(ss,ESP-4,CS);
writememw(ss,ESP-6,cpu_state.pc);
ESP-=6;
}
else
{
writememw(ss,((SP-2)&0xFFFF),cpu_state.flags);
writememw(ss,((SP-4)&0xFFFF),CS);
writememw(ss,((SP-6)&0xFFFF),cpu_state.pc);
SP-=6;
}
cpu_state.flags &= ~I_FLAG;
cpu_state.flags &= ~T_FLAG;
cpu_state.pc=readmemw(0,addr);
loadcs(readmemw(0,addr+2));
cycles -= timing_int_rm;
}
}
trap = 0;
CPU_BLOCK_END();
}
int x86_int_sw_rm(int num)
{
uint32_t addr;
uint16_t new_pc, new_cs;
flags_rebuild();
cycles -= timing_int;
addr = num << 2;
new_pc = readmemw(0, addr);
new_cs = readmemw(0, addr + 2);
if (cpu_state.abrt) return 1;
writememw(ss,((SP-2)&0xFFFF),cpu_state.flags); if (cpu_state.abrt) {pclog("abrt5\n"); return 1; }
writememw(ss,((SP-4)&0xFFFF),CS);
writememw(ss,((SP-6)&0xFFFF),cpu_state.pc); if (cpu_state.abrt) {pclog("abrt6\n"); return 1; }
SP-=6;
cpu_state.eflags &= ~VIF_FLAG;
cpu_state.flags &= ~T_FLAG;
cpu_state.pc = new_pc;
loadcs(new_cs);
cycles -= timing_int_rm;
trap = 0;
CPU_BLOCK_END();
return 0;
}
void x86illegal()
{
// pclog("x86 illegal %04X %08X %04X:%08X %02X\n",msw,cr0,CS,pc,opcode);
// if (output)
// {
// dumpregs();
// exit(-1);
// }
x86_int(6);
}
int checkio(int port)
{
uint16_t t;
uint8_t d;
cpl_override = 1;
t = readmemw(tr.base, 0x66);
cpl_override = 0;
// pclog("CheckIO 1 %08X %04x %02x\n",tr.base, eflags, _cs.access);
if (cpu_state.abrt) return 0;
// pclog("CheckIO %04X %01X %01X %02X %04X %04X %08X ",CS,CPL,IOPL,port,t,t+(port>>3),tr.base+t+(port>>3));
if ((t+(port>>3))>tr.limit) return 1;
cpl_override = 1;
d = readmembl(tr.base + t + (port >> 3));
// d=readmemb(tr.base,t+(port>>3));
cpl_override = 0;
// pclog("%02X %02X\n",d,d&(1<<(port&7)));
return d&(1<<(port&7));
}
#define divexcp() { \
pclog("Divide exception at %04X(%06X):%04X\n",CS,cs,cpu_state.pc); \
x86_int(0); \
}
int divl(uint32_t val)
{
if (val==0)
{
divexcp();
return 1;
}
uint64_t num=(((uint64_t)EDX)<<32)|EAX;
uint64_t quo=num/val;
uint32_t rem=num%val;
uint32_t quo32=(uint32_t)(quo&0xFFFFFFFF);
if (quo!=(uint64_t)quo32)
{
divexcp();
return 1;
}
EDX=rem;
EAX=quo32;
return 0;
}
int idivl(int32_t val)
{
if (val==0)
{
divexcp();
return 1;
}
int64_t num=(((uint64_t)EDX)<<32)|EAX;
int64_t quo=num/val;
int32_t rem=num%val;
int32_t quo32=(int32_t)(quo&0xFFFFFFFF);
if (quo!=(int64_t)quo32)
{
divexcp();
return 1;
}
EDX=rem;
EAX=quo32;
return 0;
}
void cpu_386_flags_extract()
{
flags_extract();
}
void cpu_386_flags_rebuild()
{
flags_rebuild();
}

View file

@ -1,51 +1,61 @@
extern uint16_t ea_rseg;
#ifndef _386_COMMON_H_
#define _386_COMMON_H_
#undef readmemb
#undef writememb
#define readmemb(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1)?readmembl((s)+(a)): *(uint8_t *)(readlookup2[(uint32_t)((s)+(a))>>12] + (uint32_t)((s) + (a))) )
#define readmemw(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1 || (((s)+(a)) & 1))?readmemwl((s)+(a)):*(uint16_t *)(readlookup2[(uint32_t)((s)+(a))>>12]+(uint32_t)((s)+(a))))
#define readmeml(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1 || (((s)+(a)) & 3))?readmemll((s)+(a)):*(uint32_t *)(readlookup2[(uint32_t)((s)+(a))>>12]+(uint32_t)((s)+(a))))
#define readmemq(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1 || (((s)+(a)) & 7))?readmemql((s)+(a)):*(uint64_t *)(readlookup2[(uint32_t)((s)+(a))>>12]+(uint32_t)((s)+(a))))
#define readmemb(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF)?readmemb386l(s,a): *(uint8_t *)(readlookup2[(uint32_t)((s)+(a))>>12] + (uint32_t)((s) + (a))) )
#define readmemq(s,a) ((readlookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF || (((s)+(a))&0xFFF)>0xFF8)?readmemql(s,a):*(uint64_t *)(readlookup2[(uint32_t)((s)+(a))>>12]+(uint32_t)((s)+(a))))
#define writememb(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF) writememb386l(s,a,v); else *(uint8_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
#define writememw(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF || (((s)+(a))&0xFFF)>0xFFE) writememwl(s,a,v); else *(uint16_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
#define writememl(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF || (((s)+(a))&0xFFF)>0xFFC) writememll(s,a,v); else *(uint32_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
#define writememq(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1 || (s)==0xFFFFFFFF || (((s)+(a))&0xFFF)>0xFF8) writememql(s,a,v); else *(uint64_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
#define writememb(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1) writemembl((s)+(a),v); else *(uint8_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
#define writememw(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1 || (((s)+(a)) & 1)) writememwl((s)+(a),v); else *(uint16_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
#define writememl(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1 || (((s)+(a)) & 3)) writememll((s)+(a),v); else *(uint32_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
#define writememq(s,a,v) if (writelookup2[(uint32_t)((s)+(a))>>12]==-1 || (((s)+(a)) & 7)) writememql((s)+(a),v); else *(uint64_t *)(writelookup2[(uint32_t)((s) + (a)) >> 12] + (uint32_t)((s) + (a))) = v
int checkio(int port);
#define check_io_perm(port) if (!IOPLp || (eflags&VM_FLAG)) \
#define check_io_perm(port) if (!IOPLp || (cpu_state.eflags&VM_FLAG)) \
{ \
int tempi = checkio(port); \
if (cpu_state.abrt) return 1; \
if (tempi) \
{ \
x86gpf(NULL,0); \
if (cpu_state.eflags & VM_FLAG) \
x86gpf_expected(NULL,0); \
else \
x86gpf(NULL,0); \
return 1; \
} \
}
#define checkio_perm(port) if (!IOPLp || (eflags&VM_FLAG)) \
{ \
tempi = checkio(port); \
if (cpu_state.abrt) break; \
if (tempi) \
{ \
x86gpf(NULL,0); \
break; \
} \
}
#define SEG_CHECK_READ(seg) \
do \
{ \
if ((seg)->base == 0xffffffff) \
{ \
x86gpf("Segment can't read", 0);\
return 1; \
} \
} while (0)
#define SEG_CHECK_WRITE(seg) \
do \
{ \
if ((seg)->base == 0xffffffff) \
{ \
x86gpf("Segment can't write", 0);\
return 1; \
} \
} while (0)
#define CHECK_READ(seg, low, high) \
if ((low < (seg)->limit_low) || (high > (seg)->limit_high)) \
if ((low < (seg)->limit_low) || (high > (seg)->limit_high) || ((msw & 1) && !(cpu_state.eflags & VM_FLAG) && (((seg)->access & 10) == 8))) \
{ \
x86gpf("Limit check", 0); \
return 1; \
}
#define CHECK_WRITE(seg, low, high) \
if ((low < (seg)->limit_low) || (high > (seg)->limit_high) || !((seg)->access & 2)) \
if ((low < (seg)->limit_low) || (high > (seg)->limit_high) || !((seg)->access & 2) || ((msw & 1) && !(cpu_state.eflags & VM_FLAG) && ((seg)->access & 8))) \
{ \
x86gpf("Limit check", 0); \
return 1; \
@ -59,7 +69,7 @@ int checkio(int port);
}
#define NOTRM if (!(msw & 1) || (eflags & VM_FLAG))\
#define NOTRM if (!(msw & 1) || (cpu_state.eflags & VM_FLAG))\
{ \
x86_int(6); \
return 1; \
@ -88,8 +98,8 @@ static inline uint16_t fastreadw(uint32_t a)
uint16_t val;
if ((a&0xFFF)>0xFFE)
{
val = readmemb(0, a);
val |= (readmemb(0, a + 1) << 8);
val = fastreadb(a);
val |= (fastreadb(a + 1) << 8);
return val;
}
if ((a>>12)==pccache) return *((uint16_t *)&pccache2[a]);
@ -119,13 +129,22 @@ static inline uint32_t fastreadl(uint32_t a)
}
return *((uint32_t *)&pccache2[a]);
}
val =readmemb(0,a);
val |=(readmemb(0,a+1)<<8);
val |=(readmemb(0,a+2)<<16);
val |=(readmemb(0,a+3)<<24);
val = fastreadw(a);
val |= (fastreadw(a + 2) << 16);
return val;
}
static inline void *get_ram_ptr(uint32_t a)
{
if ((a >> 12) == pccache)
return &pccache2[a];
else
{
uint8_t *t = getpccache(a);
return &t[a];
}
}
static inline uint8_t getbyte()
{
cpu_state.pc++;
@ -158,32 +177,30 @@ static inline uint8_t geteab()
return (cpu_rm & 4) ? cpu_state.regs[cpu_rm & 3].b.h : cpu_state.regs[cpu_rm&3].b.l;
if (eal_r)
return *(uint8_t *)eal_r;
return readmemb(easeg, cpu_state.eaaddr);
return readmemb(easeg,cpu_state.eaaddr);
}
static inline uint16_t geteaw()
{
if (cpu_mod == 3)
return cpu_state.regs[cpu_rm].w;
// cycles-=3;
if (eal_r)
return *(uint16_t *)eal_r;
return readmemw(easeg, cpu_state.eaaddr);
return readmemw(easeg,cpu_state.eaaddr);
}
static inline uint32_t geteal()
{
if (cpu_mod == 3)
return cpu_state.regs[cpu_rm].l;
// cycles-=3;
if (eal_r)
return *eal_r;
return readmeml(easeg, cpu_state.eaaddr);
return readmeml(easeg,cpu_state.eaaddr);
}
static inline uint64_t geteaq()
{
return readmemq(easeg, cpu_state.eaaddr);
return readmemq(easeg,cpu_state.eaaddr);
}
static inline uint8_t geteab_mem()
@ -204,24 +221,20 @@ static inline uint32_t geteal_mem()
static inline void seteaq(uint64_t v)
{
writememql(easeg, cpu_state.eaaddr, v);
writememql(easeg+cpu_state.eaaddr, v);
}
#define seteab(v) if (cpu_mod!=3) { if (eal_w) *(uint8_t *)eal_w=v; else writememb386l(easeg,cpu_state.eaaddr,v); } else if (cpu_rm&4) cpu_state.regs[cpu_rm&3].b.h=v; else cpu_state.regs[cpu_rm].b.l=v
#define seteaw(v) if (cpu_mod!=3) { if (eal_w) *(uint16_t *)eal_w=v; else writememwl(easeg,cpu_state.eaaddr,v); } else cpu_state.regs[cpu_rm].w=v
#define seteal(v) if (cpu_mod!=3) { if (eal_w) *eal_w=v; else writememll(easeg,cpu_state.eaaddr,v); } else cpu_state.regs[cpu_rm].l=v
#define seteab(v) if (cpu_mod!=3) { if (eal_w) *(uint8_t *)eal_w=v; else writemembl(easeg+cpu_state.eaaddr,v); } else if (cpu_rm&4) cpu_state.regs[cpu_rm&3].b.h=v; else cpu_state.regs[cpu_rm].b.l=v
#define seteaw(v) if (cpu_mod!=3) { if (eal_w) *(uint16_t *)eal_w=v; else writememwl(easeg+cpu_state.eaaddr,v); } else cpu_state.regs[cpu_rm].w=v
#define seteal(v) if (cpu_mod!=3) { if (eal_w) *eal_w=v; else writememll(easeg+cpu_state.eaaddr,v); } else cpu_state.regs[cpu_rm].l=v
#define seteab_mem(v) if (eal_w) *(uint8_t *)eal_w=v; else writememb386l(easeg,cpu_state.eaaddr,v);
#define seteaw_mem(v) if (eal_w) *(uint16_t *)eal_w=v; else writememwl(easeg,cpu_state.eaaddr,v);
#define seteal_mem(v) if (eal_w) *eal_w=v; else writememll(easeg,cpu_state.eaaddr,v);
#define seteab_mem(v) if (eal_w) *(uint8_t *)eal_w=v; else writemembl(easeg+cpu_state.eaaddr,v);
#define seteaw_mem(v) if (eal_w) *(uint16_t *)eal_w=v; else writememwl(easeg+cpu_state.eaaddr,v);
#define seteal_mem(v) if (eal_w) *eal_w=v; else writememll(easeg+cpu_state.eaaddr,v);
#define getbytef() ((uint8_t)(fetchdat)); cpu_state.pc++
#define getwordf() ((uint16_t)(fetchdat)); cpu_state.pc+=2
#define getbyte2f() ((uint8_t)(fetchdat>>8)); cpu_state.pc++
#define getword2f() ((uint16_t)(fetchdat>>8)); cpu_state.pc+=2
#define rmdat rmdat32
#define fetchdat rmdat32
void x86_int(int num);
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
#include "ibm.h"
#include "cpu.h"
#include "386.h"
#include "x86.h"
#include "x86_ops.h"
#include "x87.h"
#include "x86_flags.h"
#include "mem.h"
#include "nmi.h"
#include "pic.h"
#include "codegen.h"
@ -14,14 +14,10 @@
#include "386_common.h"
extern uint16_t *mod1add[2][8];
extern uint32_t *mod1seg[8];
static inline void fetch_ea_32_long(uint32_t rmdat)
{
eal_r = eal_w = NULL;
easeg = cpu_state.ea_seg->base;
ea_rseg = cpu_state.ea_seg->seg;
if (easeg != 0xFFFFFFFF && ((easeg + cpu_state.eaaddr) & 0xFFF) <= 0xFFC)
{
uint32_t addr = easeg + cpu_state.eaaddr;
@ -36,7 +32,6 @@ static inline void fetch_ea_16_long(uint32_t rmdat)
{
eal_r = eal_w = NULL;
easeg = cpu_state.ea_seg->base;
ea_rseg = cpu_state.ea_seg->seg;
if (easeg != 0xFFFFFFFF && ((easeg + cpu_state.eaaddr) & 0xFFF) <= 0xFFC)
{
uint32_t addr = easeg + cpu_state.eaaddr;
@ -47,8 +42,8 @@ static inline void fetch_ea_16_long(uint32_t rmdat)
}
}
#define fetch_ea_16(rmdat) cpu_state.pc++; if (cpu_mod != 3) fetch_ea_16_long(rmdat);
#define fetch_ea_32(rmdat) cpu_state.pc++; if (cpu_mod != 3) fetch_ea_32_long(rmdat);
#define fetch_ea_16(rmdat) cpu_state.pc++; if (cpu_mod != 3) fetch_ea_16_long(rmdat);
#define fetch_ea_32(rmdat) cpu_state.pc++; if (cpu_mod != 3) fetch_ea_32_long(rmdat);
#define PREFETCH_RUN(instr_cycles, bytes, modrm, reads, read_ls, writes, write_ls, ea32)
@ -56,7 +51,8 @@ static inline void fetch_ea_16_long(uint32_t rmdat)
#define PREFETCH_FLUSH()
#define OP_TABLE(name) dynarec_ops_ ## name
#define CLOCK_CYCLES(c)
/*Temporary*/
#define CLOCK_CYCLES(c)
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
#include "386_ops.h"

View file

@ -104,12 +104,22 @@ static inline uint32_t POP_L_seg(uint32_t seg)
return ret;
}
static int ILLEGAL(uint32_t fetchdat)
{
cpu_state.pc = cpu_state.oldpc;
// fatal("Illegal instruction %08X\n", fetchdat);
x86illegal();
return 0;
}
#include "x86_ops_arith.h"
#include "x86_ops_atomic.h"
#include "x86_ops_bcd.h"
#include "x86_ops_bit.h"
#include "x86_ops_bitscan.h"
#include "x86_ops_call.h"
#include "x86_ops_cyrix.h"
#include "x86_ops_flag.h"
#include "x86_ops_fpu.h"
#include "x86_ops_inc_dec.h"
@ -118,6 +128,7 @@ static inline uint32_t POP_L_seg(uint32_t seg)
#include "x86_ops_jump.h"
#include "x86_ops_misc.h"
#include "x86_ops_mmx.h"
#include "x86_ops_3dnow.h"
#include "x86_ops_mmx_arith.h"
#include "x86_ops_mmx_cmp.h"
#include "x86_ops_mmx_logic.h"
@ -140,15 +151,6 @@ static inline uint32_t POP_L_seg(uint32_t seg)
#include "x86_ops_string.h"
#include "x86_ops_xchg.h"
static int ILLEGAL(uint32_t fetchdat)
{
cpu_state.pc = cpu_state.oldpc;
// fatal("Illegal instruction %08X\n", fetchdat);
x86illegal();
return 0;
}
static int op0F_w_a16(uint32_t fetchdat)
{
int opcode = fetchdat & 0xff;
@ -279,7 +281,7 @@ OpFn OP_TABLE(386_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_w_a16, opLAR_w_a16, opLSL_w_a16, ILLEGAL, ILLEGAL, opCLTS, opLOADALL386, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -301,7 +303,7 @@ OpFn OP_TABLE(386_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_l_a16, opLAR_l_a16, opLSL_l_a16, ILLEGAL, ILLEGAL, opCLTS, opLOADALL386, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -323,7 +325,7 @@ OpFn OP_TABLE(386_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_w_a32, opLAR_w_a32, opLSL_w_a32, ILLEGAL, ILLEGAL, opCLTS, opLOADALL386, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -345,7 +347,7 @@ OpFn OP_TABLE(386_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_l_a32, opLAR_l_a32, opLSL_l_a32, ILLEGAL, ILLEGAL, opCLTS, opLOADALL386, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -370,7 +372,7 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_w_a16, opLAR_w_a16, opLSL_w_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -380,10 +382,10 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a16, opPSRLD_a16, opPSRLQ_a16, ILLEGAL, opPMULLW_a16, ILLEGAL, ILLEGAL, opPSUBUSB_a16, opPSUBUSW_a16, NULL, opPAND_a16, opPADDUSB_a16, opPADDUSW_a16, NULL, opPANDN_a16,
/*e0*/ ILLEGAL, opPSRAW_a16, opPSRAD_a16, ILLEGAL, ILLEGAL, opPMULHW_a16, ILLEGAL, ILLEGAL, opPSUBSB_a16, opPSUBSW_a16, NULL, opPOR_a16, opPADDSB_a16, opPADDSW_a16, NULL, opPXOR_a16,
/*f0*/ ILLEGAL, opPSLLW_a16, opPSLLD_a16, opPSLLQ_a16, ILLEGAL, opPMADDWD_a16, ILLEGAL, ILLEGAL, opPSUBB_a16, opPSUBW_a16, opPSUBD_a16, ILLEGAL, opPADDB_a16, opPADDW_a16, opPADDD_a16, ILLEGAL,
@ -392,7 +394,7 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_l_a16, opLAR_l_a16, opLSL_l_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -402,10 +404,10 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a16, opPSRLD_a16, opPSRLQ_a16, ILLEGAL, opPMULLW_a16, ILLEGAL, ILLEGAL, opPSUBUSB_a16, opPSUBUSW_a16, NULL, opPAND_a16, opPADDUSB_a16, opPADDUSW_a16, NULL, opPANDN_a16,
/*e0*/ ILLEGAL, opPSRAW_a16, opPSRAD_a16, ILLEGAL, ILLEGAL, opPMULHW_a16, ILLEGAL, ILLEGAL, opPSUBSB_a16, opPSUBSW_a16, NULL, opPOR_a16, opPADDSB_a16, opPADDSW_a16, NULL, opPXOR_a16,
/*f0*/ ILLEGAL, opPSLLW_a16, opPSLLD_a16, opPSLLQ_a16, ILLEGAL, opPMADDWD_a16, ILLEGAL, ILLEGAL, opPSUBB_a16, opPSUBW_a16, opPSUBD_a16, ILLEGAL, opPADDB_a16, opPADDW_a16, opPADDD_a16, ILLEGAL,
@ -414,7 +416,7 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_w_a32, opLAR_w_a32, opLSL_w_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -424,10 +426,10 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a32, opPSRLD_a32, opPSRLQ_a32, ILLEGAL, opPMULLW_a32, ILLEGAL, ILLEGAL, opPSUBUSB_a32, opPSUBUSW_a32, NULL, opPAND_a32, opPADDUSB_a32, opPADDUSW_a32, NULL, opPANDN_a32,
/*e0*/ ILLEGAL, opPSRAW_a32, opPSRAD_a32, ILLEGAL, ILLEGAL, opPMULHW_a32, ILLEGAL, ILLEGAL, opPSUBSB_a32, opPSUBSW_a32, NULL, opPOR_a32, opPADDSB_a32, opPADDSW_a32, NULL, opPXOR_a32,
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
@ -436,7 +438,7 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_l_a32, opLAR_l_a32, opLSL_l_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
@ -446,16 +448,107 @@ OpFn OP_TABLE(winchip_0f)[1024] =
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a32, opPSRLD_a32, opPSRLQ_a32, ILLEGAL, opPMULLW_a32, ILLEGAL, ILLEGAL, opPSUBUSB_a32, opPSUBUSW_a32, NULL, opPAND_a32, opPADDUSB_a32, opPADDUSW_a32, NULL, opPANDN_a32,
/*e0*/ ILLEGAL, opPSRAW_a32, opPSRAD_a32, ILLEGAL, ILLEGAL, opPMULHW_a32, ILLEGAL, ILLEGAL, opPSUBSB_a32, opPSUBSW_a32, NULL, opPOR_a32, opPADDSB_a32, opPADDSW_a32, NULL, opPXOR_a32,
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
};
OpFn OP_TABLE(pentium_0f)[1024] =
OpFn OP_TABLE(winchip2_0f)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_w_a16, opLAR_w_a16, opLSL_w_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, opPREFETCH_a16, opFEMMS, op3DNOW_a16,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a16,opPUNPCKLWD_a16,opPUNPCKLDQ_a16,opPACKSSWB_a16, opPCMPGTB_a16, opPCMPGTW_a16, opPCMPGTD_a16, opPACKUSWB_a16, opPUNPCKHBW_a16,opPUNPCKHWD_a16,opPUNPCKHDQ_a16,opPACKSSDW_a16, ILLEGAL, ILLEGAL, opMOVD_l_mm_a16,opMOVQ_q_mm_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a16,opMOVQ_mm_q_a16,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a16, opPSRLD_a16, opPSRLQ_a16, ILLEGAL, opPMULLW_a16, ILLEGAL, ILLEGAL, opPSUBUSB_a16, opPSUBUSW_a16, NULL, opPAND_a16, opPADDUSB_a16, opPADDUSW_a16, NULL, opPANDN_a16,
/*e0*/ ILLEGAL, opPSRAW_a16, opPSRAD_a16, ILLEGAL, ILLEGAL, opPMULHW_a16, ILLEGAL, ILLEGAL, opPSUBSB_a16, opPSUBSW_a16, NULL, opPOR_a16, opPADDSB_a16, opPADDSW_a16, NULL, opPXOR_a16,
/*f0*/ ILLEGAL, opPSLLW_a16, opPSLLD_a16, opPSLLQ_a16, ILLEGAL, opPMADDWD_a16, ILLEGAL, ILLEGAL, opPSUBB_a16, opPSUBW_a16, opPSUBD_a16, ILLEGAL, opPADDB_a16, opPADDW_a16, opPADDD_a16, ILLEGAL,
/*32-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_l_a16, opLAR_l_a16, opLSL_l_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, opPREFETCH_a16, opFEMMS, op3DNOW_a16,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a16,opPUNPCKLWD_a16,opPUNPCKLDQ_a16,opPACKSSWB_a16, opPCMPGTB_a16, opPCMPGTW_a16, opPCMPGTD_a16, opPACKUSWB_a16, opPUNPCKHBW_a16,opPUNPCKHWD_a16,opPUNPCKHDQ_a16,opPACKSSDW_a16, ILLEGAL, ILLEGAL, opMOVD_l_mm_a16,opMOVQ_q_mm_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a16,opMOVQ_mm_q_a16,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a16, opPSRLD_a16, opPSRLQ_a16, ILLEGAL, opPMULLW_a16, ILLEGAL, ILLEGAL, opPSUBUSB_a16, opPSUBUSW_a16, NULL, opPAND_a16, opPADDUSB_a16, opPADDUSW_a16, NULL, opPANDN_a16,
/*e0*/ ILLEGAL, opPSRAW_a16, opPSRAD_a16, ILLEGAL, ILLEGAL, opPMULHW_a16, ILLEGAL, ILLEGAL, opPSUBSB_a16, opPSUBSW_a16, NULL, opPOR_a16, opPADDSB_a16, opPADDSW_a16, NULL, opPXOR_a16,
/*f0*/ ILLEGAL, opPSLLW_a16, opPSLLD_a16, opPSLLQ_a16, ILLEGAL, opPMADDWD_a16, ILLEGAL, ILLEGAL, opPSUBB_a16, opPSUBW_a16, opPSUBD_a16, ILLEGAL, opPADDB_a16, opPADDW_a16, opPADDD_a16, ILLEGAL,
/*16-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_w_a32, opLAR_w_a32, opLSL_w_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, opPREFETCH_a32, opFEMMS, op3DNOW_a32,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a32,opPUNPCKLWD_a32,opPUNPCKLDQ_a32,opPACKSSWB_a32, opPCMPGTB_a32, opPCMPGTW_a32, opPCMPGTD_a32, opPACKUSWB_a32, opPUNPCKHBW_a32,opPUNPCKHWD_a32,opPUNPCKHDQ_a32,opPACKSSDW_a32, ILLEGAL, ILLEGAL, opMOVD_l_mm_a32,opMOVQ_q_mm_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a32,opMOVQ_mm_q_a32,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a32, opPSRLD_a32, opPSRLQ_a32, ILLEGAL, opPMULLW_a32, ILLEGAL, ILLEGAL, opPSUBUSB_a32, opPSUBUSW_a32, NULL, opPAND_a32, opPADDUSB_a32, opPADDUSW_a32, NULL, opPANDN_a32,
/*e0*/ ILLEGAL, opPSRAW_a32, opPSRAD_a32, ILLEGAL, ILLEGAL, opPMULHW_a32, ILLEGAL, ILLEGAL, opPSUBSB_a32, opPSUBSW_a32, NULL, opPOR_a32, opPADDSB_a32, opPADDSW_a32, NULL, opPXOR_a32,
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
/*32-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_l_a32, opLAR_l_a32, opLSL_l_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, opPREFETCH_a32, opFEMMS, op3DNOW_a32,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a32,opPUNPCKLWD_a32,opPUNPCKLDQ_a32,opPACKSSWB_a32, opPCMPGTB_a32, opPCMPGTW_a32, opPCMPGTD_a32, opPACKUSWB_a32, opPUNPCKHBW_a32,opPUNPCKHWD_a32,opPUNPCKHDQ_a32,opPACKSSDW_a32, ILLEGAL, ILLEGAL, opMOVD_l_mm_a32,opMOVQ_q_mm_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a32,opMOVQ_mm_q_a32,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a32, opPSRLD_a32, opPSRLQ_a32, ILLEGAL, opPMULLW_a32, ILLEGAL, ILLEGAL, opPSUBUSB_a32, opPSUBUSW_a32, NULL, opPAND_a32, opPADDUSB_a32, opPADDUSW_a32, NULL, opPANDN_a32,
/*e0*/ ILLEGAL, opPSRAW_a32, opPSRAD_a32, ILLEGAL, ILLEGAL, opPMULHW_a32, ILLEGAL, ILLEGAL, opPSUBSB_a32, opPSUBSW_a32, NULL, opPOR_a32, opPADDSB_a32, opPADDSW_a32, NULL, opPXOR_a32,
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
};
OpFn OP_TABLE(pentium_0f)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
@ -471,7 +564,7 @@ OpFn OP_TABLE(pentium_0f)[1024] =
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -493,7 +586,7 @@ OpFn OP_TABLE(pentium_0f)[1024] =
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -515,7 +608,7 @@ OpFn OP_TABLE(pentium_0f)[1024] =
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -537,7 +630,7 @@ OpFn OP_TABLE(pentium_0f)[1024] =
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -546,7 +639,98 @@ OpFn OP_TABLE(pentium_0f)[1024] =
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
};
OpFn OP_TABLE(pentiummmx_0f)[1024] =
OpFn OP_TABLE(c6x86_0f)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_w_a16, opLAR_w_a16, opLSL_w_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opSVDC_a16, opRSDC_a16, opSVLDT_a16, opRSLDT_a16, opSVTS_a16, opRSTS_a16, opSMINT, ILLEGAL,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*32-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_l_a16, opLAR_l_a16, opLSL_l_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opSVDC_a16, opRSDC_a16, opSVLDT_a16, opRSLDT_a16, opSVTS_a16, opRSTS_a16, opSMINT, ILLEGAL,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*16-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_w_a32, opLAR_w_a32, opLSL_w_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opSVDC_a32, opRSDC_a32, opSVLDT_a32, opRSLDT_a32, opSVTS_a32, opRSTS_a32, opSMINT, ILLEGAL,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*32-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_l_a32, opLAR_l_a32, opLSL_l_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opSVDC_a32, opRSDC_a32, opSVLDT_a32, opRSLDT_a32, opSVTS_a32, opRSTS_a32, opSMINT, ILLEGAL,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
};
OpFn OP_TABLE(pentiummmx_0f)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
@ -562,7 +746,7 @@ OpFn OP_TABLE(pentiummmx_0f)[1024] =
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -584,7 +768,7 @@ OpFn OP_TABLE(pentiummmx_0f)[1024] =
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -606,7 +790,7 @@ OpFn OP_TABLE(pentiummmx_0f)[1024] =
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -628,7 +812,7 @@ OpFn OP_TABLE(pentiummmx_0f)[1024] =
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -644,16 +828,16 @@ OpFn OP_TABLE(c6x86mx_0f)[1024] =
/*00*/ op0F00_a16, op0F01_w_a16, opLAR_w_a16, opLSL_w_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, opRDSHR_a16, opWRSHR_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_w_a16, opCMOVNO_w_a16, opCMOVB_w_a16, opCMOVNB_w_a16, opCMOVE_w_a16, opCMOVNE_w_a16, opCMOVBE_w_a16, opCMOVNBE_w_a16,opCMOVS_w_a16, opCMOVNS_w_a16, opCMOVP_w_a16, opCMOVNP_w_a16, opCMOVL_w_a16, opCMOVNL_w_a16, opCMOVLE_w_a16, opCMOVNLE_w_a16,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a16,opPUNPCKLWD_a16,opPUNPCKLDQ_a16,opPACKSSWB_a16, opPCMPGTB_a16, opPCMPGTW_a16, opPCMPGTD_a16, opPACKUSWB_a16, opPUNPCKHBW_a16,opPUNPCKHWD_a16,opPUNPCKHDQ_a16,opPACKSSDW_a16, ILLEGAL, ILLEGAL, opMOVD_l_mm_a16,opMOVQ_q_mm_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a16,opMOVQ_mm_q_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, opSVDC_a16, opRSDC_a16, opSVLDT_a16, opRSLDT_a16, opSVTS_a16, opRSTS_a16, opMOVD_mm_l_a16_cx,opMOVQ_mm_q_a16,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -666,16 +850,16 @@ OpFn OP_TABLE(c6x86mx_0f)[1024] =
/*00*/ op0F00_a16, op0F01_l_a16, opLAR_l_a16, opLSL_l_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, opRDSHR_a16, opWRSHR_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_l_a16, opCMOVNO_l_a16, opCMOVB_l_a16, opCMOVNB_l_a16, opCMOVE_l_a16, opCMOVNE_l_a16, opCMOVBE_l_a16, opCMOVNBE_l_a16,opCMOVS_l_a16, opCMOVNS_l_a16, opCMOVP_l_a16, opCMOVNP_l_a16, opCMOVL_l_a16, opCMOVNL_l_a16, opCMOVLE_l_a16, opCMOVNLE_l_a16,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a16,opPUNPCKLWD_a16,opPUNPCKLDQ_a16,opPACKSSWB_a16, opPCMPGTB_a16, opPCMPGTW_a16, opPCMPGTD_a16, opPACKUSWB_a16, opPUNPCKHBW_a16,opPUNPCKHWD_a16,opPUNPCKHDQ_a16,opPACKSSDW_a16, ILLEGAL, ILLEGAL, opMOVD_l_mm_a16,opMOVQ_q_mm_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a16,opMOVQ_mm_q_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, opSVDC_a16, opRSDC_a16, opSVLDT_a16, opRSLDT_a16, opSVTS_a16, opRSTS_a16, opMOVD_mm_l_a16_cx,opMOVQ_mm_q_a16,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -688,16 +872,16 @@ OpFn OP_TABLE(c6x86mx_0f)[1024] =
/*00*/ op0F00_a32, op0F01_w_a32, opLAR_w_a32, opLSL_w_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, opRDSHR_a32, opWRSHR_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_w_a32, opCMOVNO_w_a32, opCMOVB_w_a32, opCMOVNB_w_a32, opCMOVE_w_a32, opCMOVNE_w_a32, opCMOVBE_w_a32, opCMOVNBE_w_a32,opCMOVS_w_a32, opCMOVNS_w_a32, opCMOVP_w_a32, opCMOVNP_w_a32, opCMOVL_w_a32, opCMOVNL_w_a32, opCMOVLE_w_a32, opCMOVNLE_w_a32,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a32,opPUNPCKLWD_a32,opPUNPCKLDQ_a32,opPACKSSWB_a32, opPCMPGTB_a32, opPCMPGTW_a32, opPCMPGTD_a32, opPACKUSWB_a32, opPUNPCKHBW_a32,opPUNPCKHWD_a32,opPUNPCKHDQ_a32,opPACKSSDW_a32, ILLEGAL, ILLEGAL, opMOVD_l_mm_a32,opMOVQ_q_mm_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a32,opMOVQ_mm_q_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, opSVDC_a32, opRSDC_a32, opSVLDT_a32, opRSLDT_a32, opSVTS_a32, opRSTS_a32, opMOVD_mm_l_a32_cx,opMOVQ_mm_q_a32,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, ILLEGAL, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -710,16 +894,16 @@ OpFn OP_TABLE(c6x86mx_0f)[1024] =
/*00*/ op0F00_a32, op0F01_l_a32, opLAR_l_a32, opLSL_l_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, ILLEGAL, ILLEGAL, opRDSHR_a32, opWRSHR_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_l_a32, opCMOVNO_l_a32, opCMOVB_l_a32, opCMOVNB_l_a32, opCMOVE_l_a32, opCMOVNE_l_a32, opCMOVBE_l_a32, opCMOVNBE_l_a32,opCMOVS_l_a32, opCMOVNS_l_a32, opCMOVP_l_a32, opCMOVNP_l_a32, opCMOVL_l_a32, opCMOVNL_l_a32, opCMOVLE_l_a32, opCMOVNLE_l_a32,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a32,opPUNPCKLWD_a32,opPUNPCKLDQ_a32,opPACKSSWB_a32, opPCMPGTB_a32, opPCMPGTW_a32, opPCMPGTD_a32, opPACKUSWB_a32, opPUNPCKHBW_a32,opPUNPCKHWD_a32,opPUNPCKHDQ_a32,opPACKSSDW_a32, ILLEGAL, ILLEGAL, opMOVD_l_mm_a32,opMOVQ_q_mm_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a32,opMOVQ_mm_q_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, opSVDC_a16, opRSDC_a16, opSVLDT_a16, opRSLDT_a16, opSVTS_a16, opRSTS_a16, opMOVD_mm_l_a32_cx,opMOVQ_mm_q_a32,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, ILLEGAL, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
@ -728,7 +912,189 @@ OpFn OP_TABLE(c6x86mx_0f)[1024] =
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
};
OpFn OP_TABLE(286)[1024] =
OpFn OP_TABLE(pentiumpro_0f)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_w_a16, opLAR_w_a16, opLSL_w_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_w_a16, opCMOVNO_w_a16, opCMOVB_w_a16, opCMOVNB_w_a16, opCMOVE_w_a16, opCMOVNE_w_a16, opCMOVBE_w_a16, opCMOVNBE_w_a16,opCMOVS_w_a16, opCMOVNS_w_a16, opCMOVP_w_a16, opCMOVNP_w_a16, opCMOVL_w_a16, opCMOVNL_w_a16, opCMOVLE_w_a16, opCMOVNLE_w_a16,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*32-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_l_a16, opLAR_l_a16, opLSL_l_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_l_a16, opCMOVNO_l_a16, opCMOVB_l_a16, opCMOVNB_l_a16, opCMOVE_l_a16, opCMOVNE_l_a16, opCMOVBE_l_a16, opCMOVNBE_l_a16,opCMOVS_l_a16, opCMOVNS_l_a16, opCMOVP_l_a16, opCMOVNP_l_a16, opCMOVL_l_a16, opCMOVNL_l_a16, opCMOVLE_l_a16, opCMOVNLE_l_a16,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*16-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_w_a32, opLAR_w_a32, opLSL_w_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_w_a32, opCMOVNO_w_a32, opCMOVB_w_a32, opCMOVNB_w_a32, opCMOVE_w_a32, opCMOVNE_w_a32, opCMOVBE_w_a32, opCMOVNBE_w_a32,opCMOVS_w_a32, opCMOVNS_w_a32, opCMOVP_w_a32, opCMOVNP_w_a32, opCMOVL_w_a32, opCMOVNL_w_a32, opCMOVLE_w_a32, opCMOVNLE_w_a32,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*32-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_l_a32, opLAR_l_a32, opLSL_l_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, ILLEGAL, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_l_a32, opCMOVNO_l_a32, opCMOVB_l_a32, opCMOVNB_l_a32, opCMOVE_l_a32, opCMOVNE_l_a32, opCMOVBE_l_a32, opCMOVNBE_l_a32,opCMOVS_l_a32, opCMOVNS_l_a32, opCMOVP_l_a32, opCMOVNP_l_a32, opCMOVL_l_a32, opCMOVNL_l_a32, opCMOVLE_l_a32, opCMOVNLE_l_a32,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*70*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*e0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*f0*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
};
OpFn OP_TABLE(pentium2_0f)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_w_a16, opLAR_w_a16, opLSL_w_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_w_a16, opCMOVNO_w_a16, opCMOVB_w_a16, opCMOVNB_w_a16, opCMOVE_w_a16, opCMOVNE_w_a16, opCMOVBE_w_a16, opCMOVNBE_w_a16,opCMOVS_w_a16, opCMOVNS_w_a16, opCMOVP_w_a16, opCMOVNP_w_a16, opCMOVL_w_a16, opCMOVNL_w_a16, opCMOVLE_w_a16, opCMOVNLE_w_a16,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a16,opPUNPCKLWD_a16,opPUNPCKLDQ_a16,opPACKSSWB_a16, opPCMPGTB_a16, opPCMPGTW_a16, opPCMPGTD_a16, opPACKUSWB_a16, opPUNPCKHBW_a16,opPUNPCKHWD_a16,opPUNPCKHDQ_a16,opPACKSSDW_a16, ILLEGAL, ILLEGAL, opMOVD_l_mm_a16,opMOVQ_q_mm_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a16,opMOVQ_mm_q_a16,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a16, opSHLD_w_i_a16, opSHLD_w_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a16, opSHRD_w_i_a16, opSHRD_w_CL_a16,ILLEGAL, opIMUL_w_w_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_w_a16,opLSS_w_a16, opBTR_w_r_a16, opLFS_w_a16, opLGS_w_a16, opMOVZX_w_b_a16,opMOVZX_w_w_a16,ILLEGAL, ILLEGAL, opBA_w_a16, opBTC_w_r_a16, opBSF_w_a16, opBSR_w_a16, opMOVSX_w_b_a16,ILLEGAL,
/*c0*/ opXADD_b_a16, opXADD_w_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a16, opPSRLD_a16, opPSRLQ_a16, ILLEGAL, opPMULLW_a16, ILLEGAL, ILLEGAL, opPSUBUSB_a16, opPSUBUSW_a16, NULL, opPAND_a16, opPADDUSB_a16, opPADDUSW_a16, NULL, opPANDN_a16,
/*e0*/ ILLEGAL, opPSRAW_a16, opPSRAD_a16, ILLEGAL, ILLEGAL, opPMULHW_a16, ILLEGAL, ILLEGAL, opPSUBSB_a16, opPSUBSW_a16, NULL, opPOR_a16, opPADDSB_a16, opPADDSW_a16, NULL, opPXOR_a16,
/*f0*/ ILLEGAL, opPSLLW_a16, opPSLLD_a16, opPSLLQ_a16, ILLEGAL, opPMADDWD_a16, ILLEGAL, ILLEGAL, opPSUBB_a16, opPSUBW_a16, opPSUBD_a16, ILLEGAL, opPADDB_a16, opPADDW_a16, opPADDD_a16, ILLEGAL,
/*32-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a16, op0F01_l_a16, opLAR_l_a16, opLSL_l_a16, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16, opHINTNOP_a16,
/*20*/ opMOV_r_CRx_a16,opMOV_r_DRx_a16,opMOV_CRx_r_a16,opMOV_DRx_r_a16,opMOV_r_TRx_a16,ILLEGAL, opMOV_TRx_r_a16,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_l_a16, opCMOVNO_l_a16, opCMOVB_l_a16, opCMOVNB_l_a16, opCMOVE_l_a16, opCMOVNE_l_a16, opCMOVBE_l_a16, opCMOVNBE_l_a16,opCMOVS_l_a16, opCMOVNS_l_a16, opCMOVP_l_a16, opCMOVNP_l_a16, opCMOVL_l_a16, opCMOVNL_l_a16, opCMOVLE_l_a16, opCMOVNLE_l_a16,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a16,opPUNPCKLWD_a16,opPUNPCKLDQ_a16,opPACKSSWB_a16, opPCMPGTB_a16, opPCMPGTW_a16, opPCMPGTD_a16, opPACKUSWB_a16, opPUNPCKHBW_a16,opPUNPCKHWD_a16,opPUNPCKHDQ_a16,opPACKSSDW_a16, ILLEGAL, ILLEGAL, opMOVD_l_mm_a16,opMOVQ_q_mm_a16,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a16, opPCMPEQW_a16, opPCMPEQD_a16, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a16,opMOVQ_mm_q_a16,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a16, opSETNO_a16, opSETB_a16, opSETNB_a16, opSETE_a16, opSETNE_a16, opSETBE_a16, opSETNBE_a16, opSETS_a16, opSETNS_a16, opSETP_a16, opSETNP_a16, opSETL_a16, opSETNL_a16, opSETLE_a16, opSETNLE_a16,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a16, opSHLD_l_i_a16, opSHLD_l_CL_a16,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a16, opSHRD_l_i_a16, opSHRD_l_CL_a16,ILLEGAL, opIMUL_l_l_a16,
/*b0*/ opCMPXCHG_b_a16,opCMPXCHG_l_a16,opLSS_l_a16, opBTR_l_r_a16, opLFS_l_a16, opLGS_l_a16, opMOVZX_l_b_a16,opMOVZX_l_w_a16,ILLEGAL, ILLEGAL, opBA_l_a16, opBTC_l_r_a16, opBSF_l_a16, opBSR_l_a16, opMOVSX_l_b_a16,opMOVSX_l_w_a16,
/*c0*/ opXADD_b_a16, opXADD_l_a16, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a16,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a16, opPSRLD_a16, opPSRLQ_a16, ILLEGAL, opPMULLW_a16, ILLEGAL, ILLEGAL, opPSUBUSB_a16, opPSUBUSW_a16, NULL, opPAND_a16, opPADDUSB_a16, opPADDUSW_a16, NULL, opPANDN_a16,
/*e0*/ ILLEGAL, opPSRAW_a16, opPSRAD_a16, ILLEGAL, ILLEGAL, opPMULHW_a16, ILLEGAL, ILLEGAL, opPSUBSB_a16, opPSUBSW_a16, NULL, opPOR_a16, opPADDSB_a16, opPADDSW_a16, NULL, opPXOR_a16,
/*f0*/ ILLEGAL, opPSLLW_a16, opPSLLD_a16, opPSLLQ_a16, ILLEGAL, opPMADDWD_a16, ILLEGAL, ILLEGAL, opPSUBB_a16, opPSUBW_a16, opPSUBD_a16, ILLEGAL, opPADDB_a16, opPADDW_a16, opPADDD_a16, ILLEGAL,
/*16-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_w_a32, opLAR_w_a32, opLSL_w_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_w_a32, opCMOVNO_w_a32, opCMOVB_w_a32, opCMOVNB_w_a32, opCMOVE_w_a32, opCMOVNE_w_a32, opCMOVBE_w_a32, opCMOVNBE_w_a32,opCMOVS_w_a32, opCMOVNS_w_a32, opCMOVP_w_a32, opCMOVNP_w_a32, opCMOVL_w_a32, opCMOVNL_w_a32, opCMOVLE_w_a32, opCMOVNLE_w_a32,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a32,opPUNPCKLWD_a32,opPUNPCKLDQ_a32,opPACKSSWB_a32, opPCMPGTB_a32, opPCMPGTW_a32, opPCMPGTD_a32, opPACKUSWB_a32, opPUNPCKHBW_a32,opPUNPCKHWD_a32,opPUNPCKHDQ_a32,opPACKSSDW_a32, ILLEGAL, ILLEGAL, opMOVD_l_mm_a32,opMOVQ_q_mm_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a32,opMOVQ_mm_q_a32,
/*80*/ opJO_w, opJNO_w, opJB_w, opJNB_w, opJE_w, opJNE_w, opJBE_w, opJNBE_w, opJS_w, opJNS_w, opJP_w, opJNP_w, opJL_w, opJNL_w, opJLE_w, opJNLE_w,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_w, opPOP_FS_w, opCPUID, opBT_w_r_a32, opSHLD_w_i_a32, opSHLD_w_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_w, opPOP_GS_w, opRSM, opBTS_w_r_a32, opSHRD_w_i_a32, opSHRD_w_CL_a32,ILLEGAL, opIMUL_w_w_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_w_a32,opLSS_w_a32, opBTR_w_r_a32, opLFS_w_a32, opLGS_w_a32, opMOVZX_w_b_a32,opMOVZX_w_w_a32,ILLEGAL, ILLEGAL, opBA_w_a32, opBTC_w_r_a32, opBSF_w_a32, opBSR_w_a32, opMOVSX_w_b_a32,ILLEGAL,
/*c0*/ opXADD_b_a32, opXADD_w_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a32, opPSRLD_a32, opPSRLQ_a32, ILLEGAL, opPMULLW_a32, ILLEGAL, ILLEGAL, opPSUBUSB_a32, opPSUBUSW_a32, NULL, opPAND_a32, opPADDUSB_a32, opPADDUSW_a32, NULL, opPANDN_a32,
/*e0*/ ILLEGAL, opPSRAW_a32, opPSRAD_a32, ILLEGAL, ILLEGAL, opPMULHW_a32, ILLEGAL, ILLEGAL, opPSUBSB_a32, opPSUBSW_a32, NULL, opPOR_a32, opPADDSB_a32, opPADDSW_a32, NULL, opPXOR_a32,
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
/*32-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ op0F00_a32, op0F01_l_a32, opLAR_l_a32, opLSL_l_a32, ILLEGAL, ILLEGAL, opCLTS, ILLEGAL, opINVD, opWBINVD, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*10*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32, opHINTNOP_a32,
/*20*/ opMOV_r_CRx_a32,opMOV_r_DRx_a32,opMOV_CRx_r_a32,opMOV_DRx_r_a32,opMOV_r_TRx_a32,ILLEGAL, opMOV_TRx_r_a32,ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*30*/ opWRMSR, opRDTSC, opRDMSR, opRDPMC, opSYSENTER, opSYSEXIT, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*40*/ opCMOVO_l_a32, opCMOVNO_l_a32, opCMOVB_l_a32, opCMOVNB_l_a32, opCMOVE_l_a32, opCMOVNE_l_a32, opCMOVBE_l_a32, opCMOVNBE_l_a32,opCMOVS_l_a32, opCMOVNS_l_a32, opCMOVP_l_a32, opCMOVNP_l_a32, opCMOVL_l_a32, opCMOVNL_l_a32, opCMOVLE_l_a32, opCMOVNLE_l_a32,
/*50*/ ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL,
/*60*/ opPUNPCKLBW_a32,opPUNPCKLWD_a32,opPUNPCKLDQ_a32,opPACKSSWB_a32, opPCMPGTB_a32, opPCMPGTW_a32, opPCMPGTD_a32, opPACKUSWB_a32, opPUNPCKHBW_a32,opPUNPCKHWD_a32,opPUNPCKHDQ_a32,opPACKSSDW_a32, ILLEGAL, ILLEGAL, opMOVD_l_mm_a32,opMOVQ_q_mm_a32,
/*70*/ ILLEGAL, opPSxxW_imm, opPSxxD_imm, opPSxxQ_imm, opPCMPEQB_a32, opPCMPEQW_a32, opPCMPEQD_a32, opEMMS, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opMOVD_mm_l_a32,opMOVQ_mm_q_a32,
/*80*/ opJO_l, opJNO_l, opJB_l, opJNB_l, opJE_l, opJNE_l, opJBE_l, opJNBE_l, opJS_l, opJNS_l, opJP_l, opJNP_l, opJL_l, opJNL_l, opJLE_l, opJNLE_l,
/*90*/ opSETO_a32, opSETNO_a32, opSETB_a32, opSETNB_a32, opSETE_a32, opSETNE_a32, opSETBE_a32, opSETNBE_a32, opSETS_a32, opSETNS_a32, opSETP_a32, opSETNP_a32, opSETL_a32, opSETNL_a32, opSETLE_a32, opSETNLE_a32,
/*a0*/ opPUSH_FS_l, opPOP_FS_l, opCPUID, opBT_l_r_a32, opSHLD_l_i_a32, opSHLD_l_CL_a32,ILLEGAL, ILLEGAL, opPUSH_GS_l, opPOP_GS_l, opRSM, opBTS_l_r_a32, opSHRD_l_i_a32, opSHRD_l_CL_a32,ILLEGAL, opIMUL_l_l_a32,
/*b0*/ opCMPXCHG_b_a32,opCMPXCHG_l_a32,opLSS_l_a32, opBTR_l_r_a32, opLFS_l_a32, opLGS_l_a32, opMOVZX_l_b_a32,opMOVZX_l_w_a32,ILLEGAL, ILLEGAL, opBA_l_a32, opBTC_l_r_a32, opBSF_l_a32, opBSR_l_a32, opMOVSX_l_b_a32,opMOVSX_l_w_a32,
/*c0*/ opXADD_b_a32, opXADD_l_a32, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, ILLEGAL, opCMPXCHG8B_a32,opBSWAP_EAX, opBSWAP_ECX, opBSWAP_EDX, opBSWAP_EBX, opBSWAP_ESP, opBSWAP_EBP, opBSWAP_ESI, opBSWAP_EDI,
/*d0*/ ILLEGAL, opPSRLW_a32, opPSRLD_a32, opPSRLQ_a32, ILLEGAL, opPMULLW_a32, ILLEGAL, ILLEGAL, opPSUBUSB_a32, opPSUBUSW_a32, NULL, opPAND_a32, opPADDUSB_a32, opPADDUSW_a32, NULL, opPANDN_a32,
/*e0*/ ILLEGAL, opPSRAW_a32, opPSRAD_a32, ILLEGAL, ILLEGAL, opPMULHW_a32, ILLEGAL, ILLEGAL, opPSUBSB_a32, opPSUBSW_a32, NULL, opPOR_a32, opPADDSB_a32, opPADDSW_a32, NULL, opPXOR_a32,
/*f0*/ ILLEGAL, opPSLLW_a32, opPSLLD_a32, opPSLLQ_a32, ILLEGAL, opPMADDWD_a32, ILLEGAL, ILLEGAL, opPSUBB_a32, opPSUBW_a32, opPSUBD_a32, ILLEGAL, opPADDB_a32, opPADDW_a32, opPADDD_a32, ILLEGAL,
};
OpFn OP_TABLE(286)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
@ -910,4 +1276,186 @@ OpFn OP_TABLE(386)[1024] =
/*f0*/ opLOCK, opINT1, opREPNE, opREPE, opHLT, opCMC, opF6_a32, opF7_l_a32, opCLC, opSTC, opCLI, opSTI, opCLD, opSTD, opINCDEC_b_a32, opFF_l_a32,
};
OpFn OP_TABLE(REPE)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPE_w_a16,0, 0, 0, 0, 0, 0, 0, opCS_REPE_w_a16,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPE_w_a16,0, 0, 0, 0, 0, 0, 0, opDS_REPE_w_a16,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPE_w_a16,opGS_REPE_w_a16,op_66_REPE, op_67_REPE, 0, 0, 0, 0, opREP_INSB_a16, opREP_INSW_a16, opREP_OUTSB_a16,opREP_OUTSW_a16,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a16,opREP_MOVSW_a16,opREP_CMPSB_a16_E,opREP_CMPSW_a16_E,0, 0, opREP_STOSB_a16,opREP_STOSW_a16,opREP_LODSB_a16,opREP_LODSW_a16,opREP_SCASB_a16_E,opREP_SCASW_a16_E,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*32-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPE_l_a16,0, 0, 0, 0, 0, 0, 0, opCS_REPE_l_a16,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPE_l_a16,0, 0, 0, 0, 0, 0, 0, opDS_REPE_l_a16,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPE_l_a16,opGS_REPE_l_a16,op_66_REPE, op_67_REPE, 0, 0, 0, 0, opREP_INSB_a16, opREP_INSL_a16, opREP_OUTSB_a16,opREP_OUTSL_a16,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a16,opREP_MOVSL_a16,opREP_CMPSB_a16_E,opREP_CMPSL_a16_E,0, 0, opREP_STOSB_a16,opREP_STOSL_a16,opREP_LODSB_a16,opREP_LODSL_a16,opREP_SCASB_a16_E,opREP_SCASL_a16_E,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*16-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPE_w_a32,0, 0, 0, 0, 0, 0, 0, opCS_REPE_w_a32,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPE_w_a32,0, 0, 0, 0, 0, 0, 0, opDS_REPE_w_a32,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPE_w_a32,opGS_REPE_w_a32,op_66_REPE, op_67_REPE, 0, 0, 0, 0, opREP_INSB_a32, opREP_INSW_a32, opREP_OUTSB_a32,opREP_OUTSW_a32,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a32,opREP_MOVSW_a32,opREP_CMPSB_a32_E,opREP_CMPSW_a32_E,0, 0, opREP_STOSB_a32,opREP_STOSW_a32,opREP_LODSB_a32,opREP_LODSW_a32,opREP_SCASB_a32_E,opREP_SCASW_a32_E,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*32-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPE_l_a32,0, 0, 0, 0, 0, 0, 0, opCS_REPE_l_a32,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPE_l_a32,0, 0, 0, 0, 0, 0, 0, opDS_REPE_l_a32,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPE_l_a32,opGS_REPE_l_a32,op_66_REPE, op_67_REPE, 0, 0, 0, 0, opREP_INSB_a32, opREP_INSL_a32, opREP_OUTSB_a32,opREP_OUTSL_a32,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a32,opREP_MOVSL_a32,opREP_CMPSB_a32_E,opREP_CMPSL_a32_E,0, 0, opREP_STOSB_a32,opREP_STOSL_a32,opREP_LODSB_a32,opREP_LODSL_a32,opREP_SCASB_a32_E,opREP_SCASL_a32_E,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
OpFn OP_TABLE(REPNE)[1024] =
{
/*16-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPNE_w_a16,0, 0, 0, 0, 0, 0, 0, opCS_REPNE_w_a16,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPNE_w_a16,0, 0, 0, 0, 0, 0, 0, opDS_REPNE_w_a16,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPNE_w_a16,opGS_REPNE_w_a16,op_66_REPNE, op_67_REPNE, 0, 0, 0, 0, opREP_INSB_a16, opREP_INSW_a16, opREP_OUTSB_a16,opREP_OUTSW_a16,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a16,opREP_MOVSW_a16,opREP_CMPSB_a16_NE,opREP_CMPSW_a16_NE,0, 0, opREP_STOSB_a16,opREP_STOSW_a16,opREP_LODSB_a16,opREP_LODSW_a16,opREP_SCASB_a16_NE,opREP_SCASW_a16_NE,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*32-bit data, 16-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPNE_l_a16,0, 0, 0, 0, 0, 0, 0, opCS_REPNE_l_a16,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPNE_l_a16,0, 0, 0, 0, 0, 0, 0, opDS_REPNE_l_a16,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPNE_l_a16,opGS_REPNE_l_a16,op_66_REPNE, op_67_REPNE, 0, 0, 0, 0, opREP_INSB_a16, opREP_INSL_a16, opREP_OUTSB_a16,opREP_OUTSL_a16,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a16,opREP_MOVSL_a16,opREP_CMPSB_a16_NE,opREP_CMPSL_a16_NE,0, 0, opREP_STOSB_a16,opREP_STOSL_a16,opREP_LODSB_a16,opREP_LODSL_a16,opREP_SCASB_a16_NE,opREP_SCASL_a16_NE,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*16-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPNE_w_a32,0, 0, 0, 0, 0, 0, 0, opCS_REPNE_w_a32,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPNE_w_a32,0, 0, 0, 0, 0, 0, 0, opDS_REPNE_w_a32,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPNE_w_a32,opGS_REPNE_w_a32,op_66_REPNE, op_67_REPNE, 0, 0, 0, 0, opREP_INSB_a32, opREP_INSW_a32, opREP_OUTSB_a32,opREP_OUTSW_a32,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a32,opREP_MOVSW_a32,opREP_CMPSB_a32_NE,opREP_CMPSW_a32_NE,0, 0, opREP_STOSB_a32,opREP_STOSW_a32,opREP_LODSB_a32,opREP_LODSW_a32,opREP_SCASB_a32_NE,opREP_SCASW_a32_NE,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*32-bit data, 32-bit addr*/
/* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f*/
/*00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*20*/ 0, 0, 0, 0, 0, 0, opES_REPNE_l_a32,0, 0, 0, 0, 0, 0, 0, opCS_REPNE_l_a32,0,
/*30*/ 0, 0, 0, 0, 0, 0, opSS_REPNE_l_a32,0, 0, 0, 0, 0, 0, 0, opDS_REPNE_l_a32,0,
/*40*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*50*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*60*/ 0, 0, 0, 0, opFS_REPNE_l_a32,opGS_REPNE_l_a32,op_66_REPNE, op_67_REPNE, 0, 0, 0, 0, opREP_INSB_a32, opREP_INSL_a32, opREP_OUTSB_a32,opREP_OUTSL_a32,
/*70*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*80*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*90*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*a0*/ 0, 0, 0, 0, opREP_MOVSB_a32,opREP_MOVSL_a32,opREP_CMPSB_a32_NE,opREP_CMPSL_a32_NE,0, 0, opREP_STOSB_a32,opREP_STOSL_a32,opREP_LODSB_a32,opREP_LODSL_a32,opREP_SCASB_a32_NE,opREP_SCASL_a32_NE,
/*b0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*c0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*d0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*e0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*f0*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
#include "x87_ops.h"

98
src/8087.h Normal file
View file

@ -0,0 +1,98 @@
/*This file is a series of macros to get the 386+ based x87 emulation working with
the 808x emulation*/
#define X8087
#define OP_TABLE(name) ops_808x_ ## name
#define CLOCK_CYCLES(c) cycles -= (c)
#define CLOCK_CYCLES_ALWAYS(c) cycles -= (c)
#define fetch_ea_16(fetchdat)
#define fetch_ea_32(fetchdat)
#define SEG_CHECK_READ(seg)
#define SEG_CHECK_WRITE(seg)
#define CHECK_WRITE(seg, addr_lo, addr_hi)
#define PREFETCH_RUN(timing, bytes, rmdat, a, b, c, d, e)
static uint32_t readmeml(uint32_t seg, uint32_t addr)
{
return readmemw(seg, addr) | (readmemw(seg, addr+2) << 16);
}
static uint64_t readmemq(uint32_t seg, uint32_t addr)
{
return (uint64_t)readmemw(seg, addr) | ((uint64_t)readmemw(seg, addr+2) << 16) |
((uint64_t)readmemw(seg, addr+4) << 32) |
((uint64_t)readmemw(seg, addr+6) << 48);
}
static void writememb_8087(uint32_t seg, uint32_t addr, uint8_t val)
{
writememb(seg+addr, val);
}
static void writememl(uint32_t seg, uint32_t addr, uint32_t val)
{
writememw(seg, addr, val & 0xffff);
writememw(seg, addr+2, (val >> 16) & 0xffff);
}
static void writememq(uint32_t seg, uint32_t addr, uint64_t val)
{
writememw(seg, addr, val & 0xffff);
writememw(seg, addr+2, (val >> 16) & 0xffff);
writememw(seg, addr+4, (val >> 32) & 0xffff);
writememw(seg, addr+6, (val >> 48) & 0xffff);
}
static inline uint32_t geteal()
{
if (cpu_mod == 3)
fatal("geteal cpu_mod==3\n");
return readmeml(easeg, cpu_state.eaaddr);
}
static inline uint64_t geteaq()
{
if (cpu_mod == 3)
fatal("geteaq cpu_mod==3\n");
return readmemq(easeg, cpu_state.eaaddr);
}
static inline void seteal(uint32_t val)
{
if (cpu_mod == 3)
fatal("seteal cpu_mod==3\n");
else
writememl(easeg, cpu_state.eaaddr, val);
}
static inline void seteaq(uint64_t val)
{
if (cpu_mod == 3)
fatal("seteaq cpu_mod==3\n");
else
writememq(easeg, cpu_state.eaaddr, val);
}
#define flags_rebuild()
#define CF_SET() (cpu_state.flags & C_FLAG)
#define NF_SET() (cpu_state.flags & N_FLAG)
#define PF_SET() (cpu_state.flags & P_FLAG)
#define VF_SET() (cpu_state.flags & V_FLAG)
#define ZF_SET() (cpu_state.flags & Z_FLAG)
#define cond_O ( VF_SET())
#define cond_NO (!VF_SET())
#define cond_B ( CF_SET())
#define cond_NB (!CF_SET())
#define cond_E ( ZF_SET())
#define cond_NE (!ZF_SET())
#define cond_BE ( CF_SET() || ZF_SET())
#define cond_NBE (!CF_SET() && !ZF_SET())
#define cond_S ( NF_SET())
#define cond_NS (!NF_SET())
#define cond_P ( PF_SET())
#define cond_NP (!PF_SET())
#define cond_L (((NF_SET()) ? 1 : 0) != ((VF_SET()) ? 1 : 0))
#define cond_NL (((NF_SET()) ? 1 : 0) == ((VF_SET()) ? 1 : 0))
#define cond_LE (((NF_SET()) ? 1 : 0) != ((VF_SET()) ? 1 : 0) || (ZF_SET()))
#define cond_NLE (((NF_SET()) ? 1 : 0) == ((VF_SET()) ? 1 : 0) && (!ZF_SET()))
#define writememb writememb_8087
#include "x87_ops.h"
#undef writememb

1221
src/808x.c

File diff suppressed because it is too large Load diff

196
src/82091aa.c Normal file
View file

@ -0,0 +1,196 @@
#include "ibm.h"
#include "82091aa.h"
#include "fdc.h"
#include "io.h"
#include "lpt.h"
#include "serial.h"
#define AIP_AIPID 0x00
#define AIP_AIPREV 0x01
#define AIP_AIPCFG1 0x02
#define AIP_AIPCFG2 0x03
#define AIP_FCFG1 0x10
#define AIP_FCFG2 0x11
#define AIP_PCFG1 0x20
#define AIP_PCFG2 0x21
#define AIP_SACFG1 0x30
#define AIP_SACFG2 0x31
#define AIP_SBCFG1 0x40
#define AIP_SBCFG2 0x41
#define AIP_IDECFG 0x50
#define FCFG1_FDC_ENA (1 << 0)
#define FCFG1_FDC_ADDR (1 << 1)
#define PCFG1_PP_ENA (1 << 0)
#define PCFG1_PP_ADDR (3 << 1)
#define PCFG1_PP_ADDR_378 (0 << 1)
#define PCFG1_PP_ADDR_278 (1 << 1)
#define PCFG1_PP_ADDR_3BC (2 << 1)
#define SxCFG1_ENA (1 << 0)
#define SxCFG1_ADDR (7 << 1)
#define SxCFG1_ADDR_3F8 (0 << 1)
#define SxCFG1_ADDR_2F8 (1 << 1)
#define SxCFG1_ADDR_220 (2 << 1)
#define SxCFG1_ADDR_228 (3 << 1)
#define SxCFG1_ADDR_238 (4 << 1)
#define SxCFG1_ADDR_2E8 (5 << 1)
#define SxCFG1_ADDR_338 (6 << 1)
#define SxCFG1_ADDR_3E8 (7 << 1)
#define SxCFG1_IRQ (1 << 4)
#define SxCFG1_IRQ_3 (0 << 4)
#define SxCFG1_IRQ_4 (1 << 4)
static struct
{
int idx;
uint8_t regs[256];
} aip;
static uint8_t aip_read(uint16_t addr, void *p)
{
uint8_t temp;
if (!(addr & 1))
temp = aip.idx;
else
temp = aip.regs[aip.idx];
// pclog("aip_read: addr=%04x val=%02x\n", addr, temp);
return temp;
}
static void aip_write(uint16_t addr, uint8_t val, void *p)
{
// pclog("aip_write: addr=%04x val=%02x\n", addr, val);
if (!(addr & 1))
aip.idx = val;
else
{
// pclog("AIP register write: idx=%02x val=%02x\n", aip.idx, val);
switch (aip.idx)
{
case AIP_AIPCFG1:
aip.regs[AIP_AIPCFG1] = (val & ~0x4e) | (aip.regs[AIP_AIPCFG1] & 0x48);
break;
case AIP_AIPCFG2:
aip.regs[AIP_AIPCFG2] = val & 0xf8;
break;
case AIP_FCFG1:
aip.regs[AIP_FCFG1] = val & 0x83;
fdc_remove();
if ((aip.regs[AIP_FCFG1] & FCFG1_FDC_ENA) && !(aip.regs[AIP_FCFG1] & FCFG1_FDC_ADDR))
fdc_add();
break;
case AIP_FCFG2:
aip.regs[AIP_FCFG2] = (val & 0x0d) | (aip.regs[AIP_FCFG2] & 0x02);
break;
case AIP_PCFG1:
aip.regs[AIP_PCFG1] = val & 0xef;
lpt1_remove();
if (aip.regs[AIP_PCFG1] & PCFG1_PP_ENA)
{
switch (aip.regs[AIP_PCFG1] & PCFG1_PP_ADDR)
{
case PCFG1_PP_ADDR_378:
lpt1_init(0x378);
break;
case PCFG1_PP_ADDR_278:
lpt1_init(0x278);
break;
case PCFG1_PP_ADDR_3BC:
lpt1_init(0x3bc);
break;
}
}
break;
case AIP_PCFG2:
aip.regs[AIP_PCFG2] = (val & 0x0d) | (aip.regs[AIP_PCFG2] & 0x22);
break;
case AIP_SACFG1:
aip.regs[AIP_SACFG1] = val & 0x9f;
serial1_remove();
if (aip.regs[AIP_SACFG1] & SxCFG1_ENA)
{
uint16_t base = 0;
int irq = 0;
switch (aip.regs[AIP_SACFG1] & SxCFG1_ADDR)
{
case SxCFG1_ADDR_3F8: base = 0x3f8; break;
case SxCFG1_ADDR_2F8: base = 0x2f8; break;
case SxCFG1_ADDR_220: base = 0x220; break;
case SxCFG1_ADDR_228: base = 0x228; break;
case SxCFG1_ADDR_238: base = 0x238; break;
case SxCFG1_ADDR_2E8: base = 0x2e8; break;
case SxCFG1_ADDR_338: base = 0x338; break;
case SxCFG1_ADDR_3E8: base = 0x3e8; break;
}
switch (aip.regs[AIP_SACFG1] & SxCFG1_IRQ)
{
case SxCFG1_IRQ_3: irq = 3; break;
case SxCFG1_IRQ_4: irq = 4; break;
}
serial1_set(base, irq);
}
break;
case AIP_SACFG2:
aip.regs[AIP_SACFG2] = (val & 0x01d) | (aip.regs[AIP_SACFG2] & 0x02);
break;
case AIP_SBCFG1:
aip.regs[AIP_SBCFG1] = val & 0x9f;
serial2_remove();
if (aip.regs[AIP_SBCFG1] & SxCFG1_ENA)
{
uint16_t base = 0;
int irq = 0;
switch (aip.regs[AIP_SBCFG1] & SxCFG1_ADDR)
{
case SxCFG1_ADDR_3F8: base = 0x3f8; break;
case SxCFG1_ADDR_2F8: base = 0x2f8; break;
case SxCFG1_ADDR_220: base = 0x220; break;
case SxCFG1_ADDR_228: base = 0x228; break;
case SxCFG1_ADDR_238: base = 0x238; break;
case SxCFG1_ADDR_2E8: base = 0x2e8; break;
case SxCFG1_ADDR_338: base = 0x338; break;
case SxCFG1_ADDR_3E8: base = 0x3e8; break;
}
switch (aip.regs[AIP_SBCFG1] & SxCFG1_IRQ)
{
case SxCFG1_IRQ_3: irq = 3; break;
case SxCFG1_IRQ_4: irq = 4; break;
}
serial2_set(base, irq);
}
break;
case AIP_SBCFG2:
aip.regs[AIP_SACFG2] = (val & 0x01d) | (aip.regs[AIP_SACFG2] & 0x02);
break;
case AIP_IDECFG:
aip.regs[AIP_IDECFG] = val & 0x07;
break;
}
}
}
void aip_82091aa_init(uint16_t base)
{
io_sethandler(base, 0x0002, aip_read, NULL, NULL, aip_write, NULL, NULL, NULL);
memset(&aip.regs, 0xff, sizeof(aip.regs));
aip.regs[AIP_AIPID] = 0xa0;
aip.regs[AIP_AIPREV] = 0x00;
aip.regs[AIP_AIPCFG1] = 0x40;
aip.regs[AIP_AIPCFG2] = 0x00;
aip.regs[AIP_FCFG1] = 0x01;
aip.regs[AIP_FCFG2] = 0x00;
aip.regs[AIP_PCFG1] = 0x00;
aip.regs[AIP_PCFG2] = 0x00;
aip.regs[AIP_SACFG1] = 0x00;
aip.regs[AIP_SACFG2] = 0x02;
aip.regs[AIP_SBCFG1] = 0x00;
aip.regs[AIP_SBCFG2] = 0x02;
aip.regs[AIP_IDECFG] = 0x01;
}

1
src/82091aa.h Normal file
View file

@ -0,0 +1 @@
void aip_82091aa_init(uint16_t base);

View file

@ -1,51 +1,154 @@
# Makefile.am for PCem
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = pcem
noinst_SCRIPTS = ../pcem
CLEANFILES = $(noinst_SCRIPTS)
noinst_SCRIPTS =
CLEANFILES =
if !OS_WINDOWS
CLEANFILES += $(noinst_SCRIPTS)
noinst_SCRIPTS += ../pcem
../pcem: pcem
cp pcem ..
endif
amrefresh:
# Special wxWidgets files
WINDRES = $(shell $(WX_CONFIG_PATH) --rescomp)
wx.res: wx.rc
$(WINDRES) -i wx.rc --input-format=rc -o wx.res -O coff
wx-resources.cpp : pc.xrc
-wxrc -c pc.xrc -o wx-resources.cpp
pcem_CFLAGS = $(allegro_CFLAGS)
# PCem
pcem_SOURCES = 386.c 386_common.c 386_dynarec.c 386_dynarec_ops.c 808x.c 82091aa.c acc2036.c acc2168.c acc3221.c acer386sx.c \
ali1429.c amstrad.c cassette.c cbm_io.c cdrom-image.cc cdrom-null.c cmd640.c codegen.c codegen_accumulate.c \
codegen_allocator.c codegen_block.c codegen_ir.c codegen_ops.c codegen_ops_3dnow.c codegen_ops_arith.c \
codegen_ops_branch.c codegen_ops_fpu_arith.c codegen_ops_fpu_constant.c codegen_ops_fpu_loadstore.c \
codegen_ops_fpu_misc.c codegen_ops_mmx_arith.c codegen_ops_mmx_cmp.c codegen_ops_mmx_loadstore.c \
codegen_ops_mmx_logic.c codegen_ops_mmx_pack.c codegen_ops_mmx_shift.c codegen_ops_helpers.c codegen_ops_jump.c \
codegen_ops_logic.c codegen_ops_shift.c codegen_ops_misc.c codegen_ops_mov.c codegen_ops_stack.c codegen_reg.c \
codegen_timing_486.c codegen_timing_686.c codegen_timing_common.c codegen_timing_cyrixiii.c codegen_timing_k6.c codegen_timing_p6.c codegen_timing_pentium.c \
codegen_timing_winchip.c codegen_timing_winchip2.c compaq.c config.c cpu.c cpu_tables.c cs8230.c dells200.c device.c disc.c \
disc_fdi.c disc_img.c disc_sector.c dma.c esdi_at.c f82c710_upc.c fdc.c fdc37c665.c fdc37c93x.c fdd.c fdi2raw.c gameport.c hdd.c hdd_esdi.c \
hdd_file.c headland.c i430lx.c i430fx.c i430hx.c i430vx.c i440fx.c i440bx.c ide.c ide_atapi.c ide_sff8038i.c intel.c intel_flash.c io.c \
jim.c joystick_ch_flightstick_pro.c joystick_standard.c joystick_sw_pad.c joystick_tm_fcs.c keyboard.c \
keyboard_amstrad.c keyboard_at.c keyboard_olim24.c keyboard_pcjr.c keyboard_xt.c laserxt.c lpt.c lpt_dac.c lpt_dss.c \
mca.c mcr.c mem.c mem_bios.c mfm_at.c mfm_xebec.c model.c mouse.c mouse_msystems.c mouse_ps2.c mouse_serial.c mvp3.c \
neat.c nmi.c nvr.c olivetti_m24.c opti495.c paths.c pc.c pc87306.c pc87307.c pci.c pic.c piix.c piix_pm.c pit.c ppi.c ps1.c ps2.c ps2_mca.c \
ps2_nvr.c nvr_tc8521.c pzx.c rom.c rtc.c rtc_tc8521.c scamp.c scat.c scsi.c scsi_53c400.c scsi_aha1540.c scsi_cd.c scsi_hd.c \
scsi_ibm.c scsi_zip.c serial.c sio.c sis496.c sl82c460.c sound.c sound_ad1848.c sound_adlib.c sound_adlibgold.c sound_audiopci.c \
sound_azt2316a.c sound_cms.c sound_emu8k.c sound_gus.c sound_mpu401_uart.c sound_opl.c sound_pas16.c sound_ps1.c sound_pssj.c \
sound_sb.c sound_sb_dsp.c sound_sn76489.c sound_speaker.c sound_ssi2001.c sound_wss.c sound_ym7128.c soundopenal.c \
sst39sf010.c superxt.c tandy_eeprom.c tandy_rom.c t1000.c t3100e.c timer.c um8669f.c um8881f.c vid_ati_eeprom.c vid_ati_mach64.c \
vid_ati18800.c vid_ati28800.c vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c vid_colorplus.c vid_compaq_cga.c vid_ddc.c vid_ega.c \
vid_et4000.c vid_et4000w32.c vid_genius.c vid_hercules.c vid_ht216.c vid_icd2061.c vid_ics2595.c vid_im1024.c \
vid_incolor.c vid_mda.c vid_mga.c vid_olivetti_m24.c vid_oti037.c vid_oti067.c vid_paradise.c vid_pc200.c vid_pc1512.c \
vid_pc1640.c vid_pcjr.c vid_pgc.c vid_ps1_svga.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c vid_sigma.c \
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_t1000.c vid_t3100e.c vid_tandy.c vid_tandysl.c vid_tgui9440.c \
vid_tkd8001_ramdac.c vid_tvga.c vid_unk_ramdac.c vid_vga.c vid_voodoo.c vid_voodoo_banshee.c vid_voodoo_banshee_blitter.c \
vid_voodoo_blitter.c vid_voodoo_display.c vid_voodoo_fb.c vid_voodoo_fifo.c vid_voodoo_reg.c \
vid_voodoo_render.c vid_voodoo_setup.c vid_voodoo_texture.c video.c wd76c10.c vid_wy700.c vt82c586b.c \
vl82c480.c w83877tf.c w83977tf.c x86seg.c x87.c x87_timings.c xi8088.c xtide.c zenith.c sound_dbopl.cc sound_resid.cc
pcem_LDADD = $(allegro_LIBS) -lopenal
# DOSBox
pcem_SOURCES += dosbox/cdrom_image.cpp dosbox/dbopl.cpp dosbox/nukedopl.cpp dosbox/vid_cga_comp.c
pcem_SOURCES = 386.c 386_dynarec.c 386_dynarec_ops.c 808x.c acer386sx.c ali1429.c allegro-gui.c \
allegro-gui-config-sel.c allegro-gui-configure.c allegro-gui-deviceconfig.c allegro-gui-hdconf.c allegro-joystick.c allegro-keyboard.c allegro-main.c \
allegro-midi.c allegro-mouse.c allegro-video.c amstrad.c cdrom-ioctl-linux.c cdrom-iso.c cdrom-null.c \
codegen.c codegen_ops.c codegen_timing_486.c codegen_timing_686.c codegen_timing_pentium.c codegen_timing_winchip.c compaq.c config.c cpu.c \
dac.c device.c disc.c disc_fdi.c disc_img.c disc_sector.c dma.c fdc.c fdc37c665.c fdd.c fdi2raw.c gameport.c \
hdd.c hdd_esdi.c headland.c i430lx.c i430fx.c i430vx.c ide.c intel.c intel_flash.c io.c jim.c joystick_ch_flightstick_pro.c joystick_standard.c joystick_sw_pad.c \
joystick_tm_fcs.c keyboard.c keyboard_amstrad.c keyboard_at.c keyboard_olim24.c keyboard_pcjr.c keyboard_xt.c \
lpt.c mca.c mcr.c mem.c mfm_at.c mfm_xebec.c model.c mouse.c mouse_ps2.c mouse_serial.c neat.c nmi.c nvr.c olivetti_m24.c \
opti495.c pc.c pci.c pic.c piix.c pit.c ppi.c ps1.c ps2.c ps2_mca.c ps2_nvr.c rom.c rtc.c scat.c serial.c sis496.c sound.c \
sound_ad1848.c sound_adlib.c sound_adlibgold.c sound_cms.c sound_emu8k.c sound_gus.c \
sound_mpu401_uart.c sound_opl.c sound_pas16.c sound_ps1.c sound_pssj.c sound_sb.c sound_sb_dsp.c sound_sn76489.c \
sound_speaker.c sound_ssi2001.c sound_wss.c sound_ym7128.c soundopenal.c tandy_eeprom.c tandy_rom.c thread-pthread.c \
timer.c um8669f.c um8881f.c vid_ati_eeprom.c vid_ati_mach64.c vid_ati18800.c vid_ati28800.c \
vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c vid_colorplus.c vid_ega.c vid_et4000.c vid_et4000w32.c vid_genius.c vid_hercules.c \
vid_icd2061.c vid_ics2595.c vid_incolor.c vid_mda.c vid_olivetti_m24.c vid_oti067.c vid_paradise.c vid_pc200.c \
vid_pc1512.c vid_pc1640.c vid_pcjr.c vid_ps1_svga.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c \
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_tandy.c vid_tandysl.c vid_tgui9440.c \
vid_tkd8001_ramdac.c vid_tvga.c vid_unk_ramdac.c vid_vga.c vid_voodoo.c video.c wd76c10.c vid_wy700.c \
x86seg.c x87.c xtide.c sound_dbopl.cc sound_resid.cc dosbox/dbopl.cpp \
dosbox/vid_cga_comp.c resid-fp/convolve.cc resid-fp/convolve-sse.cc resid-fp/envelope.cc \
# resid-fp
pcem_SOURCES += resid-fp/convolve.cc resid-fp/convolve-sse.cc resid-fp/envelope.cc \
resid-fp/extfilt.cc resid-fp/filter.cc resid-fp/pot.cc resid-fp/sid.cc \
resid-fp/voice.cc resid-fp/wave6581_PS_.cc resid-fp/wave6581_PST.cc \
resid-fp/wave6581_P_T.cc resid-fp/wave6581__ST.cc resid-fp/wave8580_PS_.cc \
resid-fp/wave8580_PST.cc resid-fp/wave8580_P_T.cc resid-fp/wave8580__ST.cc \
resid-fp/wave.cc
#MiniVHD
pcem_SOURCES += minivhd/cwalk.c minivhd/libxml2_encoding.c minivhd/minivhd_convert.c minivhd/minivhd_create.c \
minivhd/minivhd_io.c minivhd/minivhd_manage.c minivhd/minivhd_struct_rw.c minivhd/minivhd_util.c
pcem_CFLAGS = $(subst -fpermissive,,$(shell $(WX_CONFIG_PATH) --cxxflags) $(shell sdl2-config --cflags))
pcem_CXXFLAGS = $(shell $(WX_CONFIG_PATH) --cxxflags) $(shell sdl2-config --cflags)
pcem_LDADD = @LIBS@
pcem_SOURCES += wx-main.cc wx-config_sel.c wx-dialogbox.cc wx-utils.cc wx-app.cc \
wx-sdl2-joystick.c wx-sdl2-mouse.c wx-sdl2-keyboard.c wx-sdl2-video.c \
wx-sdl2.c wx-config.c wx-deviceconfig.cc wx-status.cc wx-sdl2-status.c \
wx-thread.c wx-common.c wx-sdl2-video-renderer.c wx-sdl2-video-gl3.c \
wx-glslp-parser.c wx-shader_man.c wx-shaderconfig.cc wx-joystickconfig.cc wx-createdisc.cc \
wx-resources.cpp
if USE_ALSA
pcem_LDADD += -lasound
pcem_SOURCES += midi_alsa.c
else
pcem_SOURCES += wx-sdl2-midi.c
endif
if CPU_I386
pcem_SOURCES += codegen_x86.c
pcem_SOURCES += codegen_backend_x86.c codegen_backend_x86_ops.c codegen_backend_x86_ops_fpu.c codegen_backend_x86_ops_sse.c codegen_backend_x86_uops.c
pcem_CFLAGS += -msse2
endif
if CPU_X86_64
pcem_SOURCES += codegen_x86-64.c
pcem_SOURCES += codegen_backend_x86-64.c codegen_backend_x86-64_ops.c codegen_backend_x86-64_ops_sse.c codegen_backend_x86-64_uops.c
endif
if CPU_ARM
pcem_SOURCES += codegen_backend_arm.c codegen_backend_arm_ops.c codegen_backend_arm_uops.c
endif
if CPU_ARM64
pcem_SOURCES += codegen_backend_arm64.c codegen_backend_arm64_imm.c codegen_backend_arm64_ops.c codegen_backend_arm64_uops.c
endif
if USE_NETWORKING
pcem_CFLAGS += -DUSE_NETWORKING
pcem_CXXFLAGS += -DUSE_NETWORKING
pcem_SOURCES += ne2000.c nethandler.c wx-hostconfig.c
# SLiRP
pcem_SOURCES += slirp/bootp.c slirp/cksum.c slirp/debug.c slirp/if.c slirp/ip_icmp.c \
slirp/ip_input.c slirp/ip_output.c slirp/mbuf.c slirp/misc.c slirp/queue.c \
slirp/sbuf.c slirp/slirp.c slirp/socket.c slirp/tcp_input.c slirp/tcp_output.c \
slirp/tcp_subr.c slirp/tcp_timer.c slirp/tftp.c slirp/udp.c
if OS_WINDOWS
pcem_LDADD += -lwsock32 -liphlpapi
endif
endif
if OS_LINUX
pcem_SOURCES += cdrom-ioctl-linux.c wx-sdl2-display.c
endif
if OS_OTHER
pcem_SOURCES += cdrom-ioctl-dummy.c wx-sdl2-display.c
endif
if OS_MACOSX
pcem_SOURCES += cdrom-ioctl-osx.c wx-sdl2-display.c
pcem_CFLAGS += -DPCEM_RENDER_WITH_TIMER -DPCEM_RENDER_TIMER_LOOP
pcem_CXXFLAGS += -DPCEM_RENDER_WITH_TIMER -DPCEM_RENDER_TIMER_LOOP
endif
if OS_WINDOWS
DEFAULT_INCLUDES = -iquote .
pcem_SOURCES += cdrom-ioctl.c wx-sdl2-display-win.c
pcem_LDADD += wx.res
endif
if !HAS_OFF64T
pcem_CFLAGS += -Doff64_t=off_t -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello
endif
if RELEASE_BUILD
pcem_CFLAGS += -DRELEASE_BUILD
pcem_CXXFLAGS += -DRELEASE_BUILD
endif
#pcem_CFLAGS += -mtune=cortex-a53
#pcem_CXXFLAGS += -mtune=cortex-a53
#pcem_LDFLAGS = -flto -O3 -mtune=cortex-a15
# pcem_CFLAGS += -fprofile-use
# pcem_CXXFLAGS += -fprofile-use
# pcem_LDFLAGS = -fprofile-use

File diff suppressed because it is too large Load diff

View file

@ -1,47 +0,0 @@
VPATH = . dosbox resid-fp
CPP = g++
CC = gcc
CFLAGS = -O3 -fomit-frame-pointer -msse2 -m32
LDFLAGS = -m32
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o allegro-gui.o \
allegro-gui-configure.o allegro-gui-deviceconfig.o allegro-gui-hdconf.o allegro-joystick.o allegro-keyboard.o allegro-main.o \
allegro-midi.o allegro-mouse.o allegro-video.o amstrad.o cdrom-ioctl-linux.o cdrom-iso.o cdrom-null.o \
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86.c compaq.o config.o cpu.o \
dac.o device.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o \
hdd.o hdd_esdi.o headland.o i430lx.o i430fx.o i430vx.o ide.o intel.o intel_flash.o io.o jim.o joystick_ch_flightstick_pro.o joystick_standard.o joystick_sw_pad.o \
joystick_tm_fcs.o keyboard.o keyboard_amstrad.o keyboard_at.o keyboard_olim24.o keyboard_pcjr.o keyboard_xt.o \
lpt.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model.o mouse.o mouse_ps2.o mouse_serial.o neat.o nmi.o nvr.o olivetti_m24.o \
opti495.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o scat.o serial.o sis496.o sound.o \
sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_cms.o sound_emu8k.o sound_gus.o \
sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_sb.o sound_sb_dsp.o sound_sn76489.o \
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o thread-pthread.o \
timer.o um8669f.o um8881f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o \
vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o vid_et4000w32.o vid_genius.o vid_hercules.o \
vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc200.o \
vid_pc1512.o vid_pc1640.o vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o \
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_wy700.o vid_voodoo.o video.o wd76c10.o \
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o
DBOBJ = dbopl.o vid_cga_comp.o
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
LIBS = -lopenal -lstdc++ -lalleg -lpthread -lm
PCem: $(OBJ) $(DBOBJ) $(SIDOBJ)
$(CC) $(LDFLAGS) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem" $(LIBS)
all : PCem
clean :
rm *.o
rm PCem
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.o : %.cc
$(CPP) $(CFLAGS) -c $<
%.o : %.cpp
$(CPP) $(CFLAGS) -c $<

View file

@ -1,46 +0,0 @@
VPATH = . dosbox resid-fp
CPP = g++
CC = gcc
CFLAGS = -O3 -fomit-frame-pointer -msse2 -m64
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o allegro-gui.o \
allegro-gui-configure.o allegro-gui-deviceconfig.o allegro-gui-hdconf.o allegro-joystick.o allegro-keyboard.o allegro-main.o \
allegro-midi.o allegro-mouse.o allegro-video.o amstrad.o cdrom-ioctl-linux.o cdrom-iso.o cdrom-null.o \
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86-64.c compaq.o config.o cpu.o \
dac.o device.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o \
hdd.o hdd_esdi.o headland.o i430lx.o i430fx.o i430vx.o ide.o intel.o intel_flash.o io.o jim.o joystick_ch_flightstick_pro.o joystick_standard.o joystick_sw_pad.o \
joystick_tm_fcs.o keyboard.o keyboard_amstrad.o keyboard_at.o keyboard_olim24.o keyboard_pcjr.o keyboard_xt.o \
lpt.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model.o mouse.o mouse_ps2.o mouse_serial.o neat.o nmi.o nvr.o olivetti_m24.o \
opti495.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o scat.o serial.o sis496.o sound.o \
sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_cms.o sound_emu8k.o sound_gus.o \
sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_sb.o sound_sb_dsp.o sound_sn76489.o \
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o thread-pthread.o \
timer.o um8669f.o um8881f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o \
vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o vid_et4000w32.o vid_genius.o vid_hercules.o \
vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc200.o \
vid_pc1512.o vid_pc1640.o vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o \
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o
DBOBJ = dbopl.o vid_cga_comp.o
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
LIBS = -lopenal -lstdc++ -lalleg -lpthread -lm
PCem64: $(OBJ) $(DBOBJ) $(SIDOBJ)
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem64" $(LIBS)
all : PCem64
clean :
rm *.o
rm PCem64
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.o : %.cc
$(CPP) $(CFLAGS) -c $<
%.o : %.cpp
$(CPP) $(CFLAGS) -c $<

View file

@ -1,47 +0,0 @@
VPATH = . dosbox resid-fp
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
CFLAGS = -O3 -march=i686 -fomit-frame-pointer -msse2 -mstackrealign -Wall -Werror -fno-strict-aliasing
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad.o cdrom-ioctl.o cdrom-iso.o \
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86.o compaq.o config.o cpu.o dac.o \
device.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o hdd.o hdd_esdi.o headland.o i430lx.o i430fx.o \
i430vx.o ide.o intel.o intel_flash.o io.o jim.o joystick_ch_flightstick_pro.o joystick_standard.o joystick_sw_pad.o joystick_tm_fcs.o keyboard.o keyboard_amstrad.o keyboard_at.o \
keyboard_olim24.o keyboard_pcjr.o keyboard_xt.o lpt.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model.o mouse.o mouse_ps2.o \
mouse_serial.o neat.o nmi.o nvr.o olivetti_m24.o opti495.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o \
scat.o serial.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_cms.o sound_dbopl.o \
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o win.o win-config.o win-config_sel.o win-d3d.o win-d3d-fs.o win-ddraw.o \
win-ddraw-fs.o win-deviceconfig.o win-hdconf.o win-joystick.o win-joystickconfig.o win-keyboard.o win-midi.o win-mouse.o \
win-status.o win-video.o x86seg.o x87.o xtide.o pc.res
DBOBJ = dbopl.o vid_cga_comp.o
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
LIBS = -mwindows -lwinmm -lopenal32 -lddraw -ldinput -ldxguid -ld3d9 -lstdc++
PCem.exe: $(OBJ) $(DBOBJ) $(SIDOBJ)
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem.exe" $(LIBS)
all : PCem.exe
clean :
rm *.o
rm *.exe
rm *.res
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.o : %.cc
$(CPP) $(CFLAGS) -c $<
pc.res: pc.rc
$(WINDRES) -i pc.rc --input-format=rc -o pc.res -O coff

View file

@ -0,0 +1,79 @@
VPATH = . dosbox resid-fp minivhd
CPP = g++
CC = gcc
WINDRES = windres.exe
WXVERSION = 31
WXINCLUDE = e:/MinGWget/include/wx/
CFLAGS = -O3 -march=i686 -fomit-frame-pointer -msse2 -mstackrealign -Werror -fno-strict-aliasing
CXXFLAGS = $(CFLAGS)
OBJ = 386.o 386_common.o 386_dynarec.o 386_dynarec_ops.o 808x.o 82091aa.o acc2036.o acc2168.o acc3221.o acer386sx.o ali1429.o amstrad.o cassette.o \
cbm_io.o cdrom-ioctl.o cdrom-image.o cmd640.o codegen.o codegen_accumulate.o codegen_allocator.o \
codegen_backend_x86.o codegen_backend_x86_ops.o codegen_backend_x86_ops_fpu.o codegen_backend_x86_ops_sse.o \
codegen_backend_x86_uops.o codegen_block.o codegen_ir.o codegen_ops.o \
codegen_ops_3dnow.o codegen_ops_branch.o codegen_ops_arith.o codegen_ops_fpu_arith.o \
codegen_ops_fpu_constant.o codegen_ops_fpu_loadstore.o codegen_ops_fpu_misc.o codegen_ops_helpers.o codegen_ops_jump.o \
codegen_ops_logic.o codegen_ops_misc.o codegen_ops_mmx_arith.o codegen_ops_mmx_cmp.o \
codegen_ops_mmx_loadstore.o codegen_ops_mmx_logic.o codegen_ops_mmx_pack.o codegen_ops_mmx_shift.o \
codegen_ops_mov.o codegen_ops_shift.o codegen_ops_stack.o codegen_reg.o codegen_timing_486.o \
codegen_timing_686.o codegen_timing_common.o codegen_timing_cyrixiii.o codegen_timing_k6.o codegen_timing_p6.o codegen_timing_pentium.o \
codegen_timing_winchip.o codegen_timing_winchip2.o compaq.o config.o cpu.o cpu_tables.o cs8230.o device.o \
dells200.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o esdi_at.o f82c710_upc.o fdc.o fdc37c665.o fdc37c93x.o fdd.o \
fdi2raw.o gameport.o hdd.o hdd_esdi.o hdd_file.o headland.o i430hx.o i430lx.o i430fx.o i430vx.o i440fx.o i440bx.o ide.o \
ide_atapi.o ide_sff8038i.o intel.o intel_flash.o io.o jim.o joystick_ch_flightstick_pro.o \
joystick_standard.o joystick_sw_pad.o joystick_tm_fcs.o keyboard.o keyboard_amstrad.o keyboard_at.o \
keyboard_olim24.o keyboard_pcjr.o keyboard_xt.o laserxt.o lpt.o lpt_dac.o lpt_dss.o mca.o mcr.o \
mem.o mem_bios.o mfm_at.o mfm_xebec.o model.o mouse.o mouse_msystems.o mouse_ps2.o mouse_serial.o \
mvp3.o neat.o nmi.o nvr.o nvr_tc8521.o olivetti_m24.o opti495.o paths.o pc.o pc87306.o pc87307.o pci.o pic.o \
piix.o piix_pm.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o pzx.o rom.o rtc.o rtc_tc8521.o scamp.o scat.o scsi.o \
scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o scsi_ibm.o scsi_zip.o serial.o sio.o sis496.o sl82c460.o \
sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_azt2316a.o sound_cms.o sound_dbopl.o \
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o \
sound_resid.o sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
sound_ym7128.o soundopenal.o sst39sf010.o superxt.o t1000.o t3100e.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o \
vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o \
vid_cl5429.o vid_colorplus.o vid_compaq_cga.o vid_ddc.o vid_ega.o vid_et4000.o vid_et4000w32.o \
vid_et4000w32i.o vid_genius.o vid_hercules.o vid_ht216.o vid_icd2061.o vid_ics2595.o vid_im1024.o vid_incolor.o vid_mda.o \
vid_mga.o vid_olivetti_m24.o vid_oti037.c vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
vid_pcjr.o vid_pgc.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_sigma.o vid_stg_ramdac.o vid_svga.o \
vid_svga_render.o vid_t1000.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_voodoo_banshee.o vid_voodoo_banshee_blitter.o \
vid_voodoo_blitter.o vid_voodoo_display.o vid_voodoo_fb.o vid_voodoo_fifo.o vid_voodoo_reg.o \
vid_voodoo_render.o vid_voodoo_setup.o vid_voodoo_texture.o vid_wy700.o video.o vl82c480.o \
vt82c586b.o w83877tf.o w83977tf.o wd76c10.o x86seg.o x87.o x87_timings.o xi8088.c xtide.o zenith.o win-midi.o wx-main.o \
wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o \
wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2.o wx-config.o wx-deviceconfig.o wx-status.o \
wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display-win.o \
wx-sdl2-video-renderer.o wx-sdl2-video-gl3.o wx-glslp-parser.o wx-shader_man.o wx-shaderconfig.o \
wx-joystickconfig.o wx-createdisc.o wx.res
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
MVHDOBJ = cwalk.o libxml2_encoding.o minivhd_convert.o minivhd_create.o minivhd_io.o minivhd_manage.o minivhd_struct_rw.o minivhd_util.o
LIBS = -Wl,--subsystem,windows -mthreads -mwindows -lwxmsw$(WXVERSION)u_xrc -lwxmsw$(WXVERSION)u_html -lwxmsw$(WXVERSION)u_adv -lwxbase$(WXVERSION)u_xml -lwxmsw$(WXVERSION)u_core -lwxbase$(WXVERSION)u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -lcomdlg32 -lwinspool -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lmingw32 -lopengl32 -lopenal32 -lstdc++ -lSDL2main -lSDL2 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
PCem-wx-SDL2.exe: $(OBJ) $(DBOBJ) $(SIDOBJ) $(MVHDOBJ)
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) $(MVHDOBJ) -o "PCem-wx-SDL2.exe" $(LIBS)
strip -s PCem-wx-SDL2.exe
all : PCem-wx-SDL2.exe
clean :
rm *.o
rm PCem-wx-SDL2.exe
rm *.res
wx-resources.o : pc.xrc
-wxrc -c pc.xrc -o wx-resources.cpp
$(CPP) $(CXXFLAGS) -c wx-resources.cpp
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.o : %.cc
$(CPP) $(CXXFLAGS) -c $<
%.o : %.cpp
$(CPP) $(CXXFLAGS) -c $<
wx.res: wx.rc
$(WINDRES) -I$(WXINCLUDE)/../ -i wx.rc --input-format=rc -o wx.res -O coff

View file

@ -0,0 +1,83 @@
VPATH = . dosbox resid-fp minivhd
CPP = g++
CC = gcc
WINDRES = windres.exe
WXVERSION = 31
WXINCLUDE = e:/mingwget/include/wx/
CFLAGS = -O3 -march=i686 -fomit-frame-pointer -msse2 -mstackrealign -Werror -fno-strict-aliasing -DUSE_NETWORKING
CXXFLAGS = $(CFLAGS)
OBJ = 386.o 386_common.o 386_dynarec.o 386_dynarec_ops.o 808x.o 82091aa.o acc2036.o acc2168.o acc3221.o acer386sx.o ali1429.o amstrad.o cassette.o \
cbm_io.o cdrom-ioctl.o cdrom-image.o cmd640.o codegen.o codegen_accumulate.o codegen_allocator.o \
codegen_backend_x86.o codegen_backend_x86_ops.o codegen_backend_x86_ops_fpu.o codegen_backend_x86_ops_sse.o \
codegen_backend_x86_uops.o codegen_block.o codegen_ir.o codegen_ops.o \
codegen_ops_3dnow.o codegen_ops_branch.o codegen_ops_arith.o codegen_ops_fpu_arith.o \
codegen_ops_fpu_constant.o codegen_ops_fpu_loadstore.o codegen_ops_fpu_misc.o codegen_ops_helpers.o codegen_ops_jump.o \
codegen_ops_logic.o codegen_ops_misc.o codegen_ops_mmx_arith.o codegen_ops_mmx_cmp.o \
codegen_ops_mmx_loadstore.o codegen_ops_mmx_logic.o codegen_ops_mmx_pack.o codegen_ops_mmx_shift.o \
codegen_ops_mov.o codegen_ops_shift.o codegen_ops_stack.o codegen_reg.o codegen_timing_486.o \
codegen_timing_686.o codegen_timing_common.o codegen_timing_cyrixiii.o codegen_timing_k6.o codegen_timing_p6.o codegen_timing_pentium.o \
codegen_timing_winchip.o codegen_timing_winchip2.o compaq.o config.o cpu.o cpu_tables.o cs8230.o device.o \
dells200.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o esdi_at.o f82c710_upc.o fdc.o fdc37c665.o fdc37c93x.o fdd.o \
fdi2raw.o gameport.o hdd.o hdd_esdi.o hdd_file.o headland.o i430hx.o i430lx.o i430fx.o i430vx.o i440fx.o i440bx.o ide.o \
ide_atapi.o ide_sff8038i.o intel.o intel_flash.o io.o jim.o joystick_ch_flightstick_pro.o \
joystick_standard.o joystick_sw_pad.o joystick_tm_fcs.o keyboard.o keyboard_amstrad.o keyboard_at.o \
keyboard_olim24.o keyboard_pcjr.o keyboard_xt.o laserxt.o lpt.o lpt_dac.o lpt_dss.o mca.o mcr.o \
mem.o mem_bios.o mfm_at.o mfm_xebec.o model.o mouse.o mouse_msystems.o mouse_ps2.o mouse_serial.o \
mvp3.o neat.o nmi.o nvr.o nvr_tc8521.o olivetti_m24.o opti495.o paths.o pc.o pc87306.o pc87307.o pci.o pic.o \
piix.o piix_pm.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o pzx.o rom.o rtc.o rtc_tc8521.o scamp.o scat.o scsi.o \
scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o scsi_ibm.o scsi_zip.o serial.o sio.o sis496.o sl82c460.o \
sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_azt2316a.o sound_cms.o sound_dbopl.o \
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o \
sound_resid.o sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
sound_ym7128.o soundopenal.o sst39sf010.o superxt.o t1000.o t3100e.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o \
vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o \
vid_cl5429.o vid_colorplus.o vid_compaq_cga.o vid_ddc.o vid_ega.o vid_et4000.o vid_et4000w32.o \
vid_et4000w32i.o vid_genius.o vid_hercules.o vid_ht216.o vid_icd2061.o vid_ics2595.o vid_im1024.o vid_incolor.o vid_mda.o \
vid_mga.o vid_olivetti_m24.o vid_oti037.c vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
vid_pcjr.o vid_pgc.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_sigma.o vid_stg_ramdac.o vid_svga.o \
vid_svga_render.o vid_t1000.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_voodoo_banshee.o vid_voodoo_banshee_blitter.o \
vid_voodoo_blitter.o vid_voodoo_display.o vid_voodoo_fb.o vid_voodoo_fifo.o vid_voodoo_reg.o \
vid_voodoo_render.o vid_voodoo_setup.o vid_voodoo_texture.o vid_wy700.o video.o vl82c480.o \
vt82c586b.o w83877tf.o w83977tf.o wd76c10.o x86seg.o x87.o x87_timings.o xi8088.c xtide.o zenith.o win-midi.o wx-main.o \
wx-config_sel.o wx-dialogbox.o wx-hostconfig.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o \
wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2.o wx-config.o wx-deviceconfig.o wx-status.o \
wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display-win.o \
wx-sdl2-video-renderer.o wx-sdl2-video-gl3.o wx-glslp-parser.o wx-shader_man.o wx-shaderconfig.o \
wx-joystickconfig.o wx-createdisc.o wx.res
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
MVHDOBJ = cwalk.o libxml2_encoding.o minivhd_convert.o minivhd_create.o minivhd_io.o minivhd_manage.o minivhd_struct_rw.o minivhd_util.o
NETOBJ = ne2000.o nethandler.o
LIBS = -Wl,--subsystem,windows -mthreads -mwindows -lwxmsw$(WXVERSION)u_xrc -lwxmsw$(WXVERSION)u_html -lwxmsw$(WXVERSION)u_adv -lwxbase$(WXVERSION)u_xml -lwxmsw$(WXVERSION)u_core -lwxbase$(WXVERSION)u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -lcomdlg32 -lwinspool -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lmingw32 -lopengl32 -lopenal32 -lstdc++ -lSDL2main -lSDL2 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc -lwsock32 -liphlpapi
PCem-wx-SDL2.exe: $(OBJ) $(DBOBJ) $(SIDOBJ) $(MVHDOBJ) $(NETOBJ) libslirp.a
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) $(MVHDOBJ) $(NETOBJ) slirp/libslirp.a -o "PCem-wx-SDL2.exe" $(LIBS)
strip -s PCem-wx-SDL2.exe
libslirp.a:
$(MAKE) -C slirp
all : libslirp.a PCem-wx-SDL2.exe
clean :
rm *.o
rm PCem-wx-SDL2.exe
rm *.res
wx-resources.o : pc.xrc
-wxrc -c pc.xrc -o wx-resources.cpp
$(CPP) $(CXXFLAGS) -c wx-resources.cpp
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.o : %.cc
$(CPP) $(CXXFLAGS) -c $<
%.o : %.cpp
$(CPP) $(CXXFLAGS) -c $<
wx.res: wx.rc
$(WINDRES) -I$(WXINCLUDE)/../ -i wx.rc --input-format=rc -o wx.res -O coff

View file

@ -1,47 +0,0 @@
VPATH = . dosbox resid-fp
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
CFLAGS = -O3 -fomit-frame-pointer -msse2 -Wall -Werror -fno-strict-aliasing
OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad.o cdrom-ioctl.o cdrom-iso.o \
codegen.o codegen_ops.o codegen_timing_486.o codegen_timing_686.o codegen_timing_pentium.o codegen_timing_winchip.o codegen_x86-64.o compaq.o config.o cpu.o dac.o \
device.o disc.o disc_fdi.o disc_img.o disc_sector.o dma.o fdc.o fdc37c665.o fdd.o fdi2raw.o gameport.o hdd.o hdd_esdi.o headland.o i430lx.o i430fx.o \
i430vx.o ide.o intel.o intel_flash.o io.o jim.o joystick_ch_flightstick_pro.o joystick_standard.o joystick_sw_pad.o joystick_tm_fcs.o keyboard.o keyboard_amstrad.o keyboard_at.o \
keyboard_olim24.o keyboard_pcjr.o keyboard_xt.o lpt.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model.o mouse.o mouse_ps2.o \
mouse_serial.o neat.o nmi.o nvr.o olivetti_m24.o opti495.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o \
scat.o serial.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_cms.o sound_dbopl.o \
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o \
soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o win.o win-config.o win-d3d.o win-d3d-fs.o win-ddraw.o \
win-ddraw-fs.o win-deviceconfig.o win-hdconf.o win-joystick.o win-joystickconfig.o win-keyboard.o win-midi.o win-mouse.o \
win-status.o win-video.o x86seg.o x87.o xtide.o pc.res
DBOBJ = dbopl.o vid_cga_comp.o
SIDOBJ = convolve.o convolve-sse.o envelope.o extfilt.o filter.o pot.o sid.o voice.o wave6581__ST.o wave6581_P_T.o wave6581_PS_.o wave6581_PST.o wave8580__ST.o wave8580_P_T.o wave8580_PS_.o wave8580_PST.o wave.o
LIBS = -mwindows -lwinmm -lopenal32 -lddraw -ldinput -ldxguid -ld3d9 -lstdc++
PCem64.exe: $(OBJ) $(DBOBJ) $(SIDOBJ)
$(CC) $(OBJ) $(DBOBJ) $(SIDOBJ) -o "PCem64.exe" $(LIBS)
all : PCem64.exe
clean :
rm *.o
rm *.exe
rm *.res
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.o : %.cc
$(CPP) $(CFLAGS) -c $<
pc.res: pc.rc
$(WINDRES) -i pc.rc --input-format=rc -o pc.res -O coff

102
src/acc2036.c Normal file
View file

@ -0,0 +1,102 @@
#include "ibm.h"
#include "acc2036.h"
#include "io.h"
#include "mem.h"
static struct
{
int reg_idx;
uint8_t regs[256];
} acc2036;
static void acc2036_shadow_recalc()
{
if (acc2036.regs[0x2c] & 8)
{
switch (acc2036.regs[0x22] & 3)
{
case 0:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
break;
case 1:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTERNAL);
break;
case 2:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
break;
case 3:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
break;
}
}
else
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
if (acc2036.regs[0x2c] & 4)
{
switch (acc2036.regs[0x22] & 3)
{
case 0:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
break;
case 1:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTERNAL);
break;
case 2:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
break;
case 3:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
break;
}
}
else
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
}
static void acc2036_write(uint16_t addr, uint8_t val, void *p)
{
if (!(addr & 1))
acc2036.reg_idx = val;
else
{
acc2036.regs[acc2036.reg_idx] = val;
// pclog("Write ACC2036 R%02x %02x %04x:%04x %i\n", acc2036.reg_idx, val, CS,cpu_state.pc, ins);
switch (acc2036.reg_idx)
{
case 0x22:
case 0x2c:
acc2036_shadow_recalc();
break;
case 0x23:
mem_mapping_disable(&ram_remapped_mapping);
if (val & 0x10)
{
if (acc2036.regs[0x2c] & 0xc)
mem_remap_top_256k();
else
mem_remap_top_384k();
}
break;
}
}
}
static uint8_t acc2036_read(uint16_t addr, void *p)
{
if (!(addr & 1))
return acc2036.reg_idx;
if (acc2036.reg_idx >= 0xbc)
return 0xff;
return acc2036.regs[acc2036.reg_idx];
}
void acc2036_init()
{
memset(&acc2036, 0, sizeof(acc2036));
io_sethandler(0x00f2, 0x0002, acc2036_read, NULL, NULL, acc2036_write, NULL, NULL, NULL);
}

1
src/acc2036.h Normal file
View file

@ -0,0 +1 @@
void acc2036_init();

119
src/acc2168.c Normal file
View file

@ -0,0 +1,119 @@
#include "ibm.h"
#include "acc2168.h"
#include "cpu.h"
#include "io.h"
#include "mem.h"
#include "x86.h"
static struct
{
int reg_idx;
uint8_t regs[256];
uint8_t port_62;
} acc2168;
static void acc2168_shadow_recalc()
{
if (acc2168.regs[0x02] & 8)
{
switch (acc2168.regs[0x02] & 0x30)
{
case 0x00:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
break;
case 0x10:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
break;
case 0x20:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
break;
case 0x30:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTERNAL);
break;
}
}
else
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
if (acc2168.regs[0x02] & 4)
{
switch (acc2168.regs[0x02] & 0x30)
{
case 0x00:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
break;
case 0x10:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
break;
case 0x20:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
break;
case 0x30:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTERNAL);
break;
}
}
else
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
}
static void acc2168_write(uint16_t addr, uint8_t val, void *p)
{
// pclog("acc2168_write: addr=%04x val=%02x\n", addr, val);
if (!(addr & 1))
acc2168.reg_idx = val;
else
{
acc2168.regs[acc2168.reg_idx] = val;
// pclog("acc2168_write: idx=%02x val=%02x %04x:%04x\n", acc2168.reg_idx, val, CS,cpu_state.pc);
switch (acc2168.reg_idx)
{
case 0x02:
acc2168_shadow_recalc();
break;
}
}
}
static uint8_t acc2168_read(uint16_t addr, void *p)
{
if (!(addr & 1))
return acc2168.reg_idx;
// pclog("acc2168_read: idx=%02x val=%02x\n", acc2168.reg_idx, acc2168.regs[acc2168.reg_idx]);
return acc2168.regs[acc2168.reg_idx];
}
static uint8_t port78_read(uint16_t addr, void *p)
{
return 0;
}
static uint8_t port92_read(uint16_t addr, void *p)
{
return acc2168.port_62 | 0xfc;
}
static void port92_write(uint16_t addr, uint8_t val, void *p)
{
if ((mem_a20_alt ^ val) & 2)
{
mem_a20_alt = val & 2;
mem_a20_recalc();
}
if ((~acc2168.port_62 & val) & 1)
{
softresetx86();
cpu_set_edx();
}
acc2168.port_62 = val | 0xfC;
}
void acc2168_init()
{
memset(&acc2168, 0, sizeof(acc2168));
io_sethandler(0x00f2, 0x0002, acc2168_read, NULL, NULL, acc2168_write, NULL, NULL, NULL);
io_sethandler(0x0078, 0x0001, port78_read, NULL, NULL, NULL, NULL, NULL, NULL);
io_sethandler(0x0092, 0x0001, port92_read, NULL, NULL, port92_write, NULL, NULL, NULL);
}

1
src/acc2168.h Normal file
View file

@ -0,0 +1 @@
void acc2168_init();

122
src/acc3221.c Normal file
View file

@ -0,0 +1,122 @@
#include "ibm.h"
#include "acc3221.h"
#include "fdc.h"
#include "ide.h"
#include "io.h"
#include "lpt.h"
#include "serial.h"
static struct
{
int reg_idx;
uint8_t regs[256];
} acc3221;
#define REG_BE_LPT1_DISABLE (1 << 4)
#define REG_DB_SERIAL1_DISABLE (1 << 4)
#define REG_DB_SERIAL2_DISABLE (1 << 1)
#define REG_DE_SIRQ3_SOURCE (3 << 6)
#define REG_DE_SIRQ3_SERIAL1 (1 << 6)
#define REG_DE_SIRQ3_SERIAL2 (3 << 6)
#define REG_DE_SIRQ4_SOURCE (3 << 4)
#define REG_DE_SIRQ4_SERIAL1 (1 << 4)
#define REG_DE_SIRQ4_SERIAL2 (3 << 4)
#define REG_FB_FDC_DISABLE (1 << 1)
#define REG_FE_IDE_DISABLE (1 << 1)
static void acc3221_write(uint16_t addr, uint8_t val, void *p)
{
if (!(addr & 1))
acc3221.reg_idx = val;
else
{
acc3221.regs[acc3221.reg_idx] = val;
// pclog("Write ACC2036 R%02x %02x %04x:%04x %i\n", acc2036.reg_idx, val, CS,cpu_state.pc, ins);
if (acc3221.reg_idx >= 0xbc)
{
// pclog("Write ACC3221 R%02x %02x %04x:%04x %i\n", acc3221.reg_idx, val, CS,cpu_state.pc, ins);
fdc_remove();
if (!(acc3221.regs[0xfb] & REG_FB_FDC_DISABLE))
fdc_add();
serial1_remove();
if (!(acc3221.regs[0xdb] & REG_DB_SERIAL1_DISABLE))
{
uint16_t addr = (acc3221.regs[0xdc] & 0x7f) << 2;
if ((acc3221.regs[0xde] & REG_DE_SIRQ3_SOURCE) == REG_DE_SIRQ3_SERIAL1)
{
// pclog("COM1 addr %03x IRQ 3\n", addr);
serial1_set(addr, 3);
}
else if ((acc3221.regs[0xde] & REG_DE_SIRQ4_SOURCE) == REG_DE_SIRQ4_SERIAL1)
{
// pclog("COM1 addr %03x IRQ 4\n", addr);
serial1_set(addr, 4);
}
// else
// pclog("COM1 addr %03x no IRQ\n", addr);
}
// else
// pclog("COM1 disabled\n");
serial2_remove();
if (!(acc3221.regs[0xdb] & REG_DB_SERIAL2_DISABLE))
{
uint16_t addr = (acc3221.regs[0xdd] & 0x7f) << 2;
if ((acc3221.regs[0xde] & REG_DE_SIRQ3_SOURCE) == REG_DE_SIRQ3_SERIAL2)
{
// pclog("COM2 addr %03x IRQ 3\n", addr);
serial2_set(addr, 3);
}
else if ((acc3221.regs[0xde] & REG_DE_SIRQ4_SOURCE) == REG_DE_SIRQ4_SERIAL2)
{
// pclog("COM2 addr %03x IRQ 4\n", addr);
serial2_set(addr, 4);
}
// else
// pclog("COM2 addr %03x no IRQ\n", addr);
}
// else
// pclog("COM2 disabled\n");
lpt1_remove();
lpt2_remove();
if (!(acc3221.regs[0xbe] & REG_BE_LPT1_DISABLE))
{
// pclog("LPT1 addr %03x\n", acc3221.regs[0xbf] << 2);
lpt1_init(acc3221.regs[0xbf] << 2);
}
// else
// pclog("LPT1 disabled\n");
ide_pri_disable();
if (!(acc3221.regs[0xfe] & REG_FE_IDE_DISABLE))
ide_pri_enable();
}
}
}
static uint8_t acc3221_read(uint16_t addr, void *p)
{
if (!(addr & 1))
return acc3221.reg_idx;
if (acc3221.reg_idx < 0xbc)
return 0xff;
return acc3221.regs[acc3221.reg_idx];
}
void acc3221_init()
{
memset(&acc3221, 0, sizeof(acc3221));
io_sethandler(0x00f2, 0x0002, acc3221_read, NULL, NULL, acc3221_write, NULL, NULL, NULL);
}

1
src/acc3221.h Normal file
View file

@ -0,0 +1 @@
void acc3221_init();

View file

@ -1,22 +1,92 @@
#include "ibm.h"
#include "device.h"
#include "io.h"
#include "cpu.h"
#include "lpt.h"
#include "mem.h"
#include "serial.h"
#include "vid_oti067.h"
#include "acer386sx.h"
static int acer_index = 0;
static uint8_t acer_regs[256];
static uint8_t acer_last_write;
static int acer_locked;
static void *acer_oti067;
void acer386sx_set_oti067(void *oti067)
{
acer_oti067 = oti067;
}
void acer386sx_write(uint16_t addr, uint8_t val, void *priv)
{
if (addr & 1)
acer_regs[acer_index] = val;
{
if (acer_locked)
{
if (acer_last_write == 0x14 && val == 0x09)
acer_locked = 0;
acer_last_write = val;
return;
}
if (acer_index == 0xff && val == 0xff)
acer_locked = 1;
else
{
pclog("Write ACER reg %02x %02x %08x\n", acer_index, val, cs);
acer_regs[acer_index] = val;
switch (acer_index)
{
case 0xa:
switch ((val >> 4) & 3)
{
case 0:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
break;
case 1:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTERNAL);
break;
case 2:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
break;
case 3:
mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
break;
}
break;
case 0xb:
switch ((val >> 4) & 3)
{
case 0:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
break;
case 1:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTERNAL);
break;
case 2:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
break;
case 3:
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
break;
}
break;
}
}
}
else
acer_index = val;
acer_index = val;
}
uint8_t acer386sx_read(uint16_t addr, void *priv)
{
if (acer_locked)
return 0xff;
if (addr & 1)
{
if ((acer_index >= 0xc0 || acer_index == 0x20) && cpu_iscyrix)
@ -27,7 +97,60 @@ uint8_t acer386sx_read(uint16_t addr, void *priv)
return acer_index;
}
static uint8_t acer386sx_37f = 0, acer386sx_io = 0;
void acer386sx_io_write(uint16_t addr, uint8_t val, void *priv)
{
switch (addr)
{
case 0x37f:
acer386sx_37f = val;
if (val & 4)
oti067_enable_disable(acer_oti067, 0);
else
oti067_enable_disable(acer_oti067, 1);
break;
case 0x3f3:
acer386sx_io = val;
serial1_remove();
serial2_remove();
lpt1_remove();
lpt2_remove();
switch (val & 3)
{
case 0: lpt1_init(0x378); break;
case 1: lpt1_init(0x3bc); break;
case 2: lpt1_init(0x278); break;
}
if (!(val & 0x04))
serial1_set(0x3f8, 4);
if (!(val & 0x08))
serial2_set(0x2f8, 3);
break;
}
}
uint8_t acer386sx_io_read(uint16_t addr, void *priv)
{
switch (addr)
{
case 0x37f:
return acer386sx_37f;
case 0x3f3:
return acer386sx_io;
}
return 0xff;
}
void acer386sx_init()
{
io_sethandler(0x0022, 0x0002, acer386sx_read, NULL, NULL, acer386sx_write, NULL, NULL, NULL);
io_sethandler(0x037f, 0x0001, acer386sx_io_read, NULL, NULL, acer386sx_io_write, NULL, NULL, NULL);
io_sethandler(0x03f3, 0x0001, acer386sx_io_read, NULL, NULL, acer386sx_io_write, NULL, NULL, NULL);
acer386sx_io = 0;
acer386sx_37f = 0;
}

View file

@ -1 +1,2 @@
void acer386sx_init();
void acer386sx_set_oti067(void *oti067);

View file

@ -55,8 +55,6 @@ void ali1429_write(uint16_t port, uint8_t val, void *priv)
ali1429_recalc();
break;
case 0x14:
shadowbios = val & 1;
shadowbios_write = val & 2;
ali1429_recalc();
break;
}

View file

@ -1,265 +0,0 @@
#include "ibm.h"
#include "device.h"
#include "allegro-main.h"
#include "allegro-gui.h"
#include "config.h"
#undef printf
typedef struct config_t
{
char name[512];
struct config_t *next;
} config_t;
static config_t *config_head;
static char *get_config(int nr);
static int get_config_nr();
static void free_configs();
static void populate_configs();
static char *list_proc_joystick(int index, int *list_size)
{
int c = 0;
config_t *config = config_head;
if (index < 0)
{
while (config)
{
c++;
config = config->next;
}
*list_size = c;
return NULL;
}
for (; c < index; c++)
{
if (!config)
return NULL;
config = config->next;
}
if (!config)
return NULL;
return config->name;
// return joystick_list[index].name;
}
static char config_name[256];
static DIALOG new_config_dialog[] =
{
{d_shadow_box_proc, 0, 0, 480,80,0,0xffffff,0,0, 0,0,0,0,0}, // 0
{d_button_proc, 240-148, 56, 144, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "OK", 0, 0}, // 1
{d_button_proc, 240+4, 56, 144, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Cancel", 0, 0}, // 2
{d_edit_proc, 8, 32, 464, 16, 0, 0xffffff, 0, 0, 255, 0, config_name, 0, 0}, // 3
{d_text_proc, 240-29*4, 16, 29*8, 16, 0, 0xffffff, 0, 0, 255, 0, "Please type new config name :", 0, 0},
{0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL}
};
static int new_proc(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_CLOSE)
{
int c;
config_name[0] = 0;
new_config_dialog[3].d2 = 0;
position_dialog(new_config_dialog, SCREEN_W/2 - new_config_dialog[0].w/2, SCREEN_H/2 - new_config_dialog[0].h/2);
c = popup_dialog(new_config_dialog, 1);
position_dialog(new_config_dialog, -(SCREEN_W/2 - new_config_dialog[0].w/2), -(SCREEN_H/2 - new_config_dialog[0].h/2));
if (c == 1)
{
sprintf(config_file_default, "%sconfigs/%s.cfg", pcempath, config_name);
c = settings_configure();
free_configs();
populate_configs();
return c;
}
return D_O_K;
}
return ret;
}
static int config_proc(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_CLOSE)
{
char *name = get_config(get_config_nr());
if (name)
{
sprintf(config_file_default, "%sconfigs/%s.cfg", pcempath, name);
loadconfig(NULL);
return settings_configure();
}
return D_O_K;
}
return ret;
}
static int hdd_proc(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_CLOSE)
{
char *name = get_config(get_config_nr());
if (name)
{
sprintf(config_file_default, "%sconfigs/%s.cfg", pcempath, name);
loadconfig(NULL);
return disc_hdconf();
}
return D_O_K;
}
return ret;
}
static DIALOG config_sel_dialog[] =
{
{d_shadow_box_proc, 0, 0, 568,372,0,0xffffff,0,0, 0,0,0,0,0}, // 0
{d_button_proc, 416, 8, 144, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Load", 0, 0}, // 1
{d_button_proc, 416, 348, 144, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Quit", 0, 0}, // 2
{new_proc, 416, 56, 144, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "New...", 0, 0}, // 3
{config_proc, 416, 80, 144, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Configure...", 0, 0}, // 4
{hdd_proc, 416, 104, 144, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "HDD...", 0, 0}, // 5
{d_list_proc, 8, 8, 400, 356, 0, 0xffffff, 0, 0, 0, 0, list_proc_joystick, 0, 0}, // 6
{0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL}
};
static int get_config_nr()
{
return config_sel_dialog[6].d1;
}
static void populate_configs()
{
struct al_ffblk info;
char cfg[512];
config_t *config = NULL;
strcpy(cfg, pcempath);
strcat(cfg, "/configs/*.cfg");
printf("cfg %s\n", cfg);
if (al_findfirst(cfg, &info, FA_ALL))
return;
do
{
config_t *old_config = config;
char *ext;
config = malloc(sizeof(config_t));
if (old_config)
old_config->next = config;
else
config_head = config;
config->next = 0;
strcpy(config->name, info.name);
ext = get_extension(config->name);
if (ext && ext[0])
{
ext--;
*ext = 0;
}
printf("Found %s\n", info.name);
} while (al_findnext(&info) == 0);
al_findclose(&info);
}
static char *get_config(int nr)
{
config_t *config = config_head;
int c;
for (c = 0; c < nr; c++)
{
if (!config)
return NULL;
config = config->next;
}
if (!config)
return NULL;
return config->name;
}
static void free_configs()
{
config_t *config = config_head;
while (config)
{
config_t *old_config = config;
config = config->next;
free(old_config);
}
}
int config_sel()
{
populate_configs();
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
while (1)
{
int c;
position_dialog(config_sel_dialog, SCREEN_W/2 - config_sel_dialog[0].w/2, SCREEN_H/2 - config_sel_dialog[0].h/2);
c = popup_dialog(config_sel_dialog, 1);
position_dialog(config_sel_dialog, -(SCREEN_W/2 - config_sel_dialog[0].w/2), -(SCREEN_H/2 - config_sel_dialog[0].h/2));
if (c == 1)
{
char *name = get_config(config_sel_dialog[6].d1);
if (name)
{
sprintf(config_file_default, "%sconfigs/%s.cfg", pcempath, name);
pclog("config_file_default=%s\n", config_file_default);
free_configs();
return 0;
}
}
if (c == 2)
return 1;
}
free_configs();
return 1;
}

View file

@ -1,837 +0,0 @@
#include "ibm.h"
#include "device.h"
#include "allegro-main.h"
#include "allegro-gui.h"
#include "cpu.h"
#include "fdd.h"
#include "gameport.h"
#include "hdd.h"
#include "mem.h"
#include "model.h"
#include "mouse.h"
#include "sound.h"
#include "video.h"
#include "vid_voodoo.h"
static int romstolist[ROM_MAX];
static int settings_mouse_to_list[20], settings_list_to_mouse[20];
typedef struct allegro_list_t
{
char name[256];
int num;
} allegro_list_t;
typedef struct allegro_list_str_t
{
char name[256];
char *internal_name;
} allegro_list_str_t;
static allegro_list_t model_list[ROM_MAX+1];
static allegro_list_t video_list[GFX_MAX+1];
static allegro_list_t sound_list[GFX_MAX+1];
static allegro_list_t cpumanu_list[4];
static allegro_list_t cpu_list[32];
static allegro_list_t joystick_list[32];
static allegro_list_t mouse_list[32];
static allegro_list_str_t hdd_list[32];
static char mem_size_str[10], mem_size_units[3];
static allegro_list_t vidspeed_list[] =
{
{"8-bit", 0},
{"Slow 16-bit", 1},
{"Fast 16-bit", 2},
{"Slow VLB/PCI", 3},
{"Mid VLB/PCI", 4},
{"Fast VLB/PCI", 5},
{"", -1}
};
static allegro_list_t fdd_list[] =
{
{"None", 0},
{"5.25\" 360k", 1},
{"5.25\" 1.2M", 2},
{"5.25\" 1.2M Dual RPM", 3},
{"3.5\" 720k", 4},
{"3.5\" 1.44M", 5},
{"3.5\" 1.44M 3-Mode", 6},
{"3.5\" 2.88M", 7},
{"", -1}
};
static allegro_list_t waitstate_list[] =
{
{"System default", 0},
{"0 W/S", 1},
{"1 W/S", 2},
{"2 W/S", 3},
{"3 W/S", 4},
{"4 W/S", 5},
{"5 W/S", 6},
{"6 W/S", 7},
{"7 W/S", 8},
{"", -1}
};
static void reset_list();
static char *list_proc_model(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (model_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return model_list[index].name;
}
static char *list_proc_video(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (video_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return video_list[index].name;
}
static char *list_proc_vidspeed(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (vidspeed_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return vidspeed_list[index].name;
}
static char *list_proc_sound(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (sound_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return sound_list[index].name;
}
static char *list_proc_cpumanu(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (cpumanu_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return cpumanu_list[index].name;
}
static char *list_proc_cpu(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (cpu_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return cpu_list[index].name;
}
static char *list_proc_hdd(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (hdd_list[c].internal_name)
c++;
*list_size = c;
return NULL;
}
return hdd_list[index].name;
}
static char *list_proc_fdd(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (fdd_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return fdd_list[index].name;
}
static char *list_proc_joystick(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (joystick_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return joystick_list[index].name;
}
static char *list_proc_mouse(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (mouse_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return mouse_list[index].name;
}
static char *list_proc_ws(int index, int *list_size)
{
if (index < 0)
{
int c = 0;
while (waitstate_list[c].name[0])
c++;
*list_size = c;
return NULL;
}
return waitstate_list[index].name;
}
static int voodoo_config_proc(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_CLOSE)
{
deviceconfig_open(&voodoo_device);
return D_O_K;
}
return ret;
}
static int model_config_proc(int msg, DIALOG *d, int c);
static int video_config_proc(int msg, DIALOG *d, int c);
static int sound_config_proc(int msg, DIALOG *d, int c);
static int list_proc(int msg, DIALOG *d, int c);
static DIALOG configure_dialog[] =
{
{d_shadow_box_proc, 0, 0, 568,372,0,0xffffff,0,0, 0,0,0,0,0}, // 0
{d_button_proc, 226, 348, 50, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "OK", 0, 0}, // 1
{d_button_proc, 296, 348, 50, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Cancel", 0, 0}, // 2
{list_proc, 70*2, 12, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_model, 0, 0},
{list_proc, 70*2, 32, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_video, 0, 0},
{list_proc, 70*2, 52, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_cpumanu, 0, 0}, //5
{list_proc, 70*2, 72, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_cpu, 0, 0},
{d_list_proc, 70*2, 132, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_vidspeed, 0, 0}, //7
{list_proc, 70*2, 152, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_sound, 0, 0}, //8
{d_edit_proc, 70*2, 276, 32, 14, 0, 0xffffff, 0, 0, 3, 0, mem_size_str, 0, 0},
{d_text_proc, 98*2, 276, 40, 10, 0, 0xffffff, 0, 0, 0, 0, mem_size_units, 0, 0},
{d_check_proc, 14*2, 292, 118*2, 10, 0, 0xffffff, 0, 0, 0, 0, "CMS / Game Blaster", 0, 0},
{d_check_proc, 14*2, 308, 118*2, 10, 0, 0xffffff, 0, 0, 0, 0, "Gravis Ultrasound", 0, 0},
{d_check_proc, 14*2, 324, 118*2, 10, 0, 0xffffff, 0, 0, 0, 0, "Innovation SSI-2001", 0, 0},
{d_check_proc, 14*2, 336, 118*2, 10, 0, 0xffffff, 0, 0, 0, 0, "Voodoo Graphics", 0, 0}, //14
{d_text_proc, 16*2, 16, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Machine :", 0, 0},
{d_text_proc, 16*2, 36, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Video :", 0, 0},
{d_text_proc, 16*2, 56, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "CPU type :", 0, 0},
{d_text_proc, 16*2, 76, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "CPU :", 0, 0},
{d_text_proc, 16*2, 136, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Video speed :", 0, 0},
{d_text_proc, 16*2, 156, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Soundcard :", 0, 0},
{d_text_proc, 16*2, 276, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Memory :", 0, 0},
{d_check_proc, 14*2, 92, 118*2, 10, 0, 0xffffff, 0, 0, 0, 0, "Dynamic Recompiler", 0, 0},
{d_text_proc, 16*2, 196, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Drive A: :", 0, 0},
{d_text_proc, 16*2, 216, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Drive B: :", 0, 0},
{d_list_proc, 70*2, 192, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_fdd, 0, 0}, //25
{d_list_proc, 70*2, 212, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_fdd, 0, 0},
{video_config_proc, 452, 36, 100, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "Configure...", 0, 0}, //27
{sound_config_proc, 452, 156, 100, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "Configure...", 0, 0},
{voodoo_config_proc, 452, 336, 100, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "Configure...", 0, 0},
{d_text_proc, 16*2, 236, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Joystick :", 0, 0},
{d_list_proc, 70*2, 232, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_joystick, 0, 0}, //31
{d_text_proc, 16*2, 256, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Mouse :", 0, 0},
{d_list_proc, 70*2, 252, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_mouse, 0, 0}, //33
{model_config_proc, 452, 12, 100, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "Configure...", 0, 0},
{d_text_proc, 16*2, 116, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "Waitstates :", 0, 0},
{d_list_proc, 70*2, 112, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_ws, 0, 0}, //36
{d_text_proc, 16*2, 176, 40, 10, 0, 0xffffff, 0, 0, 0, 0, "HDD :", 0, 0},
{d_list_proc, 70*2, 172, 152*2, 20, 0, 0xffffff, 0, 0, 0, 0, list_proc_hdd, 0, 0}, //38
{0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL}
};
static void update_hdd_list(int model, int use_selected_hdd)
{
memset(hdd_list, 0, sizeof(hdd_list));
if (models[model].flags & MODEL_HAS_IDE)
{
strcpy(hdd_list[0].name, "Internal IDE");
hdd_list[0].internal_name = "internal_ide";
}
else
{
int c = 0, d = 0;
char old_name[16];
if (use_selected_hdd)
{
c = configure_dialog[38].d1;
if (c != -1 && hdd_list[c].internal_name)
strncpy(old_name, hdd_list[c].internal_name, sizeof(old_name)-1);
else
strcpy(old_name, "none");
}
else
strncpy(old_name, hdd_controller_name, sizeof(old_name)-1);
configure_dialog[38].d1 = 0;
pclog("HDD list %i\n", model);
c = 0;
while (1)
{
char *s = hdd_controller_get_name(c);
if (s[0] == 0)
break;
if ((((hdd_controller_get_flags(c) & DEVICE_AT) && !(models[model].flags & MODEL_AT)) ||
(hdd_controller_get_flags(c) & DEVICE_MCA) != (models[model].flags & MODEL_MCA)) && c)
{
pclog("Skip %i 1 %s\n", c, s);
c++;
continue;
}
if (!hdd_controller_available(c))
{
pclog("Skip %i 2 %s\n", c, s);
c++;
continue;
}
strcpy(hdd_list[d].name, s);
hdd_list[d].internal_name = hdd_controller_get_internal_name(c);
if (!strcmp(old_name, hdd_list[d].internal_name))
configure_dialog[38].d1 = d;
c++;
d++;
}
}
}
static int mouse_valid(int type, int model)
{
if ((type & MOUSE_TYPE_IF_MASK) == MOUSE_TYPE_PS2 && !(models[model].flags & MODEL_PS2))
return 0;
if ((type & MOUSE_TYPE_IF_MASK) == MOUSE_TYPE_AMSTRAD && !(models[model].flags & MODEL_AMSTRAD))
return 0;
if ((type & MOUSE_TYPE_IF_MASK) == MOUSE_TYPE_OLIM24 && !(models[model].flags & MODEL_OLIM24))
return 0;
return 1;
}
static void update_mouse_list()
{
int sel_model = model_list[configure_dialog[3].d1].num;
int c = 0, d = 0;
int new_mouse = settings_list_to_mouse[configure_dialog[33].d1];
while (mouse_get_name(c))
{
int type = mouse_get_type(c);
settings_mouse_to_list[c] = d;
if (mouse_valid(type, sel_model))
{
strcpy(mouse_list[d].name, mouse_get_name(c));
settings_list_to_mouse[d] = c;
d++;
}
c++;
}
mouse_list[d].name[0] = 0;
if (mouse_valid(mouse_get_type(new_mouse), sel_model))
configure_dialog[33].d1 = settings_mouse_to_list[new_mouse];
else
configure_dialog[33].d1 = 0;
}
static int list_proc(int msg, DIALOG *d, int c)
{
int old = d->d1;
int ret = d_list_proc(msg, d, c);
if (d->d1 != old)
{
int new_model = model_list[configure_dialog[3].d1].num;
int new_cpu_m = configure_dialog[5].d1;
int new_cpu = configure_dialog[6].d1;
int new_dynarec = configure_dialog[22].flags & D_SELECTED;
int new_gfxcard = video_old_to_new(video_list[configure_dialog[4].d1].num);
int new_mem_size;
int cpu_flags, cpu_type;
reset_list();
if (models[new_model].fixed_gfxcard)
configure_dialog[4].flags |= D_DISABLED;
else
configure_dialog[4].flags &= ~D_DISABLED;
cpu_flags = models[new_model].cpu[new_cpu_m].cpus[new_cpu].cpu_flags;
configure_dialog[22].flags = (((cpu_flags & CPU_SUPPORTS_DYNAREC) && new_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC)) ? D_SELECTED : 0;
if (!(cpu_flags & CPU_SUPPORTS_DYNAREC) || (cpu_flags & CPU_REQUIRES_DYNAREC))
configure_dialog[22].flags |= D_DISABLED;
sscanf(mem_size_str, "%i", &new_mem_size);
new_mem_size &= ~(models[new_model].ram_granularity - 1);
if (new_mem_size < models[new_model].min_ram)
new_mem_size = models[new_model].min_ram;
else if (new_mem_size > models[new_model].max_ram)
new_mem_size = models[new_model].max_ram;
sprintf(mem_size_str, "%i", new_mem_size);
if (models[new_model].flags & MODEL_AT)
sprintf(mem_size_units, "MB");
else
sprintf(mem_size_units, "kB");
if (!video_card_has_config(new_gfxcard))
configure_dialog[27].flags |= D_DISABLED;
else
configure_dialog[27].flags &= ~D_DISABLED;
if (!sound_card_has_config(configure_dialog[9].d1))
configure_dialog[28].flags |= D_DISABLED;
else
configure_dialog[28].flags &= ~D_DISABLED;
update_mouse_list();
if (!model_getdevice(new_model))
configure_dialog[34].flags |= D_DISABLED;
else
configure_dialog[34].flags &= ~D_DISABLED;
cpu_type = models[new_model].cpu[new_cpu_m].cpus[new_cpu].cpu_type;
if (cpu_type < CPU_286 || cpu_type > CPU_386DX)
configure_dialog[36].flags |= D_DISABLED;
else
configure_dialog[36].flags &= ~D_DISABLED;
update_hdd_list(new_model, 1);
return D_REDRAW;
}
return ret;
}
static int video_config_proc(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_CLOSE)
{
int new_gfxcard = video_old_to_new(video_list[configure_dialog[4].d1].num);
deviceconfig_open(video_card_getdevice(new_gfxcard));
return D_O_K;
}
return ret;
}
static int sound_config_proc(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_CLOSE)
{
int new_sndcard = sound_list[configure_dialog[8].d1].num;
deviceconfig_open(sound_card_getdevice(new_sndcard));
return D_O_K;
}
return ret;
}
static int model_config_proc(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_CLOSE)
{
int model = model_list[configure_dialog[3].d1].num;
deviceconfig_open(model_getdevice(model));
return D_O_K;
}
return ret;
}
static void reset_list()
{
int model = model_list[configure_dialog[3].d1].num;
int cpumanu = configure_dialog[5].d1;
int cpu = configure_dialog[6].d1;
int c;
memset(cpumanu_list, 0, sizeof(cpumanu_list));
memset(cpu_list, 0, sizeof(cpu_list));
c = 0;
while (models[model].cpu[c].cpus != NULL && c < 3)
{
strcpy(cpumanu_list[c].name, models[model].cpu[c].name);
cpumanu_list[c].num = c;
c++;
}
if (cpumanu >= c)
cpumanu = configure_dialog[6].d1 = c-1;
c = 0;
while (models[model].cpu[cpumanu].cpus[c].cpu_type != -1)
{
strcpy(cpu_list[c].name, models[model].cpu[cpumanu].cpus[c].name);
cpu_list[c].num = c;
c++;
}
if (cpu >= c)
cpu = configure_dialog[7].d1 = c-1;
}
int settings_configure()
{
int c, d;
int cpu_flags;
memset(model_list, 0, sizeof(model_list));
memset(video_list, 0, sizeof(video_list));
memset(sound_list, 0, sizeof(sound_list));
for (c = 0; c < ROM_MAX; c++)
romstolist[c] = 0;
c = d = 0;
while (models[c].id != -1)
{
pclog("INITDIALOG : %i %i %i\n",c,models[c].id,romspresent[models[c].id]);
if (romspresent[models[c].id])
{
strcpy(model_list[d].name, models[c].name);
model_list[d].num = c;
if (c == model)
configure_dialog[3].d1 = d;
d++;
}
c++;
}
if (models[model].fixed_gfxcard)
configure_dialog[4].flags |= D_DISABLED;
else
configure_dialog[4].flags &= ~D_DISABLED;
c = d = 0;
while (1)
{
char *s = video_card_getname(c);
if (!s[0])
break;
pclog("video_card_available : %i\n", c);
if (video_card_available(c))
{
strcpy(video_list[d].name, video_card_getname(c));
video_list[d].num = video_new_to_old(c);
if (video_new_to_old(c) == gfxcard)
configure_dialog[4].d1 = d;
d++;
}
c++;
}
if (!video_card_has_config(video_old_to_new(gfxcard)))
configure_dialog[27].flags |= D_DISABLED;
else
configure_dialog[27].flags &= ~D_DISABLED;
c = d = 0;
while (1)
{
char *s = sound_card_getname(c);
if (!s[0])
break;
if (sound_card_available(c))
{
strcpy(sound_list[d].name, sound_card_getname(c));
sound_list[d].num = c;
if (c == sound_card_current)
configure_dialog[8].d1 = d;
d++;
}
c++;
}
c = 0;
while (joystick_get_name(c))
{
strcpy(joystick_list[c].name, joystick_get_name(c));
if (c == joystick_type)
configure_dialog[31].d1 = c;
c++;
}
configure_dialog[33].d1 = 0;
update_mouse_list();
configure_dialog[33].d1 = settings_mouse_to_list[mouse_type];
update_hdd_list(model, 0);
if (!sound_card_has_config(configure_dialog[8].d1))
configure_dialog[28].flags |= D_DISABLED;
else
configure_dialog[28].flags &= ~D_DISABLED;
configure_dialog[5].d1 = cpu_manufacturer;
configure_dialog[6].d1 = cpu;
configure_dialog[7].d1 = video_speed;
configure_dialog[36].d1 = cpu_waitstates;
reset_list();
// strcpy(cpumanu_str, models[romstomodel[romset]].cpu[cpu_manufacturer].name);
// strcpy(cpu_str, models[romstomodel[romset]].cpu[cpu_manufacturer].cpus[cpu].name);
// strcpy(cache_str, cache_str_list[cache]);
// strcpy(vidspeed_str, vidspeed_str_list[video_speed]);
// strcpy(soundcard_str, sound_card_getname(sound_card_current));
if (GAMEBLASTER)
configure_dialog[11].flags |= D_SELECTED;
else
configure_dialog[11].flags &= ~D_SELECTED;
if (GUS)
configure_dialog[12].flags |= D_SELECTED;
else
configure_dialog[12].flags &= ~D_SELECTED;
if (SSI2001)
configure_dialog[13].flags |= D_SELECTED;
else
configure_dialog[13].flags &= ~D_SELECTED;
if (voodoo_enabled)
configure_dialog[14].flags |= D_SELECTED;
else
configure_dialog[14].flags &= ~D_SELECTED;
if (models[model].flags & MODEL_AT)
sprintf(mem_size_str, "%i", mem_size / 1024);
else
sprintf(mem_size_str, "%i", mem_size);
if (models[model].flags & MODEL_AT)
sprintf(mem_size_units, "MB");
else
sprintf(mem_size_units, "kB");
if (!model_getdevice(model))
configure_dialog[34].flags |= D_DISABLED;
else
configure_dialog[34].flags &= ~D_DISABLED;
cpu_flags = models[model].cpu[cpu_manufacturer].cpus[cpu].cpu_flags;
configure_dialog[22].flags = (((cpu_flags & CPU_SUPPORTS_DYNAREC) && cpu_use_dynarec) || (cpu_flags & CPU_REQUIRES_DYNAREC)) ? D_SELECTED : 0;
if (!(cpu_flags & CPU_SUPPORTS_DYNAREC) || (cpu_flags & CPU_REQUIRES_DYNAREC))
configure_dialog[22].flags |= D_DISABLED;
configure_dialog[25].d1 = fdd_get_type(0);
configure_dialog[26].d1 = fdd_get_type(1);
while (1)
{
position_dialog(configure_dialog, SCREEN_W/2 - configure_dialog[0].w/2, SCREEN_H/2 - configure_dialog[0].h/2);
c = popup_dialog(configure_dialog, 1);
position_dialog(configure_dialog, -(SCREEN_W/2 - configure_dialog[0].w/2), -(SCREEN_H/2 - configure_dialog[0].h/2));
if (c == 1)
{
int new_model = model_list[configure_dialog[3].d1].num;
int new_gfxcard = video_list[configure_dialog[4].d1].num;
int new_sndcard = sound_list[configure_dialog[8].d1].num;
int new_cpu_m = configure_dialog[5].d1;
int new_cpu = configure_dialog[6].d1;
int new_mem_size;
int new_has_fpu = (models[new_model].cpu[new_cpu_m].cpus[new_cpu].cpu_type >= CPU_i486DX) ? 1 : 0;
int new_GAMEBLASTER = (configure_dialog[11].flags & D_SELECTED) ? 1 : 0;
int new_GUS = (configure_dialog[12].flags & D_SELECTED) ? 1 : 0;
int new_SSI2001 = (configure_dialog[13].flags & D_SELECTED) ? 1 : 0;
int new_voodoo = (configure_dialog[14].flags & D_SELECTED) ? 1 : 0;
int new_dynarec = (configure_dialog[22].flags & D_SELECTED) ? 1 : 0;
int new_fda = configure_dialog[25].d1;
int new_fdb = configure_dialog[26].d1;
int new_mouse = settings_list_to_mouse[configure_dialog[33].d1];
int new_hdd = configure_dialog[38].d1;
sscanf(mem_size_str, "%i", &new_mem_size);
new_mem_size &= ~(models[new_model].ram_granularity - 1);
if (new_mem_size < models[new_model].min_ram)
new_mem_size = models[new_model].min_ram;
else if (new_mem_size > models[new_model].max_ram)
new_mem_size = models[new_model].max_ram;
if (models[new_model].flags & MODEL_AT)
new_mem_size *= 1024;
if (new_model != model || new_gfxcard != gfxcard || new_mem_size != mem_size ||
new_has_fpu != hasfpu || new_GAMEBLASTER != GAMEBLASTER || new_GUS != GUS ||
new_SSI2001 != SSI2001 || new_sndcard != sound_card_current || new_voodoo != voodoo_enabled ||
new_dynarec != cpu_use_dynarec || new_fda != fdd_get_type(0) || new_fdb != fdd_get_type(1) ||
new_mouse != mouse_type || strncmp(hdd_list[new_hdd].internal_name, hdd_controller_name, sizeof(hdd_controller_name)-1))
{
if (has_been_inited && alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) != 1)
continue;
model = new_model;
romset = model_getromset();
gfxcard = new_gfxcard;
mem_size = new_mem_size;
cpu_manufacturer = new_cpu_m;
cpu = new_cpu;
GAMEBLASTER = new_GAMEBLASTER;
GUS = new_GUS;
SSI2001 = new_SSI2001;
sound_card_current = new_sndcard;
voodoo_enabled = new_voodoo;
cpu_use_dynarec = new_dynarec;
mouse_type = new_mouse;
if (hdd_list[new_hdd].internal_name)
strncpy(hdd_controller_name, hdd_list[new_hdd].internal_name, sizeof(hdd_controller_name)-1);
else
strcpy(hdd_controller_name, "none");
mem_resize();
loadbios();
resetpchard();
fdd_set_type(0, new_fda);
fdd_set_type(1, new_fdb);
}
video_speed = configure_dialog[7].d1;
cpu_manufacturer = new_cpu_m;
cpu = new_cpu;
cpu_set();
cpu_waitstates = configure_dialog[36].d1;
cpu_update_waitstates();
joystick_type = configure_dialog[31].d1;
gameport_update_joystick_type();
saveconfig(NULL);
speedchanged();
return D_O_K;
}
if (c == 2)
return D_O_K;
}
return D_O_K;
}

View file

@ -1,303 +0,0 @@
#include "ibm.h"
#include "device.h"
#include "allegro-main.h"
#include "allegro-gui.h"
#include "config.h"
static device_t *config_device;
#define MAX_CONFIG_SIZE 64
#define MAX_CONFIG_SELECTIONS 8
static device_config_selection_t *config_selections[MAX_CONFIG_SELECTIONS];
#define list_proc_device_func(i) \
static char *list_proc_device_ ## i(int index, int *list_size) \
{ \
device_config_selection_t *config = config_selections[i]; \
\
if (index < 0) \
{ \
int c = 0; \
\
while (config[c].description[0]) \
c++; \
\
*list_size = c; \
return NULL; \
} \
\
return config[index].description; \
}
list_proc_device_func(0)
list_proc_device_func(1)
list_proc_device_func(2)
list_proc_device_func(3)
list_proc_device_func(4)
list_proc_device_func(5)
list_proc_device_func(6)
list_proc_device_func(7)
static DIALOG deviceconfig_dialog[MAX_CONFIG_SIZE] =
{
{d_shadow_box_proc, 0, 0, 568,332,0,0xffffff,0,0, 0,0,0,0,0} // 0
};
void deviceconfig_open(device_t *device)
{
DIALOG *d;
device_config_t *config = device->config;
int y = 10;
int dialog_pos = 1;
int list_pos = 0;
int c;
int id_ok, id_cancel;
memset((void *)((uintptr_t)deviceconfig_dialog) + sizeof(DIALOG), 0, sizeof(deviceconfig_dialog) - sizeof(DIALOG));
deviceconfig_dialog[0].x = deviceconfig_dialog[0].y = 0;
while (config->type != -1)
{
d = &deviceconfig_dialog[dialog_pos];
switch (config->type)
{
case CONFIG_BINARY:
d->x = 32;
d->y = y;
d->w = 118*2;
d->h = 15;
d->dp = config->description;
d->proc = d_check_proc;
d->flags = config_get_int(CFG_MACHINE, device->name, config->name, config->default_int) ? D_SELECTED : 0;
d->bg = 0xffffff;
d->fg = 0;
dialog_pos++;
y += 20;
break;
case CONFIG_SELECTION:
if (list_pos >= MAX_CONFIG_SELECTIONS)
break;
d->x = 32;
d->y = y;
d->w = 80;
d->h = 15;
d->dp = config->description;
d->proc = d_text_proc;
d->flags = 0;
d->bg = 0xffffff;
d->fg = 0;
d++;
d->x = 250;
d->y = y;
d->w = 304;
d->h = 20;
switch (list_pos)
{
case 0 : d->dp = list_proc_device_0; break;
case 1 : d->dp = list_proc_device_1; break;
case 2 : d->dp = list_proc_device_2; break;
case 3 : d->dp = list_proc_device_3; break;
case 4 : d->dp = list_proc_device_4; break;
case 5 : d->dp = list_proc_device_5; break;
case 6 : d->dp = list_proc_device_6; break;
case 7 : d->dp = list_proc_device_7; break;
}
d->proc = d_list_proc;
d->flags = 0;
d->bg = 0xffffff;
d->fg = 0;
config_selections[list_pos++] = config->selection;
c = 0;
while (config->selection[c].description[0])
{
if (config_get_int(CFG_MACHINE, device->name, config->name, config->default_int) == config->selection[c].value)
d->d1 = c;
c++;
}
dialog_pos += 2;
y += 20;
break;
case CONFIG_MIDI:
break;
}
config++;
if (dialog_pos >= MAX_CONFIG_SIZE-3)
break;
}
d = &deviceconfig_dialog[dialog_pos];
id_ok = dialog_pos;
id_cancel = dialog_pos + 1;
d->x = 226;
d->y = y+8;
d->w = 50;
d->h = 16;
d->dp = "OK";
d->proc = d_button_proc;
d->flags = D_EXIT;
d->bg = 0xffffff;
d->fg = 0;
d++;
d->x = 296;
d->y = y+8;
d->w = 50;
d->h = 16;
d->dp = "Cancel";
d->proc = d_button_proc;
d->flags = D_EXIT;
d->bg = 0xffffff;
d->fg = 0;
deviceconfig_dialog[0].h = y + 28;
config_device = device;
while (1)
{
position_dialog(deviceconfig_dialog, SCREEN_W/2 - deviceconfig_dialog[0].w/2, SCREEN_H/2 - deviceconfig_dialog[0].h/2);
c = popup_dialog(deviceconfig_dialog, 1);
position_dialog(deviceconfig_dialog, -(SCREEN_W/2 - deviceconfig_dialog[0].w/2), -(SCREEN_H/2 - deviceconfig_dialog[0].h/2));
if (c == id_ok)
{
int changed = 0;
dialog_pos = 1;
config = device->config;
while (config->type != -1)
{
int val;
d = &deviceconfig_dialog[dialog_pos];
switch (config->type)
{
case CONFIG_BINARY:
val = (d->flags & D_SELECTED) ? 1 : 0;
if (val != config_get_int(CFG_MACHINE, device->name, config->name, config->default_int))
changed = 1;
dialog_pos++;
break;
case CONFIG_SELECTION:
if (list_pos >= MAX_CONFIG_SELECTIONS)
break;
d++;
val = config->selection[d->d1].value;
if (val != config_get_int(CFG_MACHINE, device->name, config->name, config->default_int))
changed = 1;
dialog_pos += 2;
break;
case CONFIG_MIDI:
break;
}
config++;
if (dialog_pos >= MAX_CONFIG_SIZE-3)
break;
}
if (!changed)
return;
if (alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) != 1)
continue;
dialog_pos = 1;
config = device->config;
while (config->type != -1)
{
int val;
d = &deviceconfig_dialog[dialog_pos];
switch (config->type)
{
case CONFIG_BINARY:
val = (d->flags & D_SELECTED) ? 1 : 0;
config_set_int(CFG_MACHINE, config_device->name, config->name, val);
dialog_pos++;
break;
case CONFIG_SELECTION:
if (list_pos >= MAX_CONFIG_SELECTIONS)
break;
d++;
val = config->selection[d->d1].value;
config_set_int(CFG_MACHINE, config_device->name, config->name, val);
dialog_pos += 2;
break;
case CONFIG_MIDI:
break;
}
config++;
if (dialog_pos >= MAX_CONFIG_SIZE-3)
break;
}
saveconfig(NULL);
resetpchard();
return;
}
if (c == id_cancel)
break;
}
}

View file

@ -1,536 +0,0 @@
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#define _GNU_SOURCE
#include <stdio.h>
#include "ibm.h"
#include "device.h"
#include "ide.h"
#include "allegro-main.h"
#include "allegro-gui.h"
static char hd_path[4][260];
static char hd_sectors[4][10];
static char hd_heads[4][10];
static char hd_cylinders[4][10];
static char hd_size[4][20];
static char hd_path_new[260];
static char hd_sectors_new[10];
static char hd_heads_new[10];
static char hd_cylinders_new[10];
static char hd_size_new[20];
static int new_cdrom_channel;
static PcemHDC hdc_new[4];
static DIALOG hdparams_dialog[]=
{
{d_shadow_box_proc, 0, 0, 194*2,86,0,0xffffff,0,0, 0,0,0,0,0}, // 0
{d_button_proc, 126, 66, 50, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "OK", 0, 0}, // 1
{d_button_proc, 196, 66, 50, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Cancel", 0, 0}, // 2
{d_text_proc, 7*2, 6, 170, 10, 0, 0xffffff, 0, 0, 0, 0, "Initial settings are based on file size", 0, 0},
{d_text_proc, 7*2, 22, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "Sectors:", 0, 0},
{d_text_proc, 63*2, 22, 29, 8, 0, 0xffffff, 0, 0, 0, 0, "Heads:", 0, 0},
{d_text_proc, 120*2, 22, 28, 12, 0, 0xffffff, 0, 0, 0, 0, "Cylinders:", 0, 0},
{d_edit_proc, 44*2, 22, 16*2, 12, 0, 0xffffff, 0, 0, 2, 0, hd_sectors_new, 0, 0},
{d_edit_proc, 92*2, 22, 16*2, 12, 0, 0xffffff, 0, 0, 3, 0, hd_heads_new, 0, 0},
{d_edit_proc, 168*2, 22, 24*2, 12, 0, 0xffffff, 0, 0, 5, 0, hd_cylinders_new, 0, 0},
{d_text_proc, 7*2, 54, 136, 12, 0, 0xffffff, 0, 0, 0, 0, hd_size_new, 0, 0},
{0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL}
};
static int hdconf_open(int msg, DIALOG *d, int c)
{
int drv = d->d2;
int ret = d_button_proc(msg, d, c);
if (ret == D_EXIT)
{
char fn[260];
int xsize = SCREEN_W - 32, ysize = SCREEN_H - 64;
strcpy(fn, hd_path[drv]);
ret = file_select_ex("Please choose a disc image", fn, "IMG", 260, xsize, ysize);
if (ret)
{
uint64_t sz;
FILE *f = fopen64(fn, "rb");
if (!f)
{
return D_REDRAW;
}
fseeko64(f, -1, SEEK_END);
sz = ftello64(f) + 1;
fclose(f);
if ((sz % 17) == 0 && sz <= 133693440)
{
sprintf(hd_sectors_new, "17");
if (sz <= 26738688)
{
sprintf(hd_heads_new, "4");
sprintf(hd_cylinders_new, "%i", (int)((sz / 512) / 4) / 17);
}
else if (sz <= 53477376)
{
sprintf(hd_heads_new, "6");
sprintf(hd_cylinders_new, "%i", (int)((sz / 512) / 6) / 17);
}
else if (sz <= 71303168)
{
sprintf(hd_heads_new, "8");
sprintf(hd_cylinders_new, "%i", (int)((sz / 512) / 8) / 17);
}
else
{
sprintf(hd_heads_new, "15");
sprintf(hd_cylinders_new, "%i", (int)((sz / 512) / 15) / 17);
}
}
else
{
sprintf(hd_sectors_new, "63");
sprintf(hd_heads_new, "16");
sprintf(hd_cylinders_new, "%i", (int)((sz / 512) / 16) / 63);
}
while (1)
{
position_dialog(hdparams_dialog, SCREEN_W/2 - 186, SCREEN_H/2 - 86/2);
ret = popup_dialog(hdparams_dialog, 1);
position_dialog(hdparams_dialog, -(SCREEN_W/2 - 186), -(SCREEN_H/2 - 86/2));
if (ret == 1)
{
int spt, hpc, cyl;
sscanf(hd_sectors_new, "%i", &spt);
sscanf(hd_heads_new, "%i", &hpc);
sscanf(hd_cylinders_new, "%i", &cyl);
if (spt > 63)
{
alert("Drive has too many sectors (maximum is 63)", NULL, NULL, "OK", NULL, 0, 0);
continue;
}
if (hpc > 128)
{
alert("Drive has too many heads (maximum is 128)", NULL, NULL, "OK", NULL, 0, 0);
continue;
}
if (cyl > 16383)
{
alert("Drive has too many cylinders (maximum is 16383)", NULL, NULL, "OK", NULL, 0, 0);
continue;
}
hdc_new[drv].spt = spt;
hdc_new[drv].hpc = hpc;
hdc_new[drv].tracks = cyl;
strcpy(hd_path[drv], fn);
sprintf(hd_sectors[drv], "%i", hdc_new[drv].spt);
sprintf(hd_heads[drv], "%i", hdc_new[drv].hpc);
sprintf(hd_cylinders[drv], "%i", hdc_new[drv].tracks);
sprintf(hd_size[drv], "Size : %imb", (((((uint64_t)hdc_new[drv].tracks*(uint64_t)hdc_new[drv].hpc)*(uint64_t)hdc_new[drv].spt)*512)/1024)/1024);
return D_REDRAW;
}
if (ret == 2)
break;
}
}
return D_REDRAW;
}
return ret;
}
static int hdconf_new_file(int msg, DIALOG *d, int c)
{
int ret = d_button_proc(msg, d, c);
if (ret == D_EXIT)
{
char fn[260];
int xsize = SCREEN_W - 32, ysize = SCREEN_H - 64;
strcpy(fn, hd_path_new);
ret = file_select_ex("Please choose a disc image", fn, "IMG", 260, xsize, ysize);
if (ret)
strcpy(hd_path_new, fn);
return D_REDRAW;
}
return ret;
}
static DIALOG hdnew_dialog[]=
{
{d_shadow_box_proc, 0, 0, 194*2,86,0,0xffffff,0,0, 0,0,0,0,0}, // 0
{d_button_proc, 126, 66, 50, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "OK", 0, 0}, // 1
{d_button_proc, 196, 66, 50, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Cancel", 0, 0}, // 2
{d_edit_proc, 7*2, 6, 136*2, 10, 0, 0xffffff, 0, 0, 0, 0, hd_path_new, 0, 0},
{hdconf_new_file, 143*2, 6, 16*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "...", 0, 0},
{d_text_proc, 7*2, 22, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "Sectors:", 0, 0},
{d_text_proc, 63*2, 22, 29, 8, 0, 0xffffff, 0, 0, 0, 0, "Heads:", 0, 0},
{d_text_proc, 120*2, 22, 28, 12, 0, 0xffffff, 0, 0, 0, 0, "Cylinders:", 0, 0},
{d_edit_proc, 44*2, 22, 16*2, 12, 0, 0xffffff, 0, 0, 2, 0, hd_sectors_new, 0, 0},
{d_edit_proc, 92*2, 22, 16*2, 12, 0, 0xffffff, 0, 0, 3, 0, hd_heads_new, 0, 0},
{d_edit_proc, 168*2, 22, 24*2, 12, 0, 0xffffff, 0, 0, 5, 0, hd_cylinders_new, 0, 0},
// {d_text_proc, 7*2, 54, 136, 12, 0, -1, 0, 0, 0, 0, hd_size_new, 0, 0},
{0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL}
};
static int create_hd(char *fn, int cyl, int hpc, int spt)
{
int c;
uint8_t buf[512];
FILE *f = fopen64(hd_path_new, "wb");
if (!f)
{
alert("Can't open file for write", NULL, NULL, "OK", NULL, 0, 0);
return -1;
}
memset(buf, 0, 512);
for (c = 0; c < (cyl * hpc * spt); c++)
{
fwrite(buf, 512, 1, f);
}
fclose(f);
return 0;
}
static int hdconf_new(int msg, DIALOG *d, int c)
{
int drv = d->d2;
int ret = d_button_proc(msg, d, c);
if (ret == D_EXIT)
{
sprintf(hd_sectors_new, "63");
sprintf(hd_heads_new, "16");
sprintf(hd_cylinders_new, "511");
strcpy(hd_path_new, "");
while (1)
{
position_dialog(hdnew_dialog, SCREEN_W/2 - 186, SCREEN_H/2 - 86/2);
ret = popup_dialog(hdnew_dialog, 1);
position_dialog(hdnew_dialog, -(SCREEN_W/2 - 186), -(SCREEN_H/2 - 86/2));
if (ret == 1)
{
int spt, hpc, cyl;
sscanf(hd_sectors_new, "%i", &spt);
sscanf(hd_heads_new, "%i", &hpc);
sscanf(hd_cylinders_new, "%i", &cyl);
if (spt > 63)
{
alert("Drive has too many sectors (maximum is 63)", NULL, NULL, "OK", NULL, 0, 0);
continue;
}
if (hpc > 128)
{
alert("Drive has too many heads (maximum is 128)", NULL, NULL, "OK", NULL, 0, 0);
continue;
}
if (cyl > 16383)
{
alert("Drive has too many cylinders (maximum is 16383)", NULL, NULL, "OK", NULL, 0, 0);
continue;
}
if (create_hd(hd_path_new, cyl, hpc, spt))
return D_REDRAW;
alert("Remember to partition and format the new drive", NULL, NULL, "OK", NULL, 0, 0);
hdc_new[drv].spt = spt;
hdc_new[drv].hpc = hpc;
hdc_new[drv].tracks = cyl;
strcpy(hd_path[drv], hd_path_new);
sprintf(hd_sectors[drv], "%i", hdc_new[drv].spt);
sprintf(hd_heads[drv], "%i", hdc_new[drv].hpc);
sprintf(hd_cylinders[drv], "%i", hdc_new[drv].tracks);
sprintf(hd_size[drv], "Size : %imb", (((((uint64_t)hdc_new[drv].tracks*(uint64_t)hdc_new[drv].hpc)*(uint64_t)hdc_new[drv].spt)*512)/1024)/1024);
return D_REDRAW;
}
if (ret == 2)
break;
}
return D_REDRAW;
}
return ret;
}
static int hdconf_eject(int msg, DIALOG *d, int c)
{
int drv = d->d2;
int ret = d_button_proc(msg, d, c);
if (ret == D_EXIT)
{
hdc_new[drv].spt = 0;
hdc_new[drv].hpc = 0;
hdc_new[drv].tracks = 0;
strcpy(hd_path[drv], "");
sprintf(hd_sectors[drv], "%i", hdc_new[drv].spt);
sprintf(hd_heads[drv], "%i", hdc_new[drv].hpc);
sprintf(hd_cylinders[drv], "%i", hdc_new[drv].tracks);
sprintf(hd_size[drv], "Size : %imb", (((((uint64_t)hdc_new[drv].tracks*(uint64_t)hdc_new[drv].hpc)*(uint64_t)hdc_new[drv].spt)*512)/1024)/1024);
return D_REDRAW;
}
return ret;
}
static int hdconf_radio_hd(int msg, DIALOG *d, int c);
static int hdconf_radio_cd(int msg, DIALOG *d, int c);
static DIALOG hdconf_dialog[]=
{
{d_shadow_box_proc, 0, 0, 210*2,354,0,0xffffff,0,0, 0,0,0,0,0}, // 0
{d_button_proc, 150, 334, 50, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "OK", 0, 0}, // 1
{d_button_proc, 220, 334, 50, 16, 0, 0xffffff, 0, D_EXIT, 0, 0, "Cancel", 0, 0}, // 2
{d_text_proc, 7*2, 6, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "C:", 0, 0},
{hdconf_radio_hd, 7*2, 22, 96, 12, 0, 0xffffff, 0, D_EXIT, 0, 0, "Hard drive", 0, 0}, // 4
{hdconf_radio_cd, 100*2, 22, 64, 12, 0, 0xffffff, 0, D_EXIT, 0, 0, "CD-ROM", 0, 0}, // 5
{d_edit_proc, 7*2, 38, 136*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_path[0], 0, 0},
{hdconf_open, 143*2, 38, 16*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "...", 0, 0},
{hdconf_new, 159*2, 38, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "New", 0, 0},
{hdconf_eject, 183*2, 38, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 0, "Eject", 0, 0},
{d_text_proc, 7*2, 54, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "Sectors:", 0, 0},
{d_text_proc, 63*2, 54, 29, 8, 0, 0xffffff, 0, 0, 0, 0, "Heads:", 0, 0},
{d_text_proc, 120*2, 54, 28, 12, 0, 0xffffff, 0, 0, 0, 0, "Cylinders:", 0, 0},
{d_edit_proc, 44*2, 54, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_sectors[0], 0, 0},
{d_edit_proc, 92*2, 54, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_heads[0], 0, 0},
{d_edit_proc, 168*2, 54, 24*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_cylinders[0], 0, 0},
{d_text_proc, 7*2, 54, 136, 12, 0, 0xffffff, 0, 0, 0, 0, hd_size[0], 0, 0},
{d_text_proc, 7*2, 76, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "D:", 0, 0},
{hdconf_radio_hd, 7*2, 92, 96, 12, 0, 0xffffff, 0, D_EXIT, 1, 0, "Hard drive", 0, 0}, // 18
{hdconf_radio_cd, 100*2, 92, 64, 12, 0, 0xffffff, 0, D_EXIT, 1, 0, "CD-ROM", 0, 0}, // 19
{d_edit_proc, 7*2, 108, 136*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_path[1], 0, 0},
{hdconf_open, 143*2, 108, 16*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 1, "...", 0, 0},
{hdconf_new, 159*2, 108, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 1, "New", 0, 0},
{hdconf_eject, 183*2, 108, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 1, "Eject", 0, 0},
{d_edit_proc, 44*2, 124, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_sectors[1], 0, 0},
{d_edit_proc, 92*2, 124, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_heads[1], 0, 0},
{d_edit_proc, 168*2, 124, 24*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_cylinders[1], 0, 0},
{d_text_proc, 7*2, 124, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "Sectors:", 0, 0},
{d_text_proc, 63*2, 124, 29, 8, 0, 0xffffff, 0, 0, 0, 0, "Heads:", 0, 0},
{d_text_proc, 120*2, 124, 32, 12, 0, 0xffffff, 0, 0, 0, 0, "Cylinders:", 0, 0},
{d_text_proc, 7*2, 140, 136, 12, 0, 0xffffff, 0, 0, 0, 0, hd_size[1], 0, 0},
{d_text_proc, 7*2, 162, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "E:", 0, 0},
{hdconf_radio_hd, 7*2, 178, 96, 12, 0, 0xffffff, 0, D_EXIT, 2, 0, "Hard drive", 0, 0}, // 32
{hdconf_radio_cd, 100*2, 178, 64, 12, 0, 0xffffff, 0, D_EXIT, 2, 0, "CD-ROM", 0, 0}, // 33
{d_edit_proc, 7*2, 194, 136*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_path[2], 0, 0},
{hdconf_open, 143*2, 194, 16*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 2, "...", 0, 0},
{hdconf_new, 159*2, 194, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 2, "New", 0, 0},
{hdconf_eject, 183*2, 194, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 2, "Eject", 0, 0},
{d_edit_proc, 44*2, 210, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_sectors[2], 0, 0},
{d_edit_proc, 92*2, 210, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_heads[2], 0, 0},
{d_edit_proc, 168*2, 210, 24*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_cylinders[2], 0, 0},
{d_text_proc, 7*2, 210, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "Sectors:", 0, 0},
{d_text_proc, 63*2, 210, 29, 8, 0, 0xffffff, 0, 0, 0, 0, "Heads:", 0, 0},
{d_text_proc, 120*2, 210, 32, 12, 0, 0xffffff, 0, 0, 0, 0, "Cylinders:", 0, 0},
{d_text_proc, 7*2, 226, 136, 12, 0, 0xffffff, 0, 0, 0, 0, hd_size[2], 0, 0},
{d_text_proc, 7*2, 248, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "F:", 0, 0},
{hdconf_radio_hd, 7*2, 264, 96, 12, 0, 0xffffff, 0, D_EXIT, 3, 0, "Hard drive", 0, 0}, // 46
{hdconf_radio_cd, 100*2, 264, 64, 12, 0, 0xffffff, 0, D_EXIT, 3, 0, "CD-ROM", 0, 0}, // 47
{d_edit_proc, 7*2, 280, 136*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_path[3], 0, 0},
{hdconf_open, 143*2, 280, 16*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 3, "...", 0, 0},
{hdconf_new, 159*2, 280, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 3, "New", 0, 0},
{hdconf_eject, 183*2, 280, 24*2, 14, 0, 0xffffff, 0, D_EXIT, 0, 3, "Eject", 0, 0},
{d_edit_proc, 44*2, 296, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_sectors[3], 0, 0},
{d_edit_proc, 92*2, 296, 16*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_heads[3], 0, 0},
{d_edit_proc, 168*2, 296, 24*2, 12, 0, 0xffffff, 0, D_DISABLED, 0, 0, hd_cylinders[3], 0, 0},
{d_text_proc, 7*2, 296, 27, 10, 0, 0xffffff, 0, 0, 0, 0, "Sectors:", 0, 0},
{d_text_proc, 63*2, 296, 29, 8, 0, 0xffffff, 0, 0, 0, 0, "Heads:", 0, 0},
{d_text_proc, 120*2, 296, 32, 12, 0, 0xffffff, 0, 0, 0, 0, "Cylinders:", 0, 0},
{d_text_proc, 7*2, 312, 136, 12, 0, 0xffffff, 0, 0, 0, 0, hd_size[3], 0, 0},
{0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL}
};
static void update_hdd_cdrom()
{
if (new_cdrom_channel == 0)
{
hdconf_dialog[4].flags &= ~D_SELECTED;
hdconf_dialog[5].flags |= D_SELECTED;
}
else
{
hdconf_dialog[4].flags |= D_SELECTED;
hdconf_dialog[5].flags &= ~D_SELECTED;
}
if (new_cdrom_channel == 1)
{
hdconf_dialog[18].flags &= ~D_SELECTED;
hdconf_dialog[19].flags |= D_SELECTED;
}
else
{
hdconf_dialog[18].flags |= D_SELECTED;
hdconf_dialog[19].flags &= ~D_SELECTED;
}
if (new_cdrom_channel == 2)
{
hdconf_dialog[32].flags &= ~D_SELECTED;
hdconf_dialog[33].flags |= D_SELECTED;
}
else
{
hdconf_dialog[32].flags |= D_SELECTED;
hdconf_dialog[33].flags &= ~D_SELECTED;
}
if (new_cdrom_channel == 3)
{
hdconf_dialog[46].flags &= ~D_SELECTED;
hdconf_dialog[47].flags |= D_SELECTED;
}
else
{
hdconf_dialog[46].flags |= D_SELECTED;
hdconf_dialog[47].flags &= ~D_SELECTED;
}
}
static int hdconf_radio_hd(int msg, DIALOG *d, int c)
{
int ret = d_radio_proc(msg, d, c);
if (ret == D_CLOSE)
{
if (new_cdrom_channel == d->d1)
{
new_cdrom_channel = -1;
update_hdd_cdrom();
}
return D_REDRAW;
}
return ret;
}
static int hdconf_radio_cd(int msg, DIALOG *d, int c)
{
int ret = d_radio_proc(msg, d, c);
if (ret == D_CLOSE)
{
if (new_cdrom_channel != d->d1)
{
new_cdrom_channel = d->d1;
update_hdd_cdrom();
}
return D_REDRAW;
}
return ret;
}
int disc_hdconf()
{
int c;
hdc_new[0] = hdc[0];
hdc_new[1] = hdc[1];
hdc_new[2] = hdc[2];
hdc_new[3] = hdc[3];
strcpy(hd_path[0], ide_fn[0]);
strcpy(hd_path[1], ide_fn[1]);
strcpy(hd_path[2], ide_fn[2]);
strcpy(hd_path[3], ide_fn[3]);
sprintf(hd_sectors[0], "%i", hdc[0].spt);
sprintf(hd_sectors[1], "%i", hdc[1].spt);
sprintf(hd_sectors[2], "%i", hdc[2].spt);
sprintf(hd_sectors[3], "%i", hdc[3].spt);
sprintf(hd_heads[0], "%i", hdc[0].hpc);
sprintf(hd_heads[1], "%i", hdc[1].hpc);
sprintf(hd_heads[2], "%i", hdc[2].hpc);
sprintf(hd_heads[3], "%i", hdc[3].hpc);
sprintf(hd_cylinders[0], "%i", hdc[0].tracks);
sprintf(hd_cylinders[1], "%i", hdc[1].tracks);
sprintf(hd_cylinders[2], "%i", hdc[2].tracks);
sprintf(hd_cylinders[3], "%i", hdc[3].tracks);
sprintf(hd_size[0], "Size : %imb", (((((uint64_t)hdc[0].tracks*(uint64_t)hdc[0].hpc)*(uint64_t)hdc[0].spt)*512)/1024)/1024);
sprintf(hd_size[1], "Size : %imb", (((((uint64_t)hdc[1].tracks*(uint64_t)hdc[1].hpc)*(uint64_t)hdc[1].spt)*512)/1024)/1024);
sprintf(hd_size[2], "Size : %imb", (((((uint64_t)hdc[2].tracks*(uint64_t)hdc[2].hpc)*(uint64_t)hdc[2].spt)*512)/1024)/1024);
sprintf(hd_size[3], "Size : %imb", (((((uint64_t)hdc[3].tracks*(uint64_t)hdc[3].hpc)*(uint64_t)hdc[3].spt)*512)/1024)/1024);
new_cdrom_channel = cdrom_channel;
update_hdd_cdrom();
while (1)
{
position_dialog(hdconf_dialog, SCREEN_W/2 - hdconf_dialog[0].w/2, SCREEN_H/2 - hdconf_dialog[0].h/2);
c = popup_dialog(hdconf_dialog, 1);
position_dialog(hdconf_dialog, -(SCREEN_W/2 - hdconf_dialog[0].w/2), -(SCREEN_H/2 - hdconf_dialog[0].h/2));
if (c == 1)
{
if (!has_been_inited || alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) == 1)
{
hdc[0] = hdc_new[0];
hdc[1] = hdc_new[1];
hdc[2] = hdc_new[2];
hdc[3] = hdc_new[3];
strcpy(ide_fn[0], hd_path[0]);
strcpy(ide_fn[1], hd_path[1]);
strcpy(ide_fn[2], hd_path[2]);
strcpy(ide_fn[3], hd_path[3]);
cdrom_channel = new_cdrom_channel;
saveconfig(NULL);
resetpchard();
return D_O_K;
}
}
if (c == 2)
return D_O_K;
}
return D_O_K;
}

View file

@ -1,288 +0,0 @@
#include "ibm.h"
#include "device.h"
#include "allegro-main.h"
#include "allegro-gui.h"
#include "disc.h"
#include "ide.h"
#include "cdrom-ioctl.h"
#include "cdrom-iso.h"
#include "cdrom-null.h"
void warning(const char *format, ...)
{
char buf[1024];
va_list ap;
va_start(ap, format);
vsprintf(buf, format, ap);
va_end(ap);
alert("Warning:", buf, NULL, "OK", NULL, 0, 0);
}
static int file_return(void)
{
return D_CLOSE;
}
static int file_exit(void)
{
quited = 1;
return D_CLOSE;
}
static int file_reset(void)
{
resetpchard();
return D_CLOSE;
}
static int file_cad(void)
{
resetpc_cad();
return D_CLOSE;
}
static MENU file_menu[]=
{
{"&Return", file_return, NULL, 0, NULL},
{"&Hard Reset", file_reset, NULL, 0, NULL},
{"&Ctrl+Alt+Del", file_cad, NULL, 0, NULL},
{"E&xit", file_exit, NULL, 0, NULL},
{NULL,NULL,NULL,0,NULL}
};
static int disc_load_a()
{
char fn[260];
int ret;
int xsize = SCREEN_W - 32, ysize = SCREEN_H - 64;
strcpy(fn, discfns[0]);
ret = file_select_ex("Please choose a disc image", fn, "IMG;IMA;FDI", 260, xsize, ysize);
if (ret)
{
disc_close(0);
disc_load(0, fn);
saveconfig(NULL);
}
return D_O_K;
}
static int disc_load_b()
{
char fn[260];
int ret;
int xsize = SCREEN_W - 32, ysize = SCREEN_H - 64;
strcpy(fn, discfns[1]);
ret = file_select_ex("Please choose a disc image", fn, "IMG;IMA;FDI", 260, xsize, ysize);
if (ret)
{
disc_close(1);
disc_load(1, fn);
saveconfig(NULL);
}
return D_O_K;
}
static int disc_eject_a()
{
disc_close(0);
saveconfig(NULL);
return D_O_K;
}
static int disc_eject_b()
{
disc_close(1);
saveconfig(NULL);
return D_O_K;
}
static MENU disc_menu[]=
{
{"Load drive &A:...", disc_load_a, NULL, 0, NULL},
{"Load drive &B:...", disc_load_b, NULL, 0, NULL},
{"&Eject drive &A:", disc_eject_a, NULL, 0, NULL},
{"Eject drive &B:", disc_eject_b, NULL, 0, NULL},
{"&Configure hard discs...", disc_hdconf, NULL, 0, NULL},
{NULL,NULL,NULL,0,NULL}
};
static MENU cdrom_menu[];
static void cdrom_update()
{
int c;
for (c = 0; cdrom_menu[c].text; c++)
cdrom_menu[c].flags = 0;
if (!cdrom_enabled)
cdrom_menu[0].flags = D_SELECTED;
else switch (cdrom_drive)
{
case -1:
cdrom_menu[1].flags = D_SELECTED;
break;
case CDROM_ISO:
cdrom_menu[3].flags = D_SELECTED;
break;
default:
cdrom_menu[2].flags = D_SELECTED;
break;
}
}
static int cdrom_disabled()
{
if (!cdrom_enabled)
return D_O_K;
if (alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) == 1)
{
atapi->exit();
cdrom_enabled = 0;
saveconfig(NULL);
resetpchard();
cdrom_update();
}
return D_O_K;
}
static int cdrom_empty()
{
if (cdrom_enabled)
{
atapi->exit();
cdrom_drive = -1;
cdrom_null_open(cdrom_drive);
return D_O_K;
}
if (alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) == 1)
{
cdrom_drive = -1;
cdrom_enabled = 1;
cdrom_null_open(cdrom_drive);
saveconfig(NULL);
resetpchard();
cdrom_update();
}
return D_O_K;
}
static int cdrom_dev()
{
if (cdrom_enabled)
{
atapi->exit();
cdrom_drive = 1;
ioctl_open(cdrom_drive);
return D_O_K;
}
if (alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) == 1)
{
cdrom_drive = 1;
cdrom_enabled = 1;
ioctl_open(cdrom_drive);
saveconfig(NULL);
resetpchard();
cdrom_update();
}
return D_O_K;
}
static int cdrom_iso()
{
char fn[260];
int ret;
int xsize = SCREEN_W - 32, ysize = SCREEN_H - 64;
strcpy(fn, iso_path);
ret = file_select_ex("Please choose an ISO image", fn, "ISO", 260, xsize, ysize);
if (ret)
{
if (!cdrom_enabled)
{
if (alert("This will reset PCem!", "Okay to continue?", NULL, "OK", "Cancel", 0, 0) != 1)
return D_O_K;
}
else
{
atapi->exit();
}
cdrom_drive = CDROM_ISO;
iso_open(fn);
if (!cdrom_enabled)
{
cdrom_enabled = 1;
resetpchard();
}
cdrom_update();
saveconfig(NULL);
}
return D_O_K;
}
static MENU cdrom_menu[] =
{
{"&Disabled", cdrom_disabled, NULL, 0, NULL},
{"&Empty", cdrom_empty, NULL, 0, NULL},
{"/dev/cdrom", cdrom_dev, NULL, 0, NULL},
{"&ISO image...", cdrom_iso, NULL, 0, NULL},
{NULL,NULL,NULL,0,NULL}
};
static MENU settings_menu[]=
{
{"&Configure...", settings_configure, NULL, 0, NULL},
{"CD-ROM", NULL, cdrom_menu, 0, NULL},
{NULL,NULL,NULL,0,NULL}
};
static MENU main_menu[]=
{
{"&File", NULL, file_menu, 0, NULL},
{"&Disc", NULL, disc_menu, 0, NULL},
{"&Settings", NULL, settings_menu, 0, NULL},
{NULL,NULL,NULL,0,NULL}
};
static DIALOG pcem_gui[]=
{
{d_menu_proc, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, main_menu, NULL, NULL},
{d_yield_proc, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, NULL, NULL, NULL},
{0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL}
};
void gui_enter()
{
DIALOG_PLAYER *dp;
int x = 1;
infocus = 0;
dp = init_dialog(pcem_gui, 0);
show_mouse(screen);
while (x && !(mouse_b & 2) && !key[KEY_ESC])
{
x = update_dialog(dp);
}
show_mouse(NULL);
shutdown_dialog(dp);
clear(screen);
clear_keybuf();
infocus = 1;
device_force_redraw();
}

View file

@ -1,15 +0,0 @@
void gui_enter();
extern int quited;
extern int romspresent[ROM_MAX];
extern int gfx_present[GFX_MAX];
int disc_hdconf();
int settings_configure();
void deviceconfig_open(device_t *device);
int config_sel();
extern int has_been_inited;

View file

@ -1,49 +0,0 @@
#include "allegro-main.h"
#include "plat-joystick.h"
#include "device.h"
#include "gameport.h"
plat_joystick_t plat_joystick_state[MAX_PLAT_JOYSTICKS];
joystick_t joystick_state[MAX_JOYSTICKS];
int joysticks_present;
void joystick_init()
{
install_joystick(JOY_TYPE_AUTODETECT);
joysticks_present = num_joysticks;
}
void joystick_close()
{
}
void joystick_poll()
{
int c, d;
poll_joystick();
for (c = 0; c < num_joysticks; c++)
{
plat_joystick_state[c].a[0] = joy[c].stick[0].axis[0].pos * 256;
plat_joystick_state[c].a[1] = joy[c].stick[0].axis[1].pos * 256;
for (d = 0; d < MAX_JOYSTICK_BUTTONS; d++)
plat_joystick_state[c].b[d] = joy[c].button[d].b;
}
for (c = 0; c < joystick_get_max_joysticks(joystick_type); c++)
{
if (c < num_joysticks)
{
for (d = 0; d < joystick_get_axis_count(joystick_type); d++)
joystick_state[c].axis[d] = plat_joystick_state[c].a[d];
for (d = 0; d < joystick_get_button_count(joystick_type); d++)
joystick_state[c].button[d] = plat_joystick_state[c].b[d];
}
else
{
for (d = 0; d < joystick_get_axis_count(joystick_type); d++)
joystick_state[c].axis[d] = 0;
for (d = 0; d < joystick_get_button_count(joystick_type); d++)
joystick_state[c].button[d] = 0;
}
}
}

View file

@ -1,49 +0,0 @@
#include "allegro-main.h"
#include "plat-keyboard.h"
int pcem_key[272];
int rawinputkey[272];
static int key_convert[128] =
{
-1, 0x1e, 0x30, 0x2e, 0x20, 0x12, 0x21, 0x22, /* , A, B, C, D, E, F, G*/
0x23, 0x17, 0x24, 0x25, 0x26, 0x32, 0x31, 0x18, /* H, I, J, K, L, M, N, O*/
0x19, 0x10, 0x13, 0x1f, 0x14, 0x16, 0x2f, 0x11, /* P, Q, R, S, T, U, V, W*/
0x2d, 0x15, 0x2c, 0x0b, 0x02, 0x03, 0x04, 0x05, /* X, Y, Z, 0, 1, 2, 3, 4*/
0x06, 0x07, 0x08, 0x09, 0x0a, 0x52, 0x4f, 0x50, /* 5, 6, 7, 8, 9, p0, p1, p2*/
0x51, 0x4b, 0x4c, 0x4d, 0x47, 0x48, 0x49, 0x3b, /* p3, p4, p5, p6, p7, p8, p9, F1*/
0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, /* F2, F3, F4, F5, F6, F7, F8, F9*/
0x44, 0x57, 0x58, 0x01, 0x29, 0x0c, 0x0d, 0x0e, /*F10, F11, F12, ESC, `ª, -_, =+, backspace*/
0x0f, 0x1a, 0x1b, 0x1c, 0x27, 0x28, 0x2b, 0x56, /*TAB, [{, ]}, ENT, ;:, '@, \|, #~*/
0x33, 0x34, 0x35, 0x39, 0xd2, 0xd3, 0xc7, 0xcf, /* ,<, .>, /?, SPC, INS, DEL, HOME, END*/
0xc9, 0xd1, 0xcb, 0xcd, 0xc8, 0xd0, 0xb5, 0x37, /*PGU, PGD, LFT, RHT, UP, DN, /, * */
0x4a, 0x4e, 0x53, 0x9c, 0xff, -1, -1, -1, /* p-, p+, pDL, pEN, psc, pse, abnt, yen*/
-1, -1, -1, -1, -1, -1, -1, -1, /*kana, convert, noconvert, at, circumflex, colon2, kanji, pad equals*/
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 0x2a, 0x36, 0x1d, 0x9d, 0x38, /*, , lshift, rshift, lctrl, rctrl, alt*/
0xb8, 0xdb, 0xdc, 0xdd, 0x46, 0x45, 0x3a, -1 /*altgr, lwin, rwin, menu, scrlock, numlock, capslock*/
};
void keyboard_init()
{
install_keyboard();
}
void keyboard_close()
{
}
void keyboard_poll_host()
{
int c;
for (c = 0; c < 128; c++)
{
int key_idx = key_convert[c];
if (key_idx == -1)
continue;
if (key[c] != pcem_key[key_idx])
pcem_key[key_idx] = key[c];
}
}

Some files were not shown because too many files have changed in this diff Show more