~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/drivers/quizshow.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 
 
3
  Atari Quiz Show
 
4
  released under their Kee Games label, 04/1976
 
5
 
 
6
  S2650 CPU, 512 bytes RAM, B&W tilemapped video. It uses a tape player to
 
7
  stream questions, totaling 1000, divided into 4 categories.
 
8
 
 
9
TODO:
 
10
- preserve tape and hook it up, the game is not playable without it
 
11
- is timing accurate?
 
12
- correct dump for gfx roms
 
13
 
 
14
***************************************************************************/
 
15
 
 
16
#include "emu.h"
 
17
#include "cpu/s2650/s2650.h"
 
18
#include "sound/dac.h"
 
19
 
 
20
#include "quizshow.lh"
 
21
 
 
22
 
 
23
#define MASTER_CLOCK    XTAL_12_096MHz
 
24
#define PIXEL_CLOCK             (MASTER_CLOCK/2)
 
25
 
 
26
#define HTOTAL                  ((32+8+4+1) * 8)
 
27
#define HBEND                   (0)
 
28
#define HBSTART                 (256)
 
29
 
 
30
#define VTOTAL                  (256+8+4)
 
31
#define VBEND                   (0)
 
32
#define VBSTART                 (240)
 
33
 
 
34
 
 
35
class quizshow_state : public driver_device
 
36
{
 
37
public:
 
38
        quizshow_state(const machine_config &mconfig, device_type type, const char *tag)
 
39
                : driver_device(mconfig, type, tag) ,
 
40
                m_main_ram(*this, "main_ram"),
 
41
                m_fo_state(*this, "fo_state"){ }
 
42
 
 
43
        tilemap_t *m_tilemap;
 
44
        required_shared_ptr<UINT8> m_main_ram;
 
45
        required_shared_ptr<UINT8> m_fo_state;
 
46
        UINT32 m_clocks;
 
47
        int m_blink_state;
 
48
        int m_category_enable;
 
49
        int m_tape_head_pos;
 
50
        DECLARE_WRITE8_MEMBER(quizshow_lamps1_w);
 
51
        DECLARE_WRITE8_MEMBER(quizshow_lamps2_w);
 
52
        DECLARE_WRITE8_MEMBER(quizshow_lamps3_w);
 
53
        DECLARE_WRITE8_MEMBER(quizshow_tape_control_w);
 
54
        DECLARE_WRITE8_MEMBER(quizshow_audio_w);
 
55
        DECLARE_WRITE8_MEMBER(quizshow_video_disable_w);
 
56
        DECLARE_READ8_MEMBER(quizshow_timing_r);
 
57
        DECLARE_READ8_MEMBER(quizshow_tape_signal_r);
 
58
        DECLARE_WRITE8_MEMBER(quizshow_main_ram_w);
 
59
        DECLARE_CUSTOM_INPUT_MEMBER(quizshow_tape_headpos_r);
 
60
        DECLARE_INPUT_CHANGED_MEMBER(quizshow_category_select);
 
61
};
 
62
 
 
63
 
 
64
/***************************************************************************
 
65
 
 
66
  Video
 
67
 
 
68
***************************************************************************/
 
69
 
 
70
PALETTE_INIT( quizshow )
 
71
{
 
72
        machine.colortable = colortable_alloc(machine, 2);
 
73
 
 
74
        colortable_palette_set_color(machine.colortable, 0, RGB_BLACK);
 
75
        colortable_palette_set_color(machine.colortable, 1, RGB_WHITE);
 
76
 
 
77
        // normal, blink/off, invert, blink+invert
 
78
        const int lut_pal[16] = {
 
79
                0, 0, 1, 0,
 
80
                0, 0, 0, 0,
 
81
                1, 0, 0, 0,
 
82
                1, 0, 1, 0
 
83
        };
 
84
 
 
85
        for (int i = 0; i < 16 ; i++)
 
86
                colortable_entry_set_value(machine.colortable, i, lut_pal[i]);
 
87
}
 
88
 
 
89
static TILE_GET_INFO( get_tile_info )
 
90
{
 
91
        quizshow_state *state = machine.driver_data<quizshow_state>();
 
92
        UINT8 code = state->m_main_ram[tile_index];
 
93
 
 
94
        // d6: blink, d7: invert
 
95
        UINT8 color = (code & (state->m_blink_state | 0x80)) >> 6;
 
96
 
 
97
        SET_TILE_INFO(0, code & 0x3f, color, 0);
 
98
}
 
99
 
 
100
VIDEO_START( quizshow )
 
101
{
 
102
        quizshow_state *state = machine.driver_data<quizshow_state>();
 
103
        state->m_tilemap = tilemap_create(machine, get_tile_info, tilemap_scan_rows, 8, 16, 32, 16);
 
104
}
 
105
 
 
106
SCREEN_UPDATE_IND16( quizshow )
 
107
{
 
108
        quizshow_state *state = screen.machine().driver_data<quizshow_state>();
 
109
        state->m_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
 
110
        return 0;
 
111
}
 
112
 
 
113
 
 
114
/***************************************************************************
 
115
 
 
116
  I/O
 
117
 
 
118
***************************************************************************/
 
119
 
 
120
WRITE8_MEMBER(quizshow_state::quizshow_lamps1_w)
 
121
{
 
122
        // d0-d3: P1 answer button lamps
 
123
        for (int i = 0; i < 4; i++)
 
124
                output_set_lamp_value(i, data >> i & 1);
 
125
 
 
126
        // d4-d7: N/C
 
127
}
 
128
 
 
129
WRITE8_MEMBER(quizshow_state::quizshow_lamps2_w)
 
130
{
 
131
        // d0-d3: P2 answer button lamps
 
132
        for (int i = 0; i < 4; i++)
 
133
                output_set_lamp_value(i + 4, data >> i & 1);
 
134
 
 
135
        // d4-d7: N/C
 
136
}
 
137
 
 
138
WRITE8_MEMBER(quizshow_state::quizshow_lamps3_w)
 
139
{
 
140
        // d0-d1: start button lamps
 
141
        output_set_lamp_value(8, data >> 0 & 1);
 
142
        output_set_lamp_value(9, data >> 1 & 1);
 
143
 
 
144
        // d2-d3: unused? (chip is shared with quizshow_tape_control_w)
 
145
        // d4-d7: N/C
 
146
}
 
147
 
 
148
WRITE8_MEMBER(quizshow_state::quizshow_tape_control_w)
 
149
{
 
150
 
 
151
        // d2: enable user category select (changes tape head position)
 
152
        output_set_lamp_value(10, data >> 2 & 1);
 
153
        m_category_enable = (data & 0xc) == 0xc;
 
154
 
 
155
        // d3: tape motor
 
156
        // TODO
 
157
 
 
158
        // d0-d1: unused? (chip is shared with quizshow_lamps3_w)
 
159
        // d4-d7: N/C
 
160
}
 
161
 
 
162
WRITE8_MEMBER(quizshow_state::quizshow_audio_w)
 
163
{
 
164
        // d1: audio out
 
165
        dac_signed_w(machine().device("dac"), 0, (data & 2) ? 0x7f : 0);
 
166
 
 
167
        // d0, d2-d7: N/C
 
168
}
 
169
 
 
170
WRITE8_MEMBER(quizshow_state::quizshow_video_disable_w)
 
171
{
 
172
        // d0: video disable (looked glitchy when I implemented it, maybe there's more to it)
 
173
        // d1-d7: N/C
 
174
}
 
175
 
 
176
READ8_MEMBER(quizshow_state::quizshow_timing_r)
 
177
{
 
178
        UINT8 ret = 0x80;
 
179
 
 
180
        // d0-d3: 1R-8R (16-line counter)
 
181
        ret |= m_clocks >> 1 & 0xf;
 
182
 
 
183
        // d4: 8VAC?, use 8V instead
 
184
        ret |= m_clocks << 4 & 0x10;
 
185
 
 
186
        // d5-d6: 4F-8F
 
187
        ret |= m_clocks >> 2 & 0x60;
 
188
 
 
189
        // d7: display busy/idle, during in-between tilerows(?) and blanking
 
190
        if (machine().primary_screen->vpos() >= VBSTART || (machine().primary_screen->vpos() + 4) & 8)
 
191
                ret &= 0x7f;
 
192
 
 
193
        return ret;
 
194
}
 
195
 
 
196
READ8_MEMBER(quizshow_state::quizshow_tape_signal_r)
 
197
{
 
198
        // TODO (for now, hold INS to fastforward and it'll show garbage questions where D is always(?) the right answer)
 
199
        return machine().rand() & 0x80;
 
200
}
 
201
 
 
202
WRITE8_MEMBER(quizshow_state::quizshow_main_ram_w)
 
203
{
 
204
        m_main_ram[offset]=data;
 
205
        m_tilemap->mark_tile_dirty(offset);
 
206
}
 
207
 
 
208
 
 
209
static ADDRESS_MAP_START( quizshow_mem_map, AS_PROGRAM, 8, quizshow_state )
 
210
        ADDRESS_MAP_GLOBAL_MASK(0x7fff)
 
211
        AM_RANGE(0x0000, 0x0bff) AM_ROM
 
212
        AM_RANGE(0x1802, 0x1802) AM_WRITE(quizshow_audio_w)
 
213
        AM_RANGE(0x1804, 0x1804) AM_WRITE(quizshow_lamps1_w)
 
214
        AM_RANGE(0x1808, 0x1808) AM_WRITE(quizshow_lamps2_w)
 
215
        AM_RANGE(0x1810, 0x1810) AM_WRITE(quizshow_lamps3_w)
 
216
        AM_RANGE(0x1820, 0x1820) AM_WRITE(quizshow_tape_control_w)
 
217
        AM_RANGE(0x1840, 0x1840) AM_WRITE(quizshow_video_disable_w)
 
218
        AM_RANGE(0x1881, 0x1881) AM_READ_PORT("IN0")
 
219
        AM_RANGE(0x1882, 0x1882) AM_READ_PORT("IN1")
 
220
        AM_RANGE(0x1884, 0x1884) AM_READ_PORT("IN2")
 
221
        AM_RANGE(0x1888, 0x1888) AM_READ_PORT("IN3")
 
222
        AM_RANGE(0x1900, 0x1900) AM_READ(quizshow_timing_r)
 
223
        AM_RANGE(0x1e00, 0x1fff) AM_RAM_WRITE(quizshow_main_ram_w) AM_SHARE("main_ram")
 
224
ADDRESS_MAP_END
 
225
 
 
226
static ADDRESS_MAP_START( quizshow_io_map, AS_IO, 8, quizshow_state )
 
227
        ADDRESS_MAP_UNMAP_HIGH
 
228
//  AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_NOP // unused
 
229
//  AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_NOP // unused
 
230
        AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(quizshow_tape_signal_r)
 
231
        AM_RANGE(S2650_FO_PORT, S2650_FO_PORT) AM_RAM AM_SHARE("fo_state")
 
232
ADDRESS_MAP_END
 
233
 
 
234
 
 
235
/***************************************************************************
 
236
 
 
237
  Inputs
 
238
 
 
239
***************************************************************************/
 
240
 
 
241
CUSTOM_INPUT_MEMBER(quizshow_state::quizshow_tape_headpos_r)
 
242
{
 
243
        return 1 << m_tape_head_pos;
 
244
}
 
245
 
 
246
INPUT_CHANGED_MEMBER(quizshow_state::quizshow_category_select)
 
247
{
 
248
        if (newval)
 
249
        {
 
250
                if (m_category_enable)
 
251
                        m_tape_head_pos = (m_tape_head_pos + 1) & 3;
 
252
        }
 
253
}
 
254
 
 
255
static INPUT_PORTS_START( quizshow )
 
256
        PORT_START("IN0") // ADR strobe 0
 
257
        PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, quizshow_state,quizshow_tape_headpos_r, NULL)
 
258
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
 
259
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
 
260
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 )
 
261
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 )
 
262
 
 
263
        PORT_START("IN1") // ADR strobe 1
 
264
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Answer A")
 
265
        PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Answer B")
 
266
        PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Answer C")
 
267
        PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Answer D")
 
268
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Answer A") PORT_PLAYER(2)
 
269
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Answer B") PORT_PLAYER(2)
 
270
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Answer C") PORT_PLAYER(2)
 
271
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Answer D") PORT_PLAYER(2)
 
272
 
 
273
        PORT_START("IN2") // ADR strobe 2
 
274
        PORT_DIPNAME( 0x0f, 0x05, "Game Duration" )                     PORT_DIPLOCATION("SW3:4,3,2,1")
 
275
        PORT_DIPSETTING( 0x00, "50 sec. / 5 questions" )
 
276
        PORT_DIPSETTING( 0x01, "60 sec. / 6 questions" )
 
277
        PORT_DIPSETTING( 0x02, "70 sec. / 7 questions" )
 
278
        PORT_DIPSETTING( 0x03, "80 sec. / 8 questions" )
 
279
        PORT_DIPSETTING( 0x04, "90 sec. / 9 questions" )
 
280
        PORT_DIPSETTING( 0x05, "100 sec. / 10 questions" )
 
281
        PORT_DIPSETTING( 0x06, "110 sec. / 11 questions" )
 
282
        PORT_DIPSETTING( 0x07, "120 sec. / 12 questions" )
 
283
        PORT_DIPSETTING( 0x08, "130 sec. / 13 questions" )
 
284
        PORT_DIPSETTING( 0x09, "140 sec. / 14 questions" )
 
285
        PORT_DIPSETTING( 0x0a, "150 sec. / 15 questions" ) // not listed in manual
 
286
        PORT_DIPSETTING( 0x0b, "160 sec. / 16 questions" ) // "
 
287
        PORT_DIPSETTING( 0x0c, "170 sec. / 17 questions" ) // "
 
288
        PORT_DIPSETTING( 0x0d, "180 sec. / 18 questions" ) // "
 
289
        PORT_DIPSETTING( 0x0e, "190 sec. / 19 questions" ) // "
 
290
        PORT_DIPSETTING( 0x0f, "200 sec. / 20 questions" ) // "
 
291
 
 
292
        PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) )          PORT_DIPLOCATION("SW1:4")
 
293
        PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
 
294
        PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
 
295
        PORT_DIPNAME( 0x20, 0x00, "Duration Mode" )                     PORT_DIPLOCATION("SW1:3")
 
296
        PORT_DIPSETTING(    0x00, "Question Count" )
 
297
        PORT_DIPSETTING(    0x20, "Timed" )
 
298
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
 
299
        PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // N/C
 
300
 
 
301
        PORT_START("IN3") // ADR strobe 3
 
302
        PORT_DIPNAME( 0x0f, 0x05, "Bonus Questions" )           PORT_DIPLOCATION("SW2:4,3,2,1")
 
303
        PORT_DIPSETTING( 0x00, "0" )
 
304
        PORT_DIPSETTING( 0x01, "1" )
 
305
        PORT_DIPSETTING( 0x02, "2" )
 
306
        PORT_DIPSETTING( 0x03, "3" )
 
307
        PORT_DIPSETTING( 0x04, "4" )
 
308
        PORT_DIPSETTING( 0x05, "5" )
 
309
        PORT_DIPSETTING( 0x06, "6" )
 
310
        PORT_DIPSETTING( 0x07, "7" )
 
311
        PORT_DIPSETTING( 0x08, "8" )
 
312
        PORT_DIPSETTING( 0x09, "9" )
 
313
        PORT_DIPSETTING( 0x0a, "10" ) // not listed in manual
 
314
        PORT_DIPSETTING( 0x0b, "11" ) // "
 
315
        PORT_DIPSETTING( 0x0c, "12" ) // "
 
316
        PORT_DIPSETTING( 0x0d, "13" ) // "
 
317
        PORT_DIPSETTING( 0x0e, "14" ) // "
 
318
        PORT_DIPSETTING( 0x0f, "15" ) // "
 
319
        PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
 
320
 
 
321
        PORT_START("CAT")
 
322
        PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Category Select") PORT_CHANGED_MEMBER(DEVICE_SELF, quizshow_state,quizshow_category_select, NULL)
 
323
 
 
324
INPUT_PORTS_END
 
325
 
 
326
 
 
327
/***************************************************************************
 
328
 
 
329
  Machine Config
 
330
 
 
331
***************************************************************************/
 
332
 
 
333
static const gfx_layout tile_layout =
 
334
{
 
335
        8, 16,
 
336
        RGN_FRAC(1,2),
 
337
        2,
 
338
        { RGN_FRAC(0,2), RGN_FRAC(1,2) },
 
339
        { 0, 1, 2, 3, 4, 5, 6, 7 },
 
340
        {
 
341
                0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
 
342
                8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8,
 
343
        },
 
344
        8*16
 
345
};
 
346
 
 
347
static GFXDECODE_START( quizshow )
 
348
        GFXDECODE_ENTRY( "gfx1", 0, tile_layout, 0, 4 )
 
349
GFXDECODE_END
 
350
 
 
351
 
 
352
static TIMER_DEVICE_CALLBACK( quizshow_clock_timer_cb )
 
353
{
 
354
        quizshow_state *state = timer.machine().driver_data<quizshow_state>();
 
355
        state->m_clocks++;
 
356
 
 
357
        // blink is on 4F and 8F
 
358
        int blink_old = state->m_blink_state;
 
359
        state->m_blink_state = (state->m_clocks >> 2 & state->m_clocks >> 1) & 0x40;
 
360
        if (state->m_blink_state != blink_old)
 
361
                state->m_tilemap->mark_all_dirty();
 
362
}
 
363
 
 
364
static MACHINE_RESET(quizshow)
 
365
{
 
366
        quizshow_state *state = machine.driver_data<quizshow_state>();
 
367
 
 
368
        state->m_category_enable = 0;
 
369
        state->m_tape_head_pos = 0;
 
370
}
 
371
 
 
372
static MACHINE_CONFIG_START( quizshow, quizshow_state )
 
373
        /* basic machine hardware */
 
374
        MCFG_CPU_ADD("maincpu", S2650, MASTER_CLOCK / 16) // divider guessed
 
375
        MCFG_CPU_PROGRAM_MAP(quizshow_mem_map)
 
376
        MCFG_CPU_IO_MAP(quizshow_io_map)
 
377
        MCFG_TIMER_ADD_PERIODIC("clock_timer", quizshow_clock_timer_cb, attotime::from_hz(PIXEL_CLOCK / (HTOTAL * 8))) // 8V
 
378
 
 
379
        /* video hardware */
 
380
        MCFG_SCREEN_ADD("screen", RASTER)
 
381
        MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
 
382
 
 
383
        MCFG_SCREEN_UPDATE_STATIC(quizshow)
 
384
 
 
385
        MCFG_GFXDECODE(quizshow)
 
386
        MCFG_PALETTE_LENGTH(8*2)
 
387
 
 
388
        MCFG_PALETTE_INIT(quizshow)
 
389
        MCFG_VIDEO_START(quizshow)
 
390
        MCFG_MACHINE_RESET(quizshow)
 
391
 
 
392
        /* sound hardware (discrete) */
 
393
        MCFG_SPEAKER_STANDARD_MONO("mono")
 
394
 
 
395
        MCFG_SOUND_ADD("dac", DAC, 0)
 
396
        MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
 
397
MACHINE_CONFIG_END
 
398
 
 
399
 
 
400
/***************************************************************************
 
401
 
 
402
  Game drivers
 
403
 
 
404
***************************************************************************/
 
405
 
 
406
ROM_START( quizshow )
 
407
        ROM_REGION( 0x1000, "maincpu", 0 )
 
408
        ROM_LOAD( "005464-01.a1", 0x00000, 0x0200, CRC(c9da809a) SHA1(0d16e552398069a4389c34cc9fb6dcc89eb05b9b) )
 
409
        ROM_LOAD( "005464-02.c1", 0x00200, 0x0200, CRC(42237134) SHA1(2932d4820f6c9a383cb5a4e504e043e2d479d474) )
 
410
        ROM_LOAD( "005464-03.d1", 0x00400, 0x0200, CRC(0c58fee9) SHA1(c7b081bc4f274a29eb758c8758877b15c9e54d79) )
 
411
        ROM_LOAD( "005464-04.f1", 0x00600, 0x0200, CRC(4c6cffd4) SHA1(c291d0fa140faa78b807af72c677d53c620b3103) )
 
412
        ROM_LOAD( "005464-05.h1", 0x00800, 0x0200, CRC(b8d61b96) SHA1(eb437a5deaf2fc2a9acebbc506321f3151b4eafa) )
 
413
        ROM_LOAD( "005464-06.k1", 0x00a00, 0x0200, CRC(200023b2) SHA1(271d0b2b2f985a6c7b7146869ed00990a52dd653) )
 
414
 
 
415
        ROM_REGION( 0x0800, "gfx1", ROMREGION_ERASEFF )
 
416
 
 
417
        ROM_REGION( 0x0200, "user1", 0 ) // gfx1
 
418
        ROM_LOAD_NIB_HIGH( "005466-01.m2", 0x0000, 0x0200, BAD_DUMP CRC(4f42fdd6) SHA1(f8ea4b582e26cad37b746174cdc9f1c7ae0819c3) ) // not dumped yet, placeholder taken from dominos.zip
 
419
        ROM_LOAD_NIB_LOW ( "005466-02.n2", 0x0000, 0x0200, BAD_DUMP CRC(957dd8df) SHA1(280457392f40cd66eae34d2fcdbd4d2142793402) ) // "
 
420
 
 
421
        ROM_REGION( 0x0020, "proms", 0 )
 
422
        ROM_LOAD( "005465-01.f2", 0x0000, 0x0020, NO_DUMP ) // memory timing
 
423
ROM_END
 
424
 
 
425
 
 
426
static DRIVER_INIT( quizshow )
 
427
{
 
428
        UINT8 *gfxdata = machine.root_device().memregion("user1")->base();
 
429
        UINT8 *dest = machine.root_device().memregion("gfx1")->base();
 
430
 
 
431
        int tile, line;
 
432
 
 
433
        // convert gfx data to 8*16(actually 8*12), and 2bpp for masking inverted colors
 
434
        for (tile = 0; tile < 0x40; tile++)
 
435
        {
 
436
                for (line = 2; line < 14; line ++)
 
437
                {
 
438
                        dest[tile << 4 | line] = 0;
 
439
                        dest[tile << 4 | line | 0x400] = 0;
 
440
 
 
441
                        if (line >= 4 && line < 12)
 
442
                                dest[tile << 4 | line] = gfxdata[tile << 3 | (line - 4)];
 
443
                }
 
444
        }
 
445
 
 
446
        // HACK out a gfxrom glitch, remove it when a good dump is out
 
447
        dest[0x208] = dest[0x209] = 0;
 
448
}
 
449
 
 
450
 
 
451
GAMEL( 1976, quizshow, 0, quizshow, quizshow, quizshow, ROT0, "Atari (Kee Games)", "Quiz Show", GAME_NOT_WORKING, layout_quizshow )