2010-??-??  Dag Lem  <resid@nimrod.no>

	* Version 1.0 released.

	* configure.ac: Updated to current autoconf/automake standards.
	New option --enable-arch for gcc architecture specific
	optimizations, including vectorization. New option
	--enable-branch-hints for branch prediction optimizations.

	* Makefile.am, samp2src.pl: Generate header files instead of
	source files for waveform samples. Added dac.h, dac.cc.

	* siddefs.h.in: Sampling method names now better reflect their
	operation (SAMPLE_RESAMPLE_INTERPOLATE -> SAMPLE_RESAMPLE,
	SAMPLE_RESAMPLE_FAST -> SAMPLE_RESAMPLE_FASTMEM).
	New macros for branch prediction: likely / unlikely.

	* dac.h: New file; accurate emulation of non-monotonic MOS 6581
	D/A converters.

	* dac.cc: New file; accurate emulation of non-monotonic MOS 6581
	D/A converters.

	* envelope.h (EnvelopeGenerator::clock): Emulation of one cycle
	pipeline delay in the exponential frequency divider.
	(EnvelopeGenerator::output): Emulation of non-ideal DAC output.
	(EnvelopeGenerator::set_chip_model): New function; for emulation
	of DAC imperfections.
	(EnvelopeGenerator::set_exponential_counter): New function;
	modularization of exponential counter update.

	* envelope.cc (EnvelopeGenerator::EnvelopeGenerator):
	Initialization of DAC lookup tables.
	(EnvelopeGenerator::readENV): Return envelope_counter directly, in
	order to allow EnvelopeGenerator::output to emulate DAC
	imperfections.
	(EnvelopeGenerator::reset): Initialization of new
	variables.
	(EnvelopeGenerator::set_chip_model): New function; for emulation
	of DAC imperfections.
	(EnvelopeGenerator::writeCONTROL_REG): Flush of exponential
	frequency divider pipeline on attack.

	* extfilt.h (ExternalFilter::clock): Cutoff frequency fixed point
	accuracy is traded off for for vastly improved filter signal
	fixed point accuracy.
	(ExternalFilter::output): Output range reduced from 20 to 16
	bits.

	* extfilt.cc (ExternalFilter::ExternalFilter): Assumes audio
	equipment impedance of 10kOhm, yielding a high-pass 3-dB frequency
	of 1.6Hz (changed from 16Hz). Cutoff frequency fixed point accuracy
	is traded off for for vastly improved filter signal fixed point
	accuracy.
	(ExternalFilter::set_chip_model): Removed. Remaining DC levels can
	only be canceled by enabling the external filter (or by similar
	post processing).

	* filter.h: Major rewrite implementing an accurate model of the
	actual filter and output stage topology, including models for
	op-amps, input and feedback NMOS FET "resistors", and voltage
	controlled resistors (VCRs).
	(Filter::input): New interface to set external input level.
	(Filter::output): Output range reduced from 20 to 16 bits.
	(Filter::set_voice_mask): New function. Emulation of physical
	connection of EXT IN, and voice muting for test purposes.
	(Filter::solve_gain): New function; iterative solver using
	Newton-Raphson and bisection to calculate gain for SID op-amp
	gains and summers using NMOS FETs as input and feedback "resistors".
	(Filter::solve_integrate): New function; one-step fixpoint solver
	to calculate output from SID op-amp integrators using VCRs built
	from four NMOS FETs as inputs.

	* filter.cc: Major rewrite implementing an accurate model of the
	actual filter and output stage topology, including models for
	op-amps, input and feedback NMOS FET "resistors", and voltage
	controlled resistors (VCRs).
	(Filter::set_voice_mask): New function. Emulation of physical
	connection of EXT IN, and voice muting for test purposes.

	* sid.h: Resampling constants declared in enum.
	(SID::State): Added voice_mask, shift_register_reset,
	shift_pipeline, pulse_output, floating_output_ttl,
	envelope_pipeline.
	(SID::output): 16 bit output range only, n-bit interface
	removed.
	(SID::clock_resample): Renamed from
	SID::clock_resample_interpolate.
	(SID::clock_resample_fastmem): Renamed from
	SID::clock_resample_fast.

	* sid.cc (SID::clock): Emulation of one cycle pipeline write delay
	for the MOS8580.
	(SID::clock_resample): Renamed from SID::clock_resample_interpolate.
	Corrected bug in FIR table wraparound, courtesy of Antti Lankila.
	(SID::clock_resample_fastmem): Renamed from
	SID::clock_resample_fast.
	(SID::input): Hand off all processing of the external input to the
	filter.
	(SID::output): 16 bit output range only, n-bit output interface
	removed.
	(SID::read): Aging time for bus value increased from 0x2000 to
	0x4000 cycles.
	(SID::read_state, SID::write_state): Added voice_mask,
	shift_register_reset, shift_pipeline, pulse_output,
	floating_output_ttl, envelope_pipeline.
	(SID::set_voice_mask): New function. Emulation of physical
	connection of EXT IN, and voice muting for test purposes.
	(SID::write): Emulation of one cycle pipeline write delay for the
	MOS8580.
	(SID::write_pipeline): New function. Emulation of one cycle
	pipeline write delay for the MOS8580.

	* spline.h (PointPlotter::operator()): Rounding to nearest
	integer.

	* voice.h (Voice::output): Handling of DC for waveform "zero"
	level moved to Filter::clock.

	* voice.cc (Voice::set_chip_model): Call set_chip_model for
	envelope generator. Handling of DC for "zero" level moved to
	Filter::set_chip_model.

	* wave.h (WaveformGenerator::clock): Corrected shift register
	model. Emulation of reset time for the shift register. Emulation
	of two cycle pipeline delay for accumulator bit 19 to shift the
	shift register.
	(WaveformGenerator::clock_shift_register)
	(WaveformGenerator::write_shift_register)
	(WaveformGenerator::reset_shift_register)
	(WaveformGenerator::set_noise_output): New functions. Emulation
	of writes to the shift register by combined waveforms.
	(WaveformGenerator::set_waveform_output): New function. Emulation
	of floating DAC input with aging. Emulation of one cycle pipeline
	delay for the pulse width comparator to change the pulse
	level. Emulation of writes to the shift register by combined
	waveforms. Highly optimized waveform calculation using nearly
	branch-free table lookup for all waveforms; replaces 16 previous
	waveform functions named WaveformGenerator::outputXXXX.
	(WaveformGenerator::output): Emulation of non-ideal DAC output.

	* wave.cc (WaveformGenerator::WaveformGenerator): Initialization
	of lookup tables for basic waveforms and DACs.
	(WaveformGenerator::readOSC): Return waveform_output directly, in
	order to allow WaveformGenerator::output to emulate DAC
	imperfections.
	(WaveformGenerator::set_chip_model): Update pointer to current
	waveform table.
	(WaveformGenerator::writePW_LO, WaveformGenerator::writePW_HI):
	Push next pulse level into pulse level pipeline.
	(WaveformGenerator::writeCONTROL_REG): Emulation of the effects of
	the test bit on the shift register (shifting, reset time).
	Emulation of fading time for floating DAC input (waveform 0).
	Update pointer to current waveform table.
	(WaveformGenerator::reset): Initialization of new variables.

2004-06-11  Dag Lem  <resid@nimrod.no>

	* Version 0.16 released.

	* envelope.h (EnvelopeGenerator::clock): Corrected off-by-one
	error in check for ADSR delay bug in delta_t cycle interface.

	* filter.cc (Filter::set_chip_model): Initialize filter cutoff
	mappings before call to set_chip_model.

	* sid.cc (SID::set_sampling_parameters): Build shifted FIR tables
	with samples according to the sampling frequency.
	(SID::clock_resample_interpolate): New function; factorized linear
	interpolation out from filter convolutions, and made convolutions
	vectorizable.
	(SID::clock_resample_fast): New function; single convolution, same
	accuracy as with interpolation by using more filter tables.
	(SID::State, SID::read_state, SID::write_state): Read and write
	rate_counter_period and exponential_counter_period. Read sustain
	value.

2003-10-20  Dag Lem  <resid@nimrod.no>

	* Version 0.15 released.

	* envelope.h (EnvelopeGenerator): Added public State enum.
	(EnvelopeGenerator::clock): Rate counter is 15 bits, count
	rate_period - 1 after wrapping from 0x8000 to 0 in ADSR delay bug.

	* sid.cc, sid.h (SID::State): Added envelope_state.
	(SID::State::write_state): Restore register 0x18.
	(SID::set_sampling_parameters): Scale resampling filter to avoid
	clipping.
	(SID::clock_resample): Saturated arithmetics to avoid clipping.

2002-12-31  Dag Lem  <resid@nimrod.no>

	* Version 0.14 released.

	* envelope.h (EnvelopeGenerator::clock): Corrected one cycle error
	in ADSR delay bug. Only load the exponential counter period at the
	envelope counter values 255, 93, 54, 26, 14, 6, 0.

	* filter.cc (Filter::set_chip_model): Call set_w0() and set_Q() to
	update filter settings.
	(Filter::set_w0): Limit cutoff frequency for both 1 cycle and
	delta_t cycle filter.

	* filter.h (Filter::clock): Mix in external audio input.

	* sid.cc, sid.h (SID::input): New function; accepts external audio
	input sample.

	* spline.h (PointPlotter::operator ()): Clamp negative values to
	zero.

	* voice.cc, voice.h: Changed misleading name wave_DC to wave_zero.

	* wave.h (WaveformGenerator::clock): Corrected bug in check for
	accumulator bit 19 in noise register shift.

2002-01-19  Dag Lem  <resid@nimrod.no>

	* Version 0.13 released.

	* configure.in: Replaced AC_TRY_COMPILER with AC_TRY_COMPILE,
	removed AC_PROG_RANLIB.

	* envelope.h (EnvelopeGenerator::clock): Reset rate_step on state
	change.

	* extfilt.cc (ExternalFilter::set_chip_model): New calculation of
	maximum mixer DC level.

	* filter.cc (Filter::set_chip_model): Moved calculation of
	voice_DC to voice.cc, corrected calculation of mixer_DC.

	* filter.h (Filter::output): Mixer output is not inverted.

	* sid.cc (SID::set_chip_model): Call voice.set_chip_model instead
	of voice.wave.set_chip_model.

	* voice.cc (Voice::Voice): Call set_chip_model.
	(Voice::set_chip_model): New function; model both waveform D/A
	converter and envelope multiplying D/A converter DC offsets.

	* voice.h (Voice::output): Add both waveform D/A converter and
	envelope multiplying D/A converter DC offsets.

	* wave.h (WaveformGenerator::output____): Reverted to output
	minimum wave level when no waveform is selected. The maximum and
	minimum wave output levels are interchanged in C= Hacking Issue	#20.

2001-10-20  Dag Lem  <resid@nimrod.no>

	* Version 0.12 released.

	* envelope.cc, envelope.h, filter.cc, filter.h, wave.cc, wave.h:
	Removed bool usage. This avoids unnecessary conversion to 1/0.

	* filter.cc (Filter::set_chip_model): New function; selects voice
	and mixer DC offsets and mapping from the FC registers to filter
	cutoff frequency. The voice and mixer DC offsets for the MOS6581 are
	calculated from	measurements made by Hrsfalvi, Levente in
	C= Hacking Issue #20.
	(Filter::Filter): Call set_chip_model.
	(Filter::f0_6581, Filter::f0_8580): Separate FC mapping tables.
	(Filter::f0_points_6581, Filter::f0_points_8580): Separate FC mapping
	points.

	* extfilt.cc, extfilt.h (ExternalFilter::set_chip_model): New
	function supporting separate DC correction for MOS6581 and MOS8580.

	* sid.cc, sid.h (SID::adjust_sampling_frequency): New function for
	on-the-fly adjustment of sampling frequency.
	(SID::clock_fast): Corrected sample calculation.
	(SID::set_chip_model): Set filter chip model.
	(SID::output): Added audio clipping.
	(SID::clock, SID::clock_fast, SID::clock_interpolate,
	SID::clock_resample): Added sample interleaving.

	* spline.h (interpolate): Generalized to accept repeated points to
	introduce points of non-differentiability and discontinuity.

	* wave.h (WaveformGenerator::output____): No selected waveform
	yields maximum wave output level. This was found by Hrsfalvi,
	Levente in C= Hacking Issue #20.
	(WaveformGenerator::clock): Optimized for speed (no division).

2001-03-10  Dag Lem  <resid@nimrod.no>

	* Version 0.11 released.

	* configure.in: Disable building of shared library by default.
	Control inlining with RESID_INLINING (0 or 1) and RESID_INLINE
	(blank or "inline").

	* envelope.h, extfilt.h, filter.h, voice.h, wave.h: inline keyword
	in both function declarations and function definitions.

	* samp2src.pl: Beautified Perl code.

	* sid.h, sid.cc: Replaced voice variables with array. Removed
	filter variables from SID::State.
	(SID::clock): New audio sample generating interface. Three
	clocking methods are available; clocking at output sample
	frequency, clocking at cycle frequency with linear sample
	interpolation, and clocking at cycle frequency with audio
	resampling.
	(SID::clock_fast, SID::clock_interpolate, SID::clock_resample):
	New functions called by SID::clock.
	(SID::set_sampling_parameters): New function to set up SID for
	sample generation. The FIR table used in SID::clock_resample is
	calculated here.
	(SID::I0): 0th order modified Bessel function to calculate Kaiser
	window.

	* siddefs.h: Control inlining with RESID_INLINING (0 or 1) and
	RESID_INLINE (blank or "inline"). Added enum sampling_method.

	* voice.h, voice.cc (Voice::set_sync_source): Moved setting of
	sync source from constructor.

	* wave.h, wave.cc (WaveformGenerator::set_sync_source): Moved
	setting of sync source from constructor.

2000-11-22  Dag Lem  <resid@nimrod.no>

	* Version 0.10 released.

	* configure.in, Makefile.am: Use libtool to build library. The
	hack to "disable" install is removed.

	* extfilt.h, filter.h: Moved filter stability code from sid.cc.

	* sid.cc (SID::clock): Moved filter stability code to
	extfilt.h/filter.h. Don't clock the rest of the chip more
	frequently than necessary.

	* wave.cc: Typecast for pedantic (and probably incorrect)
	compilers.

2000-05-18  Dag Lem  <resid@nimrod.no>

	* Version 0.9 released.

	* filter.h (Filter::output): The sum of the filter outputs is no
	longer weighted.

1999-06-24  Dag Lem  <resid@nimrod.no>

	* Version 0.8 released.

	* filter.h, filter.cc, wave.h, wave.cc: Typecasts for pedantic
	compilers.

	* filter.h (Filter::clock): Voice 3 is only silenced by voice3off
	if it is not routed through the filter.

	* sid.cc (SID::State): Added constructor for proper initalization.

	* spline.h: Inlined template functions to avoid problems at link
	time with certain compilers.

1999-02-25  Dag Lem  <resid@nimrod.no>

	* Version 0.7 released.

	* configure.in: Check whether compiler supports bool.

	* extfilt.h, extfilt.cc: Implementation of C64 filter, external to
	the SID chip.

	* filter.h (Filter::clock): Optimized filter routing using a switch.
	(Filter::output): Optimized filter mixing using a switch, avoiding
	integer division. Corrected sign of filtered output, which is
	inverted compared to unfiltered output.

	* filter.cc (Filter::set_w0): Removed use of M_PI and math.h
	functions. Use spline table to map fc to w0.
	(Filter::fc_default): Return array of FC spline interpolation points.
	(Filter::fc_plotter): Return FC spline plotter object.

	* sid.h (SID::enable_external_filter): Enable/disable external
	filter.
	(SID::fc_default): Return array of FC spline interpolation points.
	(SID::fc_plotter): Return FC spline plotter object.
	(SID::State, SID::read_state, SID::write_state): Read and write
	complete SID state.

	* sid.cc (SID::clock): Age bus value. Clock external filter.
	(SID::enable_external_filter): Enable/disable external filter.

	* spline.h: Spline implementation. Used to specify mapping from
	the FC register to filter cutoff frequency.

1998-11-14  Dag Lem  <resid@nimrod.no>

	* Version 0.6 released.

	* configure.in: Allow compilation in a separate directory.

	* wave.h (WaveformGenerator::synchronize): Handle special case when a
	sync source is synced itself on the same cycle as its MSB is set
	high.

	* sid.cc (SID::clock): Only clock on MSB on/off for hard sync.

1998-09-06  Dag Lem  <resid@nimrod.no>

	* Version 0.5 released.

	* version.cc (resid_version_string): Version string with C linkage.

	* wave.cc (WaveformGenerator::set_chip_model): Emulation of MOS8580
	combined waveforms.

1998-08-28  Dag Lem  <resid@nimrod.no>

	* Version 0.4 released.

	* envelope.h (EnvelopeGenerator::clock): Count up to rate_period twice
	during ADSR delay bug, and add one extra rate counter step.

	* filter.cc (Filter::bsd_copysign): Renamed copysign function for
	compilation on platforms where copysign is implemented as a macro.

1998-08-23  Dag Lem  <resid@nimrod.no>

	* Version 0.3 released.

	* envelope.h (EnvelopeGenerator::clock): Handle ADSR boundary bug.

	* envelope.cc (EnvelopeGenerator::rate_counter_period,
	EnvelopeGenerator::exponential_counter_period): Corrected counter
	periods.

	* filter.h (Filter::clock): Optimized for speed (division by shifting).

	* sid.h (SID::clock): New one-cycle optimized overload of the clock()
	function.

	* wave.h (WaveformGenerator::output_P_T): Combined waveform
	pulse+triangle indexing corrected.
	(WaveformGenerator::output_P__): Check for test bit to handle
	pulse+test bit samples.
	(WaveformGenerator::output): Optimized for speed (inlining).

1998-07-28  Dag Lem  <resid@nimrod.no>

	* Version 0.2 released.

	* envelope.h (EnvelopeGenerator::clock): Start decay cycle immediately
	at envelope counter 0xff. New sustain value is zero if the sustain
	level is raised above the current envelope counter value.
	(EnvelopeGenerator::step_envelope): Handle ADSR delay bug.

	* envelope.cc (EnvelopeGenerator::rate_counter_period,
	EnvelopeGenerator::exponential_counter_period): Corrected counter
	periods.
	(EnvelopeGenerator::writeCONTROL_REG): Do not modify rate counter.

	* filter.cc (Filter::set_Q): Constrain Q to keep filter stable.

	* sid.h (SID::read, SID::write, SID::bypass_filter): Simplified API
	routing register access through the SID class.

	* sid.cc (SID::output): Corrected variable-bit audio output return.
	(SID::read, SID::write): Allow read of write only registers.

1998-06-09  Dag Lem  <resid@nimrod.no>

	* Version 0.1 released.
