Commit Graph

11903 Commits

Author SHA1 Message Date
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