Volker Ruppert
a92cbdd946
Banshee/Voodoo3: Lock buffer swapping while rendering screen.
...
This should fix issue #264 .
2024-02-25 15:53:48 +01:00
Volker Ruppert
abdbc52f22
Finally enabled the VGA_MEM_FIX code.
...
The legacy code could be removed after release Bochs 2.8 if there are no issues.
2024-02-18 11:03:31 +01:00
Volker Ruppert
cc162522bb
Fixed compilation with VGA_MEM_FIX not set.
2024-02-17 08:59:00 +01:00
Volker Ruppert
9e6d839caa
VGA_MEM_FIX: Force a refresh of the text buffer on mode change and restore.
2024-02-17 08:53:25 +01:00
Volker Ruppert
75d76db967
Cirrus: Added support for 4-bpp VBE modes with original VGABIOS.
2024-02-16 14:23:56 +01:00
Volker Ruppert
1ff88fdd05
VGA_MEM_FIX: Added text buffer in legacy format to simplify text update.
...
Using character / attribute pairs expected by the gui text update makes the
update code simpler and faster.
TODO: If possible add a buffer for active text font data.
2024-02-13 17:38:52 +01:00
Volker Ruppert
57d38ffb86
VGA_MEM_FIX: Added memory size mask to fix planar VGA modes.
2024-02-12 22:12:34 +01:00
Volker Ruppert
117f71a185
VGA_MEM_FIX: Some odd/even mode changes for correctness.
...
Offset must be shifted left by 2 instead of 1.
Even offset writes can go to plane 0 and 2, odd ones to plane 1 and 3.
2024-02-12 16:58:38 +01:00
Volker Ruppert
30c1e74627
VGA_MEM_FIX: Next attempt to fix odd/even mode related issues.
...
Now using the sequencer 'odd/even disable' switch to determine mode.
2024-02-11 17:11:48 +01:00
Volker Ruppert
549d052e34
VGA_MEM_FIX: Picked a better name for the sequencer odd/even disable switch.
2024-02-11 14:49:12 +01:00
Volker Ruppert
0e5800bf98
VGA_MEM_FIX: Fixed cursor address of the invisible cursor.
...
Now using the highest address of the default text mode buffer.
2024-02-11 13:40:02 +01:00
Volker Ruppert
39155bd3ae
VGA_MEM_FIX: Temporary fix for special memory access mode in modeX.
...
In odd/even mode fall back to planar mode if "chain odd/even" bit is 0.
2024-02-11 09:37:06 +01:00
Volker Ruppert
945ee597f0
Added currently disabled set of fixes for the VGA memory management.
...
- Added disabled definition VGA_MEM_FIX in vgacore.h. The VGA core code works as
usual unless you uncomment the define.
- Added correct implementation of the "chain four" and "odd/even" addressing mode.
This should fix the Debian / GRUB boot issue (#257 ) with both Bochs VBE and Cirrus.
- Added some compatibility code to make the gui text update work as usual.
- Tested all VGA modes except 256-color word mode (no test case).
- Some more testing with old DOS games may be required before I enable it by default
and finally remove the legacy code.
2024-02-10 17:30:24 +01:00
Volker Ruppert
fd68912dc7
Small cleanups in the VGA core code.
...
The text snapshot buffer is now allocated dynamicly.
2024-02-10 14:00:09 +01:00
Volker Ruppert
4ab88c3d8f
Cirrus: The first MB of video memory is always accessible.
2024-02-10 10:36:39 +01:00
Volker Ruppert
5c715aa9a3
Fixed clipping parameters in Banshee/Voodoo3 (issue #236 ).
...
Added 'clip_mask' with width depending on model.
Fixed VGA display issue discovered with Voodoo3.
2024-02-09 15:03:32 +01:00
Volker Ruppert
e5ff346368
Some fixes and cleanups after latest changes.
...
- Fixed Cirrus text mode output.
- VBE now using it's own 'line_offset' value.
- Since font change is now handled in update(), removing gui method set_text_charbyte().
2024-02-09 14:34:01 +01:00
Volker Ruppert
e53cf3b962
VBE/VGA: More accurate implementation of GRUB save/restore support.
...
Added VGA chain4 mode read/write support from VBE frame buffer.
Handle charmap update in update() using modified 'vga_mem_udated' flag.
Added temporary code for chain four memory addressing.
TODO: VGA memory handling rewrite including odd/even mode support.
2024-02-08 23:05:48 +01:00
Stanislav Shwartsman
c3269722f4
fixed spelling in comment
2024-02-07 00:18:06 +02:00
Volker Ruppert
1221217a7d
VBE: Preserve original line offset while in VBE mode.
2024-02-06 21:49:59 +01:00
Volker Ruppert
4e6b4165f5
Added workaround for the save/restore function of the GRUB bootloader.
...
The VGA core needs an extensive rewrite to support it correctly with
both Bochs VBE and Cirrus.
2024-02-06 20:36:15 +01:00
Volker Ruppert
6391cf0093
Fixes for VBE 4-bpp modes support.
...
Row address must be 32 bit wide and VGA compatible display end is limited to 1023.
TODO: Fix VGA compatible setup for VBE modes in VGABIOS.
2024-02-03 18:02:10 +01:00
Volker Ruppert
cd0feed380
VGA core: Added support for extended 4-bpp modes (tested with Cirrus).
2024-02-03 14:51:12 +01:00
Vort
5474eb6963
Cirrus: Add support for palette modes with pixel frequency > 85 MHz ( #254 )
...
It allows to use 1152x864x8 mode with [original
BIOS](https://github.com/bochs-emu/Bochs/files/14130753/cl-gd5446_pci_vga_bios_version_1.31.zip ).
2024-02-03 14:12:40 +01:00
Volker Ruppert
6aec66d210
Cirrus: Fixed tile x/y calculation for double scan and double width.
2024-02-02 20:49:38 +01:00
Volker Ruppert
ca482ab98e
Cirrus: Handle double scan and double width at banked memory writes.
...
TODO: Cursor still looks incorrect with modeset test program.
2024-02-02 19:00:15 +01:00
Volker Ruppert
92eb0e12be
Cirrus: Added double width support to fix up aspect ratio in double scan mode.
...
TODO: Hardware cursor code untested - test program doesn't use it.
2024-01-30 18:28:47 +01:00
Volker Ruppert
347a1bef56
Voodoo3: In double width mode also double hardware cursor width.
...
Improved mode reporting and fixed possible segfault caused by invalid pitch.
2024-01-29 19:33:29 +01:00
Volker Ruppert
14f6753ad8
Voodoo 1/2: Final attempt to implement byte writes correctly.
...
Simply shift byte to the right position and write 0's elsewhere.
2024-01-28 16:57:17 +01:00
Volker Ruppert
4ee4b89102
Voodoo 1/2: Next attempt to implement byte writes.
...
New code: read 32-bit, mask out required byte, apply new byte, write 32-bit.
2024-01-28 14:43:58 +01:00
Volker Ruppert
caef53a4a1
Voodoo 1/2: Added support for dword aligned byte writes.
...
TODO: For unaligned writes the voodoo_w() function needs to be modified.
2024-01-28 11:05:16 +01:00
Volker Ruppert
2c4b9e9457
Don't set up tiles for update if screen parameters are invalid.
2024-01-28 10:31:06 +01:00
Volker Ruppert
3ec05e8f05
Voodoo 1/2: Added support for 8 and 16 byte writes (issue #241 ).
...
Also added 16-bit read support. Odd data size and address support not done yet.
2024-01-27 18:58:22 +01:00
Shwartsman
0e1c5e35ff
added error message for unimplemented access len in bx_voodoo_1_2_c::mem_read_handler
2024-01-26 09:45:00 +02:00
Volker Ruppert
30a61c2a51
Banshee/Voodoo3 fixes in mem_write_linear (issue #231 ).
...
- Applied memory mask to start address.
- Consider half mode and double width for redraw setup.
2024-01-25 19:57:28 +01:00
Shwartsman
437ddc96fc
Addressing Black screen in Descent II: Destination Quartzon 3dfx OEM with Voodoo #238
2024-01-24 17:04:21 +02:00
Volker Ruppert
a663b9d1d0
Minor Banshee/Voodoo3 changes.
...
- Update pens when switching from / to 3D mode.
- Improved BX_ERROR message for unimplemented feature.
2024-01-22 20:23:40 +01:00
Volker Ruppert
75757e9852
Banshee/Voodoo3: Fixed overlay stride.
2024-01-22 16:37:18 +01:00
Volker Ruppert
ea0b208970
Cirrus: Implemented double scan support for color depth > 8.
...
TODO: Screen width not adjusted yet (should be done similar to Voodoo3).
2024-01-21 10:09:30 +01:00
Volker Ruppert
db0d16ff09
Banshee: Double the screen width in 'half mode' if height > width.
2024-01-20 22:30:47 +01:00
Volker Ruppert
6e48bc78fc
VGA core: Implemented a more accurate vertical timing.
...
Now using one timer with two alternating periods. A modification of the timer code
wasn't necessary. The update mode vsync is not yet affected by this change.
2024-01-19 18:40:13 +01:00
Volker Ruppert
b382358e80
Banshee: Attempt to fix redraw in case bitblt is used in 3D mode.
2024-01-18 20:32:29 +01:00
Volker Ruppert
6770a355ae
Cirrus: Fixed redraw issue caused by misaligned bitblt region.
...
If x0 + width exceeds the screen width, mark tile(s) on the left side of the screen, too.
This should finally fix issue #221 .
2024-01-17 22:12:30 +01:00
Volker Ruppert
c66d6f1a0e
Cirrus: Fixed possible segfault caused by missing address wrap.
...
- Added address wrap in cpu-to-video transparent bitblt.
- Added BX_DEBUG for address wrap detection and fixed redraw parameters.
TODO: Check other methods for possible segfaults.
2024-01-17 19:23:08 +01:00
finnbrudal
3455581a71
Cirrus: BLT System-to-screen Dword Pointer (GR2F[6:5]) implemented ( #223 )
...
Bits 5-6 of the left side clipping register have been implemented.
Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
2024-01-16 19:10:06 +01:00
Volker Ruppert
8528604888
Cirrus: Corrected redraw fix for backward BitBlt.
2024-01-15 23:28:23 +01:00
Volker Ruppert
bcfe5e129f
Cirrus: Fixed redraw values for backward BitBlt.
2024-01-15 17:11:25 +01:00
Volker Ruppert
04ed1e8fd2
Some more VGA timing handling chages.
...
- Changing status of 'update_mode_vsync' is no longer supported at runtime.
If disabled, changing the value is only valid between 1 and 75.
- Modify vtotal_usec if frequency to high before activating vsync_timer.
2024-01-14 10:13:39 +01:00
Volker Ruppert
1ebe15e3fc
Rewrite of the VGA timing code.
...
- Added VSYNC timer handler using vertical total usec. The calling time is defined
as vertical retrace end and it updates the CRTC start address like real VGA does.
It also calculates the display start time used when reading the input status register.
The VSYNC timer is disabled in Voodoo / Banshee modes.
- Improved VGA timing calculation (e.g. vertical blanking and retrace start).
2024-01-13 19:33:35 +01:00
Volker Ruppert
dbc1f5d93a
Cirrus: Fixed color expand bitblt with dword granularity enabled.
2024-01-13 05:18:07 +01:00