mirror of
https://github.com/holub/mame
synced 2025-07-10 04:05:16 +03:00
Stub implementation of 566 VCO
This commit is contained in:
parent
09c19bd622
commit
a46108ce5a
@ -17,7 +17,7 @@
|
||||
#
|
||||
# Please build documentation using
|
||||
# make mingw PARAMS=doc
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
SRC = ..
|
||||
@ -27,7 +27,7 @@ TIDY_DB = ../compile_commands.json
|
||||
|
||||
TIDY_FLAGSX = -checks=*,-google*,-hicpp*,readability*,-fuchsia*,cert-*,-android-*,
|
||||
TIDY_FLAGSX += -llvm-header-guard,-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
TIDY_FLAGSX += -cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-owning-memory,
|
||||
TIDY_FLAGSX += -cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-owning-memory,
|
||||
TIDY_FLAGSX += -modernize-use-default-member-init,-cppcoreguidelines-pro-bounds-constant-array-index,
|
||||
TIDY_FLAGSX += -modernize-pass-by-value,-cppcoreguidelines-pro-type-static-cast-downcast,
|
||||
#TIDY_FLAGSX += -cppcoreguidelines-avoid-magic-numbers,
|
||||
@ -40,8 +40,8 @@ TIDY_FLAGSX += -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
TIDY_FLAGSX += -readability-magic-numbers,-readability-implicit-bool-conversion,-readability-braces-around-statements,
|
||||
TIDY_FLAGSX += -readability-named-parameter,-readability-function-size
|
||||
|
||||
space :=
|
||||
space +=
|
||||
space :=
|
||||
space +=
|
||||
TIDY_FLAGS = $(subst $(space),,$(TIDY_FLAGSX))
|
||||
TIDY_SOURCES = $(SOURCES)
|
||||
|
||||
@ -85,7 +85,7 @@ endif
|
||||
|
||||
ifeq ($(FAST),1)
|
||||
CFLAGS += -DNL_USE_ACADEMIC_SOLVERS=0
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGETS = nltool$(EXESUFFIX) nlwav$(EXESUFFIX)
|
||||
|
||||
@ -175,6 +175,7 @@ NLOBJS := \
|
||||
$(NLOBJ)/devices/nld_dm9334.o \
|
||||
$(NLOBJ)/devices/nld_mm5837.o \
|
||||
$(NLOBJ)/devices/nld_ne555.o \
|
||||
$(NLOBJ)/devices/nld_ne566.o \
|
||||
$(NLOBJ)/devices/nld_r2r_dac.o \
|
||||
$(NLOBJ)/devices/nld_tristate.o \
|
||||
$(NLOBJ)/devices/nld_schmitt.o \
|
||||
@ -193,7 +194,7 @@ NLOBJS := \
|
||||
$(NLOBJ)/solver/nld_matrix_solver.o \
|
||||
$(NLOBJ)/tools/nl_convert.o \
|
||||
$(NLOBJ)/generated/static_solvers.o \
|
||||
|
||||
|
||||
VSBUILDS = \
|
||||
$(VSBUILD/netlistlib.vcxproj) \
|
||||
$(VSBUILD/netlistlib.vcxproj.user \
|
||||
@ -262,10 +263,10 @@ maketree: $(sort $(OBJDIRS))
|
||||
|
||||
.PHONY: clang clang-5 mingw doc native
|
||||
|
||||
native:
|
||||
native:
|
||||
$(MAKE) CEXTRAFLAGS="-march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra "
|
||||
|
||||
gcc9:
|
||||
gcc9:
|
||||
$(MAKE) CC=g++-9 LD=g++-9 CEXTRAFLAGS="-march=native -fext-numeric-literals -msse4.2 -Wall -pedantic -Wpedantic -Wsign-compare -Wextra" EXTRALIBS="-lquadmath"
|
||||
|
||||
clang:
|
||||
@ -286,15 +287,15 @@ tidy_db: compile_commands_prefix $(ALL_TIDY_FILES) compile_commands_postfix
|
||||
# FIXME: -Wno-weak-vtables -Wno-missing-variable-declarations -Wno-conversion -Wno-exit-time-destructors
|
||||
# FIXME: -Winconsistent-missing-destructor-override : c++ community has diverging opinions on this https://github.com/isocpp/CppCoreGuidelines/issues/721
|
||||
# FIXME: -Wunreachable-code : False warnings, this a documented clang bug: https://llvm.org/bugs/show_bug.cgi?id=28994
|
||||
# -Wweak-template-vtables
|
||||
# -Wweak-template-vtables
|
||||
#
|
||||
# These have to be given:
|
||||
# -Wno-missing-variable-declarations : Device factory code, on purpose
|
||||
# -Wno-missing-variable-declarations : Device factory code, on purpose
|
||||
|
||||
mingw:
|
||||
$(MAKE) CEXTRAFLAGS="-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 \
|
||||
-DWIN32_LEAN_AND_MEAN" LDEXTRAFLAGS="-Wl,--subsystem,console \
|
||||
-municode" LIBS= MD=@mkdir.exe SHELL=sh.exe DOXYGEN=doxygen.exe $(PARAMS)
|
||||
-municode" LIBS= MD=@mkdir.exe SHELL=sh.exe DOXYGEN=doxygen.exe $(PARAMS)
|
||||
|
||||
#
|
||||
# FIXME: Unicode
|
||||
|
@ -149,6 +149,8 @@ namespace devices
|
||||
//ENTRY(4066, CD_4066, "+A,B")
|
||||
LIB_ENTRY(NE555)
|
||||
LIB_ENTRY(NE555_dip)
|
||||
LIB_ENTRY(NE566)
|
||||
LIB_ENTRY(NE566_dip)
|
||||
LIB_ENTRY(MC1455P)
|
||||
LIB_ENTRY(MC1455P_dip)
|
||||
LIB_ENTRY(TMS4800)
|
||||
|
@ -90,6 +90,7 @@
|
||||
|
||||
#include "nld_mm5837.h"
|
||||
#include "nld_ne555.h"
|
||||
#include "nld_ne566.h"
|
||||
|
||||
#include "nld_r2r_dac.h"
|
||||
|
||||
|
96
src/lib/netlist/devices/nld_ne566.cpp
Normal file
96
src/lib/netlist/devices/nld_ne566.cpp
Normal file
@ -0,0 +1,96 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Couriersud
|
||||
|
||||
//- Identifier: NE566_DIP
|
||||
//- Title: NE566 VOLTAGE-CONTROLED OSCILLATOR
|
||||
//- Description:
|
||||
//-
|
||||
//- Pinalias: GND,NC,SQUARE,TRIANGLE,MODULATION,R1,C1,VCC
|
||||
//- Package: DIP
|
||||
//- NamingConvention: Naming conventions follow Phillips datasheet
|
||||
//- Limitations:
|
||||
//- Example:
|
||||
//- FunctionTable:
|
||||
//-
|
||||
//-
|
||||
|
||||
|
||||
/*
|
||||
* "Description: The Swiss army knife for timing purposes\n"
|
||||
* " which has a ton of applications.\n"
|
||||
* "DipAlias: GND,NC,SQUARE,TRIANGLE,MODULATION,R1,C1,VCC\n"
|
||||
* "Package: DIP\n"
|
||||
* "NamingConvention: Naming conventions follow Philips datasheet\n"
|
||||
* "Limitations: \n"
|
||||
* "Function Table:\n"
|
||||
*
|
||||
* Function table created from truthtable if missing.
|
||||
*
|
||||
* For package, refer to:
|
||||
*
|
||||
* https://en.wikipedia.org/wiki/List_of_integrated_circuit_packaging_types
|
||||
*
|
||||
* Special case: GATE -> use symbolic names
|
||||
*
|
||||
*/
|
||||
|
||||
#include "nld_ne566.h"
|
||||
#include "netlist/analog/nlid_twoterm.h"
|
||||
#include "nlid_system.h"
|
||||
|
||||
namespace netlist
|
||||
{
|
||||
namespace devices
|
||||
{
|
||||
NETLIB_OBJECT(NE566)
|
||||
{
|
||||
NETLIB_CONSTRUCTOR(NE566)
|
||||
, m_MODULATION(*this, "MODULATION") // Pin 5
|
||||
, m_R1(*this, "R1") // Pin 6
|
||||
, m_C1(*this, "C1") // Pin 7
|
||||
, m_SQUARE(*this, "SQUARE") // Pin 3
|
||||
, m_TRIANGLE(*this, "TRIANGLE") // Pin 4
|
||||
, m_power_pins(*this)
|
||||
{
|
||||
}
|
||||
|
||||
NETLIB_UPDATEI();
|
||||
NETLIB_RESETI();
|
||||
|
||||
private:
|
||||
analog_input_t m_MODULATION;
|
||||
analog_input_t m_R1;
|
||||
analog_input_t m_C1;
|
||||
analog_output_t m_SQUARE;
|
||||
analog_output_t m_TRIANGLE;
|
||||
nld_power_pins m_power_pins;
|
||||
};
|
||||
|
||||
NETLIB_OBJECT_DERIVED(NE566_dip, NE566)
|
||||
{
|
||||
NETLIB_CONSTRUCTOR_DERIVED(NE566_dip, NE566)
|
||||
{
|
||||
register_subalias("1", "GND"); // Pin 1
|
||||
register_subalias("2", "NC"); // Pin 2
|
||||
register_subalias("3", "SQUARE"); // Pin 3
|
||||
register_subalias("4", "TRIANGLE"); // Pin 4
|
||||
register_subalias("5", "MODULATION"); // Pin 5
|
||||
register_subalias("6", "R1"); // Pin 6
|
||||
register_subalias("7", "C1"); // Pin 7
|
||||
register_subalias("8", "VCC"); // Pin 8
|
||||
}
|
||||
};
|
||||
|
||||
NETLIB_RESET(NE566)
|
||||
{
|
||||
}
|
||||
|
||||
NETLIB_UPDATE(NE566)
|
||||
{
|
||||
// frequency = f0 = (2 * (VCC - MODULATION)) / (R1 * C1 * VCC)
|
||||
}
|
||||
|
||||
NETLIB_DEVICE_IMPL(NE566, "NE566", "")
|
||||
NETLIB_DEVICE_IMPL(NE566_dip, "NE566_DIP", "")
|
||||
} //namespace devices
|
||||
} // namespace netlist
|
15
src/lib/netlist/devices/nld_ne566.h
Normal file
15
src/lib/netlist/devices/nld_ne566.h
Normal file
@ -0,0 +1,15 @@
|
||||
// license:GPL-2.0+
|
||||
// copyright-holders:Couriersud
|
||||
|
||||
#ifndef NLD_NE566_H_
|
||||
#define NLD_NE566_H_
|
||||
|
||||
#include "netlist/nl_setup.h"
|
||||
|
||||
#define NE566(name) \
|
||||
NET_REGISTER_DEV(NE566, name)
|
||||
|
||||
#define NE566_DIP(name) \
|
||||
NET_REGISTER_DEV(NE566_DIP, name)
|
||||
|
||||
#endif /* NLD_NE566_H_ */
|
Loading…
Reference in New Issue
Block a user