Commit Graph

1890 Commits

Author SHA1 Message Date
Volker Ruppert
1fd6745aea Started rewrite of the gui code to make the graphics snapshot independent from
the display adapter code. When ready, the common gui code should handle it
completely. The snapshot handler should set a flag 'snapshot_mode' and then it
should force a display update. The graphics update code should be redirected to
some code that 'draws' to a snapshot buffer. These first steps are done:

- store some guest display settings in the gui code (text / graphics switch,
  x / y resolution and bpp)
- split 8 bpp palette update code in a common and a specific part and store the
  palette values in the gui code
2012-10-14 18:29:44 +00:00
Volker Ruppert
26659d5667 - some more work on save/restore support (now almost usable)
- TODO: add graphics snapshot support
2012-10-12 15:14:30 +00:00
Volker Ruppert
698afee9aa undoable / volatile mode: added support for other types of r/o base images.
These hdimage modes are now supported: flat, sparse, growing, vmware3, vmware4
und vpc. The image mode is auto-detected, so no change of configuration syntax
is necessary (TODO: documentation update). Example:

ata0-master: type=disk, mode=volatile, path=vmware4-test.img
2012-10-07 18:36:22 +00:00
Volker Ruppert
9f21d56c9d - vmware3: implemented check_format() for image mode autodetection
- vmware3: coding style changes
- vmware4: fixed endianness before version check
2012-10-07 11:38:55 +00:00
Volker Ruppert
67e2610870 vmware4: implemented check_format() for image mode autodetection 2012-10-06 10:12:36 +00:00
Volker Ruppert
fb778e706c - sparse: simplified restore code
- redolog class: added support for opening redolog file in read-only mode
- open backups for header check in read-only mode (growing, undoable, volatile, vpc)
2012-10-04 17:01:17 +00:00
Volker Ruppert
d6bdc0c18f vpc-img: implemented check_format() for image autodetection 2012-10-03 21:25:20 +00:00
Volker Ruppert
961a88ab43 - started implementation of hdimage mode autodetection and use it to check the
type of the r/o disk for the undoable / volatile mode. The format check code
  is currently written for flat, sparse and growing images. The undoable and
  volatile mode now cause a panic if the r/o image mode is unsupported.
- TODO #1: rewrite the header checks for vmware3, vmware4 and vpc images to make
  them usable for autodetection.
- TODO #2: add support for other types of r/o disks in undoable/volatile mode.
- TODO #3: add an image mode 'auto' for the supported types (NOTE: unknown images
  can be treated as flat ones if their size is multiple of 512).
2012-10-03 16:17:37 +00:00
Stanislav Shwartsman
49bb3ba8f5 some cleanups and optimizations with new event interface 2012-10-03 15:49:45 +00:00
Volker Ruppert
16ee7f8936 - turn on status bar LEDs after restore if necessary 2012-10-03 09:09:04 +00:00
Volker Ruppert
a0852c83b9 - continued work on save/restore support (still incomplete) 2012-10-03 08:12:35 +00:00
Stanislav Shwartsman
5247dfb709 added some debug log messages when cannot open VPC image 2012-10-02 20:06:31 +00:00
Volker Ruppert
54063b3e0b - skip screen update if video is unchanged
- some work on save/restore support (not yet complete)
- changed some variable types to bx_bool
2012-10-01 17:02:18 +00:00
Stanislav Shwartsman
e3c5f9027d exclude code based on uninitialized variables used only for DEBUG 2012-10-01 09:50:33 +00:00
Volker Ruppert
0611793f4c - enable Voodoo clock in init()
- don't enable Voodoo mode if hSync or vSync are still 0 to avoid Bochs crash
  (division by zero error)
- handle PCI register 0x40 (initEnable)
- fixed reported display size
2012-09-30 12:11:01 +00:00
Volker Ruppert
74dc4fc37a - replaced empty LOG_VOODOO function by BX_DEBUG 2012-09-30 10:33:51 +00:00
Volker Ruppert
2d4f9009cd - save/restore documentation updates
- removed obsolete comment
2012-09-28 21:13:46 +00:00
Volker Ruppert
b142dbcc2c - add new function hdimage_open_file() that returns file size and modification
time if requested (reduces code duplication)
- 'vpc' image mode: moved header check to a separate function that opens the
  file, checks header/footer and returns disk type (if requested)
- implemented restore function for 'vpc' mode images
- gui: updated yes/no dialog message after saving state
- save/restore documentation update (TODO: developer doc)
2012-09-27 18:38:30 +00:00
Volker Ruppert
35ec96f740 - implemented restore function for 'vmeare3' mode images
- 'vmware4' image mode: handle restore failure
2012-09-26 16:20:38 +00:00
Volker Ruppert
176121dd2b - implemented restore function for 'volatile' mode images 2012-09-25 20:00:26 +00:00
Volker Ruppert
c06e02f9f0 - fixed uninitialized variable warning and BX_INFO output 2012-09-25 18:32:38 +00:00
Volker Ruppert
84cfd36d38 - implemented restore function for 'vmware4' mode images
- fixed restore function for 'sparse' mode images
- prepared restore functions for 'vmware3' and 'vpc' mode images
2012-09-25 16:24:19 +00:00
Volker Ruppert
d29fb9a592 - implemented restore function for 'concat' mode images
- always use 'pathname' for the full path of the original image
2012-09-25 05:12:46 +00:00
Volker Ruppert
723dfc2ad7 - improved packet logging function (added ASCII dump to hexdump) 2012-09-24 19:32:57 +00:00
Volker Ruppert
7ca95178b0 - fixed save/restore in VBE mode. The class bx_shadow_bool_c expects bit #0 to
be set for "true", but variable "lfb_enabled" wasn't correctly set up.
- TODO: check the whole Bochs code for the correct usage of variables saved
  with bx_param_bool_c.
2012-09-24 15:40:50 +00:00
Volker Ruppert
5d562a7830 - implemented restore function for 'growing' mode images
- fixes and cleanups in the restore functions
2012-09-23 19:28:28 +00:00
Volker Ruppert
7fff912faf - implemented restore function for 'sparse' mode images
- fixed restore function for 'flat' mode images
2012-09-23 11:03:52 +00:00
Stanislav Shwartsman
fe327394c7 fix gcc 4.7 warnings in voodoo code 2012-09-22 19:59:40 +00:00
Volker Ruppert
31461c26fb - added helper function hdimage_copy_file() for the hdimage restore functions.
On win32 the native CopyFile() function is used. The restore function should
  work this way: coherency check (if necessary), close current image, copy saved
  image from restore path (overwrites existing one), finally re-open image.
- implemented restore function for 'flat' and 'undoable' mode images
2012-09-22 10:04:28 +00:00
Volker Ruppert
28bc5e4bc2 - moved coherency check for r/o disk and journal to a separate function to
make it usable for the required check before restoring journal file
- prepared restore function of undoable and volatile images
2012-09-21 20:25:23 +00:00
Stanislav Shwartsman
cc5f8d12d1 fixed unused var warning 2012-09-20 21:14:13 +00:00
Volker Ruppert
bcd0a58537 - simplified save_state() method of 'sparse' mode images (saving parent images
not necessary, since all changes go to the toplevel image)
2012-09-20 20:41:14 +00:00
Stanislav Shwartsman
fe727d12e3 fixed uninitialized variable warning in vga.cc 2012-09-20 19:33:39 +00:00
Volker Ruppert
50482a9f2b - implemented save state function for the disk image modes 'vmware3', 'vmware4'
and 'vpc'
- prepared hdimage restore support
- vmware4: code cleanup
2012-09-19 21:05:18 +00:00
Volker Ruppert
5cbf0894ac - implemented save state function for the disk image modes 'concat' and 'sparse'
- set timestamp of r/o disk in volatile mode, too (for save/restore support)
- TODO: save state function for the remaining image modes, restore support
2012-09-18 19:00:25 +00:00
Volker Ruppert
7da5057be5 - implemented save state function for redolog_t based disk image modes (growing,
undoable, volatile)
- TODO: save state function for the remaining image modes, restore support
- save/restore: when saving binary data to a file, use the full parameter path
  (except "bochs." prefix) as the file name to avoid overwriting duplicates
2012-09-17 19:30:40 +00:00
Stanislav Shwartsman
6682d019e3 remove inline asm code which doesn't compile for MSDEV 64-bit. compiler knows to generate code not worse than this inline asm 2012-09-17 07:57:07 +00:00
Volker Ruppert
9ee5a77747 - started implementation of sav/restore support for hard disk images using a
dummy parameter and it's save/restore handlers. Currently only the save
  support is implemented and the specific save function is only written for
  flat mode images (copies whole disk image file to the save/restore folder).
- TODO #1: implement save function for the other disk image modes
- TODO #2: add restore support (replace disk image file with the one from the
           save/restore folder)
2012-09-16 19:51:30 +00:00
Volker Ruppert
54a637a431 - indent changes 2012-09-16 10:59:15 +00:00
Volker Ruppert
35f97235ed - fixed compilation error in MinGW/MSYS and some warnings 2012-09-16 07:52:55 +00:00
Volker Ruppert
c8907855c2 - remove spaces from short filename (otherwise long name is ignored) 2012-09-15 13:15:30 +00:00
Stanislav Shwartsman
e0aea74693 code indent 2012-09-15 10:03:22 +00:00
Stanislav Shwartsman
4eaa72a32f small coding style changes + warning fixes in voodoo code 2012-09-15 09:47:31 +00:00
Volker Ruppert
5f5d8e2c33 Applied initial version of the 3dfx Voodoo Graphics emulation. The Voodoo core
is based on a patch originally designed for DOSBox. Currently only the Voodoo1
adapter model can be emulation. The emulation is currently slow, but we intend
to clean up and optimize the code. Running the 3D engine in a separate thread
is also planned. To compile with Voodoo support the configure option
"--enable-voodoo" must be used. Then the device can be activated with
"plugin_ctrl: voodoo=1" in bochsrc or on the command line. The device will be
assigned automatically to a PCI slot unless you do that manually. A specific bochsrc
option to select the adapter model will be added when the code has support for it.
2012-09-14 21:50:50 +00:00
Volker Ruppert
25518fe172 - added save/restore support for the VGA override mode
- store update interval in the vga object
2012-09-11 06:52:11 +00:00
Volker Ruppert
c340da84dd - moved the display adapter emulation to the new subdirectory iodev/display
- TODO #1: update MSVC workspace files
- TODO #2: add Voodoo Graphics emulation
2012-09-10 20:49:29 +00:00
Volker Ruppert
d2aaa00336 - dimension_update() must be called when leaving VGA override mode
- Cirrus adapter needs to set the last resolution and BPP for VGA override
- TODO #1: move display adapter code to iodev subdirectory 'display'
- TODO #2: add 3dfx Voodoo Graphics emulation
2012-09-09 15:44:20 +00:00
Volker Ruppert
8863056b7a - documentation updates (iodev subdirectories) 2012-09-02 10:51:47 +00:00
Volker Ruppert
de34274fcb - parts of the USB keypad code are still based on Ben's code, so we need to
add the LGPL to usb_hid.cc
- moved Ben's comment to usb_uhci.cc, since this file contains most of his
  initial pciusb patch
- TODO: implement full USB keyboard support (port from QEMU)
2012-09-02 09:37:47 +00:00
Volker Ruppert
62a568c131 - changed license headers from LGPL to MIT for all devices / drivers that have
been ported from QEMU and originally have this license
- TODO: The QEMU people should verify the changes and tell us if something is
  missing. Bochs 2.6 will be released after everything has been confirmed to
  be okay.
2012-08-31 12:08:19 +00:00