Commit Graph

2022 Commits

Author SHA1 Message Date
Volker Ruppert
dfae141275 Added capability to specify the ID of the MIDI device to use. If not specified,
the default MIDI mapper will be used.
2013-11-11 20:44:38 +00:00
Volker Ruppert
9554a2133e Always enable the portable ISO image file support. The option --enable-cdrom now
only controls the presence of platform-specific code to access CDROM/DVD devices
2013-11-10 11:14:42 +00:00
Volker Ruppert
b1d4a96983 Rewrite of the lowlevel cdrom code
- class cdrom_base_c now provides portable ISO image access methods
- platform specific classes implement access to cdrom/dvd devices
2013-11-06 11:15:22 +00:00
Volker Ruppert
b452803be5 Preparing lowlevel cdrom rewrite
- use #if BX_SUPPORT_CDROM instead of #ifdef LOWLEVEL_CDROM
- devices with cdrom support now use the base class cdrom_base_c
- cdrom count variable moved to cdrom.cc
- cdrom_misc.cc: don't use ioctl's for ISO files
2013-11-05 18:06:39 +00:00
Volker Ruppert
c2b1d9119d Added VMDK version 4 disk image creation support (ported from Qemu).
The 'vmware4' mode now also supported as conversion target and for resize.
2013-11-03 07:41:29 +00:00
Volker Ruppert
e29957cca2 Removed 'delete' (-d) option and added new 'backup' (-b) option.
In convert/resize mode a backup can be created if the new file name
is not specified or the same as the source file name. In commit mode
both base image and redolog file are affected by the backup switch.
Added Linux specific file copy code using '/bin/cp'.
2013-11-02 15:58:59 +00:00
Volker Ruppert
f8ea396a2c Several fixes for compiling Bochs successfully in Cygwin64 2013-11-01 18:19:52 +00:00
Volker Ruppert
5b9d937cc1 Make sure winsock.h is included in serial.cc and eth_win32.cc
Including winsock.h not needed in pc_system.cc
Don't specify architecture in gcc 4.7+ example
2013-11-01 16:26:59 +00:00
Volker Ruppert
57272ac32e Added sanity checks to the vmware4 and vvfat mode to avoid data corruption.
Some compilers need special options to pack structures correctly.
Added example for gcc 4.7+ on Windows to shortcut script.
2013-11-01 11:34:51 +00:00
Volker Ruppert
635774e1da Fixed fat_datetime() on Windows to take account of the daylight savings time.
Show expected modification date/time in case of a panic.
2013-10-29 20:52:38 +00:00
Volker Ruppert
2c779f60da bximage convert / resize: show source disk image mode
hdimage undoable / volatile: log base disk image mode
vmware4: fixed 'cylinders' calculation
2013-10-27 19:23:59 +00:00
Volker Ruppert
7f19435887 Fixed some gcc 4.8.1 warnings 2013-10-27 15:13:19 +00:00
Volker Ruppert
66b311a8a6 Some work on the new bximage utility
- added support to use 'concat' and 'dll' mode images as convert source.
  A prefix ("concat:" or "dll:") must be added to the path since autodetection
  doesn't work for these modes.
- create: fixed virtual disk size calculation based on C/H/S
- convert / resize (interactive mode): use original filename as the template for
  the new one if not specified on the command line
2013-10-25 19:10:09 +00:00
Volker Ruppert
1fb469e77f Started user doc update for bximage
Added legacy bximage and manual page to installation
Fixed some warnings
2013-10-23 15:22:09 +00:00
Volker Ruppert
bce8268c6f Added new redolog_t method commit() for the bximage commit mode, using the fast
algrithm of bxcommit.
2013-10-23 08:35:21 +00:00
Volker Ruppert
519b369f56 Removed obsolete ASPI cdrom access code for Win9x/ME 2013-10-22 19:46:46 +00:00
Volker Ruppert
4802fac2de bximage_new: Added VPC dynamic type image creation support (ported from Qemu).
The 'vpc' mode now also supported as conversion target and for resize.
2013-10-19 21:16:10 +00:00
Volker Ruppert
b5a57e7818 Some work on the new bximage utility
- added support to resize images (currently supported: flat, growing and sparse)
- added image file name check and renaming if necessary
- set minimum hard disk size to 10 MB
- vmware4: make header structure available for usage in bximage
2013-10-18 19:36:50 +00:00
Volker Ruppert
f622a042c4 Added initial version of a new bximage utility written in C++ for image
creation, conversion and rodolog commit. Image creation support is not
present yet and the executable has not been added to standard compile yet.
TODO #1: add floppy and hard disk image creation support (from bximage.c)
TODO #2: implement support for conversion to vmware and vpc formats
TODO #3: add MSVC (nmake and workspace) support
2013-10-13 20:30:51 +00:00
Volker Ruppert
6025e38333 preparing hdimage code for the the compilation with a new bximage utility
written in C++ supporting image creation, conversion and redolog commit
2013-10-13 14:33:55 +00:00
Volker Ruppert
ebdd3b4d38 slirp / vnet TFTP support: implemented timeout mechanism 2013-10-06 15:32:40 +00:00
Volker Ruppert
a4b1c2a654 slirp / vnet: increased TFTP buffer size (max. file size 64 MB with blksize=1024) 2013-09-29 09:08:24 +00:00
Volker Ruppert
a8f1834c38 slirp / vnet TFTP support:
Detect and reply all supported TFTP extension options for both read and write
operations. Use 'blksize' value if smaller than buffer size.
TODO: increase buffer size, implement timeout mechanism
2013-09-28 08:56:54 +00:00
Volker Ruppert
4b59e6b884 slirp / vnet: added support for multiple TFTP sessions
slirp: fixed minimum eth packet size for builtin replies
2013-09-27 11:47:59 +00:00
Stanislav Shwartsman
01c0f07e4e fixed compilation error under cygwin which defines WIN32 2013-09-26 19:51:30 +00:00
Volker Ruppert
ec4990a380 slirp / vnet: only one instance per Bochs session supported yet 2013-09-16 17:06:03 +00:00
Volker Ruppert
d943feaf8e panic if cirrus support is requested but not available to avoid segfault 2013-09-05 07:38:22 +00:00
Volker Ruppert
5ac2776cd0 Added IP and UDP header data structure definitions and related code cleanups 2013-08-22 11:53:40 +00:00
Volker Ruppert
7783e39b77 On Windows, the netmod plugin now must be linked with wsock32 2013-08-21 15:19:47 +00:00
Volker Ruppert
9ce849e742 Moved ARP processing to netmod.cc to reduce code duplication 2013-08-20 17:43:24 +00:00
Volker Ruppert
51688143aa Some work on the lowlevel sound support
- ALSA driver is now default on Linux (if present)
- SDL sound driver is now default if no platform-specific driver is available
  and the SDL gui is enabled
- soundlnx.cc: sendwavepacket() now exits with error if device is not opened
- soundmod.cc: exit beep loop if sendwavepacket() returns error
2013-08-04 14:35:06 +00:00
Volker Ruppert
3e27308899 Allow to specify the platform-default sound driver directly
- driver names "oss", "osx" and "win" can now be used instead of "default"
- updated sound initialization messages
2013-07-25 18:47:11 +00:00
Volker Ruppert
1c7564b98e Fixed possible crash when using beep thread 2013-07-14 19:01:29 +00:00
Volker Ruppert
b84b0eed52 Moved ALSA sound support to a separate sound driver object
- ALSA stuff moved from soundlnx.* to new soundalsa.* files
- SB16 / ES1370: including specific sound driver headers not necessary
- updated dependencies
2013-07-14 15:14:53 +00:00
Volker Ruppert
9a1d889359 ES1370: implemented wave output to file (raw and VOC format)
- added parameters 'wavemode' and 'wavefile' to the 'es1370' option
- ES1370: added new method sendwavepacket() (similar to SB16)
- moved VOC file methods from sb16.cc to soundmod.cc and added macros for them
- SB16: minor fixes
2013-07-13 17:37:48 +00:00
Volker Ruppert
f91aa29f2b Fixed and simplified DMA timer value calculation 2013-07-07 19:19:59 +00:00
Volker Ruppert
258505a762 Fixed wave output to VOC file
TODO: move VOC file code to soundmod.cc and use it for ES1370, too
2013-07-07 11:27:10 +00:00
Volker Ruppert
dd794d6d44 Some more work on the 'sound' bochsrc option
- added 'wavein' parameter to specify the wave input device if necessary
 - if 'wavein' is not set, Bochs uses the 'waveout' value for input, too
 - SB16: the 'wave' parameter is now only used to specify the filename (mode 2 or 3)
 - TODO: implement 'wavemode' feature for ES1370 similar to SB16
2013-07-06 15:12:04 +00:00
Volker Ruppert
2e993f4a84 Some work on the 'sound' bochsrc option
- forgot to save 'sound' bochsrc line
 - renamed wave output parameter to 'waveout'
 - simplified sound option parsing
2013-06-30 08:21:26 +00:00
Stanislav Shwartsman
74c2cb0127 fixed compilation warning 2013-06-25 17:32:33 +00:00
Volker Ruppert
192aa1f369 Added global sound control option in bochsrc and config interface
- added 'sound' option to select the driver and the wave output device
  (see bochsrc sample for details)
- the wave device option of sb16 and es1370 is now only used to set up the
  wave input device (if necessary)
- cleaned up the speaker code to initialize the 'sound' case correctly
2013-06-24 19:19:12 +00:00
Volker Ruppert
c3740c0e6e Added new bochsrc option to control the speaker output mode. The choices 'sound'
(lowlevel sound output), 'system' (system beep on Linux and Windows) and 'gui'
(forward beep to related gui methods) are available.
2013-06-16 18:52:34 +00:00
Volker Ruppert
f1c6be0bc8 Serial mouse detection fixes (required for CTMOUSE.EXE)
- added support for 16 bit access to serial port registers
- fixed entering mouse detection mode with DTR/RTS
- report serial port mode in log file
2013-06-16 08:36:47 +00:00
Volker Ruppert
50190829e9 Some PC speaker output fixes
- change beep frequency only if the new counter value is completely written
- turn off beep on exit
2013-06-14 19:08:51 +00:00
Volker Ruppert
c5ca69da5e Added support for changing speaker frequency while output is enabled 2013-06-11 21:04:07 +00:00
Volker Ruppert
c0d3cdb5c5 Set the initial status of removable devices to BX_EJECTED (fixes headerbar buttons) 2013-06-09 10:27:43 +00:00
Volker Ruppert
bb9eaec2dc some fixes for Bochs on MorphOS (based on a patch by Thore Sittly)
- missing functions fseeko() and localtime_r() implemented in osdep.cc
- updated cdrom_amigaos.cc code
2013-04-12 17:26:27 +00:00
Stanislav Shwartsman
401bae4501 fixed unused var warning 2013-04-09 20:35:24 +00:00
Volker Ruppert
674447c186 DLL HD support rewritten and enabled for WIN32
TODO: put sample code for VDISK.DLL into the patches directory
2013-03-08 18:25:32 +00:00
Volker Ruppert
b81622cf31 added default DRB address setup for the i440FX chipset 2013-02-27 17:21:29 +00:00
Volker Ruppert
37b1f11fa6 cleaned up serial mode handling and some other minor changes 2013-02-23 15:15:59 +00:00
Volker Ruppert
9c3d374e6a continued work for "wx second run" support
- memory: initialize ISA and PCI ROM variables in init_memory()
- sb16: remove items from runtime menu in destructor
- gui debugger: show dialog contents (TODO: fix remaining display issues)
- TODO: fix deadlock in bx_wx_gui::handle_events()
2013-02-18 20:52:19 +00:00
Volker Ruppert
910774513b some work for "wx second run" support (not yet complete)
- bx_list_c: added support for removing parameter with other parent list
- USB HC's: remove item from runtime config on simulation exit
- initialize bx_user_quit in bx_begin_simulation()
- only remove optional plugin from list if alrady unloaded
2013-02-17 08:27:43 +00:00
Volker Ruppert
e9302f4c13 don't execute hdimage save functions if the save/restore path is empty
reset save/restore path after completing save or restore process
2013-02-09 14:21:58 +00:00
Volker Ruppert
0fbd1b3eff now using new bx_param_string_c method sprint() in enhanced debugger
skip special value "none" in display library options
2013-02-02 16:02:08 +00:00
Volker Ruppert
17970857b8 added new bx_param_string_c methods isempty() and sprint()
- isempty() returns 1 if string length is 0 or string has special value "none"
- sprint() copies the formatted / converted string into a buffer
- use new methods in some parts of the code (TODO: win32 dialogs)
- check for the special value "none" to avoid failures
2013-02-01 19:13:58 +00:00
Volker Ruppert
2daadfcd85 parse serial, parallel and sound bochsrc options using the parameter list
- fixed small bug in the ne2k parser code
- added warnings to the new parser code
2013-01-26 18:17:23 +00:00
Volker Ruppert
b1cc217ea8 parse mouse and ata resource bochsrc options using the parameter list
- fixed possible segfaults in the new parser code
- use the new parser code partly for the ata device and nic options
2013-01-26 13:32:28 +00:00
Volker Ruppert
8e4e08cad7 changed USB cdrom media status parameter type to bx_param_enum_c
- moved media status names to the siminterface code
- textconfig: fixed possible segfault in runtime options prompt
2013-01-25 17:56:40 +00:00
Volker Ruppert
42cd945c35 i430FX: set up DRB address registers depending on memory size
- TODO #1: do the same for the i440FX chipset
- TODO #2: implement DRAM module detection mode in the memory code
2013-01-25 15:52:39 +00:00
Volker Ruppert
b5dd859da8 changed floppy media status parameter type to bx_param_enum_c 2013-01-23 17:56:57 +00:00
Volker Ruppert
c2b57c5a56 save the ata device options using the parameter tree
- removed parameter "present" and use the new drive type "none" instead
- re-implemented cdrom media status parameter as a bx_param_enum_c
- TODO: change floppy media status parameter type to be consistent
2013-01-22 18:26:49 +00:00
Volker Ruppert
34dbbe1c74 save the mouse, serial, parallel and ata resource options using the parameter tree 2013-01-19 22:37:15 +00:00
Volker Ruppert
a54f50e4f2 save the sound configuration using the parameter tree 2013-01-19 15:18:07 +00:00
Volker Ruppert
a5e5ac69b0 save the network configuration lines using the parameter tree
- fixed bochsrc line after a "raw byte" string parameter
- changed parameter name "macaddr" to "mac" (same as bochsrc option parameter)
- skip disabled parameters when building the bochsrc line
- added "multiline" switch to select the output format (one or multiple lines)
- renamed siminterface method and use it in the network devices code
2013-01-19 12:25:53 +00:00
Volker Ruppert
56a7dfea8a always load and enable USB UHCI if the i440FX chipset (PIIX3) is selected 2012-12-14 16:10:25 +00:00
Volker Ruppert
2ea45c0e4d implemented volatile BIOS memory write support (controlled by PIIX/PIIX3 XBCS register) 2012-12-02 19:59:23 +00:00
Stanislav Shwartsman
68c5312ee1 fixed gcc warning - array index out of bounds 2012-11-26 18:43:19 +00:00
Volker Ruppert
2f036fe5ca added IOAPIC control from the PIIX3 (enable /disable and address relocation) 2012-11-25 19:06:03 +00:00
Volker Ruppert
033af3734c PCI register behaviour fixes (PIIX/PIIX3) 2012-11-16 16:59:58 +00:00
Volker Ruppert
9c5e2565ca fixed most of the MSVC warnings 2012-11-13 20:28:36 +00:00
Volker Ruppert
38addf037f PCI register behaviour fixes, updated messages and comments 2012-11-12 18:56:07 +00:00
Volker Ruppert
6787d3b629 some PCI register behaviour fixes 2012-11-11 16:55:59 +00:00
Volker Ruppert
f0a3679e34 moved function is_pci_device() to the siminterface class 2012-11-11 12:21:09 +00:00
Volker Ruppert
cc56245407 started implementing the i430FX chipset
- renamed config parameter "i440fx_support" to "enabled"
- new config parameter "chipset" added (current choices "i430FX" and "i440FX")
- don't load ACPI support if the i430FX chipset is selected
- select register values for the core PCI devices depending on the chipset
- USB UHCI must be connected to a PCI slot if the i430FX chipset is used
- rombios changes to make the i430FX chipset work
- TODO #1: implement limitation to 1 cpu and 128 MB RAM for the i430FX chipset
- TODO #2: verify register behaviour of both chipsets
2012-11-11 08:11:17 +00:00
Volker Ruppert
ab57eb3615 fixed compilation error with debugger enabled
- read PCI confAddr value from the devices code for debugger output
- PCI confData value isn't needed at all (changes by each read / write access)
- PCI framework methods don't need to be virtual
2012-11-09 13:30:52 +00:00
Volker Ruppert
46d09f3852 moved PCI framework to the common devices code
- PCI slot configuration, memory and i/o BAR registration, PCI i/o space
  handlers now present in devices.cc
- configure: E1000 emulation and USB support need PCI
- vga: fixes for the non-PCI case
2012-11-08 19:12:26 +00:00
Volker Ruppert
9011005580 fixed some MSVC warnings in the iodev code (vgacore, voodoo, vpc-img, vvfat)
TODO: fix MSVC warnings in the voodoo rasterizer code
2012-11-01 15:43:12 +00:00
Volker Ruppert
c8012c3f1d cleaned up devices timer handler / fixed keyboard paste counter 2012-10-30 17:25:33 +00:00
Volker Ruppert
9933ffa3d9 vga refresh framework changes
- renamed trigger_timer() methods to refresh_display()
- new argument 'redraw' added to force a refresh of the entire screen
  (used in snapshot mode)
- siminterface method refresh_vga() now checks if the Bochs gui init is complete
- use SIM->refresh_vga() in some more cases
2012-10-28 08:23:39 +00:00
Volker Ruppert
4eae421272 Graphics snapshot feature re-implemented for the new graphics API
- graphics_tile_info() split into a common and specific part
- store snapshot mode in structure bx_svga_tileinfo_t
- in snapshot mode, display adapters copy raw data to buffer
- rewrite of the trigger_timer() code to make it work in all cases
- added new class bx_nonvga_device_c to make forwarding refresh requests to the
  Voodoo adapter possible
2012-10-25 15:53:04 +00:00
Volker Ruppert
bdf28d89dd Graphics snapshot handling for standard VGA and compatible modes (old graphics
API) moved to the gui code. Splitted graphics_tile_update() in a common and a
specific part. The common part handles the snapshot case if active. As a side
effect, the snapshot feature now works for CGA modes, too. Fixed palette colors
in 8 bpp snapshots.
2012-10-15 19:43:06 +00:00
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