1 // license:BSD-3-Clause
2 // copyright-holders:Stiletto
3 /***************************************************************************
4
5 US Billiards TTL Games
6
7 Game Name DATA
8 -------------------------------------
9 TV Tennis (1973/03,11?) NO
10 TV Hockey? (1973) UNKNOWN
11 Survival (1975/02-03?) UNKNOWN
12 Shark (1975/11) YES
13 Space Battle (1977/10-12?) UNKNOWN
14 Variety TV (1978/09) UNKNOWN
15
16 ***************************************************************************/
17
18
19 #include "emu.h"
20
21 #include "machine/netlist.h"
22 #include "netlist/devices/net_lib.h"
23 #include "video/fixfreq.h"
24
25 // copied from Pong, not accurate for this driver!
26 // start
27 #define MASTER_CLOCK 7159000
28 #define V_TOTAL (0x105+1) // 262
29 #define H_TOTAL (0x1C6+1) // 454
30
31 #define HBSTART (H_TOTAL)
32 #define HBEND (80)
33 #define VBSTART (V_TOTAL)
34 #define VBEND (16)
35
36 #define HRES_MULT (1)
37 // end
38
39
40 class usbilliards_state : public driver_device
41 {
42 public:
usbilliards_state(const machine_config & mconfig,device_type type,const char * tag)43 usbilliards_state(const machine_config &mconfig, device_type type, const char *tag)
44 : driver_device(mconfig, type, tag),
45 m_maincpu(*this, "maincpu"),
46 m_video(*this, "fixfreq")
47 {
48 }
49
50 void usbilliards(machine_config &config);
51
52 private:
53 // devices
54 required_device<netlist_mame_device> m_maincpu;
55 required_device<fixedfreq_device> m_video;
56
57 // driver_device overrides
58 virtual void machine_start() override;
59 virtual void machine_reset() override;
60
61 virtual void video_start() override;
62 };
63
64
65 static NETLIST_START(usbilliards)
66 SOLVER(Solver, 48000)
67 // PARAM(Solver.FREQ, 48000)
68 PARAM(Solver.ACCURACY, 1e-4) // works and is sufficient
69
70 // schematics
71 //...
72
73 // NETDEV_ANALOG_CALLBACK(sound_cb, sound, usbilliards_state, sound_cb, "")
74 // NETDEV_ANALOG_CALLBACK(video_cb, videomix, fixedfreq_device, update_vid, "fixfreq")
NETLIST_END()75 NETLIST_END()
76
77
78
79 void usbilliards_state::machine_start()
80 {
81 }
82
machine_reset()83 void usbilliards_state::machine_reset()
84 {
85 }
86
87
video_start()88 void usbilliards_state::video_start()
89 {
90 }
91
usbilliards(machine_config & config)92 void usbilliards_state::usbilliards(machine_config &config)
93 {
94 /* basic machine hardware */
95 NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_usbilliards);
96
97 /* video hardware */
98 SCREEN(config, "screen", SCREEN_TYPE_RASTER);
99 FIXFREQ(config, m_video).set_screen("screen");
100 m_video->set_monitor_clock(MASTER_CLOCK);
101 m_video->set_horz_params(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL);
102 m_video->set_vert_params(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL);
103 m_video->set_fieldcount(1);
104 m_video->set_threshold(0.30);
105 }
106
107
108 /***************************************************************************
109
110 Game driver(s)
111
112 ***************************************************************************/
113
114 /*
115 Shark by U.S. Billiards
116
117 Etched in copper on Top (C) 1975
118 010
119 1SCOOP J6 2SCOOP
120
121 Handwritten on top J0037
122 124
123
124 empty socket at 5M C etched in copper next to socket
125
126 */
127
128 ROM_START( sharkusb )
129 ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
130
131 ROM_REGION( 0x0200, "roms", ROMREGION_ERASE00 )
132 ROM_LOAD( "82s123_b.5n", 0x0000, 0x0100, CRC(91b977b3) SHA1(37929f6049dea0ebed2c01ae20354e41c867b8f9) ) // 82s123 - handwritten B - B also etched in copper next to socket
133 ROM_LOAD( "82s123_a.6n", 0x0100, 0x0100, CRC(63f621cb) SHA1(6c6e6f22313db33afd069dae1b0180b5ccddfa56) ) // 82s123 - handwritten A - A also etched in copper next to socket
134 ROM_END
135
136 GAME( 1975, sharkusb, 0, usbilliards, 0, usbilliards_state, empty_init, ROT0, "US Billiards Inc.", "Shark [TTL]", MACHINE_IS_SKELETON )
137