trunk/src/mame/drivers/sms.c
r22819 | r22820 | |
1 | | /* |
2 | | SMS Manufacturing Corp hardware |
3 | | |
4 | | Driver by Mariusz Wojcieszek |
5 | | |
6 | | Preliminary driver by Reip |
7 | | Schematics provided by Exodus |
8 | | Sure Shot board provided by ranger_lennier |
9 | | Notes by Lord Nightmare |
10 | | |
11 | | Notes/ToDo: |
12 | | - pit8254 is not accessed by z80 (and there is no interrupt service routine), so |
13 | | it is not fitted in the driver |
14 | | - video registers can be read (to read framebuffer contents), this is not emulated |
15 | | as software does not use this feature |
16 | | - I8088 clock may be incorrect |
17 | | - Video Blanking Zone input - probably hblank or vblank |
18 | | - game speed may be not 100% correct - software does not use interrupts and |
19 | | Video Blanking Zone is not emulated (which is required to get proper timings) |
20 | | - implement video raw parameters |
21 | | |
22 | | */ |
23 | | |
24 | | /* |
25 | | smssshot (Lord Nightmare) |
26 | | SMS Sure Shot (poker?) |
27 | | * Same exact board as sms trivia, but "COMPONENT SIDE REV 01" |
28 | | instead of rev 02. |
29 | | * 3 chips were removed from the board; two are shown as removed |
30 | | in the schematic, one was removed later (an apparently |
31 | | unnecessary data buffer on one of the z80 external latches) |
32 | | * Does NOT have a daughterboard with additional roms; in fact, |
33 | | connector J1 for the ribbon cable to the daughterboard isn't |
34 | | populated with pins at all |
35 | | * Serial Number A-108 etched in board, on back. |
36 | | |
37 | | |
38 | | smsbingo (Lord Nightmare) |
39 | | SMS Bingo |
40 | | Someone on the MW forums has this iirc, but it isn't dumped yet - LN |
41 | | |
42 | | |
43 | | |
44 | | **** Notes from schematics (applies to all drivers): |
45 | | Framebuffer is six tms4416 16384*4 chips; chips are arranged as three |
46 | | planes of 16384*8 bits per plane, one plane per color channel. |
47 | | Screen resolution is probably either 212x256 (two bits per plane, per |
48 | | pixel) or 424x256 (one bit per plane per pixel), depending on the pals |
49 | | installed. See schematics on page 6. The counters at U137 and U139 |
50 | | compare against binary 0b110101 (53) in comparitor at U138, and as soon |
51 | | as it hits that, HDONE is pulled high on the next MCLR clock. |
52 | | This means there will be 53 (0-52) counts in the X counter before HDONE; |
53 | | as each count refers to one 8 bit address, and the addressed 4416 rams |
54 | | have between all of them 24 bits of output (8 per plane), the minimum |
55 | | horizontal displayed resolution is 53x256 (8 bits per color per pixel), |
56 | | and maximum is 8 times that. With proper pals (and proper mixing |
57 | | resistors or other PWM fun) it should be possible to get: |
58 | | 53x256 8,8,8 RGB |
59 | | 106x256 4,4,4 RGB |
60 | | 212x256 2,2,2 RGB <- this seems the most likely to me (LN) |
61 | | 424x256 1,1,1 RGB |
62 | | |
63 | | |
64 | | * The socket at U50 and the 3 pin connector J3 is for an |
65 | | undumped intel 8050 MCU used for rs232 serial communication, |
66 | | for either linking together machines, or more likely for factory |
67 | | testing. The function of this internal rom is probably simple |
68 | | enough to HLE or to even rewrite from scratch, but I doubt the code |
69 | | on any of the dumped games even touches it, it was probably for use |
70 | | with a specific game or for a set of hardware test roms to report |
71 | | errors. |
72 | | (schematic page 4) |
73 | | The pinout of J3 is: |
74 | | pin 1 (toward bottom of pcb): rs232 input to pcb |
75 | | (pre-level shifted to 5v i.e. with a max232 or mc1489) |
76 | | pin 2 : ground |
77 | | pin 3 : rs232 output to elsewhere (to be sent to a max232 or |
78 | | mc1488 to shift to rs232 voltage levels) |
79 | | |
80 | | * The 8255 PPI at U13 (connected to the 8088) is connected to 75451 |
81 | | drivers on all pins EXCEPT pins PC3 through PC0. |
82 | | (schematic page 3) |
83 | | PA7 - Display Light 1 |
84 | | PA6 - Display Light 2 |
85 | | PA5 - Display Light 3 |
86 | | PA4 - Display Light 4 |
87 | | PA3 - Display Light 5 |
88 | | PA2 - Bet Light |
89 | | PA1 - Deal Light |
90 | | PA0 - Draw Light |
91 | | PB7 - Stand Light |
92 | | PB6 - Cancel Light |
93 | | PB5 - Coin Lock out A |
94 | | PB4 - Coin Lock out B |
95 | | PB3 - Setup Light |
96 | | PB2 - Hopper Motor |
97 | | PB1 - Coin in Counter (mechanical counter inside the machine) |
98 | | PB0 - Knock off Counter (tilt? probably also a mechanical counter) |
99 | | PC7 - unused |
100 | | PC6 - unused |
101 | | PC5 - unused |
102 | | PC4 - Battery Charge control (for 8088 ram backup 3.6v Nicad) |
103 | | PC3 - (pulled high externally, input) - unused? possibly for an ABC hopper |
104 | | PC2 - (pulled high externally, input) - unused? possibly for an ABC hopper |
105 | | PC1 - (pulled high externally, input) - "Hopper Count", |
106 | | probably a beam to check the hopper coin out |
107 | | PC0 - "Video BZ" (Video Blanking Zone, is an input) |
108 | | |
109 | | * The 8255 PPI at U2 (connected to the z80) is unused and not populated. |
110 | | (All 3 ports have +5V pullups on all pins) |
111 | | |
112 | | * The 8255 PPI at U1 (connected to the z80) is used as follows: |
113 | | (All 3 ports have +5V pullups on all pins) |
114 | | PA7 - Lighted Button 1 (input) |
115 | | PA6 - Lighted Button 2 (input) |
116 | | PA5 - Lighted Button 3 (input) |
117 | | PA4 - Lighted Button 4 (input) |
118 | | PA3 - Lighted Button 5 (input) |
119 | | PA2 - Bet Button (input) |
120 | | PA1 - Deal Button (input) |
121 | | PA0 - Draw Button (input) |
122 | | PB7 - Stand Button (input) |
123 | | PB6 - Cancel Button (input) |
124 | | PB5 - Alt Coin (input) |
125 | | PB4 - Remote Knockoff (tilt? input) |
126 | | PB3 - Operator Mode (input) |
127 | | PB2 - Coin Error reset (input) |
128 | | PB1 - unused |
129 | | PB0 - unused |
130 | | PC7 - unused |
131 | | PC6 - unused |
132 | | PC5 - unused |
133 | | PC4 - unused |
134 | | PC3 - unused |
135 | | PC2 - unused |
136 | | PC1 - unused |
137 | | PC0 - Coin (input) |
138 | | |
139 | | |
140 | | * The function of the pals is: |
141 | | LOCATION DOTS TYPE PURPOSE |
142 | | U32 1Green DMPAL10L8NC Decodes the gated by U33/U34) |
143 | | high address lines of the 8088, for mainboard ROM mapping. A |
144 | | different pal is probably used depending on whether the |
145 | | mainboard has 2764 or 27128 roms installed. |
146 | | SMS Sure Shot: dumped ok as truth table, mainboard has 4 2764s |
147 | | SMS Trivia: bad (chip shorted internally), mainboard has 2 27128s |
148 | | SMS Bingo: not dumped |
149 | | (schematic page 2) |
150 | | U38 3Blue PAL10L8CN Decodes the (gated by U36) |
151 | | high address lines of the z80 address bus, for mapping of the z80 |
152 | | ROM, RAM, Counter control, 4 z80-to-8088 ports (2 one direction, |
153 | | 2 the other), the ay-3-8910, and the two 8255 PPIs. |
154 | | (schematic page 10) |
155 | | U39 3Green PAL10L8CN Accessory decoder to U38, helps |
156 | | with the 4 z80-to-8088 ports. |
157 | | (schematic page 10) |
158 | | U40 1Red PAL10L8CN Connects to the low bits of the |
159 | | 8088 address bus for decoding writing to/reading from the 8088 side of |
160 | | the 4 z80-to-8088 ports. |
161 | | (schematic page 10, note this chip is mismarked as U9 on the page, |
162 | | it is the chip in the lower left) |
163 | | U52 1Blue PAL10L8CN Decodes the (gated by U33/U34) |
164 | | high address lines of the 8088, for main memory mapping of ram, |
165 | | z80 communication, video, serial I/O (to U50), and the output-only |
166 | | 8255 at U13 (which controls button lights and the coin hopper) |
167 | | SMS Sure Shot: dumped ok as truth table |
168 | | SMS Trivia: checksum 0, probably bad |
169 | | SMS Bingo: not dumped |
170 | | (schematic page 1) |
171 | | U58 3Brown DMPAL10H8NC Controls BDIR and BC1 on the |
172 | | ay-3-8910 given the low two address bits of the z80 bits, the |
173 | | ay-3-8910 enable line, and the buffered z80 RD and WR lines. |
174 | | (schematic page 12) |
175 | | U80 2Blue PAL10H8CN State machine which controls StartH, |
176 | | StartV, and the related functions involving the shifters for framebuffer |
177 | | address and framebuffer output. Also lets framebuffer know when in hblank |
178 | | or vblank. Is separate from the other "Video BZ" thing. |
179 | | (schematic page 6) |
180 | | U94 2Green PAL14H4CN State machine controls the |
181 | | read-modify-write logic for accessing the frame buffer (while outside |
182 | | of vblank and hblank?), may allow writing red green and blue plane bytes |
183 | | all to one address, one after the other |
184 | | (schematic page 7) |
185 | | U109 2Brown PAL14H4CN Determines next state of the |
186 | | 'Pixel control' hardware, i.e. H and V current line counters |
187 | | Also determines VBLANK/"Video BZ" |
188 | | (schematic page 5) |
189 | | U110 2Red PAL10L8CN Translates output of U109 |
190 | | before being sent to counters/color reg latch/etc. |
191 | | (schematic page 5) |
192 | | U128 Blue-Brown-Blue PAL10H8CN One of three 'sync' pals which |
193 | | control the memory and other timing subsystem, fed by a 4 bit counter. |
194 | | this particular pal has one external feedback bit. |
195 | | (schematic page 6) |
196 | | U129 Red-Green-Red DMPAL10H8NC Second of three 'sync' pals |
197 | | This one has 2 external feedback bits. |
198 | | (schematic page 6) |
199 | | U130 3Red PAL10H8CN Third of three 'sync' pals' |
200 | | This one has 3 external feedback bits plus three extra inputs from elsewhere |
201 | | which are not readable on the schematic. Will trace them later. |
202 | | (schematic page 6) |
203 | | U140 1Brown PAL14H4CN This and the next 5 pals are used |
204 | | to shift the framebuffer data, 4 bits at a time. This is done in parallel |
205 | | (8 bits per channel) for output. all 6 pals are the same. |
206 | | (schematic page 7) |
207 | | U141 1Brown PAL14H4CN |
208 | | U142 1Brown PAL14H4CN |
209 | | U143 1Brown PAL14H4CN |
210 | | U144 1Brown PAL14H4CN |
211 | | U145 1Brown PAL14H4CN |
212 | | |
213 | | |
214 | | */ |
215 | | #include "emu.h" |
216 | | #include "cpu/i86/i86.h" |
217 | | #include "cpu/z80/z80.h" |
218 | | #include "sound/ay8910.h" |
219 | | #include "machine/i8255.h" |
220 | | #include "machine/nvram.h" |
221 | | |
222 | | |
223 | | class smsmfg_state : public driver_device |
224 | | { |
225 | | public: |
226 | | smsmfg_state(const machine_config &mconfig, device_type type, const char *tag) |
227 | | : driver_device(mconfig, type, tag), |
228 | | m_maincpu(*this, "maincpu") { } |
229 | | |
230 | | UINT8 m_communication_port[4]; |
231 | | UINT8 m_communication_port_status; |
232 | | bitmap_ind16 m_bitmap; |
233 | | UINT8 m_vid_regs[7]; |
234 | | DECLARE_WRITE8_MEMBER(bankswitch_w); |
235 | | DECLARE_READ8_MEMBER(link_r); |
236 | | DECLARE_WRITE8_MEMBER(link_w); |
237 | | DECLARE_READ8_MEMBER(z80_8088_r); |
238 | | DECLARE_READ8_MEMBER(p03_r); |
239 | | DECLARE_WRITE8_MEMBER(p03_w); |
240 | | DECLARE_WRITE8_MEMBER(video_w); |
241 | | DECLARE_READ8_MEMBER(ppi0_c_r); |
242 | | DECLARE_WRITE8_MEMBER(ppi0_a_w); |
243 | | DECLARE_WRITE8_MEMBER(ppi0_b_w); |
244 | | virtual void machine_start(); |
245 | | virtual void machine_reset(); |
246 | | virtual void video_start(); |
247 | | virtual void palette_init(); |
248 | | DECLARE_MACHINE_START(sureshot); |
249 | | UINT32 screen_update_sms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
250 | | required_device<cpu_device> m_maincpu; |
251 | | }; |
252 | | |
253 | | |
254 | | /************************************* |
255 | | * |
256 | | * Bankswitching (for trivia question roms) |
257 | | * |
258 | | *************************************/ |
259 | | |
260 | | WRITE8_MEMBER(smsmfg_state::bankswitch_w) |
261 | | { |
262 | | membank("bank1")->set_entry(data); |
263 | | } |
264 | | |
265 | | /************************************* |
266 | | * |
267 | | * 8088 <-> Z80 communication |
268 | | * |
269 | | *************************************/ |
270 | | |
271 | | READ8_MEMBER(smsmfg_state::link_r) |
272 | | { |
273 | | switch(offset) |
274 | | { |
275 | | case 0: |
276 | | m_communication_port_status &= ~0x01; |
277 | | return m_communication_port[0]; |
278 | | case 1: |
279 | | m_communication_port_status &= ~0x02; |
280 | | return m_communication_port[1]; |
281 | | case 2: |
282 | | return m_communication_port_status; |
283 | | } |
284 | | return 0; |
285 | | }; |
286 | | |
287 | | WRITE8_MEMBER(smsmfg_state::link_w) |
288 | | { |
289 | | switch(offset) |
290 | | { |
291 | | case 0: |
292 | | m_communication_port_status |= 0x08; |
293 | | m_communication_port[3] = data; |
294 | | break; |
295 | | case 1: |
296 | | m_communication_port_status |= 0x04; |
297 | | m_communication_port[2] = data; |
298 | | break; |
299 | | } |
300 | | } |
301 | | |
302 | | READ8_MEMBER(smsmfg_state::z80_8088_r) |
303 | | { |
304 | | return m_communication_port_status; |
305 | | } |
306 | | |
307 | | READ8_MEMBER(smsmfg_state::p03_r) |
308 | | { |
309 | | switch(offset) |
310 | | { |
311 | | case 0: |
312 | | m_communication_port_status &= ~0x08; |
313 | | return m_communication_port[3]; |
314 | | case 1: |
315 | | m_communication_port_status &= ~0x04; |
316 | | return m_communication_port[2]; |
317 | | } |
318 | | return 0; |
319 | | } |
320 | | |
321 | | WRITE8_MEMBER(smsmfg_state::p03_w) |
322 | | { |
323 | | switch(offset) |
324 | | { |
325 | | case 0: |
326 | | m_communication_port_status |= 0x01; |
327 | | m_communication_port[0] = data; |
328 | | break; |
329 | | case 1: |
330 | | m_communication_port_status |= 0x02; |
331 | | m_communication_port[1] = data; |
332 | | break; |
333 | | } |
334 | | } |
335 | | |
336 | | |
337 | | /************************************* |
338 | | * |
339 | | * Input ports |
340 | | * |
341 | | *************************************/ |
342 | | |
343 | | static INPUT_PORTS_START(sms) |
344 | | PORT_START("IN0") |
345 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Draw") /* Draw Button */ |
346 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Deal") /* Deal Button */ |
347 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Bet") /* Bet Button */ |
348 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) /* Lighted Button 5 */ |
349 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) /* Lighted Button 4 */ |
350 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* Lighted Button 3 */ |
351 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Lighted Button 2 */ |
352 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Lighted Button 1 */ |
353 | | |
354 | | PORT_START("IN1") |
355 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
356 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
357 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Coin Error reset */ |
358 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* Operator Mode */ |
359 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Remote Knockoff */ |
360 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) |
361 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Cancel") /* Cancel Button */ |
362 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Stand") /* Stand Button */ |
363 | | |
364 | | PORT_START("IN2") |
365 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) /* Coin */ |
366 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
367 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
368 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
369 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
370 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
371 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
372 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
373 | | INPUT_PORTS_END |
374 | | |
375 | | /************************************* |
376 | | * |
377 | | * 8255 PPIs |
378 | | * |
379 | | *************************************/ |
380 | | |
381 | | READ8_MEMBER(smsmfg_state::ppi0_c_r) |
382 | | { |
383 | | /* |
384 | | PC7 - unused |
385 | | PC6 - unused |
386 | | PC5 - unused |
387 | | PC4 - Battery Charge control (for 8088 ram backup 3.6v Nicad) |
388 | | PC3 - (pulled high externally, input) - unused? possibly for an ABC hopper |
389 | | PC2 - (pulled high externally, input) - unused? possibly for an ABC hopper |
390 | | PC1 - (pulled high externally, input) - "Hopper Count", |
391 | | probably a beam to check the hopper coin out |
392 | | PC0 - "Video BZ" (Video Blanking Zone, is an input) |
393 | | it's probably vblank or hblank, 0 is always returned, games wait for this bit |
394 | | to become 0 before accesing video |
395 | | */ |
396 | | return 0; |
397 | | } |
398 | | |
399 | | WRITE8_MEMBER(smsmfg_state::ppi0_a_w) |
400 | | { |
401 | | //popmessage("Lamps: %d %d %d %d %d %d %d", BIT(data,7), BIT(data,6), BIT(data,5), BIT(data,4), BIT(data,3), BIT(data,2), BIT(data,1) ); |
402 | | output_set_lamp_value(0, !BIT(data,7)); /* Display Light 1 */ |
403 | | output_set_lamp_value(1, !BIT(data,6)); /* Display Light 2 */ |
404 | | output_set_lamp_value(2, !BIT(data,5)); /* Display Light 3 */ |
405 | | output_set_lamp_value(3, !BIT(data,4)); /* Display Light 4 */ |
406 | | output_set_lamp_value(4, !BIT(data,3)); /* Display Light 5 */ |
407 | | output_set_lamp_value(5, !BIT(data,2)); /* Bet Light */ |
408 | | output_set_lamp_value(6, !BIT(data,1)); /* Deal Light */ |
409 | | output_set_lamp_value(7, !BIT(data,0)); /* Draw Light */ |
410 | | } |
411 | | |
412 | | WRITE8_MEMBER(smsmfg_state::ppi0_b_w) |
413 | | { |
414 | | output_set_lamp_value(8, !BIT(data,7)); /* Stand Light */ |
415 | | output_set_lamp_value(9, !BIT(data,6)); /* Cancel Light */ |
416 | | |
417 | | coin_counter_w(machine(), 0, BIT(data,1)); |
418 | | coin_lockout_w(machine(), 0, BIT(data,5)); |
419 | | coin_lockout_w(machine(), 1, BIT(data,4)); |
420 | | } |
421 | | |
422 | | static I8255A_INTERFACE( ppi8255_0_intf ) |
423 | | { |
424 | | DEVCB_NULL, /* Port A read */ |
425 | | DEVCB_DRIVER_MEMBER(smsmfg_state,ppi0_a_w), /* Port A write */ |
426 | | DEVCB_NULL, /* Port B read */ |
427 | | DEVCB_DRIVER_MEMBER(smsmfg_state,ppi0_b_w), /* Port B write */ |
428 | | DEVCB_DRIVER_MEMBER(smsmfg_state,ppi0_c_r), /* Port C read */ |
429 | | DEVCB_NULL /* Port C write */ |
430 | | }; |
431 | | |
432 | | static I8255A_INTERFACE( ppi8255_1_intf ) |
433 | | { |
434 | | DEVCB_INPUT_PORT("IN0"), /* Port A read */ |
435 | | DEVCB_NULL, /* Port A write */ |
436 | | DEVCB_INPUT_PORT("IN1"), /* Port B read */ |
437 | | DEVCB_NULL, /* Port B write */ |
438 | | DEVCB_INPUT_PORT("IN2"), /* Port C read */ |
439 | | DEVCB_NULL /* Port C write */ |
440 | | }; |
441 | | |
442 | | |
443 | | /************************************* |
444 | | * |
445 | | * Video |
446 | | * |
447 | | *************************************/ |
448 | | |
449 | | WRITE8_MEMBER(smsmfg_state::video_w) |
450 | | { |
451 | | m_vid_regs[offset] = data; |
452 | | if ( offset == 5 ) |
453 | | { |
454 | | int x,y; |
455 | | int xstart = m_vid_regs[0] + m_vid_regs[1]*256; |
456 | | int width = m_vid_regs[2]; |
457 | | int ystart = m_vid_regs[3]; |
458 | | int height = m_vid_regs[4]; |
459 | | int color = m_vid_regs[5]; |
460 | | |
461 | | if ( height == 0 ) |
462 | | height = 256; |
463 | | |
464 | | if ( width == 0 ) |
465 | | width = 256; |
466 | | |
467 | | for ( y = ystart; y < ystart + height; y++ ) |
468 | | { |
469 | | for ( x = xstart; x < xstart + width; x++ ) |
470 | | { |
471 | | if ( y < 256 ) |
472 | | m_bitmap.pix16(y, x) = color; |
473 | | } |
474 | | } |
475 | | } |
476 | | } |
477 | | |
478 | | void smsmfg_state::video_start() |
479 | | { |
480 | | machine().primary_screen->register_screen_bitmap(m_bitmap); |
481 | | |
482 | | save_item(NAME(m_vid_regs)); |
483 | | save_item(NAME(m_bitmap)); |
484 | | } |
485 | | |
486 | | UINT32 smsmfg_state::screen_update_sms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
487 | | { |
488 | | copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); |
489 | | return 0; |
490 | | } |
491 | | |
492 | | void smsmfg_state::palette_init() |
493 | | { |
494 | | int i; |
495 | | |
496 | | for (i = 0; i < 8; i++ ) |
497 | | { |
498 | | palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i))); |
499 | | } |
500 | | } |
501 | | |
502 | | /************************************* |
503 | | * |
504 | | * Memory maps |
505 | | * |
506 | | *************************************/ |
507 | | |
508 | | static ADDRESS_MAP_START( sms_map, AS_PROGRAM, 8, smsmfg_state ) |
509 | | AM_RANGE(0x00000, 0x007ff) AM_RAM AM_SHARE("nvram") |
510 | | AM_RANGE(0x00800, 0x00803) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) |
511 | | AM_RANGE(0x01000, 0x01007) AM_WRITE(video_w) |
512 | | AM_RANGE(0x01800, 0x01803) AM_READWRITE(link_r, link_w) |
513 | | AM_RANGE(0x04000, 0x07fff) AM_ROMBANK("bank1") |
514 | | AM_RANGE(0x04000, 0x04000) AM_WRITE(bankswitch_w) |
515 | | AM_RANGE(0x08000, 0x0ffff) AM_ROM |
516 | | AM_RANGE(0xf8000, 0xfffff) AM_ROM // mirror for vectors |
517 | | ADDRESS_MAP_END |
518 | | |
519 | | static ADDRESS_MAP_START( sureshot_map, AS_PROGRAM, 8, smsmfg_state ) |
520 | | AM_RANGE(0x00000, 0x007ff) AM_RAM AM_SHARE("nvram") |
521 | | AM_RANGE(0x02000, 0x02007) AM_WRITE(video_w) |
522 | | AM_RANGE(0x03000, 0x03003) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) |
523 | | AM_RANGE(0x03800, 0x03803) AM_READWRITE(link_r, link_w) |
524 | | AM_RANGE(0x08000, 0x0ffff) AM_ROM |
525 | | AM_RANGE(0xf8000, 0xfffff) AM_ROM // mirror for vectors |
526 | | ADDRESS_MAP_END |
527 | | |
528 | | static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8, smsmfg_state ) |
529 | | AM_RANGE(0x0000, 0x1fff) AM_ROM |
530 | | AM_RANGE(0x2000, 0x27ff) AM_RAM |
531 | | AM_RANGE(0x3100, 0x3103) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) |
532 | | AM_RANGE(0x3381, 0x3382) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) |
533 | | AM_RANGE(0x3400, 0x3400) AM_READ(z80_8088_r) |
534 | | AM_RANGE(0x3500, 0x3501) AM_READWRITE(p03_r, p03_w) |
535 | | ADDRESS_MAP_END |
536 | | |
537 | | /************************************* |
538 | | * |
539 | | * Machine |
540 | | * |
541 | | *************************************/ |
542 | | |
543 | | void smsmfg_state::machine_start() |
544 | | { |
545 | | membank("bank1")->configure_entries(0, 16, memregion("questions")->base(), 0x4000); |
546 | | |
547 | | save_item(NAME(m_communication_port_status)); |
548 | | save_item(NAME(m_communication_port)); |
549 | | } |
550 | | |
551 | | MACHINE_START_MEMBER(smsmfg_state,sureshot) |
552 | | { |
553 | | save_item(NAME(m_communication_port_status)); |
554 | | save_item(NAME(m_communication_port)); |
555 | | } |
556 | | |
557 | | void smsmfg_state::machine_reset() |
558 | | { |
559 | | m_communication_port_status = 0; |
560 | | } |
561 | | |
562 | | static MACHINE_CONFIG_START( sms, smsmfg_state ) |
563 | | MCFG_CPU_ADD("maincpu", I8088, XTAL_24MHz/8) |
564 | | MCFG_CPU_PROGRAM_MAP(sms_map) |
565 | | |
566 | | MCFG_CPU_ADD("soundcpu", Z80, XTAL_16MHz/8) |
567 | | MCFG_CPU_PROGRAM_MAP(sub_map) |
568 | | |
569 | | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
570 | | |
571 | | |
572 | | MCFG_I8255A_ADD( "ppi8255_0", ppi8255_0_intf ) |
573 | | MCFG_I8255A_ADD( "ppi8255_1", ppi8255_1_intf ) |
574 | | |
575 | | MCFG_NVRAM_ADD_0FILL("nvram") |
576 | | |
577 | | /* video hardware */ |
578 | | MCFG_SCREEN_ADD("screen", RASTER) |
579 | | MCFG_SCREEN_REFRESH_RATE(60) |
580 | | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
581 | | MCFG_SCREEN_SIZE(0x1b0, 0x100) |
582 | | MCFG_SCREEN_VISIBLE_AREA(0, 0x1af, 0, 0xff) |
583 | | MCFG_SCREEN_UPDATE_DRIVER(smsmfg_state, screen_update_sms) |
584 | | |
585 | | MCFG_PALETTE_LENGTH(8) |
586 | | |
587 | | |
588 | | /* sound hardware */ |
589 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
590 | | |
591 | | MCFG_SOUND_ADD("aysnd", AY8910, XTAL_16MHz/8) |
592 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
593 | | MACHINE_CONFIG_END |
594 | | |
595 | | static MACHINE_CONFIG_DERIVED( sureshot, sms ) |
596 | | |
597 | | MCFG_CPU_MODIFY("maincpu") |
598 | | MCFG_CPU_PROGRAM_MAP(sureshot_map) |
599 | | |
600 | | MCFG_MACHINE_START_OVERRIDE(smsmfg_state,sureshot) |
601 | | MACHINE_CONFIG_END |
602 | | |
603 | | /************************************* |
604 | | * |
605 | | * ROM definitions |
606 | | * |
607 | | *************************************/ |
608 | | |
609 | | /* |
610 | | Triva looking board |
611 | | Silk screened on front... |
612 | | P/N 1001 |
613 | | Etched in copper on font... |
614 | | COMPONENT SIDE REV 02 |
615 | | Etched in copper on back... |
616 | | COPYRIGHT SMS 1983 S/N MADE IN USA |
617 | | mfg corp |
618 | | |
619 | | Serial number A4675 etched in board |
620 | | |
621 | | Large chips |
622 | | P8088 |
623 | | AY-3-8910 |
624 | | CDM6116 x2 |
625 | | P8255A-5 |
626 | | P8254 |
627 | | D8255AC-5 |
628 | | D780C-1 |
629 | | |
630 | | 16 Mhz crystal by D780C (U21) |
631 | | 24 Mhz crystal by P8088 (u53) |
632 | | |
633 | | Open sockets at U50 (40 pin), U15 (24 pin), U2 (40 pin), U25 (24 pin) |
634 | | |
635 | | Bottom Board |
636 | | .U17 - 27128 |
637 | | .U16 - 27128 |
638 | | .U26 - 2732 - stickered #26 073184 |
639 | | .U38 - DMPAL10L8NC - 3 blue dots on it - saved in jedec format |
640 | | .U39 - DMPAL10L8NC - 3 green dots on it - saved in jedec format |
641 | | .U40 - DMPAL10L8NC - 1 pink dot on it - saved in jedec format |
642 | | .U110 - DMPAL10L8NC - 2 pink dots on it - saved in jedec format |
643 | | .U52 - DMPAL10L8NC - not labeled - checksum was 0 |
644 | | .U32 - DMPAL10L8NC - stickered trivia U32 - couldn't read "device overcurrent" |
645 | | .U58 - DMPAL10H8NC - 3 brown dots on it - saved in jedec format |
646 | | .U80 - DMPAL10H8NC - 2 blue dots on it - saved in jedec format |
647 | | .U130 - DMPAL10H8NC - 3 pink dots on it - saved in jedec format |
648 | | .U129 - DMPAL10H8NC - pink-green-pink dots on it - saved in jedec format |
649 | | .U128 - DMPAL10H8NC - blue-brown-blue dots on it - saved in jedec format |
650 | | .U145 - DMPAL14H4NC - brown dot on it - saved in jedec format |
651 | | .U144 - DMPAL14H4NC - brown dot on it - saved in jedec format |
652 | | .U143 - DMPAL14H4NC - brown dot on it - saved in jedec format |
653 | | .U142 - DMPAL14H4NC - brown dot on it - saved in jedec format |
654 | | .U141 - DMPAL14H4NC - brown dot on it - saved in jedec format |
655 | | .U140 - DMPAL14H4NC - brown dot on it - saved in jedec format |
656 | | U.145-U.140 had the same checksum |
657 | | |
658 | | .U94 - DMPAL14H4NC - 2 green dots on it - saved in jedec format |
659 | | .U109 - DMPAL14H4NC - 2 brown dots on it - saved in jedec format |
660 | | |
661 | | Daughter Board |
662 | | Etched in copper on top... |
663 | | SMS MFG M?I 2685 ? = a cage looking symbol |
664 | | |
665 | | Read starting at top row, closest to connector to main board |
666 | | .D0 - DMPAL10L8NC - 1 orange dot on it - saved in jedec format |
667 | | .D1 - 27128 - couldn't read sticker - |
668 | | .D2 - 27128 - couldn't read sticker - |
669 | | .D3 - 27128 - couldn't read sticker - |
670 | | .D4 - 27128 - stickered 4 MOVIES .1 ?2485 ? = can't read |
671 | | .D5 - 27128 - stickered 3 ANYTHING .4 042485 |
672 | | .D6 - 27128 - stickered 2 ANYTHING .3 042485 |
673 | | .D7 - 27128 - stickered 1 ANYTHING .2 042485 |
674 | | .D8 - 27128 - stickered 0 ANYTHING .1 042485 |
675 | | |
676 | | 2nd row - left to right |
677 | | .D9 - 27128 - stickered 12 MUSIC .1 042485 |
678 | | .D10 - 27128 - stickered 13 MUSIC .1 042485 |
679 | | .D11 - 27128 - stickered 14 MUSIC .1 042485 |
680 | | .D12 - 27128 - stickered 15 MUSIC .1 042485 |
681 | | |
682 | | 3rd row - left to right |
683 | | .D13 - 27128 - stickered 11 SPORTS .4 042485 |
684 | | .D14 - 27128 - stickered 10 SPORTS .3 042485 |
685 | | .D15 - 27128 - stickered 9 SPORTS .2 042485 |
686 | | .D16 - 27128 - stickered 8 SPORTS .1 042485 |
687 | | .D17 - DMPAL10L8NC - 1 white dot on it - saved in jedec format |
688 | | |
689 | | |
690 | | ROM text showed... |
691 | | COPYRIGHT 1984 SMS MFG CORP |
692 | | TRIVIA HANGUP |
693 | | SMART ALECS |
694 | | */ |
695 | | |
696 | | ROM_START( trvhang ) |
697 | | ROM_REGION( 0x100000, "maincpu", 0 ) |
698 | | ROM_LOAD( "sms.17", 0xf8000, 0x04000, CRC(af6ef980) SHA1(f0f98d1f91de718a63b87c5f1c6ee3bd854d1c1b) ) |
699 | | ROM_LOAD( "sms.16", 0xfc000, 0x04000, CRC(b827d883) SHA1(68d6c2127ef9e537471c414ca7baa89c63997bbb) ) |
700 | | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
701 | | |
702 | | ROM_REGION( 0x10000, "soundcpu", 0 ) |
703 | | ROM_LOAD( "sms.26", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
704 | | ROM_RELOAD( 0x1000, 0x1000 ) |
705 | | |
706 | | ROM_REGION( 0x40000, "questions", 0 ) |
707 | | // anything |
708 | | ROM_LOAD( "0anything1.d8", 0x00000, 0x4000, CRC(80096807) SHA1(a38b1b13365577c0c588b8e196ee1a6c774ce3a3) ) |
709 | | ROM_LOAD( "1anything2.d7", 0x04000, 0x4000, CRC(d09946b6) SHA1(b5827945ce380f09ee758c4296f06f00ef3cbd0a) ) |
710 | | ROM_LOAD( "2anything3.d6", 0x08000, 0x4000, CRC(5b12fd09) SHA1(15804480e65bfb3207d24a1679bb78d1ad491d70) ) |
711 | | ROM_LOAD( "3anything4.d5", 0x0c000, 0x4000, CRC(f1a37ed7) SHA1(687a610319b21091cbc53232b47eb99dabe12f02) ) |
712 | | // movies |
713 | | ROM_LOAD( "4movies1.d4", 0x10000, 0x4000, CRC(76993bd1) SHA1(b9a97ab7c6d35f5fdda04342e0b3773618deedef) ) |
714 | | ROM_LOAD( "5movies1.d3", 0x14000, 0x4000, CRC(8c5f62ef) SHA1(34ac235358a71620a6619dbb16255c363f34df53) ) |
715 | | ROM_LOAD( "6movies1.d2", 0x18000, 0x4000, CRC(13c9fe08) SHA1(6b7d055621ce578446d320f98f7a4cd095e756b0) ) |
716 | | ROM_LOAD( "7movies1.d1", 0x1c000, 0x4000, CRC(04f627c0) SHA1(c656b66c60059a1b068c4a7262f07f4c136c34c1) ) |
717 | | // sports |
718 | | ROM_LOAD( "8sports1.d16", 0x20000, 0x4000, CRC(b700e7e6) SHA1(42b2c12c6af5f15d909e15ee3e7ca2e13e0142c2) ) |
719 | | ROM_LOAD( "9sports2.d15", 0x24000, 0x4000, CRC(bec225fe) SHA1(13252894eca30e06354885a21ecad43965cfd3ef) ) |
720 | | ROM_LOAD( "10sports3.d14", 0x28000, 0x4000, CRC(3bfe9b52) SHA1(0cdd9ec6ed784fab9272d50821994be5b0fd0532) ) |
721 | | ROM_LOAD( "11sports4.d13", 0x2c000, 0x4000, CRC(9bb8dbad) SHA1(0dd9ed23e6794a86a12906b326e984a2d58cc4c6) ) |
722 | | // music |
723 | | ROM_LOAD( "12music1.d9", 0x30000, 0x4000, CRC(c1691ec9) SHA1(95725fa315944c0786e2a32d483703173eb2e730) ) |
724 | | ROM_LOAD( "13music1.d10", 0x34000, 0x4000, CRC(df0da39f) SHA1(29103dca8b0c1967791e8ddd722153874e16bbda) ) |
725 | | ROM_LOAD( "14music1.d11", 0x38000, 0x4000, CRC(114b4aa6) SHA1(2621d1042b0774d60be88cc8d62613aa07c12552) ) |
726 | | ROM_LOAD( "15music1.d12", 0x3c000, 0x4000, CRC(59a40e4f) SHA1(e726ce624c76ee527edc51c1e5757b7d433dcf8c) ) |
727 | | |
728 | | |
729 | | ROM_REGION( 0x1000, "plds", 0 ) |
730 | | ROM_LOAD( "dmpal10l8nc.d17.bin", 0x000000, 0x0001f3, CRC(e9eb78e7) SHA1(688e854e82c230d367c211f611e9a8298ab64399) ) |
731 | | ROM_LOAD( "dmpal10l8nc.38.bin", 0x000000, 0x0001f3, CRC(be17ebde) SHA1(22c05eeafeadc8f55b55951c2060fb4873146cba) ) |
732 | | ROM_LOAD( "dmpal10l8nc.39.bin", 0x000000, 0x0001f3, CRC(3299e803) SHA1(12f361d27497f6347ee26838fa9f675f6aac12c2) ) |
733 | | ROM_LOAD( "dmpal10l8nc.40.bin", 0x000000, 0x0001f3, CRC(22881f1c) SHA1(646fdc4e4a423e1432b448140f2d92dd2304ff71) ) |
734 | | ROM_LOAD( "dmpal10l8nc.52.bin", 0x000000, 0x0001f3, CRC(2e43ba5f) SHA1(8b87ee8ce21f5241260f2d0de4878096d8ecb5f5) ) |
735 | | ROM_LOAD( "dmpal10h8nc.58.bin", 0x000000, 0x0001f3, CRC(020b5108) SHA1(f3221fbce40a9d6fdc2eece606e4eded3faf5f02) ) |
736 | | ROM_LOAD( "dmpal10h8nc.80.bin", 0x000000, 0x0001f3, CRC(66e21ee5) SHA1(31c29a250f50dcdf531810e59068adfea4d2d9a3) ) |
737 | | ROM_LOAD( "dmpal14h4nc.94.bin", 0x000000, 0x000283, CRC(c5fda3df) SHA1(4fdd597d25ed893cb005165b68e48567fbd2b1ce) ) |
738 | | ROM_LOAD( "dmpal14h4nc.109.bin", 0x000000, 0x000283, CRC(15d05aaa) SHA1(57500b4825a1da943d79ee7df657efed56c4320e) ) |
739 | | ROM_LOAD( "dmpal10l8nc.110.bin", 0x000000, 0x0001f3, CRC(6263b1e1) SHA1(6c8d92bcbbc2d196b5ac7765888eaf171671d651) ) |
740 | | ROM_LOAD( "dmpal10h8nc.128.bin", 0x000000, 0x0001f3, CRC(fbaea5b0) SHA1(85a757485c26304d4ce718fd954aa4736cdc4752) ) |
741 | | ROM_LOAD( "dmpal10h8nc.129.bin", 0x000000, 0x0001f3, CRC(4722fb3b) SHA1(adc0a3c0721acaa5b447c7aee771703caab80dd9) ) |
742 | | ROM_LOAD( "dmpal10h8nc.130.bin", 0x000000, 0x0001f3, CRC(d3f0a6a5) SHA1(5e08b6104dfd3e463031b2b12619589a8f7b453c) ) |
743 | | ROM_LOAD( "dmpal14h4nc.140.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
744 | | ROM_LOAD( "dmpal14h4nc.141.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
745 | | ROM_LOAD( "dmpal14h4nc.142.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
746 | | ROM_LOAD( "dmpal14h4nc.143.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
747 | | ROM_LOAD( "dmpal14h4nc.144.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
748 | | ROM_LOAD( "dmpal14h4nc.145.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
749 | | ROM_LOAD( "dmpal10l8nc.d0.bin", 0x000000, 0x0001f3, CRC(b1c221a7) SHA1(f63a022199a2d7b52c4c4827b170d49aae85e4e3) ) |
750 | | ROM_END |
751 | | |
752 | | /* |
753 | | Etched in copper on back COPYRIGHT SMS 1983 |
754 | | mfg corp. S/N A-2043 |
755 | | A-2043 was hand etched |
756 | | |
757 | | 16MHz Crystal |
758 | | 24MHz Crystal |
759 | | D780C |
760 | | D8255AC-5 |
761 | | P8255A-5 |
762 | | P8088 |
763 | | AY-3-8910 |
764 | | 6116 x2 |
765 | | P8254 |
766 | | |
767 | | Empty 40 pin socket at U2 and U50 |
768 | | Empty 24 pin socket at U25 |
769 | | Empty 28 pin socket at U18 |
770 | | |
771 | | |
772 | | |
773 | | .u16 28128 stickered U-16 |
774 | | TRIVIA -2 |
775 | | 011586 |
776 | | |
777 | | .u17 28128 stickered U-16 |
778 | | TRIVIA -2 |
779 | | 011586 |
780 | | |
781 | | .u19 28128 stickered U-16 |
782 | | TRIVIA DLXE |
783 | | 021281 |
784 | | |
785 | | .u26 2732 stickered #26 |
786 | | 073184 |
787 | | |
788 | | |
789 | | the pal's had colored dots on them |
790 | | saved in JEDEC format |
791 | | .32 dmpal10l8nc red red blue |
792 | | .52 dmpal10l8nc red red white |
793 | | .38 dmpal10l8nc blue blue blue |
794 | | .39 dmpal10l8nc green green green |
795 | | .40 dmpal10l8nc pink |
796 | | .110 dmpal10l8nc pink pink |
797 | | .58 dmpal10h8nc brown brown brown |
798 | | .80 dmpal10h8nc blue blue |
799 | | .128 dmpal10h8nc blue brown blue |
800 | | .129 dmpal10h8nc pink green pink |
801 | | .130 dmpal10h8nc pink scratched off |
802 | | .94 dmpal14h4nc green green |
803 | | .109 dmpal14h4nc brown brown |
804 | | .140 dmpal14h4nc brown |
805 | | .141 dmpal14h4nc brown |
806 | | .142 dmpal14h4nc brown |
807 | | .143 dmpal14h4nc brown |
808 | | .144 dmpal14h4nc brown |
809 | | .145 dmpal14h4nc brown |
810 | | */ |
811 | | |
812 | | ROM_START( trvhanga ) |
813 | | ROM_REGION( 0x100000, "maincpu", 0 ) |
814 | | ROM_LOAD( "sms2.u17", 0xf8000, 0x04000, CRC(e5c880a1) SHA1(da777c4e126da2f03a663f8c8f565bda8520c883) ) |
815 | | ROM_LOAD( "sms2.16", 0xfc000, 0x04000, CRC(85484aee) SHA1(7c282bd208bd644d5d57ac399942c95211e87bf4) ) |
816 | | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
817 | | |
818 | | ROM_REGION( 0x10000, "soundcpu", 0 ) |
819 | | ROM_LOAD( "sms2.26", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
820 | | ROM_RELOAD( 0x1000, 0x1000 ) |
821 | | |
822 | | ROM_REGION( 0x4000, "user", 0 ) |
823 | | ROM_LOAD( "sms2.u19", 0x00000, 0x04000, CRC(5e10059b) SHA1(f0eb490d41009ffe1c80216f699557480110954b) ) // unknown rom (leftover from conversion?) |
824 | | |
825 | | ROM_REGION( 0x40000, "questions", 0 ) |
826 | | // sex |
827 | | ROM_LOAD( "0sex1.d8", 0x00000, 0x4000, NO_DUMP ) |
828 | | ROM_LOAD( "1sex2.d7", 0x04000, 0x4000, NO_DUMP ) |
829 | | ROM_LOAD( "2sex3.d6", 0x08000, 0x4000, NO_DUMP ) |
830 | | ROM_LOAD( "3sex4.d5", 0x0c000, 0x4000, NO_DUMP ) |
831 | | // movies |
832 | | ROM_LOAD( "4movies1.d4", 0x10000, 0x4000, NO_DUMP ) |
833 | | ROM_LOAD( "5movies1.d3", 0x14000, 0x4000, NO_DUMP ) |
834 | | ROM_LOAD( "6movies1.d2", 0x18000, 0x4000, NO_DUMP ) |
835 | | ROM_LOAD( "7movies1.d1", 0x1c000, 0x4000, NO_DUMP ) |
836 | | // sports |
837 | | ROM_LOAD( "8sports1.d16", 0x20000, 0x4000, NO_DUMP ) |
838 | | ROM_LOAD( "9sports2.d15", 0x24000, 0x4000, NO_DUMP ) |
839 | | ROM_LOAD( "10sports3.d14", 0x28000, 0x4000, NO_DUMP ) |
840 | | ROM_LOAD( "11sports4.d13", 0x2c000, 0x4000, NO_DUMP ) |
841 | | // music |
842 | | ROM_LOAD( "12music1.d9", 0x30000, 0x4000, NO_DUMP ) |
843 | | ROM_LOAD( "13music1.d10", 0x34000, 0x4000, NO_DUMP ) |
844 | | ROM_LOAD( "14music1.d11", 0x38000, 0x4000, NO_DUMP ) |
845 | | ROM_LOAD( "15music1.d12", 0x3c000, 0x4000, NO_DUMP ) |
846 | | |
847 | | ROM_REGION( 0x1000, "plds", 0 ) |
848 | | ROM_LOAD( "dmpal10l8nc.32.bin", 0x000000, 0x00002c, CRC(558ca47e) SHA1(4612e5dd9832bcbf6d7b3bce803f92ea2ee03b98) ) |
849 | | ROM_LOAD( "dmpal10l8nc.38.bin", 0x000000, 0x00002c, CRC(84c39631) SHA1(8aa28be5418dd119883a9d400f23927e0cf8d7b4) ) |
850 | | ROM_LOAD( "dmpal10l8nc.39.bin", 0x000000, 0x00002c, CRC(ab950780) SHA1(73e8eb8050ca337e58b34513a9cf522e4fb43b5d) ) |
851 | | ROM_LOAD( "dmpal10l8nc.40.bin", 0x000000, 0x00002c, CRC(a2de5f30) SHA1(ea2293f6b979aa16ccf1c8d6c88ea484ef45ea6b) ) |
852 | | ROM_LOAD( "dmpal10l8nc.52.bin", 0x000000, 0x00002c, CRC(5d09ff76) SHA1(0b977db9dc465a36975b935d3585f404b86de293) ) |
853 | | ROM_LOAD( "dmpal10h8nc.58.bin", 0x000000, 0x00002c, CRC(3df46d79) SHA1(606040b69908635ab5166193c53557ffa524c9d3) ) |
854 | | ROM_LOAD( "dmpal10h8nc.80.bin", 0x000000, 0x00002c, CRC(7bd4fbf5) SHA1(a2951bcf6af2a6d0211070c2dc49b8c1e9b78b9b) ) |
855 | | ROM_LOAD( "dmpal14h4nc.94.bin", 0x000000, 0x00003c, CRC(43a4e3f1) SHA1(afc530cc52ac04abce33b7c61e256da1cb30eb23) ) |
856 | | ROM_LOAD( "dmpal14h4nc.109.bin", 0x000000, 0x00003c, CRC(98542c78) SHA1(282d06701da1130d9ca0fcbd81ea89f1462693e2) ) |
857 | | ROM_LOAD( "dmpal10l8nc.110.bin", 0x000000, 0x00002c, CRC(f59c1868) SHA1(cc75ce71057360e62ea3ea929f241dc6105f1362) ) |
858 | | ROM_LOAD( "dmpal10h8nc.128.bin", 0x000000, 0x00002c, CRC(083cd773) SHA1(70a49a53d549b90c7a036f4afaf92759bf8e20c9) ) |
859 | | ROM_LOAD( "dmpal10h8nc.129.bin", 0x000000, 0x00002c, CRC(c5841a1a) SHA1(f2929321b041114f771e9fba4cbe2fb36c26a053) ) |
860 | | ROM_LOAD( "dmpal10h8nc.130.bin", 0x000000, 0x00002c, CRC(a4051372) SHA1(23b200f3950e583cc40b3cc82d62e274294e5593) ) |
861 | | ROM_LOAD( "dmpal14h4nc.140.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
862 | | ROM_LOAD( "dmpal14h4nc.141.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
863 | | ROM_LOAD( "dmpal14h4nc.142.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
864 | | ROM_LOAD( "dmpal14h4nc.143.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
865 | | ROM_LOAD( "dmpal14h4nc.144.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
866 | | ROM_LOAD( "dmpal14h4nc.145.bin", 0x000000, 0x00003c, CRC(ab2af8de) SHA1(775495d47435c23eecf3defba15f5ca890836354) ) |
867 | | ROM_END |
868 | | |
869 | | ROM_START( sureshot ) |
870 | | ROM_REGION( 0x100000, "maincpu", 0 ) |
871 | | ROM_LOAD( "u-19 hldly s.shot 020687.u19.a12.bin", 0xf8000, 0x02000, CRC(028bdb61) SHA1(e39c27cc6dec12de5a5e60d544f35448e49baee1) ) |
872 | | ROM_LOAD( "u-18 hldly s.shot 020687.u18.a11.bin", 0xfa000, 0x02000, CRC(5aa083f1) SHA1(3eed1a7421e7abcc41a1bddf655b1e777d843898) ) |
873 | | ROM_LOAD( "u-17 hldly s.shot 020687.u17.a10.bin", 0xfc000, 0x02000, CRC(a37432d6) SHA1(398462642ab0b34efdb6ff4756758057b9833e10) ) |
874 | | ROM_LOAD( "u-16 hldly s.shot 020687.u16.a9.bin", 0xfe000, 0x02000, CRC(d7f756d5) SHA1(5c7f62b02b4d4836881c3da0604448c34ede674b) ) |
875 | | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
876 | | |
877 | | ROM_REGION( 0x10000, "soundcpu", 0 ) |
878 | | ROM_LOAD( "26 404 073184.u26.b5.bin", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
879 | | ROM_RELOAD( 0x1000, 0x1000 ) |
880 | | ROM_END |
881 | | |
882 | | /* |
883 | | Etched in copper on back COPYRIGHT SMS 1983 |
884 | | mfg corp |
885 | | S/N A-872 A-872 was etched |
886 | | MADE IN USA |
887 | | |
888 | | Etched in copper on front REV 03 |
889 | | |
890 | | Silkscreened on top P/N 1001 |
891 | | |
892 | | |
893 | | .16 2764 handwritten sticker U16 |
894 | | .17 2764 handwritten sticker U17 |
895 | | .18 2764 handwritten sticker U18 |
896 | | .19 2764 handwritten sticker U19 |
897 | | .26 2732 handwritten sticker #26 |
898 | | .32 pal10l8 green dot sticker with 32 written on it |
899 | | .52 pal10l8 blue dot sticker with 52 written on it |
900 | | .58 pal10l8 3 blue dot stickers with 58 written on one |
901 | | .40 pal10l8 red dot sticker with 40 written on it |
902 | | .39 pal10l8 3 green dot stickers with 39 written on one |
903 | | .38 pal10l8 3 blue dot stickers with 38 written on one |
904 | | .80 pal10l8 2 blue dot stickers with 80 written on one |
905 | | .94 pal14h4 2 green dot stickers with 94 written on one - was getting different values for each read |
906 | | .109 pal14h4 2 brown dot stickers with 109 written on one |
907 | | .110 pal10l8 2 red dot stickers with 110 written on one |
908 | | .128 pal10h8 1 blue, 1 brown, and another blue dot sticker with 128 written on the first blue one |
909 | | .129 pal10h8 1 green and 1 red dot sticker |
910 | | .130 pal10h8 3 red dot stickers with 130 written on one |
911 | | .140 pal14h4 1 brown sticker with 140 written on it |
912 | | .141 pal14h4 1 brown sticker with 141 written on it |
913 | | .142 pal14h4 1 brown sticker with 142 written on it |
914 | | .143 pal14h4 1 brown sticker with 143 written on it |
915 | | .144 pal14h4 1 brown sticker with 144 written on it |
916 | | .145 pal14h4 1 brown sticker with 145 written on it |
917 | | */ |
918 | | |
919 | | ROM_START( secondch ) |
920 | | ROM_REGION( 0x100000, "maincpu", 0 ) |
921 | | ROM_LOAD( "u19.19", 0xf8000, 0x02000, CRC(5ab3d30f) SHA1(16120c6d6a9d494c12f6609e5cb1311a4b40672b) ) |
922 | | ROM_LOAD( "u18.18", 0xfa000, 0x02000, CRC(941a1401) SHA1(92934d40bb256e18b996582c1af253d06732462f) ) |
923 | | ROM_LOAD( "u17.17", 0xfc000, 0x02000, CRC(88717e9f) SHA1(01b78f3ddd78e74e799d5f8ffe2f3cbcf5e6b7a2) ) |
924 | | ROM_LOAD( "u16.16", 0xfe000, 0x02000, CRC(6c9a0224) SHA1(01152024b48461c3b9ac63a9265129dabacd0462) ) |
925 | | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
926 | | |
927 | | ROM_REGION( 0x10000, "soundcpu", 0 ) |
928 | | ROM_LOAD( "#26.26", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
929 | | ROM_RELOAD( 0x1000, 0x1000 ) |
930 | | ROM_END |
931 | | |
932 | | GAME( 1984, trvhang, 0, sms, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Trivia Hangup (question set 1)", GAME_SUPPORTS_SAVE ) /* Version Trivia-1-050185 */ |
933 | | GAME( 1984, trvhanga, 0, sms, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Trivia Hangup (question set 2)", GAME_NOT_WORKING ) /* Version Trivia-2-011586 */ |
934 | | GAME( 1985, sureshot, 0, sureshot, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Sure Shot", GAME_SUPPORTS_SAVE ) |
935 | | GAME( 1985, secondch, 0, sureshot, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Second Chance", GAME_SUPPORTS_SAVE ) |
trunk/src/mame/drivers/smsmcorp.c
r0 | r22820 | |
| 1 | /* |
| 2 | SMS Manufacturing Corp hardware |
| 3 | |
| 4 | Driver by Mariusz Wojcieszek |
| 5 | |
| 6 | Preliminary driver by Reip |
| 7 | Schematics provided by Exodus |
| 8 | Sure Shot board provided by ranger_lennier |
| 9 | Notes by Lord Nightmare |
| 10 | |
| 11 | Notes/ToDo: |
| 12 | - pit8254 is not accessed by z80 (and there is no interrupt service routine), so |
| 13 | it is not fitted in the driver |
| 14 | - video registers can be read (to read framebuffer contents), this is not emulated |
| 15 | as software does not use this feature |
| 16 | - I8088 clock may be incorrect |
| 17 | - Video Blanking Zone input - probably hblank or vblank |
| 18 | - game speed may be not 100% correct - software does not use interrupts and |
| 19 | Video Blanking Zone is not emulated (which is required to get proper timings) |
| 20 | - implement video raw parameters |
| 21 | |
| 22 | */ |
| 23 | |
| 24 | /* |
| 25 | smssshot (Lord Nightmare) |
| 26 | SMS Sure Shot (poker?) |
| 27 | * Same exact board as sms trivia, but "COMPONENT SIDE REV 01" |
| 28 | instead of rev 02. |
| 29 | * 3 chips were removed from the board; two are shown as removed |
| 30 | in the schematic, one was removed later (an apparently |
| 31 | unnecessary data buffer on one of the z80 external latches) |
| 32 | * Does NOT have a daughterboard with additional roms; in fact, |
| 33 | connector J1 for the ribbon cable to the daughterboard isn't |
| 34 | populated with pins at all |
| 35 | * Serial Number A-108 etched in board, on back. |
| 36 | |
| 37 | |
| 38 | smsbingo (Lord Nightmare) |
| 39 | SMS Bingo |
| 40 | Someone on the MW forums has this iirc, but it isn't dumped yet - LN |
| 41 | |
| 42 | |
| 43 | |
| 44 | **** Notes from schematics (applies to all drivers): |
| 45 | Framebuffer is six tms4416 16384*4 chips; chips are arranged as three |
| 46 | planes of 16384*8 bits per plane, one plane per color channel. |
| 47 | Screen resolution is probably either 212x256 (two bits per plane, per |
| 48 | pixel) or 424x256 (one bit per plane per pixel), depending on the pals |
| 49 | installed. See schematics on page 6. The counters at U137 and U139 |
| 50 | compare against binary 0b110101 (53) in comparitor at U138, and as soon |
| 51 | as it hits that, HDONE is pulled high on the next MCLR clock. |
| 52 | This means there will be 53 (0-52) counts in the X counter before HDONE; |
| 53 | as each count refers to one 8 bit address, and the addressed 4416 rams |
| 54 | have between all of them 24 bits of output (8 per plane), the minimum |
| 55 | horizontal displayed resolution is 53x256 (8 bits per color per pixel), |
| 56 | and maximum is 8 times that. With proper pals (and proper mixing |
| 57 | resistors or other PWM fun) it should be possible to get: |
| 58 | 53x256 8,8,8 RGB |
| 59 | 106x256 4,4,4 RGB |
| 60 | 212x256 2,2,2 RGB <- this seems the most likely to me (LN) |
| 61 | 424x256 1,1,1 RGB |
| 62 | |
| 63 | |
| 64 | * The socket at U50 and the 3 pin connector J3 is for an |
| 65 | undumped intel 8050 MCU used for rs232 serial communication, |
| 66 | for either linking together machines, or more likely for factory |
| 67 | testing. The function of this internal rom is probably simple |
| 68 | enough to HLE or to even rewrite from scratch, but I doubt the code |
| 69 | on any of the dumped games even touches it, it was probably for use |
| 70 | with a specific game or for a set of hardware test roms to report |
| 71 | errors. |
| 72 | (schematic page 4) |
| 73 | The pinout of J3 is: |
| 74 | pin 1 (toward bottom of pcb): rs232 input to pcb |
| 75 | (pre-level shifted to 5v i.e. with a max232 or mc1489) |
| 76 | pin 2 : ground |
| 77 | pin 3 : rs232 output to elsewhere (to be sent to a max232 or |
| 78 | mc1488 to shift to rs232 voltage levels) |
| 79 | |
| 80 | * The 8255 PPI at U13 (connected to the 8088) is connected to 75451 |
| 81 | drivers on all pins EXCEPT pins PC3 through PC0. |
| 82 | (schematic page 3) |
| 83 | PA7 - Display Light 1 |
| 84 | PA6 - Display Light 2 |
| 85 | PA5 - Display Light 3 |
| 86 | PA4 - Display Light 4 |
| 87 | PA3 - Display Light 5 |
| 88 | PA2 - Bet Light |
| 89 | PA1 - Deal Light |
| 90 | PA0 - Draw Light |
| 91 | PB7 - Stand Light |
| 92 | PB6 - Cancel Light |
| 93 | PB5 - Coin Lock out A |
| 94 | PB4 - Coin Lock out B |
| 95 | PB3 - Setup Light |
| 96 | PB2 - Hopper Motor |
| 97 | PB1 - Coin in Counter (mechanical counter inside the machine) |
| 98 | PB0 - Knock off Counter (tilt? probably also a mechanical counter) |
| 99 | PC7 - unused |
| 100 | PC6 - unused |
| 101 | PC5 - unused |
| 102 | PC4 - Battery Charge control (for 8088 ram backup 3.6v Nicad) |
| 103 | PC3 - (pulled high externally, input) - unused? possibly for an ABC hopper |
| 104 | PC2 - (pulled high externally, input) - unused? possibly for an ABC hopper |
| 105 | PC1 - (pulled high externally, input) - "Hopper Count", |
| 106 | probably a beam to check the hopper coin out |
| 107 | PC0 - "Video BZ" (Video Blanking Zone, is an input) |
| 108 | |
| 109 | * The 8255 PPI at U2 (connected to the z80) is unused and not populated. |
| 110 | (All 3 ports have +5V pullups on all pins) |
| 111 | |
| 112 | * The 8255 PPI at U1 (connected to the z80) is used as follows: |
| 113 | (All 3 ports have +5V pullups on all pins) |
| 114 | PA7 - Lighted Button 1 (input) |
| 115 | PA6 - Lighted Button 2 (input) |
| 116 | PA5 - Lighted Button 3 (input) |
| 117 | PA4 - Lighted Button 4 (input) |
| 118 | PA3 - Lighted Button 5 (input) |
| 119 | PA2 - Bet Button (input) |
| 120 | PA1 - Deal Button (input) |
| 121 | PA0 - Draw Button (input) |
| 122 | PB7 - Stand Button (input) |
| 123 | PB6 - Cancel Button (input) |
| 124 | PB5 - Alt Coin (input) |
| 125 | PB4 - Remote Knockoff (tilt? input) |
| 126 | PB3 - Operator Mode (input) |
| 127 | PB2 - Coin Error reset (input) |
| 128 | PB1 - unused |
| 129 | PB0 - unused |
| 130 | PC7 - unused |
| 131 | PC6 - unused |
| 132 | PC5 - unused |
| 133 | PC4 - unused |
| 134 | PC3 - unused |
| 135 | PC2 - unused |
| 136 | PC1 - unused |
| 137 | PC0 - Coin (input) |
| 138 | |
| 139 | |
| 140 | * The function of the pals is: |
| 141 | LOCATION DOTS TYPE PURPOSE |
| 142 | U32 1Green DMPAL10L8NC Decodes the gated by U33/U34) |
| 143 | high address lines of the 8088, for mainboard ROM mapping. A |
| 144 | different pal is probably used depending on whether the |
| 145 | mainboard has 2764 or 27128 roms installed. |
| 146 | SMS Sure Shot: dumped ok as truth table, mainboard has 4 2764s |
| 147 | SMS Trivia: bad (chip shorted internally), mainboard has 2 27128s |
| 148 | SMS Bingo: not dumped |
| 149 | (schematic page 2) |
| 150 | U38 3Blue PAL10L8CN Decodes the (gated by U36) |
| 151 | high address lines of the z80 address bus, for mapping of the z80 |
| 152 | ROM, RAM, Counter control, 4 z80-to-8088 ports (2 one direction, |
| 153 | 2 the other), the ay-3-8910, and the two 8255 PPIs. |
| 154 | (schematic page 10) |
| 155 | U39 3Green PAL10L8CN Accessory decoder to U38, helps |
| 156 | with the 4 z80-to-8088 ports. |
| 157 | (schematic page 10) |
| 158 | U40 1Red PAL10L8CN Connects to the low bits of the |
| 159 | 8088 address bus for decoding writing to/reading from the 8088 side of |
| 160 | the 4 z80-to-8088 ports. |
| 161 | (schematic page 10, note this chip is mismarked as U9 on the page, |
| 162 | it is the chip in the lower left) |
| 163 | U52 1Blue PAL10L8CN Decodes the (gated by U33/U34) |
| 164 | high address lines of the 8088, for main memory mapping of ram, |
| 165 | z80 communication, video, serial I/O (to U50), and the output-only |
| 166 | 8255 at U13 (which controls button lights and the coin hopper) |
| 167 | SMS Sure Shot: dumped ok as truth table |
| 168 | SMS Trivia: checksum 0, probably bad |
| 169 | SMS Bingo: not dumped |
| 170 | (schematic page 1) |
| 171 | U58 3Brown DMPAL10H8NC Controls BDIR and BC1 on the |
| 172 | ay-3-8910 given the low two address bits of the z80 bits, the |
| 173 | ay-3-8910 enable line, and the buffered z80 RD and WR lines. |
| 174 | (schematic page 12) |
| 175 | U80 2Blue PAL10H8CN State machine which controls StartH, |
| 176 | StartV, and the related functions involving the shifters for framebuffer |
| 177 | address and framebuffer output. Also lets framebuffer know when in hblank |
| 178 | or vblank. Is separate from the other "Video BZ" thing. |
| 179 | (schematic page 6) |
| 180 | U94 2Green PAL14H4CN State machine controls the |
| 181 | read-modify-write logic for accessing the frame buffer (while outside |
| 182 | of vblank and hblank?), may allow writing red green and blue plane bytes |
| 183 | all to one address, one after the other |
| 184 | (schematic page 7) |
| 185 | U109 2Brown PAL14H4CN Determines next state of the |
| 186 | 'Pixel control' hardware, i.e. H and V current line counters |
| 187 | Also determines VBLANK/"Video BZ" |
| 188 | (schematic page 5) |
| 189 | U110 2Red PAL10L8CN Translates output of U109 |
| 190 | before being sent to counters/color reg latch/etc. |
| 191 | (schematic page 5) |
| 192 | U128 Blue-Brown-Blue PAL10H8CN One of three 'sync' pals which |
| 193 | control the memory and other timing subsystem, fed by a 4 bit counter. |
| 194 | this particular pal has one external feedback bit. |
| 195 | (schematic page 6) |
| 196 | U129 Red-Green-Red DMPAL10H8NC Second of three 'sync' pals |
| 197 | This one has 2 external feedback bits. |
| 198 | (schematic page 6) |
| 199 | U130 3Red PAL10H8CN Third of three 'sync' pals' |
| 200 | This one has 3 external feedback bits plus three extra inputs from elsewhere |
| 201 | which are not readable on the schematic. Will trace them later. |
| 202 | (schematic page 6) |
| 203 | U140 1Brown PAL14H4CN This and the next 5 pals are used |
| 204 | to shift the framebuffer data, 4 bits at a time. This is done in parallel |
| 205 | (8 bits per channel) for output. all 6 pals are the same. |
| 206 | (schematic page 7) |
| 207 | U141 1Brown PAL14H4CN |
| 208 | U142 1Brown PAL14H4CN |
| 209 | U143 1Brown PAL14H4CN |
| 210 | U144 1Brown PAL14H4CN |
| 211 | U145 1Brown PAL14H4CN |
| 212 | |
| 213 | |
| 214 | */ |
| 215 | #include "emu.h" |
| 216 | #include "cpu/i86/i86.h" |
| 217 | #include "cpu/z80/z80.h" |
| 218 | #include "sound/ay8910.h" |
| 219 | #include "machine/i8255.h" |
| 220 | #include "machine/nvram.h" |
| 221 | |
| 222 | |
| 223 | class smsmfg_state : public driver_device |
| 224 | { |
| 225 | public: |
| 226 | smsmfg_state(const machine_config &mconfig, device_type type, const char *tag) |
| 227 | : driver_device(mconfig, type, tag), |
| 228 | m_maincpu(*this, "maincpu") { } |
| 229 | |
| 230 | UINT8 m_communication_port[4]; |
| 231 | UINT8 m_communication_port_status; |
| 232 | bitmap_ind16 m_bitmap; |
| 233 | UINT8 m_vid_regs[7]; |
| 234 | DECLARE_WRITE8_MEMBER(bankswitch_w); |
| 235 | DECLARE_READ8_MEMBER(link_r); |
| 236 | DECLARE_WRITE8_MEMBER(link_w); |
| 237 | DECLARE_READ8_MEMBER(z80_8088_r); |
| 238 | DECLARE_READ8_MEMBER(p03_r); |
| 239 | DECLARE_WRITE8_MEMBER(p03_w); |
| 240 | DECLARE_WRITE8_MEMBER(video_w); |
| 241 | DECLARE_READ8_MEMBER(ppi0_c_r); |
| 242 | DECLARE_WRITE8_MEMBER(ppi0_a_w); |
| 243 | DECLARE_WRITE8_MEMBER(ppi0_b_w); |
| 244 | virtual void machine_start(); |
| 245 | virtual void machine_reset(); |
| 246 | virtual void video_start(); |
| 247 | virtual void palette_init(); |
| 248 | DECLARE_MACHINE_START(sureshot); |
| 249 | UINT32 screen_update_sms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 250 | required_device<cpu_device> m_maincpu; |
| 251 | }; |
| 252 | |
| 253 | |
| 254 | /************************************* |
| 255 | * |
| 256 | * Bankswitching (for trivia question roms) |
| 257 | * |
| 258 | *************************************/ |
| 259 | |
| 260 | WRITE8_MEMBER(smsmfg_state::bankswitch_w) |
| 261 | { |
| 262 | membank("bank1")->set_entry(data); |
| 263 | } |
| 264 | |
| 265 | /************************************* |
| 266 | * |
| 267 | * 8088 <-> Z80 communication |
| 268 | * |
| 269 | *************************************/ |
| 270 | |
| 271 | READ8_MEMBER(smsmfg_state::link_r) |
| 272 | { |
| 273 | switch(offset) |
| 274 | { |
| 275 | case 0: |
| 276 | m_communication_port_status &= ~0x01; |
| 277 | return m_communication_port[0]; |
| 278 | case 1: |
| 279 | m_communication_port_status &= ~0x02; |
| 280 | return m_communication_port[1]; |
| 281 | case 2: |
| 282 | return m_communication_port_status; |
| 283 | } |
| 284 | return 0; |
| 285 | }; |
| 286 | |
| 287 | WRITE8_MEMBER(smsmfg_state::link_w) |
| 288 | { |
| 289 | switch(offset) |
| 290 | { |
| 291 | case 0: |
| 292 | m_communication_port_status |= 0x08; |
| 293 | m_communication_port[3] = data; |
| 294 | break; |
| 295 | case 1: |
| 296 | m_communication_port_status |= 0x04; |
| 297 | m_communication_port[2] = data; |
| 298 | break; |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | READ8_MEMBER(smsmfg_state::z80_8088_r) |
| 303 | { |
| 304 | return m_communication_port_status; |
| 305 | } |
| 306 | |
| 307 | READ8_MEMBER(smsmfg_state::p03_r) |
| 308 | { |
| 309 | switch(offset) |
| 310 | { |
| 311 | case 0: |
| 312 | m_communication_port_status &= ~0x08; |
| 313 | return m_communication_port[3]; |
| 314 | case 1: |
| 315 | m_communication_port_status &= ~0x04; |
| 316 | return m_communication_port[2]; |
| 317 | } |
| 318 | return 0; |
| 319 | } |
| 320 | |
| 321 | WRITE8_MEMBER(smsmfg_state::p03_w) |
| 322 | { |
| 323 | switch(offset) |
| 324 | { |
| 325 | case 0: |
| 326 | m_communication_port_status |= 0x01; |
| 327 | m_communication_port[0] = data; |
| 328 | break; |
| 329 | case 1: |
| 330 | m_communication_port_status |= 0x02; |
| 331 | m_communication_port[1] = data; |
| 332 | break; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | |
| 337 | /************************************* |
| 338 | * |
| 339 | * Input ports |
| 340 | * |
| 341 | *************************************/ |
| 342 | |
| 343 | static INPUT_PORTS_START(sms) |
| 344 | PORT_START("IN0") |
| 345 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Draw") /* Draw Button */ |
| 346 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Deal") /* Deal Button */ |
| 347 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Bet") /* Bet Button */ |
| 348 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) /* Lighted Button 5 */ |
| 349 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) /* Lighted Button 4 */ |
| 350 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* Lighted Button 3 */ |
| 351 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* Lighted Button 2 */ |
| 352 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* Lighted Button 1 */ |
| 353 | |
| 354 | PORT_START("IN1") |
| 355 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 356 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 357 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Coin Error reset */ |
| 358 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* Operator Mode */ |
| 359 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Remote Knockoff */ |
| 360 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1) |
| 361 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Cancel") /* Cancel Button */ |
| 362 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Stand") /* Stand Button */ |
| 363 | |
| 364 | PORT_START("IN2") |
| 365 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) /* Coin */ |
| 366 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 367 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 368 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 369 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 370 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 371 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 372 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 373 | INPUT_PORTS_END |
| 374 | |
| 375 | /************************************* |
| 376 | * |
| 377 | * 8255 PPIs |
| 378 | * |
| 379 | *************************************/ |
| 380 | |
| 381 | READ8_MEMBER(smsmfg_state::ppi0_c_r) |
| 382 | { |
| 383 | /* |
| 384 | PC7 - unused |
| 385 | PC6 - unused |
| 386 | PC5 - unused |
| 387 | PC4 - Battery Charge control (for 8088 ram backup 3.6v Nicad) |
| 388 | PC3 - (pulled high externally, input) - unused? possibly for an ABC hopper |
| 389 | PC2 - (pulled high externally, input) - unused? possibly for an ABC hopper |
| 390 | PC1 - (pulled high externally, input) - "Hopper Count", |
| 391 | probably a beam to check the hopper coin out |
| 392 | PC0 - "Video BZ" (Video Blanking Zone, is an input) |
| 393 | it's probably vblank or hblank, 0 is always returned, games wait for this bit |
| 394 | to become 0 before accesing video |
| 395 | */ |
| 396 | return 0; |
| 397 | } |
| 398 | |
| 399 | WRITE8_MEMBER(smsmfg_state::ppi0_a_w) |
| 400 | { |
| 401 | //popmessage("Lamps: %d %d %d %d %d %d %d", BIT(data,7), BIT(data,6), BIT(data,5), BIT(data,4), BIT(data,3), BIT(data,2), BIT(data,1) ); |
| 402 | output_set_lamp_value(0, !BIT(data,7)); /* Display Light 1 */ |
| 403 | output_set_lamp_value(1, !BIT(data,6)); /* Display Light 2 */ |
| 404 | output_set_lamp_value(2, !BIT(data,5)); /* Display Light 3 */ |
| 405 | output_set_lamp_value(3, !BIT(data,4)); /* Display Light 4 */ |
| 406 | output_set_lamp_value(4, !BIT(data,3)); /* Display Light 5 */ |
| 407 | output_set_lamp_value(5, !BIT(data,2)); /* Bet Light */ |
| 408 | output_set_lamp_value(6, !BIT(data,1)); /* Deal Light */ |
| 409 | output_set_lamp_value(7, !BIT(data,0)); /* Draw Light */ |
| 410 | } |
| 411 | |
| 412 | WRITE8_MEMBER(smsmfg_state::ppi0_b_w) |
| 413 | { |
| 414 | output_set_lamp_value(8, !BIT(data,7)); /* Stand Light */ |
| 415 | output_set_lamp_value(9, !BIT(data,6)); /* Cancel Light */ |
| 416 | |
| 417 | coin_counter_w(machine(), 0, BIT(data,1)); |
| 418 | coin_lockout_w(machine(), 0, BIT(data,5)); |
| 419 | coin_lockout_w(machine(), 1, BIT(data,4)); |
| 420 | } |
| 421 | |
| 422 | static I8255A_INTERFACE( ppi8255_0_intf ) |
| 423 | { |
| 424 | DEVCB_NULL, /* Port A read */ |
| 425 | DEVCB_DRIVER_MEMBER(smsmfg_state,ppi0_a_w), /* Port A write */ |
| 426 | DEVCB_NULL, /* Port B read */ |
| 427 | DEVCB_DRIVER_MEMBER(smsmfg_state,ppi0_b_w), /* Port B write */ |
| 428 | DEVCB_DRIVER_MEMBER(smsmfg_state,ppi0_c_r), /* Port C read */ |
| 429 | DEVCB_NULL /* Port C write */ |
| 430 | }; |
| 431 | |
| 432 | static I8255A_INTERFACE( ppi8255_1_intf ) |
| 433 | { |
| 434 | DEVCB_INPUT_PORT("IN0"), /* Port A read */ |
| 435 | DEVCB_NULL, /* Port A write */ |
| 436 | DEVCB_INPUT_PORT("IN1"), /* Port B read */ |
| 437 | DEVCB_NULL, /* Port B write */ |
| 438 | DEVCB_INPUT_PORT("IN2"), /* Port C read */ |
| 439 | DEVCB_NULL /* Port C write */ |
| 440 | }; |
| 441 | |
| 442 | |
| 443 | /************************************* |
| 444 | * |
| 445 | * Video |
| 446 | * |
| 447 | *************************************/ |
| 448 | |
| 449 | WRITE8_MEMBER(smsmfg_state::video_w) |
| 450 | { |
| 451 | m_vid_regs[offset] = data; |
| 452 | if ( offset == 5 ) |
| 453 | { |
| 454 | int x,y; |
| 455 | int xstart = m_vid_regs[0] + m_vid_regs[1]*256; |
| 456 | int width = m_vid_regs[2]; |
| 457 | int ystart = m_vid_regs[3]; |
| 458 | int height = m_vid_regs[4]; |
| 459 | int color = m_vid_regs[5]; |
| 460 | |
| 461 | if ( height == 0 ) |
| 462 | height = 256; |
| 463 | |
| 464 | if ( width == 0 ) |
| 465 | width = 256; |
| 466 | |
| 467 | for ( y = ystart; y < ystart + height; y++ ) |
| 468 | { |
| 469 | for ( x = xstart; x < xstart + width; x++ ) |
| 470 | { |
| 471 | if ( y < 256 ) |
| 472 | m_bitmap.pix16(y, x) = color; |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | void smsmfg_state::video_start() |
| 479 | { |
| 480 | machine().primary_screen->register_screen_bitmap(m_bitmap); |
| 481 | |
| 482 | save_item(NAME(m_vid_regs)); |
| 483 | save_item(NAME(m_bitmap)); |
| 484 | } |
| 485 | |
| 486 | UINT32 smsmfg_state::screen_update_sms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 487 | { |
| 488 | copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); |
| 489 | return 0; |
| 490 | } |
| 491 | |
| 492 | void smsmfg_state::palette_init() |
| 493 | { |
| 494 | int i; |
| 495 | |
| 496 | for (i = 0; i < 8; i++ ) |
| 497 | { |
| 498 | palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i))); |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | /************************************* |
| 503 | * |
| 504 | * Memory maps |
| 505 | * |
| 506 | *************************************/ |
| 507 | |
| 508 | static ADDRESS_MAP_START( sms_map, AS_PROGRAM, 8, smsmfg_state ) |
| 509 | AM_RANGE(0x00000, 0x007ff) AM_RAM AM_SHARE("nvram") |
| 510 | AM_RANGE(0x00800, 0x00803) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) |
| 511 | AM_RANGE(0x01000, 0x01007) AM_WRITE(video_w) |
| 512 | AM_RANGE(0x01800, 0x01803) AM_READWRITE(link_r, link_w) |
| 513 | AM_RANGE(0x04000, 0x07fff) AM_ROMBANK("bank1") |
| 514 | AM_RANGE(0x04000, 0x04000) AM_WRITE(bankswitch_w) |
| 515 | AM_RANGE(0x08000, 0x0ffff) AM_ROM |
| 516 | AM_RANGE(0xf8000, 0xfffff) AM_ROM // mirror for vectors |
| 517 | ADDRESS_MAP_END |
| 518 | |
| 519 | static ADDRESS_MAP_START( sureshot_map, AS_PROGRAM, 8, smsmfg_state ) |
| 520 | AM_RANGE(0x00000, 0x007ff) AM_RAM AM_SHARE("nvram") |
| 521 | AM_RANGE(0x02000, 0x02007) AM_WRITE(video_w) |
| 522 | AM_RANGE(0x03000, 0x03003) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) |
| 523 | AM_RANGE(0x03800, 0x03803) AM_READWRITE(link_r, link_w) |
| 524 | AM_RANGE(0x08000, 0x0ffff) AM_ROM |
| 525 | AM_RANGE(0xf8000, 0xfffff) AM_ROM // mirror for vectors |
| 526 | ADDRESS_MAP_END |
| 527 | |
| 528 | static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8, smsmfg_state ) |
| 529 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 530 | AM_RANGE(0x2000, 0x27ff) AM_RAM |
| 531 | AM_RANGE(0x3100, 0x3103) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) |
| 532 | AM_RANGE(0x3381, 0x3382) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) |
| 533 | AM_RANGE(0x3400, 0x3400) AM_READ(z80_8088_r) |
| 534 | AM_RANGE(0x3500, 0x3501) AM_READWRITE(p03_r, p03_w) |
| 535 | ADDRESS_MAP_END |
| 536 | |
| 537 | /************************************* |
| 538 | * |
| 539 | * Machine |
| 540 | * |
| 541 | *************************************/ |
| 542 | |
| 543 | void smsmfg_state::machine_start() |
| 544 | { |
| 545 | membank("bank1")->configure_entries(0, 16, memregion("questions")->base(), 0x4000); |
| 546 | |
| 547 | save_item(NAME(m_communication_port_status)); |
| 548 | save_item(NAME(m_communication_port)); |
| 549 | } |
| 550 | |
| 551 | MACHINE_START_MEMBER(smsmfg_state,sureshot) |
| 552 | { |
| 553 | save_item(NAME(m_communication_port_status)); |
| 554 | save_item(NAME(m_communication_port)); |
| 555 | } |
| 556 | |
| 557 | void smsmfg_state::machine_reset() |
| 558 | { |
| 559 | m_communication_port_status = 0; |
| 560 | } |
| 561 | |
| 562 | static MACHINE_CONFIG_START( sms, smsmfg_state ) |
| 563 | MCFG_CPU_ADD("maincpu", I8088, XTAL_24MHz/8) |
| 564 | MCFG_CPU_PROGRAM_MAP(sms_map) |
| 565 | |
| 566 | MCFG_CPU_ADD("soundcpu", Z80, XTAL_16MHz/8) |
| 567 | MCFG_CPU_PROGRAM_MAP(sub_map) |
| 568 | |
| 569 | MCFG_QUANTUM_TIME(attotime::from_hz(6000)) |
| 570 | |
| 571 | |
| 572 | MCFG_I8255A_ADD( "ppi8255_0", ppi8255_0_intf ) |
| 573 | MCFG_I8255A_ADD( "ppi8255_1", ppi8255_1_intf ) |
| 574 | |
| 575 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 576 | |
| 577 | /* video hardware */ |
| 578 | MCFG_SCREEN_ADD("screen", RASTER) |
| 579 | MCFG_SCREEN_REFRESH_RATE(60) |
| 580 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 581 | MCFG_SCREEN_SIZE(0x1b0, 0x100) |
| 582 | MCFG_SCREEN_VISIBLE_AREA(0, 0x1af, 0, 0xff) |
| 583 | MCFG_SCREEN_UPDATE_DRIVER(smsmfg_state, screen_update_sms) |
| 584 | |
| 585 | MCFG_PALETTE_LENGTH(8) |
| 586 | |
| 587 | |
| 588 | /* sound hardware */ |
| 589 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 590 | |
| 591 | MCFG_SOUND_ADD("aysnd", AY8910, XTAL_16MHz/8) |
| 592 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 593 | MACHINE_CONFIG_END |
| 594 | |
| 595 | static MACHINE_CONFIG_DERIVED( sureshot, sms ) |
| 596 | |
| 597 | MCFG_CPU_MODIFY("maincpu") |
| 598 | MCFG_CPU_PROGRAM_MAP(sureshot_map) |
| 599 | |
| 600 | MCFG_MACHINE_START_OVERRIDE(smsmfg_state,sureshot) |
| 601 | MACHINE_CONFIG_END |
| 602 | |
| 603 | /************************************* |
| 604 | * |
| 605 | * ROM definitions |
| 606 | * |
| 607 | *************************************/ |
| 608 | |
| 609 | /* |
| 610 | Triva looking board |
| 611 | Silk screened on front... |
| 612 | P/N 1001 |
| 613 | Etched in copper on font... |
| 614 | COMPONENT SIDE REV 02 |
| 615 | Etched in copper on back... |
| 616 | COPYRIGHT SMS 1983 S/N MADE IN USA |
| 617 | mfg corp |
| 618 | |
| 619 | Serial number A4675 etched in board |
| 620 | |
| 621 | Large chips |
| 622 | P8088 |
| 623 | AY-3-8910 |
| 624 | CDM6116 x2 |
| 625 | P8255A-5 |
| 626 | P8254 |
| 627 | D8255AC-5 |
| 628 | D780C-1 |
| 629 | |
| 630 | 16 Mhz crystal by D780C (U21) |
| 631 | 24 Mhz crystal by P8088 (u53) |
| 632 | |
| 633 | Open sockets at U50 (40 pin), U15 (24 pin), U2 (40 pin), U25 (24 pin) |
| 634 | |
| 635 | Bottom Board |
| 636 | .U17 - 27128 |
| 637 | .U16 - 27128 |
| 638 | .U26 - 2732 - stickered #26 073184 |
| 639 | .U38 - DMPAL10L8NC - 3 blue dots on it - saved in jedec format |
| 640 | .U39 - DMPAL10L8NC - 3 green dots on it - saved in jedec format |
| 641 | .U40 - DMPAL10L8NC - 1 pink dot on it - saved in jedec format |
| 642 | .U110 - DMPAL10L8NC - 2 pink dots on it - saved in jedec format |
| 643 | .U52 - DMPAL10L8NC - not labeled - checksum was 0 |
| 644 | .U32 - DMPAL10L8NC - stickered trivia U32 - couldn't read "device overcurrent" |
| 645 | .U58 - DMPAL10H8NC - 3 brown dots on it - saved in jedec format |
| 646 | .U80 - DMPAL10H8NC - 2 blue dots on it - saved in jedec format |
| 647 | .U130 - DMPAL10H8NC - 3 pink dots on it - saved in jedec format |
| 648 | .U129 - DMPAL10H8NC - pink-green-pink dots on it - saved in jedec format |
| 649 | .U128 - DMPAL10H8NC - blue-brown-blue dots on it - saved in jedec format |
| 650 | .U145 - DMPAL14H4NC - brown dot on it - saved in jedec format |
| 651 | .U144 - DMPAL14H4NC - brown dot on it - saved in jedec format |
| 652 | .U143 - DMPAL14H4NC - brown dot on it - saved in jedec format |
| 653 | .U142 - DMPAL14H4NC - brown dot on it - saved in jedec format |
| 654 | .U141 - DMPAL14H4NC - brown dot on it - saved in jedec format |
| 655 | .U140 - DMPAL14H4NC - brown dot on it - saved in jedec format |
| 656 | U.145-U.140 had the same checksum |
| 657 | |
| 658 | .U94 - DMPAL14H4NC - 2 green dots on it - saved in jedec format |
| 659 | .U109 - DMPAL14H4NC - 2 brown dots on it - saved in jedec format |
| 660 | |
| 661 | Daughter Board |
| 662 | Etched in copper on top... |
| 663 | SMS MFG M?I 2685 ? = a cage looking symbol |
| 664 | |
| 665 | Read starting at top row, closest to connector to main board |
| 666 | .D0 - DMPAL10L8NC - 1 orange dot on it - saved in jedec format |
| 667 | .D1 - 27128 - couldn't read sticker - |
| 668 | .D2 - 27128 - couldn't read sticker - |
| 669 | .D3 - 27128 - couldn't read sticker - |
| 670 | .D4 - 27128 - stickered 4 MOVIES .1 ?2485 ? = can't read |
| 671 | .D5 - 27128 - stickered 3 ANYTHING .4 042485 |
| 672 | .D6 - 27128 - stickered 2 ANYTHING .3 042485 |
| 673 | .D7 - 27128 - stickered 1 ANYTHING .2 042485 |
| 674 | .D8 - 27128 - stickered 0 ANYTHING .1 042485 |
| 675 | |
| 676 | 2nd row - left to right |
| 677 | .D9 - 27128 - stickered 12 MUSIC .1 042485 |
| 678 | .D10 - 27128 - stickered 13 MUSIC .1 042485 |
| 679 | .D11 - 27128 - stickered 14 MUSIC .1 042485 |
| 680 | .D12 - 27128 - stickered 15 MUSIC .1 042485 |
| 681 | |
| 682 | 3rd row - left to right |
| 683 | .D13 - 27128 - stickered 11 SPORTS .4 042485 |
| 684 | .D14 - 27128 - stickered 10 SPORTS .3 042485 |
| 685 | .D15 - 27128 - stickered 9 SPORTS .2 042485 |
| 686 | .D16 - 27128 - stickered 8 SPORTS .1 042485 |
| 687 | .D17 - DMPAL10L8NC - 1 white dot on it - saved in jedec format |
| 688 | |
| 689 | |
| 690 | ROM text showed... |
| 691 | COPYRIGHT 1984 SMS MFG CORP |
| 692 | TRIVIA HANGUP |
| 693 | SMART ALECS |
| 694 | */ |
| 695 | |
| 696 | ROM_START( trvhang ) |
| 697 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 698 | ROM_LOAD( "sms.17", 0xf8000, 0x04000, CRC(af6ef980) SHA1(f0f98d1f91de718a63b87c5f1c6ee3bd854d1c1b) ) |
| 699 | ROM_LOAD( "sms.16", 0xfc000, 0x04000, CRC(b827d883) SHA1(68d6c2127ef9e537471c414ca7baa89c63997bbb) ) |
| 700 | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
| 701 | |
| 702 | ROM_REGION( 0x10000, "soundcpu", 0 ) |
| 703 | ROM_LOAD( "sms.26", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
| 704 | ROM_RELOAD( 0x1000, 0x1000 ) |
| 705 | |
| 706 | ROM_REGION( 0x40000, "questions", 0 ) |
| 707 | // anything |
| 708 | ROM_LOAD( "0anything1.d8", 0x00000, 0x4000, CRC(80096807) SHA1(a38b1b13365577c0c588b8e196ee1a6c774ce3a3) ) |
| 709 | ROM_LOAD( "1anything2.d7", 0x04000, 0x4000, CRC(d09946b6) SHA1(b5827945ce380f09ee758c4296f06f00ef3cbd0a) ) |
| 710 | ROM_LOAD( "2anything3.d6", 0x08000, 0x4000, CRC(5b12fd09) SHA1(15804480e65bfb3207d24a1679bb78d1ad491d70) ) |
| 711 | ROM_LOAD( "3anything4.d5", 0x0c000, 0x4000, CRC(f1a37ed7) SHA1(687a610319b21091cbc53232b47eb99dabe12f02) ) |
| 712 | // movies |
| 713 | ROM_LOAD( "4movies1.d4", 0x10000, 0x4000, CRC(76993bd1) SHA1(b9a97ab7c6d35f5fdda04342e0b3773618deedef) ) |
| 714 | ROM_LOAD( "5movies1.d3", 0x14000, 0x4000, CRC(8c5f62ef) SHA1(34ac235358a71620a6619dbb16255c363f34df53) ) |
| 715 | ROM_LOAD( "6movies1.d2", 0x18000, 0x4000, CRC(13c9fe08) SHA1(6b7d055621ce578446d320f98f7a4cd095e756b0) ) |
| 716 | ROM_LOAD( "7movies1.d1", 0x1c000, 0x4000, CRC(04f627c0) SHA1(c656b66c60059a1b068c4a7262f07f4c136c34c1) ) |
| 717 | // sports |
| 718 | ROM_LOAD( "8sports1.d16", 0x20000, 0x4000, CRC(b700e7e6) SHA1(42b2c12c6af5f15d909e15ee3e7ca2e13e0142c2) ) |
| 719 | ROM_LOAD( "9sports2.d15", 0x24000, 0x4000, CRC(bec225fe) SHA1(13252894eca30e06354885a21ecad43965cfd3ef) ) |
| 720 | ROM_LOAD( "10sports3.d14", 0x28000, 0x4000, CRC(3bfe9b52) SHA1(0cdd9ec6ed784fab9272d50821994be5b0fd0532) ) |
| 721 | ROM_LOAD( "11sports4.d13", 0x2c000, 0x4000, CRC(9bb8dbad) SHA1(0dd9ed23e6794a86a12906b326e984a2d58cc4c6) ) |
| 722 | // music |
| 723 | ROM_LOAD( "12music1.d9", 0x30000, 0x4000, CRC(c1691ec9) SHA1(95725fa315944c0786e2a32d483703173eb2e730) ) |
| 724 | ROM_LOAD( "13music1.d10", 0x34000, 0x4000, CRC(df0da39f) SHA1(29103dca8b0c1967791e8ddd722153874e16bbda) ) |
| 725 | ROM_LOAD( "14music1.d11", 0x38000, 0x4000, CRC(114b4aa6) SHA1(2621d1042b0774d60be88cc8d62613aa07c12552) ) |
| 726 | ROM_LOAD( "15music1.d12", 0x3c000, 0x4000, CRC(59a40e4f) SHA1(e726ce624c76ee527edc51c1e5757b7d433dcf8c) ) |
| 727 | |
| 728 | |
| 729 | ROM_REGION( 0x1000, "plds", 0 ) |
| 730 | ROM_LOAD( "dmpal10l8nc.d17.bin", 0x000000, 0x0001f3, CRC(e9eb78e7) SHA1(688e854e82c230d367c211f611e9a8298ab64399) ) |
| 731 | ROM_LOAD( "dmpal10l8nc.38.bin", 0x000000, 0x0001f3, CRC(be17ebde) SHA1(22c05eeafeadc8f55b55951c2060fb4873146cba) ) |
| 732 | ROM_LOAD( "dmpal10l8nc.39.bin", 0x000000, 0x0001f3, CRC(3299e803) SHA1(12f361d27497f6347ee26838fa9f675f6aac12c2) ) |
| 733 | ROM_LOAD( "dmpal10l8nc.40.bin", 0x000000, 0x0001f3, CRC(22881f1c) SHA1(646fdc4e4a423e1432b448140f2d92dd2304ff71) ) |
| 734 | ROM_LOAD( "dmpal10l8nc.52.bin", 0x000000, 0x0001f3, CRC(2e43ba5f) SHA1(8b87ee8ce21f5241260f2d0de4878096d8ecb5f5) ) |
| 735 | ROM_LOAD( "dmpal10h8nc.58.bin", 0x000000, 0x0001f3, CRC(020b5108) SHA1(f3221fbce40a9d6fdc2eece606e4eded3faf5f02) ) |
| 736 | ROM_LOAD( "dmpal10h8nc.80.bin", 0x000000, 0x0001f3, CRC(66e21ee5) SHA1(31c29a250f50dcdf531810e59068adfea4d2d9a3) ) |
| 737 | ROM_LOAD( "dmpal14h4nc.94.bin", 0x000000, 0x000283, CRC(c5fda3df) SHA1(4fdd597d25ed893cb005165b68e48567fbd2b1ce) ) |
| 738 | ROM_LOAD( "dmpal14h4nc.109.bin", 0x000000, 0x000283, CRC(15d05aaa) SHA1(57500b4825a1da943d79ee7df657efed56c4320e) ) |
| 739 | ROM_LOAD( "dmpal10l8nc.110.bin", 0x000000, 0x0001f3, CRC(6263b1e1) SHA1(6c8d92bcbbc2d196b5ac7765888eaf171671d651) ) |
| 740 | ROM_LOAD( "dmpal10h8nc.128.bin", 0x000000, 0x0001f3, CRC(fbaea5b0) SHA1(85a757485c26304d4ce718fd954aa4736cdc4752) ) |
| 741 | ROM_LOAD( "dmpal10h8nc.129.bin", 0x000000, 0x0001f3, CRC(4722fb3b) SHA1(adc0a3c0721acaa5b447c7aee771703caab80dd9) ) |
| 742 | ROM_LOAD( "dmpal10h8nc.130.bin", 0x000000, 0x0001f3, CRC(d3f0a6a5) SHA1(5e08b6104dfd3e463031b2b12619589a8f7b453c) ) |
| 743 | ROM_LOAD( "dmpal14h4nc.140.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
| 744 | ROM_LOAD( "dmpal14h4nc.141.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
| 745 | ROM_LOAD( "dmpal14h4nc.142.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
| 746 | ROM_LOAD( "dmpal14h4nc.143.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
| 747 | ROM_LOAD( "dmpal14h4nc.144.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
| 748 | ROM_LOAD( "dmpal14h4nc.145.bin", 0x000000, 0x000283, CRC(031f662d) SHA1(6fa072db3203cdb95262d7778a6ee8310423b3df) ) |
| 749 | ROM_LOAD( "dmpal10l8nc.d0.bin", 0x000000, 0x0001f3, CRC(b1c221a7) SHA1(f63a022199a2d7b52c4c4827b170d49aae85e4e3) ) |
| 750 | ROM_END |
| 751 | |
| 752 | /* |
| 753 | Etched in copper on back COPYRIGHT SMS 1983 |
| 754 | mfg corp. S/N A-2043 |
| 755 | A-2043 was hand etched |
| 756 | |
| 757 | 16MHz Crystal |
| 758 | 24MHz Crystal |
| 759 | D780C |
| 760 | D8255AC-5 |
| 761 | P8255A-5 |
| 762 | P8088 |
| 763 | AY-3-8910 |
| 764 | 6116 x2 |
| 765 | P8254 |
| 766 | |
| 767 | Empty 40 pin socket at U2 and U50 |
| 768 | Empty 24 pin socket at U25 |
| 769 | Empty 28 pin socket at U18 |
| 770 | |
| 771 | |
| 772 | |
| 773 | .u16 28128 stickered U-16 |
| 774 | TRIVIA -2 |
| 775 | 011586 |
| 776 | |
| 777 | .u17 28128 stickered U-16 |
| 778 | TRIVIA -2 |
| 779 | 011586 |
| 780 | |
| 781 | .u19 28128 stickered U-16 |
| 782 | TRIVIA DLXE |
| 783 | 021281 |
| 784 | |
| 785 | .u26 2732 stickered #26 |
| 786 | 073184 |
| 787 | |
| 788 | |
| 789 | the pal's had colored dots on them |
| 790 | saved in JEDEC format |
| 791 | .32 dmpal10l8nc red red blue |
| 792 | .52 dmpal10l8nc red red white |
| 793 | .38 dmpal10l8nc blue blue blue |
| 794 | .39 dmpal10l8nc green green green |
| 795 | .40 dmpal10l8nc pink |
| 796 | .110 dmpal10l8nc pink pink |
| 797 | .58 dmpal10h8nc brown brown brown |
| 798 | .80 dmpal10h8nc blue blue |
| 799 | .128 dmpal10h8nc blue brown blue |
| 800 | .129 dmpal10h8nc pink green pink |
| 801 | .130 dmpal10h8nc pink scratched off |
| 802 | .94 dmpal14h4nc green green |
| 803 | .109 dmpal14h4nc brown brown |
| 804 | .140 dmpal14h4nc brown |
| 805 | .141 dmpal14h4nc brown |
| 806 | .142 dmpal14h4nc brown |
| 807 | .143 dmpal14h4nc brown |
| 808 | .144 dmpal14h4nc brown |
| 809 | .145 dmpal14h4nc brown |
| 810 | */ |
| 811 | |
| 812 | ROM_START( trvhanga ) |
| 813 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 814 | ROM_LOAD( "sms2.u17", 0xf8000, 0x04000, CRC(e5c880a1) SHA1(da777c4e126da2f03a663f8c8f565bda8520c883) ) |
| 815 | ROM_LOAD( "sms2.16", 0xfc000, 0x04000, CRC(85484aee) SHA1(7c282bd208bd644d5d57ac399942c95211e87bf4) ) |
| 816 | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
| 817 | |
| 818 | ROM_REGION( 0x10000, "soundcpu", 0 ) |
| 819 | ROM_LOAD( "sms2.26", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
| 820 | ROM_RELOAD( 0x1000, 0x1000 ) |
| 821 | |
| 822 | ROM_REGION( 0x4000, "user", 0 ) |
| 823 | ROM_LOAD( "sms2.u19", 0x00000, 0x04000, CRC(5e10059b) SHA1(f0eb490d41009ffe1c80216f699557480110954b) ) // unknown rom (leftover from conversion?) |
| 824 | |
| 825 | ROM_REGION( 0x40000, "questions", 0 ) |
| 826 | // sex |
| 827 | ROM_LOAD( "0sex1.d8", 0x00000, 0x4000, NO_DUMP ) |
| 828 | ROM_LOAD( "1sex2.d7", 0x04000, 0x4000, NO_DUMP ) |
| 829 | ROM_LOAD( "2sex3.d6", 0x08000, 0x4000, NO_DUMP ) |
| 830 | ROM_LOAD( "3sex4.d5", 0x0c000, 0x4000, NO_DUMP ) |
| 831 | // movies |
| 832 | ROM_LOAD( "4movies1.d4", 0x10000, 0x4000, NO_DUMP ) |
| 833 | ROM_LOAD( "5movies1.d3", 0x14000, 0x4000, NO_DUMP ) |
| 834 | ROM_LOAD( "6movies1.d2", 0x18000, 0x4000, NO_DUMP ) |
| 835 | ROM_LOAD( "7movies1.d1", 0x1c000, 0x4000, NO_DUMP ) |
| 836 | // sports |
| 837 | ROM_LOAD( "8sports1.d16", 0x20000, 0x4000, NO_DUMP ) |
| 838 | ROM_LOAD( "9sports2.d15", 0x24000, 0x4000, NO_DUMP ) |
| 839 | ROM_LOAD( "10sports3.d14", 0x28000, 0x4000, NO_DUMP ) |
| 840 | ROM_LOAD( "11sports4.d13", 0x2c000, 0x4000, NO_DUMP ) |
| 841 | // music |
| 842 | ROM_LOAD( "12music1.d9", 0x30000, 0x4000, NO_DUMP ) |
| 843 | ROM_LOAD( "13music1.d10", 0x34000, 0x4000, NO_DUMP ) |
| 844 | ROM_LOAD( "14music1.d11", 0x38000, 0x4000, NO_DUMP ) |
| 845 | ROM_LOAD( "15music1.d12", 0x3c000, 0x4000, NO_DUMP ) |
| 846 | |
| 847 | ROM_REGION( 0x1000, "plds", 0 ) |
| 848 | ROM_LOAD( "dmpal10l8nc.32.bin", 0x000000, 0x00002c, CRC(558ca47e) SHA1(4612e5dd9832bcbf6d7b3bce803f92ea2ee03b98) ) |
| 849 | ROM_LOAD( "dmpal10l8nc.38.bin", 0x000000, 0x00002c, CRC(84c39631) SHA1(8aa28be5418dd119883a9d400f23927e0cf8d7b4) ) |
| 850 | ROM_LOAD( "dmpal10l8nc.39.bin", 0x000000, 0x00002c, CRC(ab950780) SHA1(73e8eb8050ca337e58b34513a9cf522e4fb43b5d) ) |
| 851 | ROM_LOAD( "dmpal10l8nc.40.bin", 0x000000, 0x00002c, CRC(a2de5f30) SHA1(ea2293f6b979aa16ccf1c8d6c88ea484ef45ea6b) ) |
| 852 | ROM_LOAD( "dmpal10l8nc.52.bin", 0x000000, 0x00002c, CRC(5d09ff76) SHA1(0b977db9dc465a36975b935d3585f404b86de293) ) |
| 853 | ROM_LOAD( "dmpal10h8nc.58.bin", 0x000000, 0x00002c, CRC(3df46d79) SHA1(606040b69908635ab5166193c53557ffa524c9d3) ) |
| 854 | ROM_LOAD( "dmpal10h8nc.80.bin", 0x000000, 0x00002c, CRC(7bd4fbf5) SHA1(a2951bcf6af2a6d0211070c2dc49b8c1e9b78b9b) ) |
| 855 | ROM_LOAD( "dmpal14h4nc.94.bin", 0x000000, 0x00003c, CRC(43a4e3f1) SHA1(afc530cc52ac04abce33b7c61e256da1cb30eb23) ) |
| 856 | ROM_LOAD( "dmpal14h4nc.109.bin", 0x000000, 0x00003c, CRC(98542c78) SHA1(282d06701da1130d9ca0fcbd81ea89f1462693e2) ) |
| 857 | ROM_LOAD( "dmpal10l8nc.110.bin", 0x000000, 0x00002c, CRC(f59c1868) SHA1(cc75ce71057360e62ea3ea929f241dc6105f1362) ) |
| 858 | ROM_LOAD( "dmpal10h8nc.128.bin", 0x000000, 0x00002c, CRC(083cd773) SHA1(70a49a53d549b90c7a036f4afaf92759bf8e20c9) ) |
| 859 | ROM_LOAD( "dmpal10h8nc.129.bin", 0x000000, 0x00002c, CRC(c5841a1a) SHA1(f2929321b041114f771e9fba4cbe2fb36c26a053) ) |
| 860 | ROM_LOAD( "dmpal10h8nc.130.bin", 0x000000, 0x00002c, CRC(a4051372) SHA1(23b200f3950e583cc40b3cc82d62e274294e5593) ) |
| 861 | ROM_LOAD( "dmpal14h4nc.140.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
| 862 | ROM_LOAD( "dmpal14h4nc.141.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
| 863 | ROM_LOAD( "dmpal14h4nc.142.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
| 864 | ROM_LOAD( "dmpal14h4nc.143.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
| 865 | ROM_LOAD( "dmpal14h4nc.144.bin", 0x000000, 0x00003c, CRC(c921d183) SHA1(db7be592058456e83a8603cf839f5664ea0a0f76) ) |
| 866 | ROM_LOAD( "dmpal14h4nc.145.bin", 0x000000, 0x00003c, CRC(ab2af8de) SHA1(775495d47435c23eecf3defba15f5ca890836354) ) |
| 867 | ROM_END |
| 868 | |
| 869 | ROM_START( sureshot ) |
| 870 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 871 | ROM_LOAD( "u-19 hldly s.shot 020687.u19.a12.bin", 0xf8000, 0x02000, CRC(028bdb61) SHA1(e39c27cc6dec12de5a5e60d544f35448e49baee1) ) |
| 872 | ROM_LOAD( "u-18 hldly s.shot 020687.u18.a11.bin", 0xfa000, 0x02000, CRC(5aa083f1) SHA1(3eed1a7421e7abcc41a1bddf655b1e777d843898) ) |
| 873 | ROM_LOAD( "u-17 hldly s.shot 020687.u17.a10.bin", 0xfc000, 0x02000, CRC(a37432d6) SHA1(398462642ab0b34efdb6ff4756758057b9833e10) ) |
| 874 | ROM_LOAD( "u-16 hldly s.shot 020687.u16.a9.bin", 0xfe000, 0x02000, CRC(d7f756d5) SHA1(5c7f62b02b4d4836881c3da0604448c34ede674b) ) |
| 875 | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
| 876 | |
| 877 | ROM_REGION( 0x10000, "soundcpu", 0 ) |
| 878 | ROM_LOAD( "26 404 073184.u26.b5.bin", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
| 879 | ROM_RELOAD( 0x1000, 0x1000 ) |
| 880 | ROM_END |
| 881 | |
| 882 | /* |
| 883 | Etched in copper on back COPYRIGHT SMS 1983 |
| 884 | mfg corp |
| 885 | S/N A-872 A-872 was etched |
| 886 | MADE IN USA |
| 887 | |
| 888 | Etched in copper on front REV 03 |
| 889 | |
| 890 | Silkscreened on top P/N 1001 |
| 891 | |
| 892 | |
| 893 | .16 2764 handwritten sticker U16 |
| 894 | .17 2764 handwritten sticker U17 |
| 895 | .18 2764 handwritten sticker U18 |
| 896 | .19 2764 handwritten sticker U19 |
| 897 | .26 2732 handwritten sticker #26 |
| 898 | .32 pal10l8 green dot sticker with 32 written on it |
| 899 | .52 pal10l8 blue dot sticker with 52 written on it |
| 900 | .58 pal10l8 3 blue dot stickers with 58 written on one |
| 901 | .40 pal10l8 red dot sticker with 40 written on it |
| 902 | .39 pal10l8 3 green dot stickers with 39 written on one |
| 903 | .38 pal10l8 3 blue dot stickers with 38 written on one |
| 904 | .80 pal10l8 2 blue dot stickers with 80 written on one |
| 905 | .94 pal14h4 2 green dot stickers with 94 written on one - was getting different values for each read |
| 906 | .109 pal14h4 2 brown dot stickers with 109 written on one |
| 907 | .110 pal10l8 2 red dot stickers with 110 written on one |
| 908 | .128 pal10h8 1 blue, 1 brown, and another blue dot sticker with 128 written on the first blue one |
| 909 | .129 pal10h8 1 green and 1 red dot sticker |
| 910 | .130 pal10h8 3 red dot stickers with 130 written on one |
| 911 | .140 pal14h4 1 brown sticker with 140 written on it |
| 912 | .141 pal14h4 1 brown sticker with 141 written on it |
| 913 | .142 pal14h4 1 brown sticker with 142 written on it |
| 914 | .143 pal14h4 1 brown sticker with 143 written on it |
| 915 | .144 pal14h4 1 brown sticker with 144 written on it |
| 916 | .145 pal14h4 1 brown sticker with 145 written on it |
| 917 | */ |
| 918 | |
| 919 | ROM_START( secondch ) |
| 920 | ROM_REGION( 0x100000, "maincpu", 0 ) |
| 921 | ROM_LOAD( "u19.19", 0xf8000, 0x02000, CRC(5ab3d30f) SHA1(16120c6d6a9d494c12f6609e5cb1311a4b40672b) ) |
| 922 | ROM_LOAD( "u18.18", 0xfa000, 0x02000, CRC(941a1401) SHA1(92934d40bb256e18b996582c1af253d06732462f) ) |
| 923 | ROM_LOAD( "u17.17", 0xfc000, 0x02000, CRC(88717e9f) SHA1(01b78f3ddd78e74e799d5f8ffe2f3cbcf5e6b7a2) ) |
| 924 | ROM_LOAD( "u16.16", 0xfe000, 0x02000, CRC(6c9a0224) SHA1(01152024b48461c3b9ac63a9265129dabacd0462) ) |
| 925 | ROM_COPY( "maincpu", 0xf8000, 0x08000, 0x8000 ) |
| 926 | |
| 927 | ROM_REGION( 0x10000, "soundcpu", 0 ) |
| 928 | ROM_LOAD( "#26.26", 0x0000, 0x1000, CRC(e04bb922) SHA1(1df90720f11a5b736273f43272d7727b3020f848) ) |
| 929 | ROM_RELOAD( 0x1000, 0x1000 ) |
| 930 | ROM_END |
| 931 | |
| 932 | GAME( 1984, trvhang, 0, sms, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Trivia Hangup (question set 1)", GAME_SUPPORTS_SAVE ) /* Version Trivia-1-050185 */ |
| 933 | GAME( 1984, trvhanga, 0, sms, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Trivia Hangup (question set 2)", GAME_NOT_WORKING ) /* Version Trivia-2-011586 */ |
| 934 | GAME( 1985, sureshot, 0, sureshot, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Sure Shot", GAME_SUPPORTS_SAVE ) |
| 935 | GAME( 1985, secondch, 0, sureshot, sms, driver_device, 0, ROT0, "SMS Manufacturing Corp.", "Second Chance", GAME_SUPPORTS_SAVE ) |