コード例 #1
0
ファイル: tvbasketball.cpp プロジェクト: ChoccyHobNob/DiCE
static Astable555Desc _9d_555_desc(K_OHM(40.0), K_OHM(15.0), U_FARAD(22.0));

static Paddle1VerticalDesc pad1_desc(4000.0, 94000.0, &_5h_555_desc);
static Paddle2VerticalDesc pad2_desc(4000.0, 94000.0, &_3f_555_desc);
static Paddle3VerticalDesc pad3_desc(4000.0, 94000.0, &_3h_555_desc);
static Paddle4VerticalDesc pad4_desc(4000.0, 94000.0, &_5f_555_desc);

static CapacitorDesc c1_desc(U_FARAD(0.001));
static CapacitorDesc c2_desc(U_FARAD(0.001));
static CapacitorDesc c3_desc(U_FARAD(0.001));
static CapacitorDesc c4_desc(U_FARAD(0.001));
static CapacitorDesc c5_desc(U_FARAD(0.001));
static CapacitorDesc c6_desc(P_FARAD(100.0));
static CapacitorDesc c7_desc(U_FARAD(0.01));

static BufferDesc buf1_desc(DELAY_NS(25.0), DELAY_NS(25.0)); // 25 ns buffer to prevent resonance in RC circuits
static BufferDesc buf2_desc(DELAY_NS(25.0), DELAY_NS(25.0)); // 25 ns buffer to prevent resonance in RC circuits

static SeriesRCDesc rc1_desc(OHM(220.0), U_FARAD(350.0));
static SeriesRCDesc rc2_desc(OHM(220.0), U_FARAD(470.0));

static PotentimeterAstable555Desc pot1_desc("playtime", "Play Time", K_OHM(35.0), K_OHM(10.0), K_OHM(60.0), _9d_555_desc);

// Hack to improve performance
static CHIP_LOGIC( diode_matrix_custom_n )
{
    DIODE_LAYOUT* d_l = (DIODE_LAYOUT*)custom_data;

    int y = 4*pin[i5] + 2*pin[i4] + pin[i3];
    int x = 2*pin[i2] + pin[i1];
コード例 #2
0
ファイル: breakout.c プロジェクト: andysarcade/mame
#include "netlist/nl_dice_compat.h"
#include "netlist/devices/net_lib.h"
#include "netlist/analog/nld_twoterm.h"

//2 555 timers
static Astable555Desc b2_555_desc(OHM(560.0), M_OHM(1.8), U_FARAD(0.1));

static Mono555Desc c9_555_desc(OHM(47.0), U_FARAD(1.0));	// R33, C21

//check these values
//static Paddle1HorizontalDesc pad1_desc(15047.0, 47.0, &c9_555_desc);

static CapacitorDesc c32_desc(U_FARAD(0.1));
static CapacitorDesc c36_desc(N_FARAD(1.0));	//0.001uF = 1nF
static CapacitorDesc c37_desc(P_FARAD(330.0));
static BufferDesc pad_en_buf_desc(DELAY_NS(15.0), DELAY_NS(15.0)); // Prevents 12ns glitch on PAD_EN_n signal from resetting C9. TODO: is this accurate?

#if 0
static VIDEO_DESC( breakout )
    VIDEO_RESISTANCE(1, K_OHM(0.0))
    VIDEO_RESISTANCE(2, K_OHM(3.9))
    VIDEO_RESISTANCE(3, K_OHM(3.9))
    VIDEO_RESISTANCE(4, K_OHM(3.9))
    VIDEO_RESISTANCE(5, K_OHM(3.9))
    VIDEO_RESISTANCE(6, K_OHM(3.9))
    //VIDEO_RESISTANCE(Video::HBLANK_PIN, K_OHM(0.0))
    VIDEO_ORIENTATION(ROTATE_90)
    VIDEO_CONTRAST(4.0)

    // Values guessed based on screenshots. TODO: Make more accurate
    //             X,         Y,   W,        H,    R,    G,    B