Skip to content

Conversation

m1macrophage
Copy link
Contributor

@m1macrophage m1macrophage commented Apr 29, 2025

Used netlists for the simulation of the voltage-to-current converters. The resistor networks in these circuits are non-trivial, requiring solving a system of equations, and the transistors are used in their exponential region. Netlist use is confined to those complex DC calculations.

@galibert galibert merged commit 071b8e4 into mamedev:master Apr 29, 2025
6 checks passed
@m1macrophage m1macrophage deleted the source branch April 30, 2025 05:16
@Lord-Nightmare
Copy link
Contributor

There's a small issue here: the way nl_source.cpp is linked sort of works by accident, since there's no nl_source.h included by source.cpp to let the compiler know that it needs to link in nl_source.cpp (this will break single-driver builds).

The solution, as far as I can tell, is to remove the line

NETLIST_EXTERNAL(moogsource)

from source.cpp and instead put it in its own file, nl_source.h, which will be #include'd from source.cpp.
nl_source.h would be something like:

// license:BSD-3-Clause
// copyright-holders:m1macrophage

NETLIST_EXTERNAL(moogsource)

and that's it.

@m1macrophage
Copy link
Contributor Author

Sent #13680

I tried a single-driver build, and the presence of the .h file didn't seem to make a difference. In both cases, I had to include nl_source.cpp in the files {...} section for linking to work. But maybe I missed some step, or this is just an issue with different setups.

Regardless, your suggestion matches the standard way to do things, so better to go with that anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants