コード例 #1
0
ファイル: skyraid.c プロジェクト: Paulodx/sdl-mame-wii
static DISCRETE_RESET( skyraid_missle_custom_charge )
{
	struct skyraid_missle_custom_charge_context *context = (struct skyraid_missle_custom_charge_context *)node->context;

	/* everything is based on the input to the O.C. inverter */

	/* the charging voltage across the cap */
	context->v_charge[0] = 0;
	context->v_charge[1] = SKYRAID_MISSLE_CHARGE_PLUS * RES_VOLTAGE_DIVIDER(SKYRAID_MISSLE_CUSTOM_R1 + SKYRAID_MISSLE_CUSTOM_R2, SKYRAID_MISSLE_CUSTOM_R3);
	context->v_charge[1] = SKYRAID_MISSLE_CHARGE_PLUS - context->v_charge[1];
	context->v_cap = 0;

	/* precalculate charging exponents */
	/* discharge cap */
	context->exp[0] = RC_CHARGE_EXP(SKYRAID_MISSLE_CUSTOM_R2 * SKYRAID_MISSLE_CUSTOM_C);
	/* charge cap */
	context->exp[1] = RC_CHARGE_EXP(RES_2_PARALLEL(SKYRAID_MISSLE_CUSTOM_R1 + SKYRAID_MISSLE_CUSTOM_R2, SKYRAID_MISSLE_CUSTOM_R3) * SKYRAID_MISSLE_CUSTOM_C);

	/* starts at full voltage until cap starts charging */
	node->output[0] = SKYRAID_MISSLE_CHARGE_PLUS;
}
コード例 #2
0
ファイル: skyraid.c プロジェクト: crazii/mameplus
{
	SKYRAID_R85, 0, SKYRAID_R86, 0, SKYRAID_R110,   /* r1, r2, r3, r4, rF*/
	SKYRAID_C85, SKYRAID_C86, 0,    /* c1, c2, c3 */
	0, 12, -5,  /* vRef, vP, vN */
};

static const discrete_dac_r1_ladder skyraid_plane_dac =
{
	2, {SKYRAID_R28, SKYRAID_R27},
	0, 0, 0, 0              /* no vBias, rBias, rGnd, cFilter */
};

static const discrete_mixer_desc skyraid_mixer =
{
	DISC_MIXER_IS_RESISTOR,
	{SKYRAID_R120, SKYRAID_R32, SKYRAID_R29, SKYRAID_R30, SKYRAID_R31, RES_2_PARALLEL(SKYRAID_R28, SKYRAID_R27)},
	{0, 0, 0, 0, 0, SKYRAID_PLANE_ON__IC_E8},   /* r_nodes */
	{0}, 0, 0, 0, 0, 0, 1       /* no c, rI, rF, cF, cAmp, vRef, gain */
};


/************************************************************************
 *
 * Custom skyraid missle charge
 *
 * input[0]    - In1 (Logic)
 * input[1]    - R1
 * input[2]    - R2
 * input[3]    - R3
 * input[4]    - C
 *
コード例 #3
0
ファイル: sprint8.cpp プロジェクト: system11b/mame
static const discrete_555_desc sprint8_motor_555a_desc =
{
	DISC_555_OUT_COUNT_F_X,
	5, DEFAULT_555_VALUES
};

static const discrete_555_desc sprint8_motor_555m_desc =
{
	DISC_555_OUT_ENERGY | DISC_555_TRIGGER_IS_COUNT,
	5, DEFAULT_555_VALUES
};

static const discrete_op_amp_filt_info sprint8_motor_filter =
{
	SPRINT8_R27, 0, SPRINT8_R28 + RES_2_PARALLEL(SPRINT8_R19, SPRINT8_R20), 0, SPRINT8_R29, /* r1, r2, r3, r4, rF, */
	SPRINT8_C18, SPRINT8_C19, 0,                                    /* c1, c2, c3, */
	5.0 * RES_VOLTAGE_DIVIDER(SPRINT8_R19, SPRINT8_R20), 5, 0       /* vRef, vP, vN */
};

static const discrete_mixer_desc sprint8_crash_screech_mixer =
{
	DISC_MIXER_IS_RESISTOR,
	{SPRINT8_R149, SPRINT8_R91},
	{0, NODE_80},                       /* R93 switched in/out of circuit */
	{0}, 0, 0, SPRINT8_C64, 0, 0, 1     /* c, rI, rF, cF, cAmp, vRef, gain */
};

static const discrete_mixer_desc sprint8_mixer =
{
	DISC_MIXER_IS_RESISTOR,
コード例 #4
0
ファイル: starshp1.c プロジェクト: Ander-son/libretro-mame
	 ************************************************/
	DISCRETE_SQUAREWFIX(NODE_40,                    /* S128V signal */
						1,                          /* ENAB */
						STARSHP1_S128V,
						DEFAULT_TTL_V_LOGIC_1,
						50,                         /* DUTY */
						DEFAULT_TTL_V_LOGIC_1 / 2,  /* BIAS */
						0)                          /* PHASE */
	DISCRETE_MIXER2(    NODE_41,                    /* voltage at R54 & R55 junction */
						1,                          /* ENAB */
						NODE_40,                    /* IC E10, pin 12 */
						5,                          /* 5V to R55 */
						&starshp1_566_a9_mix_r)
	DISCRETE_566(       NODE_42,                    /* IC A9, pin 4 */
						STARSHP1_MOTOR_SPEED,       /* IC A9, pin 5 */
						RES_2_PARALLEL(STARSHP1_R54, STARSHP1_R55),
						STARSHP1_C34,
						5, -10, NODE_41,            /* VPOS,VNEG,VCHARGE */
						DISC_566_OUT_DC | DISC_566_OUT_TRIANGLE)
	DISCRETE_SWITCH(NODE_43,
						1,                          /* ENAB */
						STARSHP1_MOLVL,             /* SWITCH */
						STARSHP1_R59 + RES_2_PARALLEL(STARSHP1_R58, STARSHP1_R60 + STARSHP1_R76),
						STARSHP1_R59 + STARSHP1_R60 + STARSHP1_R76)
	DISCRETE_CRFILTER(NODE_44,
						NODE_42,                    /* IN0 */
						NODE_43,                    /* RVAL*/
						STARSHP1_C36)
	DISCRETE_SWITCH(NODE_45,                        /* gain affect of voltage divider */
						1,                          /* ENAB */
						STARSHP1_MOLVL,             /* SWITCH */
コード例 #5
0
ファイル: skyraid.c プロジェクト: Paulodx/sdl-mame-wii
{
	SKYRAID_R85, 0, SKYRAID_R86, 0, SKYRAID_R110,	/* r1, r2, r3, r4, rF*/
	SKYRAID_C85, SKYRAID_C86, 0,	/* c1, c2, c3 */
	0, 12, -5,	/* vRef, vP, vN */
};

static const discrete_dac_r1_ladder skyraid_plane_dac =
{
	2, {SKYRAID_R28, SKYRAID_R27},
	0, 0, 0, 0				/* no vBias, rBias, rGnd, cFilter */
};

static const discrete_mixer_desc skyraid_mixer =
{
	DISC_MIXER_IS_RESISTOR,
	{SKYRAID_R120, SKYRAID_R32, SKYRAID_R29, SKYRAID_R30, SKYRAID_R31, RES_2_PARALLEL(SKYRAID_R28, SKYRAID_R27)},
	{0, 0, 0, 0, 0, SKYRAID_PLANE_ON__IC_E8},	/* r_nodes */
	{0}, 0, 0, 0, 0, 0, 1		/* no c, rI, rF, cF, cAmp, vRef, gain */
};


/************************************************************************
 *
 * Custom skyraid missle charge
 *
 * input[0]    - In1 (Logic)
 * input[1]    - R1
 * input[2]    - R2
 * input[3]    - R3
 * input[4]    - C
 *
コード例 #6
0
ファイル: m79amb.cpp プロジェクト: ursine/mame
#define M79AMB_C34      CAP_U(0.03)
#define M79AMB_C35      CAP_U(0.1)
#define M79AMB_C36      CAP_U(0.1)
#define M79AMB_C37      CAP_P(500)
#define M79AMB_C41      CAP_U(0.1)
#define M79AMB_C42      CAP_U(15)


static const discrete_mixer_desc m79amb_final_mix =
{
	DISC_MIXER_IS_OP_AMP,
	{
		M79AMB_R76 + M79AMB_R9,
		M79AMB_R77 + M79AMB_R19,
		M79AMB_R78 + M79AMB_R29,
		M79AMB_R79 + RES_2_PARALLEL(M79AMB_R41, M79AMB_R42 + M79AMB_R43),
		M79AMB_R80 + RES_2_PARALLEL(M79AMB_R48, M79AMB_R49),
		M79AMB_R81 + RES_2_PARALLEL(M79AMB_R59, M79AMB_R57 + M79AMB_R58),
		M79AMB_R82 + RES_2_PARALLEL(M79AMB_R69, M79AMB_R67 + M79AMB_R68)
	},
	{0},                /* no r_nodes */
	{M79AMB_C6, M79AMB_C12, M79AMB_C18, M79AMB_C23, M79AMB_C28, M79AMB_C32, M79AMB_C36},
	0,
	M79AMB_R83 + M79AMB_R84,
	M79AMB_C37,
	M79AMB_C42,
	0,
	1               /* gain */
};

DISCRETE_SOUND_START( m79amb )