summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/netlist/devices/net_lib.cpp3
-rw-r--r--src/lib/util/aviio.cpp2
-rw-r--r--src/lib/util/corealloc.h2
-rw-r--r--src/lib/util/options.cpp23
-rw-r--r--src/lib/util/options.h5
5 files changed, 32 insertions, 3 deletions
diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp
index 3b8edc8ac84..4df6811dddc 100644
--- a/src/lib/netlist/devices/net_lib.cpp
+++ b/src/lib/netlist/devices/net_lib.cpp
@@ -41,8 +41,9 @@ NETLIST_START(bjt_models)
NET_MODEL("2N5190 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)")
NET_MODEL("2SC945 NPN(IS=3.577E-14 BF=2.382E+02 NF=1.01 VAF=1.206E+02 IKF=3.332E-01 ISE=3.038E-16 NE=1.205 BR=1.289E+01 NR=1.015 VAR=1.533E+01 IKR=2.037E-01 ISC=3.972E-14 NC=1.115 RB=3.680E+01 IRB=1.004E-04 RBM=1 RE=8.338E-01 RC=1.557E+00 CJE=1.877E-11 VJE=7.211E-01 MJE=3.486E-01 TF=4.149E-10 XTF=1.000E+02 VTF=9.956 ITF=5.118E-01 PTF=0 CJC=6.876p VJC=3.645E-01 MJC=3.074E-01 TR=5.145E-08 XTB=1.5 EG=1.11 XTI=3 FC=0.5 Vceo=50 Icrating=100m MFG=NEC)")
- NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)")
+ NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45 ICRATING=100M MFG=ZETEX)")
NET_MODEL("BC556B PNP(IS=3.83E-14 NF=1.008 ISE=1.22E-14 NE=1.528 BF=344.4 IKF=0.08039 VAF=21.11 NR=1.005 ISC=2.85E-13 NC=1.28 BR=14.84 IKR=0.047 VAR=32.02 RB=1 IRB=1.00E-06 RBM=1 RE=0.6202 RC=0.5713 XTB=0 EG=1.11 XTI=3 CJE=1.23E-11 VJE=0.6106 MJE=0.378 TF=5.60E-10 XTF=3.414 VTF=5.23 ITF=0.1483 PTF=0 CJC=1.08E-11 VJC=0.1022 MJC=0.3563 XCJC=0.6288 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.8027 Vceo=65 Icrating=100m mfg=Philips)")
+ NET_MODEL("BC548C NPN(IS=1.95E-14 ISE=1.31E-15 ISC=1.0E-13 XTI=3 BF=466 BR=2.42 IKF=0.18 IKR=1 XTB=1.5 VAF=91.7 VAR=24.7 VJE=0.632 VJC=0.339 RE=1 RC=1.73 RB=26.5 RBM=10 IRB=10 CJE=1.33E-11 CJC=5.17E-12 XCJC=1 FC=0.9 NF=0.993 NR=1.2 NE=1.32 NC=2.00 MJE=0.326 MJC=0.319 TF=6.52E-10 TR=0 PTF=0 ITF=1.03 VTF=1.65 XTF=100 EG=1.11 KF=1E-9 AF=1 VCEO=40 ICrating=800M MFG=Siemens)")
NET_MODEL("BC817-25 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)")
NETLIST_END()
diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp
index 90918c06673..a448128070b 100644
--- a/src/lib/util/aviio.cpp
+++ b/src/lib/util/aviio.cpp
@@ -1297,7 +1297,7 @@ avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample
UINT32 bytes_per_sample;
file_error filerr;
avi_stream *stream;
- int offset;
+ int offset = 0;
/* get the audio stream */
stream = get_audio_stream(file, channel, &offset);
diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h
index 4f0b961eb59..2c1df6dd46c 100644
--- a/src/lib/util/corealloc.h
+++ b/src/lib/util/corealloc.h
@@ -27,7 +27,9 @@
// global allocation helpers -- use these instead of new and delete
#define global_alloc(_type) new _type
+#define global_alloc_nothrow(_type) new (std::nothrow) _type
#define global_alloc_array(_type, _num) new _type[_num]
+#define global_alloc_array_nothrow(_type, _num) new (std::nothrow) _type[_num]
#define global_free(_ptr) do { delete _ptr; } while (0)
#define global_free_array(_ptr) do { delete[] _ptr; } while (0)
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index d7ab454d063..830721127ac 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -58,7 +58,8 @@ core_options::entry::entry(const char *name, const char *description, UINT32 fla
m_seqid(0),
m_error_reported(false),
m_priority(OPTION_PRIORITY_DEFAULT),
- m_description(description)
+ m_description(description),
+ m_changed(false)
{
// copy in the name(s) as appropriate
if (name != nullptr)
@@ -615,6 +616,16 @@ bool core_options::exists(const char *name) const
}
//-------------------------------------------------
+// is_changed - return if option have been marked
+// changed
+//-------------------------------------------------
+
+bool core_options::is_changed(const char *name) const
+{
+ auto curentry = m_entrymap.find(name);
+ return (curentry != m_entrymap.end()) ? curentry->second->is_changed() : false;
+}
+//-------------------------------------------------
// set_value - set the raw option value
//-------------------------------------------------
@@ -656,6 +667,16 @@ void core_options::set_flag(const char *name, UINT32 mask, UINT32 flag)
curentry->second->set_flag(mask, flag);
}
+void core_options::mark_changed(const char* name)
+{
+ // find the entry first
+ auto curentry = m_entrymap.find(name);
+ if (curentry == m_entrymap.end())
+ {
+ return;
+ }
+ curentry->second->mark_changed();
+}
//-------------------------------------------------
// reset - reset the options state, removing
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index 1df89bed6c7..5edf64a9fcd 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -89,12 +89,14 @@ public:
bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; }
bool has_range() const { return (!m_minimum.empty() && !m_maximum.empty()); }
int priority() const { return m_priority; }
+ bool is_changed() const { return m_changed; }
// setters
void set_value(const char *newvalue, int priority);
void set_default_value(const char *defvalue);
void set_description(const char *description);
void set_flag(UINT32 mask, UINT32 flag);
+ void mark_changed() { m_changed = true; }
void revert(int priority);
private:
@@ -110,6 +112,7 @@ public:
std::string m_defdata; // default data for this item
std::string m_minimum; // minimum value
std::string m_maximum; // maximum value
+ bool m_changed; // changed flag
};
// construction/destruction
@@ -157,6 +160,7 @@ public:
float float_value(const char *name) const { return atof(value(name)); }
UINT32 seqid(const char *name) const;
bool exists(const char *name) const;
+ bool is_changed(const char *name) const;
// setting
void set_command(const char *command);
@@ -164,6 +168,7 @@ public:
bool set_value(const char *name, int value, int priority, std::string &error_string);
bool set_value(const char *name, float value, int priority, std::string &error_string);
void set_flag(const char *name, UINT32 mask, UINT32 flags);
+ void mark_changed(const char *name);
// misc
static const char *unadorned(int x = 0) { return s_option_unadorned[MIN(x, MAX_UNADORNED_OPTIONS)]; }