use new method do dump param tree during save/restore, GUI and text debugger and other places
significantly reduce code duplication over multiple modules
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
- 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).
- 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.
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.
- 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).
- 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.
- 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.
- 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).
- 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.
- 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.
- 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).
- 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).
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.
- 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).
- 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.
- 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.
- Fixed segfault when leaving tiled desktop mode.
- Temporarily disabled the CMDFIFO "hole count" feature. The current code makes
trouble and needs to be improved.
- 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.
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, ...
- 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.
- 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.
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.
- 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.
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.
- 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.
- 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.
- 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.
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.
- 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.
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.
- 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.
- 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
"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, ...
- 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.
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.
- 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.
- 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).
- 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.
- 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.
- 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.
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.
- 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.
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.
- 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.
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.
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.
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.
- 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).
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.
- 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.
- 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.
- 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.
- 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.
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...
- 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.
- 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.
- 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.
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.
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.
- 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.
- 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).
- 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).
- 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.
- 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.
- 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.
- 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.
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).
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.
- 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.