forked from LMMS/lmms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7a4560
commit 1c8858c
Showing
44 changed files
with
9,521 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.vs | ||
out/ | ||
CMakeSettings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Authors of reSID. | ||
|
||
Dag Lem: Designed and programmed complete emulation engine. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
project(resid) | ||
|
||
set(SRC_VER 0.16) | ||
set(MAJOR_VER 5) | ||
set(MINOR_VER 0) | ||
set(PATCH_VER 0) | ||
|
||
option(SIDPLAY_BUILD_SHARED "Build a dynamic library instead of static library" OFF) | ||
|
||
if (APPLE) | ||
option(SIDPLAY_BUILD_FRAMEWORK "Build the library as a macOS framework" OFF) | ||
option(SIDPLAY_BUILD_UNIVERSAL "Build the shared/framework library as a universal binary" ON) | ||
if (SIDPLAY_BUILD_UNIVERSAL) | ||
set(CMAKE_OSX_ARCHITECTURES "i386;x86_64") | ||
endif() | ||
endif () | ||
|
||
file(GLOB SOURCES *.cc) | ||
set(API_HEADERS envelope.h extfilt.h filter.h pot.h sid.h siddefs.h spline.h voice.h wave.h) | ||
|
||
if (SIDPLAY_BUILD_SHARED OR SIDPLAY_BUILD_FRAMEWORK) | ||
add_library(${PROJECT_NAME} SHARED ${SOURCES} ${API_HEADERS}) | ||
else() | ||
add_library(${PROJECT_NAME} ${SOURCES} ${API_HEADERS}) | ||
endif() | ||
|
||
if (WIN32 AND SIDPLAY_BUILD_SHARED) | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE RESID_DLL=1 RESID_EXPORTS=1) | ||
endif() | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
VERSION ${SRC_VER} | ||
SOVERSION ${MAJOR_VER} | ||
CXX_STANDARD 11) | ||
|
||
target_include_directories(${PROJECT_NAME} PRIVATE | ||
${CMAKE_BINARY_DIR}) | ||
|
||
if (APPLE AND SIDPLAY_BUILD_FRAMEWORK) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
OUTPUT_NAME ${PROJECT_NAME} | ||
FRAMEWORK TRUE | ||
FRAMEWORK_VERSION C | ||
MACOSX_FRAMEWORK_IDENTIFIER net.zimmers) | ||
set_source_files_properties(${API_HEADERS} PROPERTIES | ||
MACOSX_PACKAGE_LOCATION Headers) | ||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9") | ||
endif () | ||
|
||
target_compile_definitions(${PROJECT_NAME} PRIVATE VERSION="${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}") | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
RUNTIME DESTINATION bin | ||
FRAMEWORK DESTINATION "/Library/Frameworks" | ||
PUBLIC_HEADER DESTINATION include/${PROJECT_NAME}) | ||
|
||
if (NOT APPLE OR NOT SIDPLAY_BUILD_FRAMEWORK) | ||
install(FILES ${API_HEADERS} DESTINATION include/${PROJECT_NAME}) | ||
endif () |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,313 @@ | ||
2004-06-11 Dag Lem <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 H�rsfalvi, 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 H�rsfalvi, | ||
Levente in C= Hacking Issue #20. | ||
(WaveformGenerator::clock): Optimized for speed (no division). | ||
|
||
2001-03-10 Dag Lem <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* Version 0.9 released. | ||
|
||
* filter.h (Filter::output): The sum of the filter outputs is no | ||
longer weighted. | ||
|
||
1999-06-24 Dag Lem <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* 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 <[email protected]> | ||
|
||
* Version 0.1 released. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Building requires the CMake build system (version 3.0 or later). | ||
|
||
Most Unix-style systems: | ||
|
||
mkdir resid-build | ||
cmake ../resid | ||
make | ||
sudo make install |
Oops, something went wrong.