Commit Graph

36 Commits

Author SHA1 Message Date
Volker Ruppert
967f7d3381 Added method parse_param() to bx_param_bytestring_c and use it to reduce code
duplication (TODO: similar changes in win32paramdlg.cc).
2018-02-04 22:20:46 +00:00
Stanislav Shwartsman
dc628676ad rename bx_shadow_data_c::get_format as it overrides/collides with bx_param::get_format 2018-01-19 21:21:09 +00:00
Stanislav Shwartsman
e8d0e718f1 continue param tree changes
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>)
2018-01-19 20:27:04 +00:00
Stanislav Shwartsman
5f2bf81995 add new dump_param method to param object which dumps param into a string
use new method do dump param tree during save/restore, GUI and text debugger and other places
significantly reduce code duplication over multiple modules
2018-01-10 20:05:59 +00:00
Stanislav Shwartsman
e05e6f58b0 add new method to param object - dump_param
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
2018-01-10 19:10:19 +00:00
Volker Ruppert
9912c99fd2 Continued work on Voodoo2 support (some demos now working).
- 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.
2017-05-16 20:37:01 +00:00
Stanislav Shwartsman
68b9d10b76 reverting latest commit, merged by mistake 2017-04-20 18:31:52 +00:00
Stanislav Shwartsman
e3fdf42225 use std::string in param_tree and gain more robust code with automatic garbage collection 2017-04-20 18:26:45 +00:00
Stanislav Shwartsman
de7aa70c23 fixed more warning from msvc 2017-03-18 19:28:02 +00:00
Stanislav Shwartsman
40609d3ab2 c++ better to use delete and not malloc 2016-12-05 18:41:35 +00:00
Stanislav Shwartsman
dff5e9587b fixed SMP mode compilation err 2016-05-05 14:15:17 +00:00
Stanislav Shwartsman
3ffe5d3d87 parse params from string using bx_param method - avoid unnecessary switch walking over param types 2016-05-03 19:15:09 +00:00
Stanislav Shwartsman
b5d1b30f3d rename variable to avoid conflict with std::string class 2016-04-30 20:44:10 +00:00
Volker Ruppert
9bc8651328 Extended functionality of class bx_shadow_data_c to simplify saving small byte
arrays. Changed register_state() code in a few devices to use this feature.
TODO: Use this feature in all devices with small byte arrays.
2015-10-05 18:09:58 +00:00
Volker Ruppert
7da8cfa4b0 Fixed save/restore support of the USB subsystem when using an external hub
with devices conected at runtime.
- Added restore handler support for the bx_list_c class. If a handler is
  registered, it will be called after restoring all of the list's members.
- USB hub: add special lists to the port state and add pointers to the
  runtime-only options for each port. The restore handler of this list calls
  init_device() to make sure all connected devices can be restored.
- Call restore_logopts() after restoring hardware to make sure all saved
  modules have been created.
- TODO: the USB cdrom also needs a fix for it's runtime-only options.
2015-08-28 17:37:38 +00:00
Volker Ruppert
16fb8317bd Fixed parameter handler issues found with runtime changes while cdrom tray locked.
- bx_param_num_c: set the value returned from the handler.
- bx_param_string_c: set the new value after processing the handler.
- harddrv param handler: check lock state of cdrom and modify value if true.
2015-08-10 18:44:16 +00:00
Volker Ruppert
924201f694 Added capability to handle floating point values with save/restore.
Improved OPL3 save/restore support.
2015-03-13 21:28:40 +00:00
Volker Ruppert
c8ef526143 Fixed some warnings. 2014-12-01 17:06:00 +00:00
Volker Ruppert
0a6274c2af Fixed bx_shadow_bool_c method set() to make it work with initial value "1".
This fixes the floppy malfunction after restore and maybe other issues. The
buggy code failed to clear the DMA controller mask bits and the floppy DMA
requests never arrived at the CPU.
2014-05-13 21:10:31 +00:00
Volker Ruppert
76a03aa1f0 Networking-related fixes
- bx_param_string_c method isempty() didn't work for raw byte strings. Now using
  it to check whether or not the current value matches the initial one. The
  parameter handling of the network adapters now use this method to check if
  the MAC address is already initialized to avoid incorrect BX_ERRORs.
- small documentation update
2014-03-10 19:05:46 +00:00
Stanislav Shwartsman
52c80539ef fixed uninitialzied variable which caused unpredictable behavior in some cases (randomly ignoring params during loading .bochsrc) 2013-12-22 20:47:30 +00:00
Volker Ruppert
f3a6fbd235 Simplified setup of special runtime menus / dialogs
- If the runtime flag of a bx_list_c object is set, all it's items are set up
  as runtime options.
- Set the runtime parameter for all top-level runtime-only lists. Setting up
  each single parameter is no longer needed.
2013-11-25 21:07:39 +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
48b345d06f save log options per device (from original bochsrc - runtime changes not handled yet)
code cleanup in bx_write_param_list() and other parts of the bochsrc save code
2013-02-03 18:28:25 +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
2f5be164d2 - reverted part of rev. 11031: for dependent lists the check 'param->get_parent() == this'
also works and no deplist trick is required
- bx_param_c destructor now deletes the dependent list if it exists (memory leak)
- bx_list_c::clear() only deletes the parameter if the list is it's parent
- added new method cleanup_save_restore() to free memory on simulator shutdown
2012-02-14 18:13:54 +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
Stanislav Shwartsman
2e32bf2d84 for bx_list param - convert 'choise' variable to regular integer
also for textconfig - fix operation under cygwin
under cygwin it is not guaranteed that any printf is printed on the screen under you flush the FILE stream.
2012-01-21 20:36:32 +00:00
Volker Ruppert
9669929cbb - several fixes related to the graphics snapshot feature
- fixed size entries in bitmap file header for 8 bpp
  - bx_param_filename_c now uses the file extension from the initial value as
    the default (if present)
  - SIM->ask_filename() now uses the correct parameter type
  - win32paramdlg AskFilename(): added filter for BMP files
2011-08-09 09:56:00 +00:00
Stanislav Shwartsman
d11114ac19 Patch for emulating target with larger memory than host has available by Gary Cameron.
The patch was posted in mailing list at Thu 6/16/2011.

Desription for CHANGES:

- Memory
  - Added new configure option which enables RAM file backing for large guest
    memory with a smaller amount host memory, without causing a panic when
    host memory is exhausted (patch by Gary Cameron). To enable configure with
        --enable-large-ramfile option.
2011-07-22 17:46:06 +00:00
Volker Ruppert
48e8df25ff - fixed some MSVC warnings 2011-06-19 05:37:30 +00:00
Volker Ruppert
c78026a9a2 - deleted executable properties from source files 2011-04-03 10:29:19 +00:00
Stanislav Shwartsman
af28ef231a storing list title in param is redundant, extra overhead 2011-03-19 21:40:07 +00:00
Stanislav Shwartsman
00981cd7a6 Adding Id and Rev property to all files 2011-02-24 22:05:47 +00:00
Stanislav Shwartsman
a6ad162346 separate param tree code out of rest of siminterface
create new module
2010-09-16 21:46:45 +00:00