Commit Graph

11451 Commits

Author SHA1 Message Date
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
Volker Ruppert
17abf11e85 Check requested maximum DHCP message size and report if invalid (networking
modules vnet / socket only).
2017-06-18 15:54:54 +00:00
Volker Ruppert
d22cdbdbf7 Some work on the bxhub utility.
- Added DNS service support for the server "vnet" and connected clients.
- Added command line option "-loglev=" to control whether or not there is
  BX_ERROR, BX_INFO or BX_DEBUG output. Default value is 1 (BX_ERROR only).
2017-06-17 12:40:13 +00:00
Volker Ruppert
2ae5fd563e Added destructors to some networking modules and call fclose() there for the
case the logging feature is enabled.
2017-06-16 08:27:55 +00:00
Stanislav Shwartsman
54e969b749 disasm update 2017-06-05 21:05:47 +00:00
Stanislav Shwartsman
20e9e33662 internal disasm updates 2017-06-05 20:49:04 +00:00
Stanislav Shwartsman
3f4f18de7a internal disasm updates 2017-06-05 20:28:33 +00:00
Stanislav Shwartsman
46ef85ce0f avoid using magic constants for disasm source metadata 2017-06-05 19:55:40 +00:00
Volker Ruppert
8006ec9fa3 Fixes and updates for wxWidgets 3.0
- wxMSW unicode: define UNICODE before including windows.h via bochs.h.
- Fixed compilation error (wxNode usage).
- Fixed deprecation warnings at toolbar creation.
2017-06-04 09:32:58 +00:00
Stanislav Shwartsman
38e2562d9c added new debugger cap: conditional continue' 2017-06-03 19:11:52 +00:00
Volker Ruppert
f38a0d8a97 Updated code for the invisible cursor on wxGTK (fixes compilation on wxMSW 3.0). 2017-06-03 14:32:56 +00:00
Volker Ruppert
bdd8875692 Reverted BX_THREAD_KILL() changes in the lowlevel sound code. Now using control
variables again to let the threads end normally. Re-implenented the method
closewaveoutput() for some modules, move the destructor code to it and call it
after leaving the mixer thread. This fixes a deadlock in the "soundwin" module
if Bochs is compiled with plugin support.
2017-06-02 16:56:58 +00:00
Volker Ruppert
726e39f854 Some work on the USB device plugin code.
- usb_common: init_device() now splits device name and primary option before
  detecting device type.
- usb_hub: now completely handle port option in constructor.
- plugin.h: removed obsolete defines.
2017-06-01 20:04:10 +00:00
Stanislav Shwartsman
b4d2bbcd32 fixed compilation issue 2017-06-01 10:25:22 +00:00
Stanislav Shwartsman
555bb8f8b6 updates to prev commit 2017-06-01 08:41:41 +00:00
Stanislav Shwartsman
6ab4fd597b implement another form of AR field packing used in SKL, in addition on present NHM format 2017-06-01 08:31:20 +00:00
Stanislav Shwartsman
bde8a1f69d fixed ifdef typo 2017-06-01 07:48:54 +00:00
Stanislav Shwartsman
22e9051716 implemented correct VM-exit instruction information for INVPCID, RDRAND/RDSEED and XSAVES/XRSTORS instruction Vmexits 2017-05-31 13:16:49 +00:00
Volker Ruppert
1de56aa05e Fixed plugins case (unloading module). 2017-05-28 08:45:23 +00:00
Volker Ruppert
bd1eb0f862 Rewrite of the USB devices plugin code similar to the network driver code.
- Removed "pseudo device plugin" containing common code and all connectable
  USB devices.
- Moved USB device base class and module handling to the Bochs core.
  Now loading USB device plugins in usb_common.cc.
- Created separate plugins for each USB device implementation.
- Modified Bochs plugin system to support new plugin type PLUGTYPE_USBDEV.
- Added entries for the non-plugin case similar to the network and sound stuff.
2017-05-28 08:13:06 +00:00
Stanislav Shwartsman
bb43ac527b fixed decoder issue when decoding opcode 8f (aka xop prefix) as well 2017-05-27 10:32:44 +00:00
Stanislav Shwartsman
54c109ceb4 VEX and EVEX opcodes should be considered as 2-byte opcode, always attempt to fetch 2nd byte even if #UD is already detected 2017-05-26 11:46:02 +00:00
Stanislav Shwartsman
48a2bc2cbf change disasm memsize print 2017-05-26 11:21:56 +00:00
Stanislav Shwartsman
6ac6463754 fixed compilation err with recent gcc 2017-05-26 07:16:25 +00:00
Volker Ruppert
431e9671a6 Code cleanup: removed unused definitions, functions and statistics code not
required for the emulation.
2017-05-21 18:30:25 +00:00
Volker Ruppert
5db2596317 The resampler and mixer threads are now stopped with BX_THREAD_KILL(). 2017-05-21 15:08:20 +00:00
Volker Ruppert
82eeab4a57 Some documentation updates. 2017-05-21 07:27:26 +00:00
Volker Ruppert
c160fd4830 Bochs thread handling improvements:
- Modified win32 thread macros to use the handle instead of the id.
- Added new macro BX_THREAD_KILL to terminate threads.
Voodoo thread changes:
- Let the cmdfifo_thread sleep while the CMDFIFO is disabled.
- Kill the cmdfifo_thread in destructor and removed old thread control code.
2017-05-18 18:34:00 +00:00
Volker Ruppert
495a8afeac Voodoo2 bitBLT: optimized SGRAM fill code a little bit. 2017-05-17 21:21:53 +00:00
Volker Ruppert
9912c99fd2 Continued work on Voodoo2 support (some demos now working).
- Added capability to save/restore float type values in paramtree / siminterface.
- Added Voodoo2 triangle generator data to save/restore list.
- Implemented bitBLT function "SGRAM fill".
- Minor other changes and cleanups.
- TODO: remaining bitBLT functions, thread handling improvements.
2017-05-16 20:37:01 +00:00
Volker Ruppert
9a705a3369 Fixed Voodoo2 CMDFIFO write handling (check address range first). 2017-05-15 20:55:49 +00:00
Volker Ruppert
da489b91ce Implemented CMDFIFO type 3 data support using some pieces of code from file
voodoo.h.txt which was a part of the original voodoo patch for DOSBox.
Some Voodoo2 specific parts were not integrated in the main patch file. I guess
they have been removed since Voodoo2 support was incomplete (2D stuff missing).
TODO: Voodoo2 2D support (bitblt engine), more testing, code cleanup...
2017-05-15 19:15:55 +00:00
Volker Ruppert
6265976a2c Some work on the Voodoo2 CMDFIFO support.
- Added CMDFIFO thread similar to the sound output thread.
- split register write function in 2 functions: register_w_common() handles
  the CMDFIFO writes and valid registers in CMDFIFO mode. It forwards write
  accesses to other registers to register_w() (Voodoo1 and non-CMDFIFO mode).
  The CMDFIFO thread also calls register_w() when processing data.
- The CMDFIFO thread processes all data, but it does not yet execute type 3
  requests (extended triangle generator missing).
- TODO #1: implement Voodoo2 specific triangle functions (for CMDFIFO).
- TODO #2: implement 2D bitblt engine.
2017-05-14 15:53:29 +00:00
Volker Ruppert
19f6cbc519 Continued preparing Voodoo2 CMDFIFO support.
- Zero out voodoo device state in init().
- Added the CMDFIFO state to save/restore list.
- Added CMDFIFO register handling in read/write functions.
- Added new function cmdfifo_put().
- TODO: CMDFIFO thread.
2017-05-13 11:52:49 +00:00
Stanislav Shwartsman
af76e0c412 fixes for debugger and disasm 2017-05-10 18:31:59 +00:00
Stanislav Shwartsman
1ca366609f add memsize for non-evex memory refrences in disasm 2017-05-09 19:49:27 +00:00
Stanislav Shwartsman
f8abddafcf bugfix in disasm 2017-05-09 19:34:03 +00:00
Volker Ruppert
a575b4aa2f Some work on the Voodoo2 CMDFIFO code.
- Fixed normal register access in CMDFIFO mode.
- Implemented cmdFifoBaseAddr register behaviour.
- Write CMDFIFO data to FBI memory (has no effect yet).
- Changed some log messages to BX_DEBUG.
- Report unimplemented Voodoo2 registers.
- TODO: Add FIFO thread to process the CMDFIFO data.
2017-05-09 19:18:58 +00:00
Stanislav Shwartsman
1d48973c80 updates in fetchdecode.h to help automatic disasm to determined memaccess size 2017-05-09 12:06:02 +00:00
Volker Ruppert
e956100a60 Fixed possible segfault in win32 gui when switching back from Voodoo to VBE or
Cirrus mode. Set font height to 0 in graphics modes and fixed argument order.
2017-05-07 14:52:37 +00:00
Volker Ruppert
eb89cdaea4 It is valid to set up the PRD size larger than the IDE transfer size. Fixed
busmaster DMA code to handle this case.
2017-05-07 07:47:08 +00:00
Volker Ruppert
78ff38fcf3 Fixed check for unimplemented CMDFIFO and return for now if write would be
valid. The hRetrace value can be set now, since Bochs no longer crashes.
TODO: Implement enough of the FIFO stuff to make the Win9x driver for the
Voodoo2 work.
2017-05-06 10:07:28 +00:00
Volker Ruppert
495607d162 Added description for the win32 option "traphotkeys". 2017-05-06 08:15:05 +00:00
Volker Ruppert
6273f0cdc9 Added new win32 gui option "traphotkeys" to disable system hotkeys for the
host when the mouse is captured and in fullscreen mode. This is useful if the
guest is also a Windows version. These changes are based on the rejected SF
patch "disablesystemhotkeys". But instead of disabling the hotkeys completely,
the events are sent to the Bochs keyboard.
2017-05-05 21:44:30 +00:00
Stanislav Shwartsman
e357da9150 update (c) for fpu files 2017-05-05 21:09:27 +00:00
Stanislav Shwartsman
1abfcd39ff implement FOPCODE and FDP deprecation CPU features 2017-05-05 20:56:13 +00:00
Stanislav Shwartsman
fce7476bda convert magic defines into static const variables 2017-05-03 18:20:13 +00:00
Volker Ruppert
8b96faf99e Some work on the timing code of the Bochs display adapters.
- Voodoo: Use the VGA/Cirrus timers to drive the gui screen update.
  The vertical retrace emulation is still driven by a separate timer.
- VGA/Cirrus: Since we are using the virtual timer, we also have to read
  time_usec() from it.
- vgacore: removed unused timer methods.
2017-05-01 11:54:12 +00:00
Volker Ruppert
73c914a7f6 - Some work on the Voodoo Graphics emulation (Voodoo2 specific)
- prepared hRetrace value implementation (cannot be enabled yet, since the
    driver passes this test and gets confused in next stage (segfault).
  - Detect CMDFIFO access (not present yet).
  - Report disabling Voodoo graphics mode.
  - TODO #1: Fix Voodoo2 to make it usable.
  - TODO #2: Split update code and drive gui screen updates from the VGA timer
    (finally remove new realtime option again).
2017-05-01 09:11:12 +00:00
Volker Ruppert
d462e52a9d Implemented 'realtime' option for the Voodoo update timer similar to the VGA
realtime option (enabled by default).
2017-04-30 09:07:25 +00:00
Volker Ruppert
904984e795 Voodoo code cleanup (removed unused / disabled stuff). 2017-04-29 22:19:29 +00:00
Volker Ruppert
a7529c1e75 - Some work on the Voodoo Graphics emulation
- Since we are using the virtual timer, so we have to read time_usec()
    from it, too (TODO: realtime mode is hardcoded, maybe add an option).
  - Voodoo1 and Voodoo2 have different timing register widths.
  - Fixed vertical retrace value returned by get_retrace().
  - Prepared separate hvRetrace register (TODO: hRetrace).
2017-04-29 10:25:57 +00:00
Volker Ruppert
f4bfb6353f - Some work on the Voodoo Graphics emulation
- Store the Voodoo model in structure bx_voodoo_t.
  - The PCI initEnable register of the Voodoo2 model has a read-only secondary
    revision ID in bits 12..15. Now the Voodoo2 is correctly detected by the
    Windows driver, but display is not yet working (blank screen).
  - Reset now disables VGA override.
- PCI: Moved PCI device base class methods to the end of file devices.cc and
  re-define LOG_THIS to use the correct log module and prefix.
2017-04-28 18:45:45 +00:00
Volker Ruppert
915746a1fd Fixed slirp user-mode networking support on Cygwin 64-bit.
- Enabled Winsock2 usage and define _WIN32 symbol for Cygwin (both 32 and 64 bit).
- Changed include order in some files to resolve conflicts.
- Modified some data types to fix errors and warnings.
- Added workarounds for the incorrectly defined symbols FIONBIO, FIONREAD and
  EWOULDBLOCK.
- Verified slirp usability with Cygwin 32-bit, MinGW/MSYS and MSVC builds of
  Bochs. Other ports should not be affected.
2017-04-23 08:38:16 +00:00
Volker Ruppert
1ffac6a461 Moved method release_keys() to the common devices code to make sure this
feature also affects the removable (USB) keyboard.
2017-04-22 15:32:07 +00:00
Volker Ruppert
4ebe5e6879 If setenv() is present on Windows and variable BXSHARE is not set, use the
function get_builtin_variable() to set it up with either the value of the Bochs
registry key or the BX_SHARE_PATH constant.
2017-04-22 10:17:54 +00:00
Volker Ruppert
ec03c4bb53 Fixes in networking modules for 64-bit Cygwin.
- socket: Define the FIONBIO workaround for 64-bit Cygwin only.
- slirp: Don't mix usage of WIN32 and _WIN32 definitions.
- TODO: The slirp module still fails at UDP socket creation when Bochs is
  compiled in Cygwin64.
2017-04-21 21:07:52 +00:00
Volker Ruppert
89ed58114b Fixed compilation with DEBUG symbol defined. 2017-04-21 15:28:25 +00:00
Volker Ruppert
068795a73f Fixes in networking modules for 64-bit Cygwin.
- slirp: Increment IP packet ID outside of htons() to avoid undefined behaviour.
- socket: Workaround for a bug in the w32api code that generates a constant
  with wrong value. Setting up our own FIONBIO fixes the panic.
- TODO: The slirp module still fails when Bochs is compiled in Cygwin64.
2017-04-20 18:51:18 +00:00
Stanislav Shwartsman
68b9d10b76 reverting latest commit, merged by mistake 2017-04-20 18:31:52 +00:00
Stanislav Shwartsman
e3fdf42225 use std::string in param_tree and gain more robust code with automatic garbage collection 2017-04-20 18:26:45 +00:00
Volker Ruppert
78cce73f8a Fixed error handling on Windows (avoid flooding log file with useless messages). 2017-04-19 21:03:53 +00:00
Stanislav Shwartsman
cfecb7c969 fixed compilation err in cygwin 2017-04-19 18:30:02 +00:00
Volker Ruppert
2fb6263102 Compilation fixes for Cygwin.
NOTE: networking still fails when compiled with Cygwin ('socket' mode fails
to set up non-blocking i/o / 'slirp' doesn't complain, but fails to connect
the internet).
2017-04-18 20:45:28 +00:00
Stanislav Shwartsman
2cae01edea better way of fixing shift of 1 by 64-bit to avoid integer overflow 2017-04-17 20:38:18 +00:00
Volker Ruppert
7f2191c117 Fixed MSVC warnings. 2017-04-17 19:56:41 +00:00
Stanislav Shwartsman
0702901377 fixed gcc specific ULL usage in hpet code 2017-04-17 18:44:16 +00:00
Volker Ruppert
0ee643ad76 Removed gui support auto-detection using --with-all-libs option for the MacOS 9
and SVGAlib specific guis. These guis can still be enabled explicitly with
--with-macos or --with-svga options.
2017-04-17 14:41:02 +00:00
Volker Ruppert
e1d8bedbb5 Added symbol BX_LOAD32BITOSHACK to disable this legacy feature. With the
latest BIOS images 32-bit and even 64-bit guest OS's are known to boot inside
of Bochs without hacking. This legacy hack could be removed after next release
if nobody complains.
2017-04-17 13:26:44 +00:00
Volker Ruppert
e36b3175d1 Missed the new HPET files. 2017-04-17 07:31:08 +00:00
Volker Ruppert
e5370fa2ac Regenerated configure script and recompiled BIOS for HPET support. 2017-04-17 07:28:22 +00:00
Volker Ruppert
1d27d67ccd Added initial version of the High Precision Event Timer (HPET) ported from Qemu.
- Created framework based on our I/O APIC code and ported HPET core from Qemu
  with some required changes for the Bochs timer and IRQ handling.
- Enabled HPET-specific code in the ACPI and rombios32 sources and generated
  new ACPI table with iasl.
- The HPET device plugin is now always loaded if the i440FX chipset is selected
  (same as ACPI). We have to rethink this when we have implemented a more
  modern chipset.
- TODO: Rewrite of the virtual timer code for nanosecond support to make the
  realtime synchronization possible with HPET.
2017-04-17 07:26:00 +00:00
Volker Ruppert
89654a4beb Prepared devices and timer code for HPET support
- PIT / CMOS: added methods to control IRQ generation (for HPET legacy mode).
- Added method for activating timer with nanosecond value.
- Removed unused declaration in the keyboard code.
- TODO: virtual timer code also needs to handle nanosecond values.
2017-04-15 20:31:07 +00:00
Volker Ruppert
73bcd4f8ca Added method to convert cpu ticks to nanoseconds (required for HPET).
I/O APIC: no need to call reset() in init().
2017-04-14 19:35:21 +00:00
Stanislav Shwartsman
3d51439090 fixed compilation err for CPU_LEVEL=5 2017-04-13 05:33:29 +00:00
Stanislav Shwartsman
1a3ff4b438 fixed bogus error message 2017-04-11 18:35:17 +00:00