Commit Graph

11426 Commits

Author SHA1 Message Date
Volker Ruppert
766089e02d Some small improvements for the DSP direct output (non-DMA) mode.
- Generate output in 16-bit stereo format.
- Stop non-DMA output mode after 0.1 seconds of silence.
2018-05-15 18:51:41 +00:00
Volker Ruppert
bda6a2a6de Speaker beep methods should only be called in PIT mode 3 (square wave generator).
Added speaker handler to send OUT line change to new speaker method set_line().
2018-05-14 18:17:04 +00:00
Volker Ruppert
3962a08d3a Added support for DSP command 0x10 (Sending 8-bit samples directly to DSP). 2018-05-13 18:10:23 +00:00
Volker Ruppert
74d40805d1 Added support for unlocking disk images (locks leftover from previous Bochs
session) with the new command line argument '-unlock'.
2018-05-11 07:44:49 +00:00
Volker Ruppert
9e0a507726 Added stub for the undocumented DSP command 0xE2. 2018-05-10 15:50:25 +00:00
Volker Ruppert
c10e8feea6 Added support for driving the speaker line directly with the speaker gate, but
the square wave generator disabled. This feature has been used by old demos and
games to play digitized sound before soundcards with DSP became popular.
2018-05-10 10:50:42 +00:00
Volker Ruppert
53d703f6e1 Documentation updates (i440BX chipset / Voodoo AGP adapters). 2018-05-06 16:31:56 +00:00
Volker Ruppert
3f45d44184 Added subsystem ID for Voodoo3 AGP with an existing VGA ROM.
Updated some comments.
TODO: full AGP support, LGPL'd VGABIOS for Banshee / Voodoo3
2018-05-06 06:13:57 +00:00
Volker Ruppert
211eefa8d5 Updated both MSVC workspace files for current SVN (added DDC files). 2018-05-04 21:21:51 +00:00
Volker Ruppert
4462ac7319 Fixed Banshee status reading via MMIO (unaligned access is allowed).
The Banshee AGP model is now basicly working (tested with Win98SE).
Started documentation updates about i440BX chipset and Banshee AGP.
2018-05-03 19:46:12 +00:00
Volker Ruppert
9bd54cc380 Some work on the i440BX chipset AGP support in the Bochs BIOS.
- rombios.c: return maximum bus number #1 for i440BX.
- Now using different i/o and memory base address regions for PCI and AGP.
- Added some init code for the i440BX PCI/AGP bridge.
- Some code cleanups.
2018-05-03 17:55:17 +00:00
Volker Ruppert
536f9ba094 Some work on the i440BX chipset AGP support in the Bochs BIOS.
- rombios.c: return maximum bus number #1 for i440BX.
- Now using different i/o and memory base address regions for PCI and AGP.
- Added some init code for the i440BX PCI/AGP bridge.
- Some code cleanups.
2018-05-03 17:54:31 +00:00
Volker Ruppert
7412ebc07b Added new macros BX_DEBUG_PCI_READ and BX_DEBUG_PCI_WRITE to unify the debug
output of PCI config space handlers.
Banshee: some PCI register fixes.
2018-05-01 15:54:37 +00:00
Volker Ruppert
92ce5c3846 Moved PIR table modification for the i440BX chipset from the memory code to the
BIOS init code and some related fixes and cleanups.
2018-05-01 07:05:28 +00:00
Volker Ruppert
e526d6c9d7 Moved PIR table modification for the i440BX chipset from the memory code to the
BIOS init code and some related fixes and cleanups.
2018-05-01 07:04:43 +00:00
Volker Ruppert
e781a8f998 Some PCI IRQ roouting changes for i440BX chipset support.
- Bochs BIOS: Improved calculating PCI slot number from device number to handle
  the i440BX case correctly.
- Memory code: Detect and modify the PCI IRQ roouting table of the Bochs BIOS
  for the i440BX chipset (TODO: this could be done by the BIOS itself after
  copying to shadow RAM).
2018-04-29 16:22:44 +00:00
Volker Ruppert
eeefe369d7 Some PCI IRQ roouting changes for i440BX chipset support.
- Bochs BIOS: Improved calculating PCI slot number from device number to handle
  the i440BX case correctly.
- Memory code: Detect and modify the PCI IRQ roouting table of the Bochs BIOS
  for the i440BX chipset (TODO: this could be done by the BIOS itself after
  copying to shadow RAM).
2018-04-29 16:20:58 +00:00
Volker Ruppert
69be05b2b5 Started preparing the Bochs BIOS for i440BX chipset support.
- Added symbols for the i440BX host bridge device ID.
- Probe and search for devices on PCI bus #1 (AGP).
- Set up memory and i/o regions only for header type 0.
- Set AGP aperture size to 64 MB.
- TODO: PCI IRQ routing, i440BX specific register setup.
2018-04-24 21:30:31 +00:00
Volker Ruppert
00ac6013f0 Started preparing the Bochs BIOS for i440BX chipset support.
- Added symbols for the i440BX host bridge device ID.
- Probe and search for devices on PCI bus #1 (AGP).
- Set up memory and i/o regions only for header type 0.
- Set AGP aperture size to 64 MB.
- TODO: PCI IRQ routing, i440BX specific register setup.
2018-04-24 21:29:41 +00:00
Stanislav Shwartsman
fcd9ce1634 fix compilation without x86_64 2018-04-15 14:22:16 +00:00
Stanislav Shwartsman
d000e21001 added MOVDIRI opcode implementation 2018-04-06 05:06:36 +00:00
Volker Ruppert
776e8270f6 Started preparing Bochs BIOS for the sector size option.
- Function ata_cmd_data_io: using fixed block size 512 only for 'identify'
  commands. For read/write commands the hard disk sector size must be used.
- Take account of sector size when calculating hard disk size in MBytes (TODO:
  calculation is not correct for not yet existing very big disks).
- updated comment.
2018-04-05 21:35:41 +00:00
Volker Ruppert
6739601a52 Started preparing Bochs BIOS for the sector size option.
- Function ata_cmd_data_io: using fixed block size 512 only for 'identify'
  commands. For read/write commands the hard disk sector size must be used.
- Take account of sector size when calculating hard disk size in MBytes (TODO:
  calculation is not correct for not yet existing very big disks).
- updated comment.
2018-04-05 21:35:24 +00:00
Stanislav Shwartsman
fd15b61d94 keep def of YMM/ZMM register even if AVX or EVEX are not compiled in and let reading/writing them to MEM 2018-04-04 19:31:56 +00:00
Stanislav Shwartsman
8c9f7f54b6 update CPUID definitions with recently published EAS-33 extensions document 2018-04-04 18:15:44 +00:00
Volker Ruppert
e63296ddca Added more default return values and improved debug output (i/o len). 2018-04-02 17:32:51 +00:00
Volker Ruppert
a086cdf08f Some work on the Voodoo Banshee emulation.
- Added default value for the video clock frequency to make sure that the
  vertical timer works.
- Changing vidDesktopStartAddr register when the video processor is on now
  forces a screen update.
2018-04-01 16:05:40 +00:00
Volker Ruppert
1aab0f9e31 If the base image of an undoable/volatile mode image has a builtin geometry,
the toplevel image inherits the base image settings.
2018-03-31 17:07:44 +00:00
Volker Ruppert
1855f22d2b Added sector size option in bximage for creating flat, sparse and growing mode
images. TODO: using ATA disk images with big sectors requires BIOS support.
2018-03-30 21:04:04 +00:00
Volker Ruppert
7895516c4d Fixed copy&paste bug making undoable/volatile disk images fail. 2018-03-30 09:35:15 +00:00
Stanislav Shwartsman
0cd49ddae4 fixed compilation with EVEX disabled 2018-03-29 08:50:38 +00:00
Volker Ruppert
95d0a182af Some work on the disk image sector size option based on a patch by Ben Lunt.
- Implemented sector size handling in the ATA disk emulation. This feature
  still needs BIOS support to boot from a disk with big sectors.
- Enabled sector size support in the redolog_t class based disk image mode.
  The base class can handle 512 byte blocks only, but that doesn't matter since
  all valid sector sizes are multiple of it. So for now the growing, undoable
  and volatile disk image modes internally read/write 512 bytes per call.
- TODO: BIOS, bximage.
2018-03-27 17:47:46 +00:00
Volker Ruppert
1d3e8ca33f Now ignoring PCI base memory flags (BX_ERROR instead of BX_PANIC). The USB xHCI
controller is now usable again, but we still don't support the 64-bit PCI
address space.
2018-03-26 20:58:40 +00:00
Volker Ruppert
ea7334bfab Sector size option implemented in the USB disk code. The sector size value must
be specified as a USB port option (e.g. 'sect_size:1024'). The values 512, 1024
and 4096 are supported. If not specified, it defaults to 512.
TODO: ATA disk (harddrv code), BIOS, bximage.
2018-03-23 19:02:38 +00:00
Volker Ruppert
657cd05c0a Continued preparing hard disk sector size option in the hdimage code.
- 'flat' mode: disk image size must be multiple of sector size.
- 'concat' mode: each disk image size and lseek() offset must be multiple of
   sector size.
- 'sparse' mode: page size and lseek() offset must be multiple of sector size.
- TODO: 'growing', 'undoable' and 'volatile' mode: redolog_t class is still
  based on 512-byte blocks.
- TODO: 'vbox', 'vmware3', 'vmware4', 'vpc' and 'vvfat' mode have a builtin
  geometry. If other sector sizes are supported, it should be handled correctly.
- harddrv code now reports current sector size, but still panics for now.
- TODO: harrdrv and USB disk code, bximage, BIOS.
2018-03-18 09:07:31 +00:00
Volker Ruppert
db95a54238 Prepared config interface for a hard disk sector size option.
This code is based on the initial patch by Ben Lunt with some modifications:
using enum parameter, extra parser handler and cdrom handling not necessary,
TODO: hdimage and bximage code, harddrv and USB disk emulation, BIOS.
2018-03-13 20:35:56 +00:00
Volker Ruppert
e639d9dd29 Report AGP model in PCI status, new PCI capabilities and strapInfo register.
AGP specific features are not present yet.
2018-03-09 18:33:44 +00:00
Volker Ruppert
8952c144bd Some work on the i440BX chipset and related changes.
- Fixed PCI BAR initialization (now using memset()).
  - Fixed reset failure (set all PAM memory types to ROM).
  - Added stub for the AGP aperture (register BAR #0, handle APSIZE and read
    GART entry in read/write handlers).
  - Added some more PCI register defaults and write masks.
  - Fixed a warning in the ES1370 code.
  - Voodoo Banshee: set up PCI subsystem ID depending on bus and model.
  - Volatile BIOS write support must also be present in ISA BIOS memory.
2018-03-04 04:53:16 +00:00
Volker Ruppert
73bc76072e Added support for assigning a device (banshee or voodoo3) on Bochs PCI slot #5
to AGP if chipset i440BX is selected. AGP-specific features are not implemented
yet.
2018-02-25 20:59:30 +00:00
Volker Ruppert
e7093e74d8 Started implementing the i440BX PCI/AGP chipset.
- Added new PCI chipset choice for the i440BX AGPset. Some basic work is done,
  but AGP support is not present yet.
- Added new class for the "virtual" PCI-to-PCI bridge that should manage the
  secondary bus (AGP). Since this device must appear with device number #1 at
  the primary bus, it was required to change the PCI device numbers for the
  i440BX case. Moved the PIIX4 module to device number #7. The presence of the
  PCI base address regions now depends on the header type as expected.
- Since the Bochs BIOS cannot handle the modified PCI device layout, all tests
  continued with an external BIOS designed for this chipset (GA-6BA_F1.bin).
  This BIOS requires additional changes in some devices.
- ACPI: Return value 0 for some status registers and the GPI registers.
- CMOS: Since the PIIX4 supports a 256 byte CMOS RAM, prepared support for it
  and enable it in case a 256 byte CMOS image is used.
- PCI: The device numbers for 4 slots starting at #8. The 5th slot could be
  used for AGP when available.
2018-02-24 18:04:36 +00:00
Volker Ruppert
1e35653b1e Added method to return the PCI device name and improved debug output. 2018-02-18 07:41:42 +00:00
Volker Ruppert
511457fd0e Added a new section about Voodoo Graphics usage in the user documenation.
Mention the new VESA DDC support in the docs.
2018-02-17 09:10:58 +00:00
Volker Ruppert
04981c35d3 Added the subsystem ID of a Voodoo3 PCI model to make it work with an external
VGABIOS image in Win95/98 guest without hacking. Mention the Voodoo3 model in
the docs.
2018-02-16 13:11:30 +00:00
Stanislav Shwartsman
773f1b7e42 cleanup return value of all instruction handlers 2018-02-16 07:57:32 +00:00
Volker Ruppert
05da2a4dff Added basic support for the Voodoo3 model (Banshee plus secondary TMU).
Using a temporary subsystem ID, since I haven't found a VGABIOS ROM image for
the PCI version and Bochs doesn't support AGP yet. After modifying Voodoo3.inf
the driver could be installed successfully in Win95/98 and the Voodoo3 works as
expected (same issues as the Banshee model).
Removed BX_ERROR message about setting undocumented srcXY register bits. They
seem to have no effect on the emulation and could be ignored.
2018-02-13 19:36:20 +00:00
Volker Ruppert
e14f70088c Fixed possible infinite loop: width for redraw_area() cannot be 0. 2018-02-12 21:07:04 +00:00
Volker Ruppert
6610382b31 Fixed possible infinte loop when text_update() is called within video mode change
(found with Voodoo Banshee).
2018-02-12 09:19:33 +00:00
Volker Ruppert
bb472a78f9 Some work on the Voodoo Banshee emulation and related changes.
- Screen-to-screen blt: added support for expanding monochrome source data.
- Fixed calculation of the pitch for packed source data.
- Fixed repeated execution of some commands in non-immediate mode.
- PCI devices: fixed and improved BX_INFO / BX_DEBUG messages.
2018-02-11 22:40:30 +00:00
Volker Ruppert
dbbeffd32e Now also using parse_param() method for BXT_PARAM_BYTESTRING input to reduce
code duplication.
2018-02-05 21:08:43 +00:00
Stanislav Shwartsman
1e35e64ec6 fixed compilation warnings 2018-02-05 16:02:53 +00:00
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