예제 #1
0
        //NETLIST_START(konami1x)
        void netlist_konami1x(netlist.nlparse_t setup)
        {
            netlist.helper h = new netlist.helper();

            h.NETLIST_START(setup);

            h.SOLVER("Solver", 48000);

            h.ANALOG_INPUT("VP5", 5);
            h.ANALOG_INPUT("VM5", -5);

            h.LOCAL_SOURCE("filter", netlist_filter);
            h.LOCAL_SOURCE("amp", netlist_amp);
            h.LOCAL_SOURCE("AY1", netlist_AY1);
            h.LOCAL_SOURCE("AY2", netlist_AY2);

            h.INCLUDE("AY1");

            h.NET_C("FCHA1.O", "FCHB1.O", "FCHC1.O");

            h.SUBMODEL("amp", "AMP");

            h.NET_C("VP5", "AMP.VP");
            h.NET_C("GND", "AMP.GND");
            h.NET_C("VM5", "AMP.VM");
            h.NET_C("FCHA1.O", "AMP.OPAMP");

            h.ALIAS("OUT", "AMP.OUT");

            h.NETLIST_END();
        }
예제 #2
0
        //NETLIST_START(gunfight)
        public static void netlist_gunfight(netlist.nlparse_t setup)
        {
            netlist.helper h = new netlist.helper();

            h.NETLIST_START(setup);

            h.SOLVER("Solver", 48000);
            h.PARAM("Solver.SORT_TYPE", "ASCENDING");
            // For this netlist, ASCENDING turns out to be slightly faster than
            // the default sort type of PREFER_IDENTITY_TOP_LEFT, but the
            // difference when using static solvers is very small.

            h.LOCAL_SOURCE("gunfight_schematics", netlist_gunfight_schematics);

            h.INCLUDE("gunfight_schematics");

            // The amplifying transistors all get 16-volt power. The raw AC power
            // input from the main power supply to the game logic board is 16.5
            // volts, but this is rectified and regulated to about 16 volts via
            // TIP-31 power transistor Q301 and BZX61-C16 16-volt Zener diode
            // D304.
            h.ANALOG_INPUT("I_V16", 16); // 16-volt power for sound amplifiers
            h.ANALOG_INPUT("I_V5", 5);   // 5-volt power for logic input devices

            h.LOGIC_INPUT("I_LEFT_SHOT", 0, "74XX");
            h.LOGIC_INPUT("I_RIGHT_SHOT", 0, "74XX");
            h.LOGIC_INPUT("I_LEFT_HIT", 0, "74XX");
            h.LOGIC_INPUT("I_RIGHT_HIT", 0, "74XX");

            // Power and ground connections for logic input devices:
            h.NET_C("I_V5.Q",
                    "I_LEFT_SHOT.VCC", "I_RIGHT_SHOT.VCC",
                    "I_LEFT_HIT.VCC", "I_RIGHT_HIT.VCC");
            h.NET_C("GND",
                    "I_LEFT_SHOT.GND", "I_RIGHT_SHOT.GND",
                    "I_LEFT_HIT.GND", "I_RIGHT_HIT.GND");

            h.ALIAS("IN_LS", "I_LEFT_SHOT.Q");
            h.ALIAS("IN_RS", "I_RIGHT_SHOT.Q");
            h.ALIAS("IN_LH", "I_LEFT_HIT.Q");
            h.ALIAS("IN_RH", "I_RIGHT_HIT.Q");

#if USE_FRONTIERS
            // These frontiers keep the mostly independant halves of the circuit
            // (left channel and right channel) from affecting each other and the
            // noise generator, which speeds up processing substantially while
            // making no audible change in the output. These seem to be the only
            // frontiers which improve performance; I haven't been able to find
            // any additional beneficial ones from examining the circuit and
            // experimenting.
            h.OPTIMIZE_FRONTIER("C303.1", RES_M(1), 50);
            h.OPTIMIZE_FRONTIER("C306.1", RES_M(1), 50);
            h.OPTIMIZE_FRONTIER("C304.1", RES_M(1), 50);
            h.OPTIMIZE_FRONTIER("C305.1", RES_M(1), 50);
#endif

            h.NETLIST_END();
        }
예제 #3
0
        /* ----------------------------------------------------------------------------
        *  Always included
        * ---------------------------------------------------------------------------*/
        //NETLIST_START(base_lib)
        public static void netlist_base_lib(netlist.nlparse_t setup)
        {
            netlist.helper h = new netlist.helper();

            h.NETLIST_START(setup);

            h.NET_REGISTER_DEV("GNDA", "GND");
            h.NET_REGISTER_DEV("PARAMETER", "NETLIST");

            h.LOCAL_SOURCE("diode_models", netlist_diode_models);
            h.LOCAL_SOURCE("bjt_models", netlist_bjt_models);
            h.LOCAL_SOURCE("mosfet_models", netlist_mosfet_models);
            h.LOCAL_SOURCE("family_models", netlist_family_models);

            h.EXTERNAL_SOURCE("ttl74xx_lib", nlm_ttl74xx_global.netlist_ttl74xx_lib);
            h.EXTERNAL_SOURCE("cd4xxx_lib", nlm_cd4xxx_global.netlist_cd4xxx_lib);
            h.EXTERNAL_SOURCE("opamp_lib", nlm_opamp_global.netlist_opamp_lib);
            h.EXTERNAL_SOURCE("otheric_lib", nlm_otheric_global.netlist_otheric_lib);
            h.EXTERNAL_SOURCE("roms_lib", nlm_roms_global.netlist_roms_lib);

            h.EXTERNAL_SOURCE("modules_lib", nlm_modules_global.netlist_modules_lib);

            h.INCLUDE("diode_models");
            h.INCLUDE("bjt_models");
            h.INCLUDE("mosfet_models");
            h.INCLUDE("family_models");

            h.INCLUDE("ttl74xx_lib");
            h.INCLUDE("cd4xxx_lib");
            h.INCLUDE("opamp_lib");
            h.INCLUDE("otheric_lib");
            h.INCLUDE("roms_lib");

            h.INCLUDE("modules_lib");

            h.NETLIST_END();
        }