Commit Graph

134 Commits

Author SHA1 Message Date
Volker Ruppert
3c0ad43092 Continued preparing Bochs for SDL2 support
- added new symbol BX_WITH_SDL2 and prepared build system
- TODO #1: add new option --with-sdl2 to configure script
- TODO #2: add new file sdl2.cc (porting seems hard to do - writing from scratch
  might be better)
2014-06-23 19:37:58 +00:00
Volker Ruppert
773ac518b3 Fixed broken MSVC plugins support (many CDECL additions required)
TODO: check for remaining CDECL issues (hdimage mode 'dll') and update project files
2014-06-08 08:40:08 +00:00
Volker Ruppert
7cb5729365 Seek delay implemented for ATA/ATAPI DMA read commands
TODO: seek delay for write commands
2014-01-19 18:13:12 +00:00
Volker Ruppert
ea7997210d Some work on the wave volume control support
- ES1370: implemented CODEC registers (AK4531 mixer) and wave volume control
- Moved wave volume application code to new method pcm_apply_volume() and use
  it for both soundcards
- TODO: stereo support
2013-12-14 17:43:12 +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
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
17b7b87a61 Added new experimental gui 'vncsrv" using the LibVNCServer library. It supports
higher resolutions and > 8 bpp graphics modes. The RFB gui with limited
capabilities is still available.
TODO:
- fix random segfaults in dimension_update()
- Windows (MinGW) support
- fixes for clients not supporting 'rfbEncodingNewFBSize'
- fix cursor shape after dimension update()
2013-05-30 17:18:30 +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
Volker Ruppert
2f036fe5ca added IOAPIC control from the PIIX3 (enable /disable and address relocation) 2012-11-25 19:06:03 +00:00
Volker Ruppert
f0a3679e34 moved function is_pci_device() to the siminterface class 2012-11-11 12:21:09 +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
4bc41a51e6 - removed unused declarations 2012-11-03 23:18:14 +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
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
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
9189105a0b - prepared support for sending absolute x/y values from the gui to the mouse emulation
- new gui method set_mouse_mode_absxy() should switch the gui to absolute
    x/y mode
  - new DEV_mouse_motion() argument 'absxy' indicates whether or not the gui
    sends absolute x/y values
  - USB tablet code prepared to use the new feature
  - TODO: implement this feature for each gui (sdl, win32, wx, x, ...)
2012-06-21 17:33:37 +00:00
Volker Ruppert
d6e7be922b - prepared pc speaker beep support in the lowlevel sound module
- sound devices: moved wave output init to the init() method (required for
  beep support)
- TODO: implement beep using a separete thread
2012-05-20 14:19:49 +00:00
Volker Ruppert
f65c4e66b8 - debugger command 'info device': implemented support for additional arguments
- ne2k: replaced debugger command 'info ne2k' completely by a new version based
  on 'info device' with additional arguments and removed all of the now obsolete
  stuff (ne2k device stub, macro for print_info())
- pci: added option 'dump=full' for the debugger command 'info device' to show
  the whole PCI config space
- TODO: some other devices could have support for additional options in
  debug_dump()
2012-04-23 17:06:19 +00:00
Volker Ruppert
bdfe4ae1bb - added debug_dump() (prints the same as 'info ne2k' without arguments)
- removed FILE parameter from print_info() (unused - since dbg_printf() doesn't
  need it)
- converted tabs to spaces
- TODO: implement 'info device' with optional arguments to get rid of the
  print_info() method
2012-04-18 17:03:00 +00:00
Volker Ruppert
086266d033 - implemented new debugger command 'info device [string]' that shows the state
of the device specified in 'string'. Added register mechanism and chained
  list to store the device name and pointer. Replace hardcoded debug info
  implementations for pic, pci and vga by the new one.
- TODO #1: improve existing debug_dump() output and add more devices
- TODO #2: add support for additional arguments and replace the NE2k print_info()
2012-03-10 17:14:07 +00:00
Volker Ruppert
8ada8d66ff - simplyfied unloading of core plugins 2012-02-12 08:37:42 +00:00
Volker Ruppert
825edc4c64 - blinking in VGA graphics mode implemented (undocumented feature???)
- prepared function to override the VGA output (stops the update timer)
- minor cleanups the update() code
2012-01-27 18:50:07 +00:00
Volker Ruppert
ca2e44c0c4 - moved the pcivga code to vga.cc and removed the now obsolete plugin device 2012-01-26 16:35:38 +00:00
Volker Ruppert
da42a100eb - major rewrite of the vga / cirrus code
- added new class bx_vgacore_c containing the core of the standard VGA
    emulation. This is now the base class for both vga and cirrus.
  - created 2 separate plugins 'vga' (for standard VGA and VBE) and 'svga_cirrus'
    (Cirrus emulation). The vga extension option is used to select which plugin
    should be loaded.
- TODO: move the pcivga code to the VGA/VBE code, add subdirectory for display
        adapters, severak improvements and cleanups
2012-01-24 21:58:24 +00:00
Volker Ruppert
a34cf1bcd5 - changes in the text update interface code
- changed argument for the text mode info structure to a pointer
  - added attribute controller palette to bx_vga_tminfo_t and removed the
    previous implementation
  - carbon.cc: attempt to fix the text mode colors (untested)
- x.cc: fixed warnings
2012-01-22 12:22:03 +00:00
Volker Ruppert
ed669adfd1 - rewrite of the PCI memory management code for the expansion ROM and BIOS area
- store memory type array in the memory object to avoid calling the pci plugin
    frequently. The pci code calls a memory method to change the memory type in
    case the PAM registers are modified.
  - removed now obsolete code and minor cleanups
2012-01-19 18:32:11 +00:00
Volker Ruppert
5c49e2458f - added new plugin type PLUGTYPE_STANDARD for optional plugins which are used in
nearly all cases and plugins that depend on others. These plugins cannot be
  managed with 'plugin_ctrl' (e.g. keyboard, harddrv, pci_ide). Store the plugin
  type in the divice structure for compatiblity with the "no-plugin" compilation.
  Call the device methods init(), reset() and after_restore_state() for each type
  separately in the order: stanard, optional, user. This also affects the status
  bar LED feature: now the keyboard and harddrv LEDs are always visible, but
  those of optional plugins may be invisible if there is no space left.
- TODO #1: add the devices 'ne2k' and 'sb16' to 'plugin_ctrl'
- TODO #2: manage core plugins with the device plugin system
2012-01-10 17:45:18 +00:00
Volker Ruppert
aad2d89c83 - rewrite of the optional plugin control feature. Now the plugins are loaded
directly while parsing the bochsrc or command line. If plugin support is enabled,
  the option could load all optional plugins, not only the ones supported before.
  NOTE #1: The old option had all plugins enabled by default and gave the user
           a chance to diable them. Now the plugins are only loaded if they
           appear in the config line and they are set to "1".
  NOTE #2: Loading a plugin that is controlled by a bochsrc option is possible,
           but it currently leads to a panic, since the load command is still
           present in devices.cc.
  NOTE #3: The plugin init code creates the device object and registers the
           optional plugin device. As an option, it can create config parameters
           and register an option parser. The device init, register state and
           reset is still handled in devices.cc, but in the order the devices
           have been loaded with the plugin control.
  NOTE #4: If plugin support is disabled, the plugin control only accepts the
           devices listed in plugin.cc.
- plugin init of core plugins now fails if they are not loaded with the expected
  type. For core plugins the load order is important and they cannot be handled
  with the chained devices list (used for optional and user plugins).
- some additions for calling config.cc functions from a plugin device
2011-12-25 08:52:34 +00:00
Volker Ruppert
04b0bcb746 - some work for the case the plugin support is turned off
- added plugin unload function and improved load function
  - use new function in bx_unload_plugins()
- new macro BX_UNREGISTER_DEVICE_DEVMODEL for future enhancements
2011-12-23 12:01:58 +00:00
Volker Ruppert
38a797f502 - added function for loading optional plugins in case the plugin support is
turned off. Removed workaround code from devices.cc.
- removed 'pci_ide' plugin from the optional plugin control, since it depends
  on the presence of 'pci' and 'harddrv'.
- define types for plugin init/fini functions
2011-12-22 10:35:49 +00:00
Volker Ruppert
27c857784d - prepared receive status callback function that returns several flags.
For now it returns a flag that indicated that the device can receive data
  from the eth module and flags for the device speed. TODO: Use this callback
  in the eth modules before sending data to the device.
2011-12-17 08:22:33 +00:00
Volker Ruppert
5045a241e8 - ported Intel(R) 82540EM Gigabit Ethernet adapter emulation from Qemu
- TODO: add save/restore support, use Bochs function for host to little endian
  data conversion, timers of networking modules 'vnet' and 'slirp' should use
  the device speed instead of fixed 10 MBit
2011-12-13 20:53:44 +00:00
Volker Ruppert
e607d6e070 - rewrite of the method init_module() similar to the netmod one
- lowlevel sound modules must always include their headers for correct
  auto-generated dependencies
2011-08-18 07:05:09 +00:00
Volker Ruppert
592c3399eb - created separate plugin 'netmod' that contains the common networking code
and the supported ethernet modules
  - renamed eth.* files to netmod.*
  - pseudo-device plugin implementation similar to 'soundmod'
- TODO: move sound, net and usb stuff to a separate subdirectory of iodev
2011-08-16 17:27:27 +00:00
Volker Ruppert
c7f63fca93 - added palette for 8 bpp support
(TODO: support for standard VGA 4 bit mode - saving as 8 bpp BMP)
2011-08-05 15:47:33 +00:00
Volker Ruppert
828b52fc50 - prepared graphics snapshot feature for VBE and Cirrus modes (TODO: save data in BMP format) 2011-08-01 18:21:25 +00:00
Volker Ruppert
5014eed268 - link lowlevel cdrom support with the hdimage plugin instead of harddrv and usb_common. This fixes
duplicate log prefixes on Windows if both IDE and USB cdroms are used in plugin mode. Windows also
  requires the cdrom base class and the init_cdrom() method to link and work correctly.
2011-07-17 17:23:12 +00:00
Stanislav Shwartsman
e6987d553c unregister BeOs plugin 2011-07-11 17:44:46 +00:00
Volker Ruppert
c2d0c207f7 - preparing Bochs for experimental USB xHCI support (written by Ben Lunt) TODO list:
- add sources (update in progress)
  - update configure script
  - initialize new USB devices member 'max_packet_size' (need help from Ben)
2011-07-04 19:42:47 +00:00
Stanislav Shwartsman
03879cf90d added infrastructure for prefetch support in the memory handlers 2011-06-29 19:48:46 +00:00
Volker Ruppert
6a42228075 - first step for DLL plugin support with MSVC. Now the BOCHS.EXE with plugin
support compiles and links fine and the main object files for the plugin DLLs
  are created. Since the gui and iodev makefiles are not ready yet, the link
  stage must be done manually. Support for the search path defined in
  LTDL_LIBRARY_PATH should be added when the DLL plugins compile and work.
2011-06-15 17:24:32 +00:00
Volker Ruppert
d03db7f940 - several changes related to cdrom runtime configuration
* moved runtime handlers for cdrom from config.cc to the device object
  * cd media status variable is now always of type bx_bool
  * changed obsolete gui names like "cdromD" to "cdrom1"
  * TODO: implement new runtime config mechanism similar to USB
2011-06-13 09:32:39 +00:00
Volker Ruppert
29c5c45609 - implemented gameport (joystick) presence control by external device and use
it in the ES1370 device (enabled by default)
2011-03-31 16:54:06 +00:00
Volker Ruppert
ae45908060 - ported ES1370 soundcard emulation from Qemu. For now, only sound output to
DAC2 is sent to the lowlevel sound module. DAC1 and sound input (ADC) are not
  yet supported. Also unsupported: CODEC (mixer), UART (MIDI) and legacy support.
  Sound module selection in configure script now no longer depends on SB16 and
  uses autodetection only.
- fixed segfault when saving bochsrc
2011-03-12 17:37:26 +00:00
Stanislav Shwartsman
00981cd7a6 Adding Id and Rev property to all files 2011-02-24 22:05:47 +00:00
Volker Ruppert
4e3b704a19 - created separate plugin 'soundmod' that contains the lowlevel sound output
stuff (pseudo device implementation similar to 'usb_common' and 'hdimage')
2011-02-14 21:14:20 +00:00
Volker Ruppert
00c4dc40d6 - added floppy string parameter handler and moved "path" handling there
- the "readlonly" parameter is now completely handled in the floppy code
- detect VVFAT as 1.44 MB media when using the "image=" parameter in bochsrc
2011-01-18 21:04:44 +00:00
Volker Ruppert
51682da8b4 - converted the hdimage stuff to a separate plugin (similar to usb_common)
- usb_common is now a core plugin
- fixed an MSVC warning in devices.cc
- updated year in copyright
2011-01-12 22:34:42 +00:00