Commit Graph

306 Commits

Author SHA1 Message Date
Stanislav Shwartsman
1e4f1624c8 remove trailing whitespace from source files 2022-08-23 21:46:04 +03:00
Volker Ruppert
52b0000db7 Applied two patches from Debian.
- Apply standard flags from environment everywhere (SF patch #546).
- Allow overriding ld and objcopy for building bios on non-x86 platforms.
2021-09-10 15:33:22 +00:00
Volker Ruppert
412285baed Fixed compilation for big endian architectures (SF patch #563). 2021-08-24 19:06:01 +00:00
Volker Ruppert
a1058990ba Trailing '../\' breaks compilation with MSVC nmake. Regenerated dependencies. 2021-07-27 18:13:26 +00:00
Stanislav Shwartsman
021f3794fa remove cpudb.h from some Makefile dependencies. TODO: it should be only in cpu/init.cc and config.cc 2021-07-25 18:08:54 +00:00
Volker Ruppert
6b08329fa2 Voodoo 1/2: Always reset 'swaps_pending' counter when switching to Voodoo mode.
This fixes a possible deadlock in accelerated Direct3D test.
2021-07-18 07:25:08 +00:00
Volker Ruppert
7c8b1c5f28 Some small changes in the Voodoo Banshee code.
- Report some more unimplemented bits of the vidProcCfg register.
- Code cleanup in some bitblt methods.
2021-07-08 14:43:18 +00:00
Volker Ruppert
a38f0fdb02 The 2D destination x/y positions are signed values. Modified code to handle
negative values properly.
2021-07-07 06:54:30 +00:00
Volker Ruppert
44288f603d Fixed and cleaned up pattern fill methods. 2021-07-06 12:09:38 +00:00
Volker Ruppert
e17539861c Fixed and simplified setup of source and destination pitch. 2021-07-06 09:08:12 +00:00
Volker Ruppert
4bf3b23983 Added support for drawing polygon with pattern. 2021-07-06 06:40:53 +00:00
Volker Ruppert
0262b100a5 Some Banshee bitblt fixes.
- Fixed screen-to-screen code in the right-to-left case.
- Some pattern handling fixes (pattern origin is always destination x0, y0).
2021-07-05 10:30:04 +00:00
Volker Ruppert
8de6206ab6 Some Banshee bitblt clip code changes.
- Fixed screen-to-screen stretch code using new clip check.
- Simplified line / polygon drawing code using new clip check.
2021-07-04 15:06:50 +00:00
Volker Ruppert
fe9198b5a7 Fixed clipping related issues in host-to-screen methods.
- Added simple clip check method to be called for each destination x / y change.
- Use the new clip check in both host-to-screen methods.
- Some related changes.
- TODO: verify other bitblt methods for clipping correctness.
2021-07-04 08:17:55 +00:00
Volker Ruppert
e0cc76af53 Some changes in the Voodoo Banshee code.
- Calculate host-to-screen data size for "source stride packing" in color mode
  similar to the monochrome mode.
- Set up data swizzle mode for all launch area operations.
- Temporarily draw polygon in normal mode in case the currently unsupported
  pattern mode is selected.
- TODO #1: Rewrite of the clipping code at least for host-to-screen functions.
- TODO #2: Drawing polygon with pattern if requested.
2021-07-03 20:54:38 +00:00
Volker Ruppert
69c4758fbb New attempt to fix the Banshee bitblt issues in host-to-screen mode with
monochrome source and "source stride" packing. Now adding the source stride
converted to pixels to the 5-bit srcX value.
TODO #1: color source needs to be handled in a similar way (no test case yet).
TODO #2: clipping needs to be rewritten at least for host-to-screen blts.
2021-07-02 17:29:22 +00:00
Volker Ruppert
a23db5e82a Small changes in the Voodoo Banshee code.
- Redirect byte and word writes into CMDFIFO space to LFB (FIXME).
- Added stub for the CMDFIFO code #6 (AGP-to-VRAM transfer).
2021-07-01 19:32:28 +00:00
Volker Ruppert
28b506f2de Small changes in the Voodoo Banshee code.
- Added support for byte and word access to Banshee i/o space.
- Added stub for the CMDFIFO command JMP AGP.
2021-06-30 07:41:21 +00:00
Volker Ruppert
3d852a208e Added 'vtimer_running' flag to save/restore list (fixes display flickering
after restore Banshee in 3D mode).
2021-06-22 17:03:05 +00:00
Volker Ruppert
821b42f309 Fixed some MSVC warnings when compiling for WIN64. 2021-06-20 07:30:29 +00:00
Volker Ruppert
56fb9cacc2 Fixed "extended address wrap" mode: setting "plane shift" value not correct in
"chain4" mode (fixes DOS Doom in Win95).
2021-06-18 23:00:40 +00:00
Volker Ruppert
277830ca07 Cleaned up method determine_screen_dimensions(): no special cases handling needed. 2021-06-08 19:06:22 +00:00
Volker Ruppert
ad3090ab1a Some small fixes found with original Cirrus VGABIOS at VBE mode testing.
- Setting up bank #0 modifies the external offset for VRAM access in VGA core.
- Added support for interlaced VGA modes.
2021-06-04 12:14:45 +00:00
Volker Ruppert
733e466628 Split the VBE bank into separate read and write apertures. The compatibility
mode sets both banks to the same value. Reading VBE bank register always
returns the write aperture setting. This feature is designed for the scrolling
function of the VBE 'write character' support. VBE code should use compatibility
mode for now.
TODO: update VGABIOS to use this feature.
2021-05-30 16:13:37 +00:00
Volker Ruppert
c78c1a9af9 Enable preferred timing mode as expected by EDID format version 1.3. 2021-05-30 07:28:53 +00:00
Volker Ruppert
8cbf4eff8e Some changes for the Bochs VBE 32k bank granularity feature.
- VBE enable register returns 32k granularity flag if enabled.
- VBE bank register returns 32k granularity flag if VBE_DISPI_GETCAPS is set.
- Defining new DISPI ID not necessary.
- TODO: update VGABIOS to use this feature.
2021-05-23 06:30:51 +00:00
Volker Ruppert
43033b2137 Some changes for the Bochs VBE support.
- Limit VBE bank size to 64k as expected.
- Enabling VBE mode now clears the whole video memory for all bpp modes unless
  "noclear" bit is set.
- Prepared 32k bank granularity mode required for text output functions. Added
  new VBE_DISPI_ID6 to indicate this capability. The default is still 64k.
2021-05-21 20:49:34 +00:00
Volker Ruppert
57ad842568 Some small Cirrus changes.
- Save/restore: fixed number of registers per controller.
- Report interlaced mode on mode switch.
- Added BX_DEBUG message for MCLK setting (unused).
2021-05-16 07:40:46 +00:00
Volker Ruppert
128e54a137 Some small Cirrus Video clock changes.
- Fixed reset values for VCLK and related sequencer registers.
- Added BX_ERROR for unimplemented feature (using MCLK as VCLK).
2021-05-15 16:15:59 +00:00
Volker Ruppert
aa9045b63f Set EDID checksum in constructor. 2021-05-13 17:58:57 +00:00
Volker Ruppert
95dc1b2012 Skip display update if a mode update is in progress. 2021-05-11 15:00:58 +00:00
Volker Ruppert
77cc12cce5 Added support for reading VGA latches using CRTC register 0x22 (undocumented
for original VGA, documented for Cirrus and Voodoo Banshee).
2021-04-23 06:42:52 +00:00
Volker Ruppert
6d5897217c Added missing PEL mask support in the VGA core. 2021-04-17 08:42:03 +00:00
Volker Ruppert
69695bfd67 Prepared the Banshee code for the planned LGPL'd VGABIOS with 3dfx Voodoo
support. The VGABIOS image will be compiled for Banshee PCI and this code
modifies the PCI data for the Voodoo3 and AGP models.
2021-04-11 20:09:43 +00:00
Volker Ruppert
7aa5eb7a51 Some changes for correct vertical frequency reporting on mode switch.
- vgacore: method get_crtc_params() now returns selected video clock value.
- banshee: now using selected video clock instead of hardcoded VCLK #3.
- cirrus: added vertical frequency to mode switch BX_INFO.
2021-04-07 06:31:25 +00:00
Volker Ruppert
857c3be2ba Some work on the Voodoo Banshee code.
- Moved setup of default i/o register values to reset().
- Set up strapInfo register bits in init().
- Don't overwrite readonly bits in miscInit1 register.
- Set up subsystem ID in VGABIOS ROM in case it's > 32k (doesn't exist yet).
- Copy subsystem ID from ROM to PCI config registers in reset().
2021-04-04 19:00:29 +00:00
Volker Ruppert
25e725a23c Makefile dependency updates
- Don't include paramtree.h in siminterface.h to get rid of duplicates
  in a lot of Makefile dependency lines.
- Regenerated Makefile dependencies in iodev and affected subdirectories.
- FIXME #1: including debug.h causes duplicate entries of config.h and osdep.h.
- FIXME #2: cpudb.h appears in most of the iodev* dependencies, but only needed
  by config.cc and the cpu class.
2021-03-13 09:54:06 +00:00
Volker Ruppert
a2cf072751 Some cleanups in the plugins code. 2021-03-07 16:01:39 +00:00
Volker Ruppert
4dd5816108 Some changes in the Bochs plugins code.
- Changed variable type of the plugin_t "type" member from enum to Bit16u.
- Added support for returning device flags with the new mode PLUGIN_FLAGS in
  the plugin entry functions. It is currently only used for devices that can
  be connected to a PCI slot.
- Code cleanup in core device plugins: checking type no longer necessary.
- The "non-plugin" mode now also uses the "loadtype" member of plugin_t.

TODO: Change PCI slot options to bx_param_enum_c and build the choices list
using the new capabilities of the plugin API.
2021-02-26 20:37:49 +00:00
Volker Ruppert
8aaf9d858e Changed type of vga and svga_cirrus plugins to PLUGTYPE_VGA. Modified vga
extension option init to make this work correctly. The choices "none" and "vbe"
load the vga plugin, "cirrus" loads svga_cirrus.
2021-02-23 08:12:24 +00:00
Volker Ruppert
2e44a5c8bf Changed type of VGA extension option to bx_param_enum_c. Additional choices are
added from plugins list.
2021-02-19 16:05:56 +00:00
Volker Ruppert
24bccc8efb Changed parameter handler argument "set" type to bool. 2021-02-19 13:13:42 +00:00
Volker Ruppert
0d425037df Improved plugin type detection at Bochs startup.
- Added special mode to all plugin entry functions that returns the plugin type.
- The plugins search function now temporarily loads all available plugins and
  reads the plugin type using the new mode PLUGIN_PROBE.
- Added "loadtype" to the plugin structure to store the type used for plugin
  loading (currently only the voodoo plugin provides two types).
2021-02-07 16:16:06 +00:00
Volker Ruppert
cdc505dfce Fixed MSVC warnings in the devices code after bx_bool to bool changes. 2021-02-06 19:56:57 +00:00
Volker Ruppert
3cf2807dce Continued bx_bool to bool type changes.
- Changes in the VGA core and Voodoo code.
- Removed unnecessary typecasts in some devices.
- TODO: USB host controller code.
2021-02-03 18:08:04 +00:00
Volker Ruppert
dce82d74e1 Changed bx_bool to bool type in some more devices.
TODO: parts of the display adapter and USB host controller code.
2021-02-01 20:39:33 +00:00
Volker Ruppert
f9dfaf1cca Changed bx_bool to bool type in iodev.h and affected code. 2021-01-31 08:22:55 +00:00
Volker Ruppert
89522c30d8 Some more bx_bool to bool type changes.
- bx_shadow_bool_c: removed unused bitnum feature and changed data type.
- Changed return type of memory handlers to bool.
- Modified virtual timer, PIC and PIT code.
2021-01-30 23:55:24 +00:00
Volker Ruppert
c8f4a6f260 Save/restore: now using the macro BXRS_PARAM_BOOL in all devices. 2021-01-30 21:59:15 +00:00
Stanislav Shwartsman
7cc9cffeed remove siminterface.h from bochs.h and include it only where required 2021-01-30 19:40:18 +00:00