#define NETLIST_DEVELOPMENT 0 #include "netlist/nl_dice_compat.h" #define SLOW_BUT_ACCURATE 0 //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(47000.0), U_FARAD(1.0)); // R33, C21 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 Mono9602Desc n8_desc(K_OHM(33.0), U_FARAD(100.0), K_OHM(5.6), P_FARAD(0)); // No capacitor on 2nd 9602 static Mono9602Desc f3_desc(K_OHM(47.0), U_FARAD(1.0), K_OHM(47.0), U_FARAD(1.0)); static Mono9602Desc a7_desc(K_OHM(68.0), U_FARAD(1.0), K_OHM(22.0), U_FARAD(10.0)); static Mono9602Desc a8_desc(K_OHM(27.0), U_FARAD(1.0), K_OHM(27.0), U_FARAD(1.0)); CIRCUIT_LAYOUT( breakout ) #if (SLOW_BUT_ACCURATE) SOLVER(Solver, 48000) PARAM(Solver.ACCURACY, 1e-8) // less accuracy and diode will not work PARAM(Solver.GS_THRESHOLD, 6) #else SOLVER(Solver, 48000) PARAM(Solver.ACCURACY, 1e-6) PARAM(Solver.GS_THRESHOLD, 6)
}; static DIODE_LAYOUT dummy_layout = { { 0, 1, 0, 0 }, { 0, 1, 0, 0 }, { 0, 1, 1, 0 }, { 0, 0, 0, 0 }, { 1, 0, 0, 0 }, { 1, 1, 0, 0 }, { 1, 1, 0, 1 }, { 1, 0, 0, 1 } }; static VIDEO_DESC( tvbasketball ) VIDEO_RESISTANCE(1, K_OHM(2.7)) VIDEO_RESISTANCE(2, K_OHM(2.2)) VIDEO_RESISTANCE(3, K_OHM(1.8)) VIDEO_RESISTANCE(4, K_OHM(1.0)) VIDEO_RESISTANCE(Video::HBLANK_PIN, K_OHM(1.2)) VIDEO_CONTRAST(1.5) VIDEO_DESC_END static INPUT_DESC( tvbasketball ) INPUT_INFO(PADDLE1_VERTICAL_INPUT, "Move Left Striped Player") INPUT_INFO(PADDLE2_VERTICAL_INPUT, "Move Right Solid Player") INPUT_INFO(PADDLE3_VERTICAL_INPUT, "Move Right Striped Player") INPUT_INFO(PADDLE4_VERTICAL_INPUT, "Move Left Solid Player") INPUT_INFO(COIN_INPUT, {{ 1 }}, "Insert Coin") INPUT_INFO(START_INPUT, {{ 1 }}, "Start Game") INPUT_DESC_END
* Copyright (C) 2008-2013 DICE Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * */ // identify unknown devices in IDE //#define NETLIST_DEVELOPMENT 1 #include "netlist/nl_dice_compat.h" static Mono555Desc a3_555_desc(K_OHM(100.0), U_FARAD(0.1)); static Mono555Desc a10_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer static Mono555Desc b10_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer static Mono555Desc b9a_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer static Mono555Desc b9b_555_desc(K_OHM(70.0), U_FARAD(0.1)); // actually 56k + 50k trimmer static Mono555Desc f5_555_desc(K_OHM(330.0), U_FARAD(4.7)); static Mono555Desc g5_555_desc(K_OHM(220.0), U_FARAD(1.0)); static SeriesRCDesc c33_desc(K_OHM(1.0), U_FARAD(0.1)); // Capacitor C33, Resistor R30 #if 0 static Paddle1VerticalDesc pad1_desc(17000.0, 145000.0, &a10_555_desc); static Paddle2VerticalDesc pad2_desc(17000.0, 145000.0, &b10_555_desc);
//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 VIDEO_OVERLAY( 15.570e-6, 0.0, 1.911e-6, -1.0, 0.80, 0.15, 0.05 ) // Red Bricks VIDEO_OVERLAY( 17.481e-6, 0.0, 1.956e-6, -1.0, 0.95, 0.65, 0.05 ) // Amber Bricks VIDEO_OVERLAY( 19.437e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.25 ) // Green Bricks VIDEO_OVERLAY( 21.393e-6, 0.0, 1.955e-6, -1.0, 0.95, 0.95, 0.20 ) // Yellow Bricks
4, "D", 5, "E", 6, "F", 7, "G", 8, "H", 9, "I", 10, "J", 11, "K", 12, "L", 13, "M", 14, "N", 15, "O" ); #endif static Mono9602Desc b1_desc(K_OHM(9.1), U_FARAD(100.0), K_OHM(9.1), U_FARAD(100.0)); static Mono9602Desc c1_desc(K_OHM(15.0), U_FARAD(5.0), K_OHM(15.0), U_FARAD(5.0)); static Mono9602Desc e1_desc(K_OHM(33.0), U_FARAD(47.0), K_OHM(27.0), P_FARAD(100.0)); static Mono555Desc d9_555_desc(K_OHM(610.0), U_FARAD(100.0)); static DipswitchDesc dipswitch1_desc("coinage", "Coinage", 0, "1 Coin / 1 Credit", "1 Coin / 2 Credits"); static DipswitchDesc dipswitch2_desc("plane_type", "Plane Type", 0, "Airplane", "UFO"); static PotentimeterMono555Desc pot1_desc("playtime", "Play Time", K_OHM(830.0), K_OHM(220.0), K_OHM(1220.0), d9_555_desc); static RomDesc k1_desc("antiaircraft", "aa.k1", 0x9DE772D5); // 100 ms period +/- 25% (Guess). TODO: Determine actual functionality static CUSTOM_LOGIC( RANDOM_CLOCK_GEN ) { // Output should be high at start, so push event immediately if(chip->circuit->global_time == 0)