Commit Graph

1890 Commits

Author SHA1 Message Date
Volker Ruppert
48042499cf - added original authors on top of LGPL'd sources ported from Qemu
- added LICENSE file to clarify the Bochs license
- TODO: fix source files ported from Qemu with MIT license
2012-08-30 20:41:25 +00:00
Volker Ruppert
78513089e4 - fixed unloading of support plugins
- TODO: reorganize plugin types, since there are now 3 subtypes of core plugins
  (gui, core devices and support for networking, sound, usb)
2012-08-20 07:35:30 +00:00
Volker Ruppert
a2dd985aef - remove registered device state in destructor (fixes crash on Bochs exit with
MSVC plugins)
2012-08-19 08:16:20 +00:00
Volker Ruppert
11b22c8473 - forgot to remove obsolete stuff 2012-08-16 12:25:55 +00:00
Volker Ruppert
43c1ac48f4 - implemented TFTP support in eth_slirp.cc
* moved TFTP request processing core from eth_vnet.cc to netmod.cc
  * added TFTP handling in eth_slirp.cc similar to DHCP
2012-08-16 11:59:44 +00:00
Volker Ruppert
6809e9b72e - compilation fixes 2012-08-15 21:29:32 +00:00
Volker Ruppert
d6b3875eec - remove cdrom runtime parameter handlers on exit (for wx "2nd run" support) 2012-08-15 08:30:22 +00:00
Volker Ruppert
4538078abb - several fixes for "2nd run" support in wx (still incomplete)
- uninstall parameter handlers (floppy, keyboard)
  - unload plugin that cannot be removed automatically
- wx: removed "show keyboard" demo and some other cleanups
- TODO: remove wx debugger and make wx work with the enhanced gui debugger
2012-08-14 19:33:24 +00:00
Volker Ruppert
e90c04a65f - fixed typo 2012-08-08 15:38:33 +00:00
Volker Ruppert
2d0d73b5e3 - fixed MSVC compilation error
- updated default VS2008Ex workspace file (TODO: update plugin version)
2012-08-06 18:32:54 +00:00
Volker Ruppert
90168f5dcd - moved the lowlevel cdrom and disk image stuff to the new subdirectory iodev/hdimage
- TODO: update MSVC workspace files
2012-08-05 18:13:38 +00:00
Volker Ruppert
7bbc26c70f - redolog: skip bitmap update if extent_index is unchanged after lseek()
- more usage of helper functions bx_read_image() / bx_write_image()
- CHANGES update
2012-08-05 14:42:37 +00:00
Volker Ruppert
7c6f287fc7 - added VirtualPC image support, new disk image mode is called 'vpc'
- ported Qemu block driver (written by Alex Beregszaszi and Kevin Wolf)
  - added helper functions bx_read_image() and bx_write_image()
- TODO: use helper function for the other disk image modes
2012-08-05 09:33:33 +00:00
Volker Ruppert
ab0300f6b2 - some work on the 'sparse' disk image mode
- fixed broken read support caused by wrong #if
  - when opening disk some info is printed to log file
  - coding style changes
2012-07-24 19:27:22 +00:00
Volker Ruppert
8d30a38f7e - undoable: added support for checking the modification time of the base disk
- store r/o disk timestamp in FAT format in reserved field of redolog header
  - use the VVFAT function fat_datetime() to convert the mtime value
  - update redolog header if timestamp is undefined (first usage)
  - Bochs now panics if the r/o disk has been modified after the first usage with
    the undoable disk image mode to avoid journal file corruption.
- undoable: fixed r/o disk size check
2012-07-21 12:00:46 +00:00
Volker Ruppert
85a914c9e9 - implemented "fast-dma" support for 16 bit and in the SB16
- TODO: fix BX_DBG_DMA_REPORT
2012-07-14 14:20:36 +00:00
Volker Ruppert
53438e92c6 - fixes based on Debian patches by Guillem Jover
- set SHELL variable with configure script
  - add '--tag CXX' argument to libtool calls
2012-07-14 07:01:43 +00:00
Volker Ruppert
c6a9f8eb0d - added the capability to transfer more then one byte per ISA DMA cycle.
- use this feature for floppy read and write operations. This does not mean that
  the floppy now works faster than realtime, but it reduces the number of DMA
  calls from the CPU.
- removed outdated file: patch.fast-dma-cbothamy
- TODO: implement this feature in the SB16 (8 and 16 bit)
2012-07-12 21:20:46 +00:00
Volker Ruppert
82c65076cc - renamed PCI Pseudo NIC bochsrc option to "pcipnic" (temporary hack should
be removed after next Bochs release)
- documentation updates
2012-07-11 21:03:59 +00:00
Volker Ruppert
707f9b816c - PCI-only now can be automatically assigned to a PCI slot if not specified
in the PCI slot configuration. Combined PCI/ISA devices (cirrus, vga, ne2k)
  still must be assigned to a PCI slot to let it work as a PCI device.
2012-07-09 17:23:07 +00:00
Volker Ruppert
5994d0e100 - added 'gameport' and 'iodebug' to the default set of plugins (if present)
- use the "auto-unload" feature for 'serial' and 'parallel' plugins, too
- TODO: treat unknown bochsrc directive as plugin name and try to load it
2012-07-08 07:01:25 +00:00
Volker Ruppert
db633275b0 - several improvements to the optional plugin control
- SIM->opt_plugin_ctrl() now can be used to verify the optional plugin
    configuration when using the plugin name "*". The 'load' value 1 makes
    sure that all plugins with the value 1 are loaded. The 'load' value 0
    unloads all plugin with the value 0 (marked for removal).
  - add the default set of plugins to the 'plugin_ctrl' list and load all these
    pre-defined optional plugins before parsing the configuration.
  - special wx case: verify plugin configuration before showing the plugin
    control dialog and before initialising hardware.
  - device plugins that have been loaded, but not configured now set their
    plugin control value to 0. Added the plugin unload check before signalling reset.
2012-07-06 17:19:32 +00:00
Stanislav Shwartsman
77bbea504c merged compilation patch by Sebastian, update closed bugs in CHANGES 2012-06-24 17:42:24 +00:00
Volker Ruppert
a9f27d029c - implemented absolute x/y mouse position mode in the X11 gui
- minor fixes in the USB tablet HID report descriptor
2012-06-24 07:43:36 +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
40f33ff8c2 - don't clear pending interrupt bits when setting the new status 2012-06-21 17:06:57 +00:00
Volker Ruppert
05fe85659a - fixed and improved IRQ handling (ported update_irq() function from Qemu) 2012-06-17 07:14:27 +00:00
Volker Ruppert
095fd7d18a - added SDL sound support (wave output only) 2012-06-09 10:12:05 +00:00
Volker Ruppert
3a4c3e9d54 - added method to return the type of the lowlevel sound module and use it to
check if a sleep / delay call is rquired in the beep generator
- preparing SDL sound support
2012-06-08 20:49:39 +00:00
Volker Ruppert
262b994f41 - added missing files / directories to target 'dist-clean'
- iodev makefile: updated dependencies
2012-05-27 20:11:37 +00:00
Volker Ruppert
5c0bd188ed - check the beep output interface and report the one to be used in the reset()
method. This makes sure that the lowlevel sound interface is reported correctly.
2012-05-24 18:06:40 +00:00
Stanislav Shwartsman
88cc825040 allow 1-byte and 2-byte writes to I/O APIC index register 2012-05-22 14:48:48 +00:00
Volker Ruppert
f4134d5d29 - implemented pc speaker beep in the lowlevel sound module for win32
- improved square wave generator code
2012-05-21 18:45:09 +00:00
Stanislav Shwartsman
eac0991fe1 fixed compilation err with lowlevel sound disabled 2012-05-20 18:58:08 +00:00
Volker Ruppert
076c8ff966 - implemented pc speaker beep in the lowlevel sound module using pthreads
- TODO: win32 threads support
2012-05-20 17:22:50 +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
89f716f599 - removed unused case with virtual timer support disabled
- TODO: rewrite virtual timer code to have both modes (normal and realtime)
  available at the same time
2012-05-17 09:11:48 +00:00
Volker Ruppert
27fdc3cd45 - added new parameter 'rtc_sync' for the 'clock' option. If this option is
enabled together with the realtime synchronization, the RTC runs at realtime speed.
2012-05-15 17:03:45 +00:00
Stanislav Shwartsman
4a22693deb enable back the timer IRQ fix. TODO: ACPI MADT support is still required 2012-05-12 11:55:38 +00:00
Stanislav Shwartsman
03162d86f5 LAPIC: fixed timer interrupts after reloading of LAPIC Timer Divide Configuration register 2012-05-12 11:52:29 +00:00
Volker Ruppert
a925a07c3b - cmos: added debug_dump() 2012-05-12 07:27:49 +00:00
Volker Ruppert
e17000ef68 - changed format of PCI config space dump (16 values per line) 2012-05-08 19:04:35 +00:00
Stanislav Shwartsman
1ab623536c optimize harddrv code 2012-05-06 19:19:00 +00:00
Volker Ruppert
62de4d9178 - speaker should only beep if both bit #0 and #1 of port 0x61 are set
- fixed possible division by zero when calculating beep frequency (counter value
  0x0000 means 0x10000)
- small code cleanup
- TODO: implement beep generator in the lowlevel sound interaface
2012-05-03 19:45:06 +00:00
Volker Ruppert
378f8a04a6 - pit: added debug_dump()
- pit82c54: modified print_counter() for debugger usage
2012-05-01 15:53:28 +00:00
Volker Ruppert
1462fcaf9c - pci2isa debug_dump(): added option 'dump=full' to show the whole PCI config space
- updated debugger documentation
2012-04-25 16:50:41 +00:00
Stanislav Shwartsman
8871aa5da3 removed unused variable - fixing gcc warning 2012-04-23 18:52:11 +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
Stanislav Shwartsman
d71ed03ba1 fixed buffer overflow in serial.cc 2012-04-21 18:13:10 +00:00
Volker Ruppert
d364f22c3c - don't panic in debugger if the iodebug plugin is not loaded
- iodebug: fixed some warnings
- development.dbk: updated iodebug documentation
2012-04-19 18:03:13 +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
99a31bd150 - devices 'parallel' and 'serial':
- added to optional plugin control
  - moved config parameter creation and bochsrc option parsing to the plugin
    device code
2012-04-16 19:17:10 +00:00
Stanislav Shwartsman
6bfad819de bugfix 2012-04-11 14:47:47 +00:00
Volker Ruppert
34ca44cbcd - sb16 / es1370: fixed possible segfaults when unloading plugin 2012-04-09 08:48:10 +00:00
Volker Ruppert
c24080c92a - more accurate horizontal retrace emulation (based on the DOSBox implementation) 2012-04-08 14:21:18 +00:00
Volker Ruppert
a3f7a30422 - ioapic: added debug_dump() (prints redirection table) 2012-04-01 18:53:16 +00:00
Volker Ruppert
4c253c8cd6 - more accurate vertical retrace emulation (based on the DOSBox implementation) 2012-03-25 19:16:44 +00:00
Volker Ruppert
c43cf378f4 - floppy: added debug_dump() 2012-03-23 17:22:30 +00:00
Volker Ruppert
51cba8776d - improved debug_dump()
- small code cleanup
2012-03-20 18:29:49 +00:00
Volker Ruppert
a00bf4c01a - pci2isa: show PCI IRQ level in debug_dump()
- dma: added debug_dump() with verbose output if channel is active
2012-03-15 18:12:13 +00:00
Volker Ruppert
5a9e4a98ff - makefile fixes in the iodev subdirs related to SF bug #3459998 2012-03-12 21:10:44 +00:00
Volker Ruppert
4acef49a29 - improved debvug_dump() for pci, pic and vga / cirrus
- pci2isa: added debug_dump()
2012-03-11 12:17:41 +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
953cd82219 - make the PCI debug_dump() usable from the debugger
- TODO:
  add debug info for more devices without adding them to bx_devices_c and
  without a macro in plugin. A register mechanism in the debugger code would
  be nice. Currently it is only possible to show the devices state by
  accessing the save/restore tree. The debug_dump() output should show
  the operation mode and the most important registers.
2012-03-07 18:08:35 +00:00
Volker Ruppert
2d90b30b14 - attempt to fix SF bug #3493315
- for sequencer reg #1 a screen update is required after changing bit #0, #3 and #5
  - added new method skip_update() that checks the conditions to skip the screen update
    and it is called after resizing the display
  - clear screen request from the sequencer is now handled by the update() code
    in the new method skip_update() instead of clearing display directly
2012-02-25 15:51:39 +00:00
Stanislav Shwartsman
75cf2e2c4a Fix fallout from bx_list_c change 2012-02-24 21:58:41 +00:00
Stanislav Shwartsman
b38c3e3629 Fix fallout from bx_list_c change 2012-02-24 19:40:18 +00:00
Stanislav Shwartsman
7d2e7e5245 Fix memset in pcipnic.cc 2012-02-24 19:38:10 +00:00
Volker Ruppert
1425e2370c - fixes related to the wx 2nd run support (not yet complete)
- siminterface: don't create plugin parameter if it already exists
  - wx: make sure all plugins are loaded when creating plugin control dialog
  - USB HC's: fixed removal of parameters when unloading plugin
2012-02-23 21:26:13 +00:00
Volker Ruppert
d74762b984 - wx: use new log function name for the table of log modules
- added some more log function names
2012-02-23 17:16:35 +00:00
Volker Ruppert
a3441c8e55 - fixed memory leaks 2012-02-18 08:52:25 +00:00
Volker Ruppert
55854afa86 - calculate horizontal and vertical frequency from CRT for more accurate retrace
timing (TODO: length of retrace signals should be calculated, too)
2012-02-14 20:56:42 +00:00
Volker Ruppert
8bb206ccdf - added special flag for dependent lists
- bx_list_c: don't accept duplicate param names in list (except dependent lists
  and special menus)
- added BX_PANIC for malloc() failure
- harddrv: fixed wrong variable found with bx_list_c changes
2012-02-13 20:58:26 +00:00
Volker Ruppert
de94b08a1a - class bx_list_c now contains a chained list of parameters. Removed the now
obsolete maxsize parameter from all lists.
2012-02-12 18:43:20 +00:00
Volker Ruppert
1df471dc82 - fixed line offset change in case VBE is disabled or in 4bpp mode 2012-02-12 13:14:38 +00:00
Volker Ruppert
8ada8d66ff - simplyfied unloading of core plugins 2012-02-12 08:37:42 +00:00
Volker Ruppert
47c68a2f04 - fixed possible crash on Windows 2012-02-11 17:11:58 +00:00
Volker Ruppert
f5ca539534 - fixed some uninitialized values found with valgrind 2012-02-10 18:08:17 +00:00
Volker Ruppert
47f2137edf - set device state structure to 0 with memset() for some devices
- cleaned up vga core init code after adding memset()
- floppy: removed structures that had been used for win95 direct access
2012-02-05 10:08:56 +00:00
Volker Ruppert
b7333b7f3e - removed definitions that already exist in the vgacore files
- minor fixes and cleanups
2012-01-31 18:53:02 +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
ac08e89e94 - void gui init code to a new method and call it after the extension init
- added last maximum scan line to the bx_vga_c object
2012-01-23 22:16:08 +00:00
Volker Ruppert
709dc30cf4 - changed the maximum x/y resolution and the resulting number of x/y tiles
from constant to variable
2012-01-22 16:13:45 +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
500ad37191 - added arguments for x/y resolution to the gui init() and store x/y tilesize
in the gui object. Now the gui doesn't need to include vga.h.
- TODO #1: win32.cc also shouldn't include vga.h
- TODO #2: replace BX_MAX_XRES / BX_MAX_YRES by variables that can be set
  depending on the configuration
2012-01-21 12:15:10 +00:00
Volker Ruppert
3ec77e9372 - store config parameter values in local variables to avoid searching for
parameters at simulation time
2012-01-20 15:56:17 +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
ec464f6f17 - fixed sector count to support > 32GB virtual disk size (patch by soynor) 2012-01-16 17:27:37 +00:00
Volker Ruppert
a700d33e9f - call functions for config and bochsrc parameter handling used by plugins
from the siminterface (required by MSVC and maybe others)
2012-01-16 17:11:16 +00:00
Volker Ruppert
8d7954e576 - another iodev cleanup: renamed pit_wrap files to 'pit'
- updated devices.txt
2012-01-15 08:50:20 +00:00
Volker Ruppert
c6bd3fb60c - moved the sound stuff to the new subdirectory iodev/sound
- TODO #1: update MSVC workspace files
- TODO #2: these 'device classes' could be moved to subdirectories, too:
  - pci (when we have more than one chipset)
  - display (when we have one more device and vga / cirrus cleaned up)
2012-01-15 07:52:04 +00:00
Volker Ruppert
50de0a12cd - moved the networking stuff to the new subdirectory iodev/network
- TODO: do the same with the sound code and update MSVC workspace files
2012-01-14 17:03:00 +00:00
Volker Ruppert
b72d603d83 - forgot to remove this file 2012-01-14 12:37:58 +00:00
Volker Ruppert
68b49ba42d - moved the USB stuff to the new subdirectory iodev/usb
- TODO #1: do the same with the network and sound code
- TODO #2: update MSVC workspace files
2012-01-14 12:36:32 +00:00
Volker Ruppert
e4570a0939 - added special linked list for core plugins and manage them with the device
plugin system.The load order is important for these devices!
- load support plugins for networking, sound and usb only if at least one of the
  related plugin devices is loaded.
- plugin_ctrl: added missing devices to the list in bochsrc sample
2012-01-13 17:04:47 +00:00
Volker Ruppert
fb9401c3b0 - devices 'ne2k' and 'sb16': moved config parameter creation and bochsrc option
parsing to the plugin device code
- sb16: modified misc runtime menu creation to make the sb16 parameters optional
- ne2k: changed location of the init() method in file (now matches coding style
  of other device plugins)
2012-01-12 18:03:20 +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
db4520f778 - devices 'pcidev' and 'pcipnic': moved config parameter creation and bochsrc
option parsing to the plugin device code
2012-01-09 17:15:03 +00:00