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.
- '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.
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.
- 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.
- 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.
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.
- 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.
- 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.
- 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.
- 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.
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>)
- 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.
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.