- 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.
directly sent to the optional keyboard (USB keypad). It is now independent
from the legacy keyboard and the check for supported keys is simplified. The
legacy keyboard still receives the unhandled key event, but now sent from the
common devices code.
bx_devmodel_c. The early version of the combined vga / svga_cirrus code
required the now obsolete implementation. Some related cleanups in the
devices code.
- Since the pci_read_handler() method is identical in most devices, move it
to the base class to reduce code duplication. Only the 'pcidev' device has
it's own implementation (NOTE: it is not maintained yet).
- Minor other fixes and cleanups in some PCI devices.
- Using bochsrc option "load32bitOSImage" now causes a warning. It is not
maintained yet, not documented and we don't whether it is used or not.
I guess it was designed to boot a real 32-bit guest OS when the Bochs BIOS
wasn't able to do it.
- Added config option --enable-busmouse to all shortcut scripts. We have two
usable models present now (tested with Win95).
- Added warnings for currently not maintained features in the configure script,
the bochsrc sample and the user doc.
- Removed detection of deprecated bochsrc options "i440fxsupport" and
"vga_update_interval".
- Legacy bochsrc option "user_shortcut" is now deprecated.
- Removed deprecated configure option --enable-misaligned-sse from user doc.
- Updated some TODO items.
- Makefile: cleanup of the 'clean' target (adds missing 'bxhub').
- configure script: create cpudb subdirectories if necessary for building
outside of the source tree.
- cpudb Makefile: clean object files from new location.
- In "non-plugin" mode loading and unloading network module is not necessary.
Now enabled loading for the plugin mode only and removed unloading function
for that case. The "pseudo plugin" entries of the dummy entry points are
necessary to make sure the self-registering network driver objects are not
optimized out.
- slirp / vnet: Since the plugin init function is not called in non-plugin
mode, revert the instance count init change.
- Fixed a makefile dependecy.
- TODO: Implement self-registering objects in the sound driver code.
- Removed "pseudo device plugin" containing common code and specific drivers.
- Moved network module base classes and module handling to the Bochs core.
Now loading network driver plugins in netmod.cc.
- Moved shared networking code used by the 'vnet' driver and 'bxhub' from
netmod.cc/.h to new files netutil.cc/.h.
- Created separate plugins for each network driver implementation.
- Modified Bochs plugin system to support new plugin type PLUGTYPE_NETWORK.
The format of the 'ethdev' string must be 'host:port' to use this feature.
Using the port number only for connecting 'bxhub' on the same machine is still
supported.
- Small changes to avoid crash after failure.
- Several cleanups in the socket mode.
- Fixed reporting active mode after init is done.
- Reporting sent/received byte with BX_DEBUG.
- The 'vnet' module now uses the 'script' parameter for an alternative log
file name.
- Renamed log file names in some networking modules (replaced 'ne2k' by a name
related to the module name).
- Documentation updates (networking stuff and cmosimage).
- Increase maximum number of Bochs client sessions to 6.
- Define bx_devmodel_c to 'void' for the bxhub case to simplify netmod code.
- Minor cleanups in bxhub and related vnet code.
- According to the specs masked edge-sensitive IRQs are not held pending.
- Print BX_DEBUG message in set_irq_level() only in case of level change to
avoid flooding log file.
- eth_socket.cc: Added missing winsock init.
- bxhub.cc: Added missing CDECL macro to the signal handler.
- Added some definitions for non-Windows platforms similar to the serial and
rfb code.
- bxhub.cc: Put all client data in a structure and added send_packet() function.
- bxhub.cc: Added SVN ID line.
- netmod.cc: Changed some DHCP messages to BX_DEBUG.
- eth_socket.cc: Minor cleanups.
external program 'bxhub' (simulating a two port ethernet hub). It is based on
an old SF patch and it has been updated and extended:
- Windows support (tested with MinGW/MSYS and MSVC nmake).
- Command line arguments for 'bxhub' (base port number, MAC address, TFTP).
- Added support for DHCP, TFTP, ARP and ICMP echo (ping). It uses parts of the
code for the 'vnet' module with some additions from the former "slirp backend".
- TODO: code cleanup to reduce duplication, rewrite of the networking plugins
stuff similar to the work done with the sound drivers.
- Builtin sound driver plugin support should depend on BX_SUPPORT_SOUNDLOW.
- Added some symbols required for the MSVC plugin of sound driver "file".
- Clean up threads and audio buffers only when shutting down the primary sound
driver (pcm_callback_id >= 0). Fixes crash on exit with wavemode 3.
- Renamed OSS sound driver files from soundlnx.cc/.h to soundoss.cc/.h.
- Removed "pseudo device plugin" containing common code and specific drivers.
- Moved common sound code, base classes of sound drivers and the dummy driver
to the Bochs core. Now loading sound driver plugins in soundmod.cc.
- Created separate plugins for the platform/library specific drivers and the
"file" driver.
- Modified Bochs plugin system to support now plugin type PLUGTYPE_SOUND.
- Changed the name of the entry point of the gui plugin code to
lib{gui_name}_gui_plugin_init(). It is used when loading plugin with the new
type. Added gui init code for the non-plugin version in plugin.cc.
- Some related changes for the "wx" case.
- The function load_and_init_display_lib() now only returns 1 on success.
- Minor other changes.
Prepared "biosdetect" option in the harddrv code.
TODO #1: Add support for a comma-separated list of BIOS options.
TODO #2: Implement support for at least "biosdetect=none" in the Bochs BIOS.
configuration, loading images). Cleaned up "romimage" option parsing and
prepared parameter "options" for the behaviour of the Bochs BIOS.
TODO: implement BIOS option "fastboot" to skip the boot menu prompt.
either libsamplerate or the SoX resampler library installed. If not installed,
the data is only copied to the output buffer and sample rate of the output
driver is changed similar to legacy code. Related changes:
- Added check for libsamplerate or SoX resampler header files in configure
script.
- Added functions for converting source format to float (requied by resampler)
and float to output format.
- Added support for float type data in the audio buffer code. Buffer chain #0
receives float data from sendwavepacket() and buffer #1 receives data for
mixing and output in format "16-bit signed little endian stereo".
- ALSA: Disable builtin resampling feature if resampler is present to avoid
doing it twice.
- Create a file with image name plus extension ".lock" if an image is opened
in read/write mode. This file will be deleted after closing the image.
- Check for a lock file before opening an image and fail if it exists.
- Check for a lock file before creating a undoable/volatile redolog file and
fail if it exists.
- Only keep the comments for the specific gui methods in nogui.cc and add
references to this file in all other gui sources.
- Changed the order of methods and added some useful comments in gui.cc / gui.h.
- Minor other cleanups
- Removed unused functions and declarations.
- Removed unused command line argument handling.
- TODO: Modify the "plugin_init" and PLUGTYPE_* definitions.
- Added gui console support to the rfb and vncsrv guis.
- Started preparing the legacy SDL gui for console support.
- TODO: The sdl and sdl2 guis need a special keyboard handling for shifted keys.
- Moved helper function reverse_bitorder to the common gui code.
- In console_refresh() call flush() after text_update().
- Started preparing rfb, sdl, sdl2 and vncsrv gui for using the console.
- Some other small cleanups.
- vncserv.cc: Fixed sdl font issue.
- Don't check for mouse toggle event if console is active.
- Added support for blinking cursor.
- Added stubs in the gui code to reduce BX_USE_TEXTCONIG usage in x.cc.
code. Now the runtime configuration runs in the Bochs window instead of
console / xterm. The simulation screen is restored when the
simulation continues. This feature can be implemented for all guis
without gui dialog box support (e.g. sdl2/sdl2 on non-win32 platforms, rfb).
"fatal". It can be used for all cases when there is no workaroud present to
avoid application crash or incorrect simulation behaviour. As a first step now
using BX_FATAL() for some data structure size and bit field errors.
- Show message box (modified ask dialog) in method fatal() if not called after
ask dialog or pressing power button.
- Removed code for unsupported actions "ask" and "fatal" from info() method.
- Some related small code cleanups.
- Added new symbol BX_SYNC_EVT_LOG_DLG and method log_dlg() in siminterface to
handle the cases "ask", "warn" and "quit".
- Added support to change action from "warn" to "report in the "warn" dialog
(sdl2, win32 and wx).
- TODO: Add quit message box for the log action "fatal" and add BX_FATAL()
macro for all cases where continuing after BX_PANIC would be dangerous.
- Added new logfunctions method warn() similar to ask().
- Added new siminterface method log_warn() similar to log_ask().
- Modified sdl2, wx and win32 ask dialog to make it usable for warnings.
- On X11 use the new message box dialog to display warnings.
- Some related changes in the logio and siminterface code.
- Rewrite of the existing yes/no dialog to support more button options. Now it
can be used with OK/Cancel buttons or as a simple message box with OK or
Cancel. This message box that can be used to show error messages with a
new action "warn" or for critical panics when continuing would be dangerous
("BX_FATAL"). These features are not implemented yet.
- Partial rewrite of the button handling code (e.g. new method add_button()).
- some malloc/free to new/delete changes.
- The retry timer now calls process_transfer_ring() for enabled slots only.
- On USB3-only ports ignore device speed setup and try to enable super-speed mode.
- Added support for HID devices in high-speed mode.
- Added separate descriptors for MSD devices in high-speed mode.
- NOTE: USB 2.0 values ported from Qemu / tested with USB EHCI.
async mode by default for all USB devices (used by disk, cdrom and floppy).
Whenever we implement a new HC model, it is still possible to set the async mode
to 0 until the async packet completion is working correctly.
- Extended USB callback definition to support different event types sent from
device to HC. Currently we only have the two events "async completion" and
"remote wakeup".
- Implemented event handlers in the UHCI, OHCI and EHCI. For the EHCI version
we currently have no test case.
- The external USB hub now uses this feature at device connect/disconnect.
Now the device change on the hub is correctly detected by the guest OS.
- TODO #1: remote wakeup and async completion for the xHCI.
- TODO #2: event handler for the external hub to make a USB device work on
a chain of hubs.
- TODO #3: the event handler possibly could be used for the packet copy code.