Commit Graph

11426 Commits

Author SHA1 Message Date
Volker Ruppert
967f7d3381 Added method parse_param() to bx_param_bytestring_c and use it to reduce code
duplication (TODO: similar changes in win32paramdlg.cc).
2018-02-04 22:20:46 +00:00
Volker Ruppert
50c1370216 Some work on the PCI devices code.
- Added INT pin init to method init_pci_conf().
- Moved readonly register handling to the common PCI write handler.
- Moved IRQ line reporting to the common PCI write handler.
2018-02-04 18:17:28 +00:00
Volker Ruppert
87145baf61 Rewrite of the PCI base address (BAR) handling to reduce code duplication.
- Added new structure bx_pci_bar_t that contains all parameters related to the
  PCI BARs (type, size, address and r/w handlers).
- Added new methods init_bar_io() and init_bar_mem() to set up the new structure
  in the pci device init code.
- Added new method pci_write_handler_common() to handle writes to the normal
  BARs and the ROM BAR. Writes to other registers are forwarded to the device
  specific PCI write handlers. Removed BAR and ROM BAR handling from the
  specific code.
- Added new method pci_bar_change_notify() to execute specific code after BAR
  update (vga, ne2k).
- Moved normal BAR handling to method after_restore_pci_state().
- Store pointer to PCI device name in bx_pci_device_c and use it for i/o setup.
2018-02-04 09:41:50 +00:00
Volker Ruppert
c4a86cbee0 Some fixes in the bochsrc save and parse functions.
- Fixed saving new parameter type BXT_PARAM_BYTESTRING (MAC address).
- Fixed some special parser functions by using new parse_param() method.
2018-02-02 19:04:59 +00:00
Volker Ruppert
89353c8f4f Applied SF patch #539 (written by David O'Shea).
- Ported "hack for NE2000 with Netware 3.11" from an older QEMU version.
- Check if the TX packet is within memory bounds, otherwise PANIC.
2018-01-30 19:21:24 +00:00
Volker Ruppert
82f45f262a Small addition for the plug&play BIOS stub: added support for function 0x0000
(currently returning 0 for number of device nodes).
2018-01-28 11:59:29 +00:00
Volker Ruppert
38c3d80bb7 Small addition for the plug&play BIOS stub: added support for function 0x0000
(currently returning 0 for number of device nodes).
2018-01-28 11:59:13 +00:00
Stanislav Shwartsman
2bca4cc310 improve debug print for SPP access 2018-01-27 21:25:46 +00:00
Stanislav Shwartsman
afc2ee6bfd Implemented SPP: EPT-Based Subpage Protection. Cleaned code duplication between FXSAVE/FXRSTORE and XSAVE/XRSTOR (save/restore of SSE code is the same) 2018-01-27 21:20:33 +00:00
Stanislav Shwartsman
a9ac81e092 convert defines to const and enum in paging.cc 2018-01-27 19:31:39 +00:00
Stanislav Shwartsman
fd70b46136 update CHANGES 2018-01-27 19:12:22 +00:00
Stanislav Shwartsman
c600964b6d simplify save/retore format for pci2isa irq_registry 2018-01-26 20:13:47 +00:00
Stanislav Shwartsman
7310d9edae write byte arrays from param_data in save/restore in JSON style format (using [] instead of {}). fixes in save/restore. 2018-01-26 20:02:28 +00:00
Stanislav Shwartsman
3dd83448eb fixes for commit 13439 which accidentally broke save/restore disalog on windows 2018-01-26 19:28:52 +00:00
Volker Ruppert
80325ccd3e LGPL'd VGABIOS updated from CVS (VESA extension 'read EDID' for Bochs VBE
and Cirrus added).
2018-01-26 16:28:29 +00:00
Volker Ruppert
26314fb8b7 Implemented basic DDC support for the Bochs VBE adapter.
TODO: Update both Bochs VBE and Cirrus version of the LGPL'd VGABIOS to return
the EDID using this feature.
2018-01-26 09:37:26 +00:00
Stanislav Shwartsman
769ed3ef88 fixed MOVBE instruction decoding 2018-01-23 19:53:34 +00:00
Stanislav Shwartsman
7bdcc826d7 fixed ambiguous function definition 2018-01-23 19:08:23 +00:00
Stanislav Shwartsman
dc628676ad rename bx_shadow_data_c::get_format as it overrides/collides with bx_param::get_format 2018-01-19 21:21:09 +00:00
Volker Ruppert
5154285270 Some work on the Voodoo Banshee emulation.
- Added support for stippled lines.
- Fixed return values of the I2C interface with no VMI/decoder connected.
- Added some comments about current status of the Banshee code.
2018-01-19 20:58:06 +00:00
Stanislav Shwartsman
e4c8b37b18 minor updates to param tree code 2018-01-19 20:39:48 +00:00
Stanislav Shwartsman
e8d0e718f1 continue param tree changes
take RAW_BYTES string out of bx_param_string_c into new param type bx_param_bytestring_c (better name, anybody?)
this is intermediate step, later it would be better to merge bx_param_string into generic template bx_param<type>
but bx_param_bytestring_cis not matching that concept (or probably will continue to inherit from bx_param<string>)
2018-01-19 20:27:04 +00:00
Volker Ruppert
de30601ca6 Fixed possible FPE at high speaker frequencies (beep_samples == 0). 2018-01-18 19:00:57 +00:00
Volker Ruppert
5c5fd2c97c Fixed segfault when disabling speaker plugin. 2018-01-16 16:55:39 +00:00
Volker Ruppert
e647f7b120 Implemented basic DDC support.
- Basic I2C implementation for DDC2B support.
- Added VESA EDID structure (values from a patch for the LGPL'd VGABIOS).
- Windows now detecting plug&play monitor "Bochs Screen" if an original VGABIOS
  image is used (Cirrus PCI / Voodoo Banshee).
- TODO: Add this feature in the Cirrus version of the LGPL'd VGABIOS.
2018-01-14 18:44:28 +00:00
Volker Ruppert
1f2d9ca668 Added DDC stub for the Cirrus and Voodoo Banshee display adapters (when ready,
this code should return the VESA EDID for the Bochs plug&play monitor).
2018-01-11 19:02:08 +00:00
Stanislav Shwartsman
7d1a524ff0 fix indentation after tab2space 2018-01-11 08:47:02 +00:00
Stanislav Shwartsman
6d93ba14ec tab2space 2018-01-11 08:45:00 +00:00
Stanislav Shwartsman
a22c6a292a better dump of param tree from debugger 2018-01-10 20:21:24 +00:00
Stanislav Shwartsman
5f2bf81995 add new dump_param method to param object which dumps param into a string
use new method do dump param tree during save/restore, GUI and text debugger and other places
significantly reduce code duplication over multiple modules
2018-01-10 20:05:59 +00:00
Stanislav Shwartsman
e05e6f58b0 add new method to param object - dump_param
the method dumps param to the FILE
use new method do dump param tree during save/restore

also make more use of parse_param methods which initialize param from a string
2018-01-10 19:10:19 +00:00
Volker Ruppert
5903673b3d Two small changes in the Voodoo Banshee emulation.
- More accurate calculation of the stretch factor.
- Added support for writing the subsystem IDs in PCI space and set up default
  value in reset().
2018-01-08 20:52:23 +00:00
Volker Ruppert
cd72170c78 Updated both MSVC workspace files for current SVN. 2018-01-07 12:07:18 +00:00
Volker Ruppert
23df53aae5 Voodoo Banshee: added basic screen-to-screen stretching support (using nearest
source pixel).
2018-01-06 17:27:55 +00:00
Volker Ruppert
7f321d0c20 Moved Voodoo Banshee specific code to separate file banshee.cc.
TODO: code cleanup, update workspace files.
2018-01-05 17:43:51 +00:00
Volker Ruppert
55c9bad4ef Some work on the Voodoo Banshee emulation.
- Happy new year!
- Improved pixel format conversion in host-to-screen operations.
- Rewrite of the linear framebuffer read/write code fixes icons in 16 bpp mode.
- Don't flood log file when polling the 2D status register (similar to 3D one).
- FIXME list:
  - Minor issues in all Banshee modes (e.g. forward/back buttons in explorer).
  - Display errors in 16 bpp mode after leaving 3D mode.
  - Display errors in 16 bpp mode in case debug messages are turned on (timing).
  - Voodoo2 3D demo "donut" still fails.
  - Bochs crashes on Windows host (MSVC in some cases, MSYS2 64-bit build also
    reported, but not yet reproduced.
- TODO list:
  - Remaining 2D stuff: polygon fill, stretching functions.
  - Move Banshee stuff to separate files.
  - Add Voodoo3 support (it's an improved Banshee card).
2018-01-01 19:08:16 +00:00
Stanislav Shwartsman
3c08cfedf2 fixed buffer overflow when printing instruction disasm for opcode bytes which cannot be decoded 2017-12-31 21:22:04 +00:00
Volker Ruppert
6a8a204f09 Two fixes in the Voodoo Banshee emulation.
- Fixed reading from ROM in word/dword mode (SeaBIOS needs this).
- Fixed an MSVC warning.
2017-12-31 16:52:02 +00:00
Volker Ruppert
ed803ee40e Updated default MSVC workspace for current SVN (TODO: plugins workspace). 2017-12-31 09:34:59 +00:00
Stanislav Shwartsman
6566cab8aa fixed new disasm for avx2 opcodes 2017-12-30 18:45:21 +00:00
Volker Ruppert
6469e9d717 Fixed bxhub compilation in MSYS2. 2017-12-30 14:56:54 +00:00
Volker Ruppert
bcad3aa655 Some work on the Voodoo Banshee emulation.
- Simplified register writes from CMDFIFO using new methods in the new classes.
- Started work on reset() and continued work on save/restore support.
- Mention the Banshee model in the Bochs documentation.
2017-12-29 11:18:45 +00:00
Stanislav Shwartsman
9abd8ba8fa old legacy disasm: omit printing rep prefix if no repeatable opcode 2017-12-28 20:52:46 +00:00
Stanislav Shwartsman
9659641cbf distinguish between vzeroupper/vzeroall in old legacy disasm 2017-12-28 20:20:13 +00:00
Stanislav Shwartsman
4c03fe3e2c fixed disasm of vcvtps2ph/ph2ps opcodes 2017-12-28 19:59:42 +00:00
Volker Ruppert
c505716ff1 First step of the Voodoo code restructuring. Now we have a base class
bx_voodoo_base_c that contains the shared code and the new classes
bx_voodoo_1_2_c and bx_banshee_c with the specific implementations. There are
not functional changes yet. TODO: The Banshee specific stuff could be moved to
separate files, but should still remain in the same plugin as Voodoo 1/2.
2017-12-28 09:54:22 +00:00
Stanislav Shwartsman
27a7925810 fix for MOV to CR3 in long mode with PCID enabled - patch by Kent Williams 2017-12-25 19:49:45 +00:00
Volker Ruppert
d5e2fbed00 Some work on the Voodoo Banshee emulation.
- Fixed alignment for unpacked monochrome source data in case the calculated
  required amount of data for one row is more than the given source pitch.
  In even rows the leftmost pixel comes from the LSB bit #7 as expected.
  In odd rows the whole row is aligned to the next dword boundary (the rightmost
  pixel comes from the MSB bit #0). This alternating alignment is not documented,
  but fixes some bitmaps (e.g. Win95 login / logout dialogs).
- Fixed calculation of host-to-screen data size for the pixel alignment > 0 and
  color depth > 8.
- Added minimal support for pixel format conversion (32/24 to 16).
2017-12-25 09:27:00 +00:00
Stanislav Shwartsman
ed8fa8ac61 fix compilation with no AVX enabled 2017-12-24 15:38:21 +00:00
Volker Ruppert
625f3cf6f5 Some small changes for the Voodoo Banshee emulation.
- Also set the "Banshee busy" flag if one of the CMDFIFOs is busy.
- Fixed CMDFIFO error message condition.
- Tiled source pitch is only used for screen-to-screen operations.
2017-12-24 10:15:34 +00:00
Volker Ruppert
2cbe839deb Fixed outdated start address for the system BIOS image and added link to
'romimage' option.
2017-12-24 09:37:02 +00:00
Stanislav Shwartsman
32661d4de6 supposed to fix osx compilation 2017-12-22 08:35:04 +00:00
Stanislav Shwartsman
ca034f0642 fixed disasm of sse insertps instruction 2017-12-21 18:18:10 +00:00
Volker Ruppert
6adba30922 Some small changes for the Voodoo Banshee emulation.
- Use the CMDFIFO wakeup on vertical retrace only for the 3D mode.
- Report screen mode change (2D, 3D, mixed).
- Added BX_ERRORs for currently unsupported pixel format conversion.
2017-12-20 22:12:54 +00:00
Stanislav Shwartsman
59c542fb06 fix disasm of FISTTP opcodes 2017-12-19 20:36:55 +00:00
Stanislav Shwartsman
4337a062e2 disasm memsize for gather opcodes 2017-12-19 19:51:55 +00:00
Stanislav Shwartsman
15187110ef implement disasm of implicit memory reference for maskmovdqu/maskmovq opcodes. fix vmaskmovdqu disasm for legacy disasm as well 2017-12-19 19:45:30 +00:00
Stanislav Shwartsman
e086f7ba19 split INSERTPS opcode to reg and mem forms 2017-12-19 19:25:40 +00:00
Volker Ruppert
b30ec133a3 Some work on the Voodoo Banshee emulation.
- Only continue bitblt operation if width and height is > 0 after clipping.
- Temporary hack: Processing CMDFIFO packets directly after completion fixes
  some display issues (FIXME: 3D mode should work like Voodoo2).
2017-12-17 22:23:20 +00:00
Stanislav Shwartsman
4b7d7c9501 align UD opcodes with latest Intel SDM in old disasm 2017-12-17 18:55:03 +00:00
Stanislav Shwartsman
ce3eafa535 disasm fix 2017-12-17 18:47:21 +00:00
Stanislav Shwartsman
79ec183ff6 fixup for MMX opcodes disasm 2017-12-17 17:21:02 +00:00
Volker Ruppert
b2a92fddfa Voodoo Banshee code cleanups and optimizations. 2017-12-17 16:55:10 +00:00
Stanislav Shwartsman
e0c3433f7f bugfix in old disasm 2017-12-16 19:34:14 +00:00
Stanislav Shwartsman
5dc5e01a12 disasm fixes and reorg of pinsr* opcodes 2017-12-16 18:34:20 +00:00
Volker Ruppert
96f269d453 Some work on the Voodoo Banshee emulation.
- Handling variable 'gui_update_pending' like Voodoo 1/2 fixes 3D display
  flicker. Simplified first stage of the update() code. Some 3D display issues
  still need to be investigated.
- Added missing 16-bit write support in 3D memory space.
- Added separate method for linear FB writes und use it for CMDFIFO packet type
  5, destination code 0. Added minimal "byte disable" support in this code.
2017-12-15 20:54:09 +00:00
Stanislav Shwartsman
6a4e8ff2f1 fixed typo in prev commit 2017-12-13 21:08:10 +00:00
Stanislav Shwartsman
f362f34ed6 correctly decode PINSRQ instruction 2017-12-13 20:59:41 +00:00
Stanislav Shwartsman
69b29c3e15 added compilation instructions for bxdisasm_new.cc 2017-12-13 20:27:02 +00:00
Stanislav Shwartsman
50a799ea11 split handlers for PINSRD/Q opcodes. fix disasm for MULX instruction 2017-12-13 20:18:59 +00:00
Stanislav Shwartsman
07bff3be43 fixed decoding of VPINSRB/W/D/Q and VINSERTPS with EVEX prefix 2017-12-13 20:02:12 +00:00
Stanislav Shwartsman
8a311515dd correctly decode VPEXTRB/W/D/Q - these opcodes allowed to be with VEX.L=0 only
fixed disasm module compilation with no AVX enabled
remove duplicate opcode handlers
2017-12-13 19:51:25 +00:00
Stanislav Shwartsman
2f3c9d3c8c correct disasm for movsxd opcode 2017-12-13 18:44:13 +00:00
Volker Ruppert
47f3936de2 Some work on the Voodoo Banshee emulation.
- Added Banshee specific registers in register_w() since they use the same
  addresses as the Voodoo2 CMDFIFO config registers in register_w_common().
  Now the fullscreen 3D mode is basicly working. The display flickers sometimes
  and the desktop is possibly unusable after leaving 3D mode. This may be
  caused by the still incorrect CMDFIFO implementation.
- Split the host-to-screen method in two ones: one for the pattern case (ternary
  ROPs) and one optimized for the standard case (binary ROPs).
- Improved the foreground/background color handling for bitblt operations.
2017-12-13 18:40:45 +00:00
Stanislav Shwartsman
df877cc03d adjustments to old disasm done during validation of new disasm 2017-12-13 18:18:20 +00:00
Stanislav Shwartsman
c1dc514c2a clarify disasm of movlhps/movhlps opcodes 2017-12-12 08:55:09 +00:00
Stanislav Shwartsman
fd953421f4 new disasm: add correct memaccess size for FLDCW 2017-12-11 19:58:09 +00:00
Stanislav Shwartsman
a84d9cf1c7 disasm: fix crc32 operand description 2017-12-11 19:45:50 +00:00
Stanislav Shwartsman
a028ef7c9c bugfix for decoder with EVEX enabled 2017-12-11 19:29:11 +00:00
Stanislav Shwartsman
e46f37b40e fixed disasm of memsize for sse legacy instructions 2017-12-11 18:33:33 +00:00
Stanislav Shwartsman
404a5f2c53 bugfix for previous commit 2017-12-11 16:41:48 +00:00
Stanislav Shwartsman
b03f78d652 updates for bochs decoder and decoder based disasm 2017-12-11 15:45:43 +00:00
Volker Ruppert
99a90c295a Some work on the Voodoo Banshee emulation.
- Prepared update() code for 3D support (not yet working).
- Attempt to fix the LFB base address.
- CMDFIFO packet type 5: Added support for destination code 0 (linear FB).
2017-12-10 16:39:11 +00:00
Volker Ruppert
d621db4c81 USB xHCI fixes for Win 8.1 by Ben Lunt. 2017-12-09 11:18:18 +00:00
Volker Ruppert
df6246601e Some fixes for the Voodoo Banshee emulation.
- Always check if CMDFIFO is still enabled in the FIFO thread loop.
- Fixed offset for 3D register access (3D still not usable).
- Apply FBI mask when accessing memory in tiled desktop mode to avoid segfault.
- Added support for 16-bit writes to LFB.
- Don't access Voodoo2 CMDFIFO in Banshee mode.
- Set up the correct chipmask for Banshee (it has only one TMU).
- Fixed CMDFIFO enable message (using index #0 and #1).
2017-12-08 18:24:54 +00:00
Volker Ruppert
dd694757f4 Attempt to fix the calculation of the source pitch and the total amount of
dwords required for host-to-screen operations. There are no related error
messages in the log when I test 8, 24 and 32 bpp modes. There are still display
errors caused by buggy code, incorrect CMDFIFO implemenation or undocumented
features. The 16 bpp mode is still unusable possibly caused by CMDFIFO. 3D mode
testing cannot start before this mode is okay.
2017-12-06 21:36:08 +00:00
Stanislav Shwartsman
c80e587ded properly handle kmask registers in modrm form 2017-12-05 19:33:23 +00:00
Stanislav Shwartsman
8f15cfb514 fixed link err with debugger enabled 2017-12-05 19:23:41 +00:00
Volker Ruppert
54650e8cd1 Fixed possible compilation error (thanks to Ben Lunt). 2017-12-03 08:09:47 +00:00
Volker Ruppert
93b51df2cb Including stdint.h is not required here, since we are using Bit8u, Bit16u etc,
(thanks to Ben Lunt).
2017-12-03 07:56:45 +00:00
Volker Ruppert
aca3c9a29c Some work on the Voodoo Banshee emulation.
- Host-to-screen blt: Added support for host data word wizzling.
- Added variable 'vtimer_running' to simplify the CMDFIFO code.
- Minor other change.
2017-12-02 17:15:48 +00:00
Stanislav Shwartsman
31ea453921 fixed bogus assert 2017-12-02 16:40:03 +00:00
Stanislav Shwartsman
d4ce16d8d6 added new disasm stand-alone stub, compile as g++ -I. -I./instrument/stubs -DBX_STANDALONE_DECODER bxdisasm_new.cc cpu/decoder/*.cc -o bxdisasm 2017-12-01 21:30:04 +00:00
Stanislav Shwartsman
eaa05c32e8 link without LOGIO for standalone decoder mode 2017-12-01 21:27:30 +00:00
Stanislav Shwartsman
60591800f1 handle lock mov cr0 amd feature out decoder critical path 2017-12-01 21:18:16 +00:00
Volker Ruppert
9a98d3a5ba Some changes for the Voodoo Banshee emulation.
- now also using update_timing() and vertical_timer_handler() for Banshee.
- Changed CMDFIFO log message to BX_DEBUG.
2017-12-01 17:05:49 +00:00
Volker Ruppert
5698c69744 Attempt to fix the CMDFIFO hole count feature based on the code from voodoo.h.txt.
The Voodoo2 works fine with it. With the Banshee model only the 16 bpp mode is
not usable yet. This issue needs to be investigated.
2017-11-30 17:24:02 +00:00
Stanislav Shwartsman
01067cb4b9 another compilation fix for new disasm stand-alone module 2017-11-29 19:24:00 +00:00
Volker Ruppert
ad60191059 Some work on the Voodoo emulation code.
- Disabled voodoo_update() function completely and added the required code to
  the vertical timer handler (Voodoo 1/2).
- Added new method banshee_blt_execute() to reduce code duplication.
- Added support for the pattern x/y start offset (Banshee).
2017-11-28 20:36:23 +00:00
Volker Ruppert
bb88561a43 Retrieve vertical retrace value with method get_crtc_params() (now using a
structure for the returned values calculated from CRTC regs).
2017-11-28 18:05:36 +00:00
Stanislav Shwartsman
a7e58973ce fixed typo 2017-11-27 20:26:54 +00:00
Stanislav Shwartsman
c8d9aeb377 mark blocks of code which not supposed to be compiled for stand-alone bochs cpu decoder 2017-11-27 20:25:04 +00:00
Stanislav Shwartsman
cef6c7fb98 fix for new disasm 2017-11-26 19:38:58 +00:00
Volker Ruppert
1fb03a6f5b Some fixes and small changes for the Voodoo emulation.
- Fixed Voodoo2 usage after adding CMDFIFO RdPtr rollover detection. The end
  address value is the address of the last valid 4k page.
- Added support for using 2 CMDFIFO streams (Banshee and later).
- Fixed BX_DEBUG messages in 3D register read/write functions for the Banshee
  case.
- Forward read/write access to the intrCtrl register from the 2D to the 3D
  register set. This register is still not implemented yet.
2017-11-26 18:35:50 +00:00
Stanislav Shwartsman
596b3b6eb8 reduce CPU dependencies from fetchdecode module 2017-11-25 20:20:34 +00:00
Volker Ruppert
778c0c6fed Set IOC flag only if the TD has been completed successfully (Thanks to Ben Lunt). 2017-11-25 11:18:02 +00:00
Volker Ruppert
690919ae0e Added vertical retrace emulation support for Voodoo Banshee. Now the screen
resolution can be set to 800 x 600 in Win95 guest. Minor other changes.
2017-11-25 10:27:53 +00:00
Stanislav Shwartsman
03f63453f5 add bxdisasm.cc - interactive instruction disassembler using bochs disasm engine (pre-alpha) 2017-11-25 08:15:47 +00:00
Volker Ruppert
ff8f0225eb Some work on the Voodoo Banshee BitBlt code.
- Implemented line / polyline commands (solid lines only). The algorithm comes
  from the already removed unused draw_line() function.
- Implemented start bit/byte support for host-to-screen blts.
- Rewrite of the launchArea handling: added new method for setting up the
  required size and handle all currently implemented command in launch mode.
2017-11-24 20:18:52 +00:00
Volker Ruppert
b0abba2c5e Some fixes for the Voodoo Banshee emulation.
- Fixed segfault when leaving tiled desktop mode.
- Temporarily disabled the CMDFIFO "hole count" feature. The current code makes
  trouble and needs to be improved.
2017-11-23 21:54:28 +00:00
Volker Ruppert
3ad06c130e Some work for the Voodoo Banshee 16 bpp mode support.
- Started implementing the CMDFIFO "hole count" support. It does not yet count
  holes, but it handles the Amin and Amax values (except read pointer rollover
  and JMP command). This is enough to get a usable desktop after Win95 guest
  startup.
- Added read / write support for the desktop tile space.
- Fixed tiled desktop redraw after bitblt operation.
2017-11-22 17:07:39 +00:00
Volker Ruppert
e136e25586 Added support for indexed host displays (the win32 gui uses a 8 bpp bitmap for
the screen buffer in 8 bpp guest mode).
2017-11-19 17:18:17 +00:00
Volker Ruppert
d6f96db705 Some fixes for the Voodoo Banshee emulation.
- Fixed display updates for color depth > 8.
- Fixed compilation on MSVC (bitblt.h).
- Improved error message for undocumented srcXY bits.
- Fixed a GCC warning.
- Updated makefile dependencies.
2017-11-19 09:06:37 +00:00
Volker Ruppert
96f4c44cce Fixed Voodoo Banshee screen update issues and some other small changes.
Banshee TODO list:
#1: Fix display errors caused by incorrect implementation and find out the
    expected behaviour of the undocumented stuff.
#2: Make color depth > 8 work correctly.
#3: Screen resulution change not possible yet (only 640 x 480 works).
#4: Implement remaining 2D commands (line, polyline, polygon fill, stretchBlt).
#5: 3D core usablility, code cleanup, ...
2017-11-17 19:06:56 +00:00
Volker Ruppert
c81df659c1 Some work on the Voodoo Banshee BitBlt code.
- Implemented ternary raster operations. With 3 binary input values we have 8
  possible combinations und the ROP code is the binary representation of the
  result table. Instead of implementing cascades of binary operations at byte
  level, we simply build a 3-bit value from D, S and P. This is the bit number
  of the ROP code to use as the result. This is performed for each bit of color
  data. We still keep the existing binary operations at byte level, since the
  code is faster for that case.
- Inplemented the "row #0 only" flag handling in pattern fill operations. This
  flags seems to have an undocumented effect on the source pitch of
  host-to-screen operations. This issue needs to be investigated.
- TODO: Some bits of the srcXY register seem to have an undocumented effect on
  host-to-screen operations, too.
2017-11-15 22:13:37 +00:00
Stanislav Shwartsman
0c604d27d1 fixed compilation with no PKEYS enabled 2017-11-12 20:15:48 +00:00
Volker Ruppert
7ad81ace40 Some work on the Voodoo Banshee emulation.
- Added basic support for the tiled desktop space. Win95 now starts building
  the desktop, but without icons and it is not yet usable in 16 bpp mode.
- Fixed 32 to 24 bpp format conversion in host-to-screen operations.
- Fixed some raster operations.
- Now allocate buffer for launch area writes dynamicly.
- Added error messages for undocumented features.
2017-11-12 18:27:39 +00:00
Stanislav Shwartsman
13dcff5ab9 updated CHANGES 2017-11-11 12:35:27 +00:00
Stanislav Shwartsman
875c38a05c POPFD/POPFQ always clear RF flag (instead of reading it from stack image) 2017-11-11 12:27:50 +00:00
Stanislav Shwartsman
045a1cd637 XSAVEC/XSAVES should be supported in SKL-X CPUID 2017-11-11 12:04:26 +00:00
Stanislav Shwartsman
180386cd74 VMOVSS/VMOVSD are VEX.VL ignore form and not VEX.L0 2017-11-11 11:58:07 +00:00
Stanislav Shwartsman
f89b8a2742 fixed opcode of ADOX instr 2017-11-11 10:42:21 +00:00
Volker Ruppert
49885211ad Unified screen update code of all Voodoo models and prepared Voodoo 1/2 for
tile-based updates and screen update locking. Some related changes in the init
and save/restore code are also included. The main update code has been moved
from bx_voodoo_vga_c to bx_voodoo_c and the required parameters are set up
depending on the model. The BX_LOCK/BX_UNLOCK and SET_TILE_UPDATED stuff still
needs to be added in the 3D core. Currently a redraw_area() hack makes the
Voodoo 1/2 screen updates work as expected.
2017-11-09 17:58:53 +00:00
Volker Ruppert
b25ec2adcf Some work on the Voodoo Banshee emulation.
- Fixes and optimizations in the BitBlt code.
- Added mutex for display updates and lock some register writes and the BitBlt
  methods during screen update.
- Improved some debug messages.
TODO: Use the render_mutex for the Voodoo1/2 update code, too.
2017-11-07 22:07:39 +00:00
Volker Ruppert
205ac13582 Some work on the Voodoo Banshee emulation. Win95 with Banshee driver is now
almost usable in 8 bpp mode, but there are still issues (see below).
- Added basic support for pattern fill functions.
- Added some more ROPs (all S/D and P/D ones).
- Now using the ROP functions in rectangle, pattern and host-to-screen code.
- Several other related changes.
TODO:
- Implement remaining binary (P/S) and all of the ternary ROPs.
- Some Windows icons are still black or messy (e.g. start button) and screen
  are missing in some cases. Shutdown background is wrong, although the correct
  ROP is used.
- Cleanups and optimiations when the code is known to work as expected.
2017-11-06 17:01:30 +00:00
Volker Ruppert
ca9120655b Some work on the Voodoo Banshee emulation.
- Moved basic BitBlt stuff from the Cirrus code to a separate header file to
  make it usable for the Voodoo Banshee, too.
- Rewrite of the screen-to-screen BitBlt code for the new ROP code.
- Calculate redraw parameters based on the screen start.
- Set "Banshee busy" bit in the status register when 2D is busy.
- Added some error messages for unimplemented features.
2017-11-04 23:43:38 +00:00
Volker Ruppert
b1aefb0b6c Some work on the Voodoo Banshee emulation.
- Host-to-screen and screen-to-screen copy operations implemented (ROP 0xcc).
- Rectangle fill command now handles clipping.
- Attempt to fix the redraw_area() location after bitblt operations.
- Update the host palette entries when writing to CLUT (fixes screenshot).
- Added 2D register names for debug messages.
2017-11-01 21:32:41 +00:00
Volker Ruppert
815b8238c7 Some work on the Voodoo Banshee emulation.
- Fixed hardware cursor bottom/right edge display bug.
- Started splitting 2D code in different methods (no functional changes).
- Added hardware cursor to save/restore list.
TODO #1: Implement bitblt engine similar to the Cirrus one.
TODO #2: Voodoo code reorganization: base class with Voodoo core, one subclass
         for Voodoo1/2 and one for Banshee.
2017-10-31 22:58:10 +00:00
Volker Ruppert
78ef782b38 Some work on the Voodoo Banshee emulation.
- Added CMDFIFO extensions (CMDFIFO #1 still unhandled).
- Fixed voodoo plugin compilation on Windows.
- Fixed an MSVC warning.
2017-10-31 11:43:28 +00:00
Volker Ruppert
dcbca35ac7 Voodoo Banshee hardware cursor implemented. 2017-10-30 23:03:26 +00:00
Volker Ruppert
13d4f0ff65 Some work on the Voodoo Banshee emulation. Win95 boots now with Banshee driver
in 8 bpp mode, but it's not yet usable (no cursor, no text). List of changes:
- Added AGP/CMD/Misc register handling (CMDFIFO #0 is now usable).
- Started work on 2D register handling ("Rectangle fill" command implemented).
- Added Banshee specific code in redraw_area().
- Writing to VGA DAC registers also modifies the Banshee CLUT.
- Banshee now indicates that no TV-out and video-in device is connected.
- Some other related fixes and improvements.
2017-10-29 21:25:37 +00:00
Volker Ruppert
d7ab113a95 Improved video clock handling for the retrace timing emulation.
- Added VCLK array and removed hardcoded values.
- Added new method get_crtc_params() to retrieve htotal and vtotal values.
- Cirrus: Set up VCLK registers with default on reset (TODO: VGABIOS should do
  that when setting video mode).
- Voodoo Banshee: Set up VCLK #3 when writing to pllCtrl0 register. VCLK #0 and
  #1 are VGA compatible and VCLK #2 is fixed 50 MHz. Fixed maximum resolution
  based on PLL section of the spec.
2017-10-27 18:49:19 +00:00
Volker Ruppert
7bd6e6c7c2 Removed all of the pre-defined rasterizer functions and replaced it by a single
function. I guess the old stuff should be a speed optimization, but I don't see
a difference with the new code. The simulation output is also still the same.
Now Bochs compiles much faster with Voodoo support enabled and the binary is
much smaller. This patch has been written by Luigi B.
2017-10-23 20:01:25 +00:00
Volker Ruppert
e2245d98d3 Some work on the Voodoo Banshee emulation.
- Banshee Memory layout implemented (AGP/misc and 2D register behaviour not
  implemented yet). Now Win95 with Banshee driver can boot in standard VGA mode.
- Fixed memory allocation: Banshee has 16 MB shared LFB / TMU memory.
- Some work on save/restore support.
- Renamed Banshee VGA register handlers.
2017-10-23 18:45:16 +00:00
Volker Ruppert
539356ac13 Some changes and comments in the xHCI code by Ben Lunt. 2017-10-22 14:30:04 +00:00
Volker Ruppert
1b8c58ed58 Some work on the Voodoo Banshee emulation.
- tile-based VBE graphics updates implemented
- "half mode" support added (line doubling for low resultions)
- change screen resolution only after re-enabling the video processor
2017-10-22 12:16:20 +00:00
Volker Ruppert
26c6c3bfca Moved macros SET_TILE_UPDATED and GET_TILE_UPDATED to vgacore.h to reduce code
duplication.
2017-10-22 10:09:32 +00:00
Stanislav Shwartsman
8261a91ce9 implemented GFNI instructions 2017-10-21 19:57:12 +00:00
Volker Ruppert
35684fa0f5 Started implementing the Voodoo Banshee display adapter based on the existing
"Voodoo VGA" framework. Most of the work is still to do.
- Added Banshee specific PCI write handler and related stuff. The device is
  initialzed properly by the Bochs BIOS (mem, lfb, rom and i/o).
- With Banshee specific VGA BIOS it passes the init stage and boots properly
  to DOS. Parts of the init code coming from file "voodoo.h.txt" (part of the
  original patch).
- Standard VGA modes are all usable (using the Bochs VGA core).
- VBE graphics modes with 8, 16, 24 and 32 BPP are usable (VBE drawing code is
  mostly copy&paste from the Bochs VBE code. DAC 6/8 bit switch is present.
- TODO list:
  - Voodoo Banshee memory layout (registers, 2D, 3D, LFB, textures)
  - 2D graphics engine must be written from scratch
  - interaction between new device and existing 3D core
  - non-VGA mode (Voodoo model "banshee" without VGA extension "voodoo")
  - save/restore support, move Banshee stuff to separate file, ...
2017-10-21 12:46:17 +00:00
Stanislav Shwartsman
e426970f15 updating CHANGES 2017-10-20 19:55:24 +00:00
Stanislav Shwartsman
b7f62a291c fixed compressed displ form for more avx512 instructions 2017-10-20 19:41:32 +00:00
Stanislav Shwartsman
da8d6e793f fixed compilation issues 2017-10-20 19:24:10 +00:00
Stanislav Shwartsman
bca076889b decode all the vbmi2 opcodes, fix vpcompress/vpexpand instruction handler names (affects disasm) 2017-10-20 18:50:10 +00:00
Stanislav Shwartsman
77a62a4dcd implemented (experimental, still untested) AVX512 VBMI2 extensions 2017-10-20 18:38:15 +00:00
Stanislav Shwartsman
0afbb6cd3d fixed compilation when AVX is not configured in 2017-10-20 12:27:42 +00:00
Stanislav Shwartsman
5439647254 small change to extract ia_opcodes.h from instr.h to dedicated file. this would remove compilation dep of all files on ia_opcodes.h (now called ia_opcdes.def). regenerating dep ober all files in Makefiles.in 2017-10-19 21:27:25 +00:00
Stanislav Shwartsman
ba1e5bbffa fixed accidentially broken XMM versions of AES instrructions 2017-10-19 20:25:05 +00:00
Stanislav Shwartsman
15ba88c195 implemented VAES/VPCLMULDQ instructions - VEX/EVEX extensions of AES/PCLMULQDQ 2017-10-19 19:12:55 +00:00
Stanislav Shwartsman
ac442009aa lazy flags code small refactoring 2017-10-15 22:01:32 +00:00
Stanislav Shwartsman
6daa1ba9ba fixed compilation issue with EVEX enabled 2017-10-15 20:40:56 +00:00
Stanislav Shwartsman
944f37b1f2 implemented AVX-512 BITALG instructions/bugfix for VPOPCNT instructions 2017-10-15 20:33:19 +00:00
Stanislav Shwartsman
0d190eec8e implemented AVX-512 VNNI instructions 2017-10-15 19:17:07 +00:00
Stanislav Shwartsman
4179e6f939 add some const 2017-10-14 18:42:12 +00:00
Volker Ruppert
184324c8e8 Some small fixes in the display adapters code.
- Fixed missing bx_gui->flush() call after non-VGA update().
- Fixed a BX_DEBUG message in the Voodoo code.
- Re-define LOG_THIS for messages in the "Voodoo VGA" code.
2017-10-14 11:15:00 +00:00
Stanislav Shwartsman
69f27439db added new cpuid flags mentioned in new Intel SDM future extensions rev030 doc 2017-10-13 20:27:52 +00:00
Volker Ruppert
2b91dabfe5 Added new VGA extension choice "voodoo" to test the new VGA extension code. It
currently only implements an ISA standard VGA adapter with the selected Voodoo
model as it's extension. The methods of the "Voodoo VGA" device only call the
required methods of the Voodoo or VGA core.
TODO: Start implementing the Voodoo Banshee chipset based on this code.
2017-10-12 19:34:58 +00:00
Volker Ruppert
5ec78eaae2 Modified VGA extension init method. Now it returns 1 if the extension code has
initialized the VGA compatible video memory. If it has returned 0 the VGA core
code sets up the default VGA memory (256k).
2017-10-12 19:18:23 +00:00
Volker Ruppert
d25e85c21a Preparing improved VGA extension support and some VGA / Cirrus cleanups.
- Treat VGA extension name other than "none", "vbe" or "cirrus" as a VGA
  compatible device plugin and try to load it.
- Added new plugin type PLUGTYPE_VGA for such a plugins (interally handled like
  a core plugin).
- Added panic in devices init for the case no VGA compatible plugin is present.
- Added new method vga_redraw_area() that handles the non-VGA and null size
  case. The specific method redraw_area() is called otherwise.
- Moved init_systemtimer() call from extension code to init_standard_vga().
- TODO: Implement VGA subsystem in the Voodoo code to test the new feature.
  Voodoo Banshee 2D accelerator code needs to be written to make this really
  useful.
2017-10-10 18:06:16 +00:00
Volker Ruppert
6dba96d10a Some changes related to the PCI ROM handling.
- Added support for setting memory write handler to NULL (ROM case).
- Added new PCI device method after_restore_pci_state(). It currently handles
  the PCI ROM case only (could be extended).
2017-10-08 15:54:21 +00:00
Volker Ruppert
610cec209d Rewrite of the VGA/Cirrus code to reduce code duplication.
- Moved VGA timer handler to the VGA core and handle the non-VGA case there.
  It calls the specific update() code and finally bx_gui->flush().
- Moved the VGA update frequency parameter handler and the refresh_disply()
  method to the VGA core.
- Store the VGA extension parameter in the VGA core.
- Voodoo: Fixed graphics snapshot.
2017-10-08 07:55:04 +00:00
Volker Ruppert
ebbd952d3b Code cleananup: Since the Cirrus plugin device is only loaded in case the
VGA extension "cirrus" is selected, there is no need to check this parameter.
TODO: Implement new VGA extensions (e.g. Voodoo Banshee, Voodoo3).
2017-10-07 08:49:05 +00:00
Volker Ruppert
f31d062854 Added SDL / SDL2 specific multi-threading support. If one of these guis is
enabled, the portable code is used instead of the pthread or win32 one.
2017-09-16 22:01:49 +00:00
Volker Ruppert
0311f47bc3 Moved all Bochs event / wait functions required for multi-threading to a new
file called "bxthread.cc".
2017-09-14 16:18:12 +00:00
Volker Ruppert
2a47615bb6 Started updating changes after release 2.6.9. 2017-09-12 17:48:43 +00:00
Volker Ruppert
c889fcae87 Some improvements in the Voodoo2 CMDFIFO code.
TODO: Check whether or not there are still simulation freezes caused by CMDFIFO.
2017-09-12 16:29:02 +00:00
Volker Ruppert
245ccf1037 Added symbols to fix MSVC plugins compilation. 2017-09-10 19:16:02 +00:00
Volker Ruppert
b61b9d255a Moved all Bochs multi-threading definitions from bochs.h and osdep.h to a new
file called "bxthread.h".
2017-09-10 15:55:13 +00:00
Volker Ruppert
ad9f1c3417 Moved event / wait stuff from the Voodoo code to osdep.cc fot the usage in
other parts of Bochs.
2017-09-10 06:50:07 +00:00
Volker Ruppert
da48346f9d Implemented combined PCI / memory FIFO. This is required for running Voodoo1
games / demos correctly on the Voodoo2 model. I noticed a small slowdown
(2 or 3 percent) on the Voodoo1.
2017-09-08 16:17:20 +00:00
Volker Ruppert
c1d5947a80 Memory FIFO fix: 16-bit write support for the FBI video memory was missing. 2017-09-03 20:51:37 +00:00
Volker Ruppert
e063d282ac Voodoo2 CMDFIFO fix and cleanup.
- Fixed probing the CMDFIFO with Voodoo output disabled (send FIFO wakeup
  directly, otherwise driven by vertical retrace).
- Use the CMDFIFO member 'enabled' instead of reading the fbiInit7 register bit.
- TODO: The Voodoo2 freeze when testing a Voodoo1 demo is still not fixed.
2017-09-03 17:32:49 +00:00
Stanislav Shwartsman
ec6281a828 remove include which is not needed 2017-09-03 11:43:30 +00:00
Stanislav Shwartsman
3148cdd683 fixed compilation under VS2013 2017-09-03 11:42:27 +00:00
Volker Ruppert
7c3dafc7f5 Some Voodoo emulation fixes.
- voodoo_init() must be called after initializing FIFO mutex.
- The 'op_pending' counter must be reset after resetting FIFOs.
- Fixed an MSVC warning and removed obsolete comment.
- FIXME: There are still some conditions that can freeze the Voodoo display.
2017-09-03 08:28:16 +00:00
Volker Ruppert
1f85292418 Implemented memory FIFO to speed up the Voodoo1 emulation. The PCI FIFO with
it's 64 entries is still not present, since it makes the emulation a few
percent slower due to the overhead of the FIFO code. The memory FIFO has 64k
entries and makes a speedup of around 75 % possible.
2017-09-01 17:30:49 +00:00
Volker Ruppert
ea8bfca53f Two USB modifications requested by Ben Lunt.
- usb_msd.cc: The Device Qualifier is valid for high speed devices only.
- uhci_core.cc: Don't report BX_DEBUG message if the current TD belongs to an
  async operation that is still not complete.
2017-08-26 08:10:21 +00:00
Volker Ruppert
bd40347963 Store FIFO presence in variable "enabled" and report the state change of the
currently unimplemented FIFOs.
2017-08-24 21:08:21 +00:00
Stanislav Shwartsman
2d3d62db5f cleaned cr2 print in 32-bit mode 2017-08-22 21:14:39 +00:00
Stanislav Shwartsman
2a55ba0a39 Merge set of debugger improvements by Doug Gale <doug16k>
Here is his original comment:

I have made several improvements in the debugger.
I have fixed several issues with proper handling of 64-bit addresses, and added support for 64 bit symbols.
I also have added several symbol lookups.
2017-08-22 21:03:58 +00:00
Stanislav Shwartsman
f490b00beb added support for conditional breakpoints in Bochs debugger 2017-08-22 18:47:18 +00:00
Volker Ruppert
680189a548 Fixed Voodoo pixel clock calculation.
- Now using float type for the 'clk0_freq' variable.
- DAC register 6 can switch to half pixel clock (ported from PCem).
- Writing value 0xf8 to PLL register 0x0e completes clock #0 setup.
2017-08-21 19:33:29 +00:00
Volker Ruppert
4e80e2fbfc Started preparing the Voodoo code for the PCI FIFO / memory FIFO implementation.
- Initialize the thread and event stuff for both Voodoo models.
- Rewrite of the event handling code to manage different events.
2017-08-20 20:25:45 +00:00
Volker Ruppert
e187f3907a Removed Voodoo realtime option. Since the gui screen update timing is now
controlled by the 'vga' option and Voodoo2 CMDFIFO thread has the best
performance with realtime mode disabled, this option is now obsolete.
2017-08-18 15:19:30 +00:00
Volker Ruppert
9a1668ac36 First version of the Voodoo2 CMDFIFO thread using "pthread cond" code on
non-WIN32 platforms instead of BX_MSLEEP(). The donut demo is once again a
little bit slower, but on other tests the IPS values are still okay. Cleaned
up the code a little bit and added save/restore stuff for the new code.
2017-08-17 19:15:02 +00:00
Volker Ruppert
6361386e8b Reverted BX_LOCK/BX_UNLOCK changes from previous commit (don't lock CMDFIFO
completely while running cmdfifo_process()). The donut demo is now a little bit
slower on Linux host, but other test cases are faster again.
2017-08-17 17:15:12 +00:00
Volker Ruppert
fcb5f6d1d3 Voodoo2: Now only start processing of the CMDFIFO at the vertical retrace.
I noticed a speed improvement of around 10 % (tested with donut demo only).
2017-08-15 21:30:45 +00:00
Stanislav Shwartsman
7f4a9b4b08 skylake CPUID should compile also with no EVEX 2017-08-09 21:04:15 +00:00
Stanislav Shwartsman
7f01a7d9b6 remove obsolete comment 2017-08-09 20:37:43 +00:00
Stanislav Shwartsman
b2fdbd1274 added Skylake-X model to CPUDB -> with EVEX and AVX512 support 2017-08-09 20:36:17 +00:00
Volker Ruppert
593141603d Small change in the non-WIN32 Voodoo2 thread code: Process all complete command
packets and then always sleep for 1 millisecond.
TODO: The first tests with pthread_cond_* stuff showed a slowdown of approx.
10 % compared with the IPS value of the current code.
2017-08-09 15:42:34 +00:00
Volker Ruppert
3cee1f74ee Now using WIN32 event / wait functions in the Voodoo2 thread. I noticed a speed
improvement of around 10 % (tested with donut demo only).
TODO: Use similar functions of the pthread library for improvements on other
platforms.
2017-08-08 18:23:12 +00:00
Volker Ruppert
bd39f8c103 Fixed GCC 6.3 warnings (indentation only). 2017-08-07 18:18:18 +00:00
Volker Ruppert
ca3758423b Fixed some MSVC warnings. 2017-08-06 18:35:37 +00:00
Volker Ruppert
21fce8c2f2 Fixed compilation failure if ES1370 is enabled, but gameport disabled in config.h. 2017-08-04 18:09:26 +00:00
Volker Ruppert
18dc09aaad Fixed possible CMDFIFO failure. 2017-07-18 18:03:16 +00:00
Volker Ruppert
7b5eca0cf2 Minimal improvement in the CMDFIFO code: calculate needed depth for current
command and execute it when there is enough data present (code partly ported
from voodoo.h.txt).
TODO: Use "wait for event / condition" functions instead of msleep() if there
is a performance improvement with it.
2017-07-17 18:07:28 +00:00
Volker Ruppert
2b92978728 Fixed save/restore failure. 2017-07-12 21:01:58 +00:00
Volker Ruppert
0d7c32c6b5 Minor fixes and cleanups in the bxhub code.
TODO: rewrite of the vnet server code to reduce code duplication.
2017-07-04 18:53:33 +00:00
Volker Ruppert
bc82bf9316 Removed unnecessary include. 2017-06-28 15:34:34 +00:00
Volker Ruppert
851e9a084c Fixed compilation on MSVC (Bochs always defines stricmp). 2017-06-23 19:44:30 +00:00