~ubuntu-branches/debian/wheezy/mame/wheezy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Emmanuel Kasper, Félix Arreola Rodríguez, Jordi Mallach
  • Date: 2011-05-11 21:06:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110511210650-jizvh8a6x117y9hr
Tags: 0.142-1
[ Emmanuel Kasper ]
* New upstream release
* Set NOWERROR=1 to allow compiling with gcc-4.6
* Remove fix_powerpc_build.patch, as upstream has taken it in this release
* Add gnome-video-arcade front end as a suggested package

[ Félix Arreola Rodríguez ]
* Add kfreebsd-build.patch to quilt series, to fix build on kfreebsd

[ Jordi Mallach ]
* Remove unneeded and bogus addition of --with-quilt to the dh invocation.
* Add Cesare Falco (long time Ubuntu maintainer) to Uploaders, and wrap
  them into multiple lines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 *
33
33
 *************************************/
34
34
 
35
 
static void update_interrupts(running_machine *machine)
 
35
static void update_interrupts(running_machine &machine)
36
36
{
37
 
        atarig1_state *state = machine->driver_data<atarig1_state>();
38
 
        cputag_set_input_line(machine, "maincpu", 1, state->video_int_state ? ASSERT_LINE : CLEAR_LINE);
39
 
        cputag_set_input_line(machine, "maincpu", 2, state->sound_int_state ? ASSERT_LINE : CLEAR_LINE);
 
37
        atarig1_state *state = machine.driver_data<atarig1_state>();
 
38
        cputag_set_input_line(machine, "maincpu", 1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
 
39
        cputag_set_input_line(machine, "maincpu", 2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
40
40
}
41
41
 
42
42
 
43
43
static MACHINE_START( atarig1 )
44
44
{
45
 
        atarig1_state *state = machine->driver_data<atarig1_state>();
 
45
        atarig1_state *state = machine.driver_data<atarig1_state>();
46
46
        atarigen_init(machine);
47
 
        state_save_register_global(machine, state->which_input);
 
47
        state->save_item(NAME(state->m_which_input));
48
48
}
49
49
 
50
50
 
51
51
static MACHINE_RESET( atarig1 )
52
52
{
53
 
        atarig1_state *state = machine->driver_data<atarig1_state>();
 
53
        atarig1_state *state = machine.driver_data<atarig1_state>();
54
54
 
55
55
        atarigen_eeprom_reset(state);
56
56
        atarigen_slapstic_reset(state);
57
57
        atarigen_interrupt_reset(state, update_interrupts);
58
 
        atarigen_scanline_timer_reset(*machine->primary_screen, atarig1_scanline_update, 8);
 
58
        atarigen_scanline_timer_reset(*machine.primary_screen, atarig1_scanline_update, 8);
59
59
        atarijsa_reset();
60
60
}
61
61
 
70
70
static WRITE16_HANDLER( mo_control_w )
71
71
{
72
72
        if (ACCESSING_BITS_0_7)
73
 
                atarirle_control_w(space->machine, 0, data & 7);
 
73
        {
 
74
                atarig1_state *state = space->machine().driver_data<atarig1_state>();
 
75
                atarirle_control_w(state->m_rle, data & 7);
 
76
        }
74
77
}
75
78
 
76
79
 
77
80
static WRITE16_HANDLER( mo_command_w )
78
81
{
79
 
        atarig1_state *state = space->machine->driver_data<atarig1_state>();
80
 
        COMBINE_DATA(state->mo_command);
81
 
        atarirle_command_w(0, (data == 0 && state->is_pitfight) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
 
82
        atarig1_state *state = space->machine().driver_data<atarig1_state>();
 
83
        COMBINE_DATA(state->m_mo_command);
 
84
        atarirle_command_w(state->m_rle, (data == 0 && state->m_is_pitfight) ? ATARIRLE_COMMAND_CHECKSUM : ATARIRLE_COMMAND_DRAW);
82
85
}
83
86
 
84
87
 
91
94
 
92
95
static READ16_HANDLER( special_port0_r )
93
96
{
94
 
        atarig1_state *state = space->machine->driver_data<atarig1_state>();
95
 
        int temp = input_port_read(space->machine, "IN0");
96
 
        if (state->cpu_to_sound_ready) temp ^= 0x1000;
 
97
        atarig1_state *state = space->machine().driver_data<atarig1_state>();
 
98
        int temp = input_port_read(space->machine(), "IN0");
 
99
        if (state->m_cpu_to_sound_ready) temp ^= 0x1000;
97
100
        temp ^= 0x2000;         /* A2DOK always high for now */
98
101
        return temp;
99
102
}
101
104
 
102
105
static WRITE16_HANDLER( a2d_select_w )
103
106
{
104
 
        atarig1_state *state = space->machine->driver_data<atarig1_state>();
105
 
        state->which_input = offset;
 
107
        atarig1_state *state = space->machine().driver_data<atarig1_state>();
 
108
        state->m_which_input = offset;
106
109
}
107
110
 
108
111
 
109
112
static READ16_HANDLER( a2d_data_r )
110
113
{
111
114
        static const char *const adcnames[] = { "ADC0", "ADC1", "ADC2" };
112
 
        atarig1_state *state = space->machine->driver_data<atarig1_state>();
 
115
        atarig1_state *state = space->machine().driver_data<atarig1_state>();
113
116
 
114
117
        /* Pit Fighter has no A2D, just another input port */
115
 
        if (state->is_pitfight)
116
 
                return input_port_read(space->machine, "ADC0");
 
118
        if (state->m_is_pitfight)
 
119
                return input_port_read(space->machine(), "ADC0");
117
120
 
118
121
        /* otherwise, assume it's hydra */
119
 
        if (state->which_input < 3)
120
 
                return input_port_read(space->machine, adcnames[state->which_input]) << 8;
 
122
        if (state->m_which_input < 3)
 
123
                return input_port_read(space->machine(), adcnames[state->m_which_input]) << 8;
121
124
 
122
125
        return 0;
123
126
}
133
136
INLINE void update_bank(atarig1_state *state, int bank)
134
137
{
135
138
        /* if the bank has changed, copy the memory; Pit Fighter needs this */
136
 
        if (bank != state->bslapstic_bank)
 
139
        if (bank != state->m_bslapstic_bank)
137
140
        {
138
141
                /* bank 0 comes from the copy we made earlier */
139
142
                if (bank == 0)
140
 
                        memcpy(state->bslapstic_base, state->bslapstic_bank0, 0x2000);
 
143
                        memcpy(state->m_bslapstic_base, state->m_bslapstic_bank0, 0x2000);
141
144
                else
142
 
                        memcpy(state->bslapstic_base, &state->bslapstic_base[bank * 0x1000], 0x2000);
 
145
                        memcpy(state->m_bslapstic_base, &state->m_bslapstic_base[bank * 0x1000], 0x2000);
143
146
 
144
147
                /* remember the current bank */
145
 
                state->bslapstic_bank = bank;
 
148
                state->m_bslapstic_bank = bank;
146
149
        }
147
150
}
148
151
 
149
152
 
150
153
static STATE_POSTLOAD( pitfightb_state_postload )
151
154
{
152
 
        atarig1_state *state = machine->driver_data<atarig1_state>();
153
 
        int bank = state->bslapstic_bank;
154
 
        state->bslapstic_bank = -1;
 
155
        atarig1_state *state = machine.driver_data<atarig1_state>();
 
156
        int bank = state->m_bslapstic_bank;
 
157
        state->m_bslapstic_bank = -1;
155
158
        update_bank(state, bank);
156
159
}
157
160
 
158
161
 
159
162
static READ16_HANDLER( pitfightb_cheap_slapstic_r )
160
163
{
161
 
        atarig1_state *state = space->machine->driver_data<atarig1_state>();
162
 
        int result = state->bslapstic_base[offset & 0xfff];
 
164
        atarig1_state *state = space->machine().driver_data<atarig1_state>();
 
165
        int result = state->m_bslapstic_base[offset & 0xfff];
163
166
 
164
167
        /* the cheap replacement slapstic just triggers on the simple banking */
165
168
        /* addresses; a software patch ensure that this is good enough */
166
169
 
167
170
        /* offset 0 primes the chip */
168
171
        if (offset == 0)
169
 
                state->bslapstic_primed = TRUE;
 
172
                state->m_bslapstic_primed = TRUE;
170
173
 
171
174
        /* one of 4 bankswitchers produces the result */
172
 
        else if (state->bslapstic_primed)
 
175
        else if (state->m_bslapstic_primed)
173
176
        {
174
177
                if (offset == 0x42)
175
 
                        update_bank(state, 0), state->bslapstic_primed = FALSE;
 
178
                        update_bank(state, 0), state->m_bslapstic_primed = FALSE;
176
179
                else if (offset == 0x52)
177
 
                        update_bank(state, 1), state->bslapstic_primed = FALSE;
 
180
                        update_bank(state, 1), state->m_bslapstic_primed = FALSE;
178
181
                else if (offset == 0x62)
179
 
                        update_bank(state, 2), state->bslapstic_primed = FALSE;
 
182
                        update_bank(state, 2), state->m_bslapstic_primed = FALSE;
180
183
                else if (offset == 0x72)
181
 
                        update_bank(state, 3), state->bslapstic_primed = FALSE;
 
184
                        update_bank(state, 3), state->m_bslapstic_primed = FALSE;
182
185
        }
183
186
        return result;
184
187
}
185
188
 
186
189
 
187
 
static void pitfightb_cheap_slapstic_init(running_machine *machine)
 
190
static void pitfightb_cheap_slapstic_init(running_machine &machine)
188
191
{
189
 
        atarig1_state *state = machine->driver_data<atarig1_state>();
 
192
        atarig1_state *state = machine.driver_data<atarig1_state>();
190
193
 
191
194
        /* install a read handler */
192
 
        state->bslapstic_base = memory_install_read16_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x038000, 0x03ffff, 0, 0, pitfightb_cheap_slapstic_r);
 
195
        state->m_bslapstic_base = machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x038000, 0x03ffff, FUNC(pitfightb_cheap_slapstic_r));
193
196
 
194
197
        /* allocate memory for a copy of bank 0 */
195
 
        state->bslapstic_bank0 = auto_alloc_array(machine, UINT8, 0x2000);
196
 
        memcpy(state->bslapstic_bank0, state->bslapstic_base, 0x2000);
 
198
        state->m_bslapstic_bank0 = auto_alloc_array(machine, UINT8, 0x2000);
 
199
        memcpy(state->m_bslapstic_bank0, state->m_bslapstic_base, 0x2000);
197
200
 
198
201
        /* not primed by default */
199
 
        state->bslapstic_primed = FALSE;
 
202
        state->m_bslapstic_primed = FALSE;
200
203
}
201
204
 
202
205
 
207
210
 *
208
211
 *************************************/
209
212
 
210
 
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
 
213
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16 )
211
214
        AM_RANGE(0x000000, 0x037fff) AM_ROM
212
215
        AM_RANGE(0x038000, 0x03ffff) AM_ROM     /* pitfight slapstic goes here */
213
216
        AM_RANGE(0x040000, 0x077fff) AM_ROM
224
227
        AM_RANGE(0xfd8000, 0xfdffff) AM_READWRITE(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
225
228
/*  AM_RANGE(0xfe0000, 0xfe7fff) AM_READ(from_r)*/
226
229
        AM_RANGE(0xfe8000, 0xfe89ff) AM_RAM_WRITE(atarigen_666_paletteram_w) AM_BASE_GENERIC(paletteram)
227
 
        AM_RANGE(0xff0000, 0xff0fff) AM_WRITE(atarirle_0_spriteram_w) AM_BASE(&atarirle_0_spriteram)
228
 
        AM_RANGE(0xff2000, 0xff2001) AM_WRITE(mo_command_w) AM_BASE_MEMBER(atarig1_state, mo_command)
229
 
        AM_RANGE(0xff4000, 0xff5fff) AM_WRITE(atarigen_playfield_w) AM_BASE_MEMBER(atarig1_state, playfield)
230
 
        AM_RANGE(0xff6000, 0xff6fff) AM_WRITE(atarigen_alpha_w) AM_BASE_MEMBER(atarig1_state, alpha)
 
230
        AM_RANGE(0xff0000, 0xff0fff) AM_DEVREADWRITE("rle", atarirle_spriteram_r, atarirle_spriteram_w)
 
231
        AM_RANGE(0xff2000, 0xff2001) AM_WRITE(mo_command_w) AM_BASE_MEMBER(atarig1_state, m_mo_command)
 
232
        AM_RANGE(0xff4000, 0xff5fff) AM_WRITE(atarigen_playfield_w) AM_BASE_MEMBER(atarig1_state, m_playfield)
 
233
        AM_RANGE(0xff6000, 0xff6fff) AM_WRITE(atarigen_alpha_w) AM_BASE_MEMBER(atarig1_state, m_alpha)
231
234
        AM_RANGE(0xff0000, 0xffffff) AM_RAM
232
235
ADDRESS_MAP_END
233
236
 
401
404
 
402
405
 
403
406
 
 
407
static const atarirle_desc modesc_hydra =
 
408
{
 
409
        "gfx3",         /* region where the GFX data lives */
 
410
        256,            /* number of entries in sprite RAM */
 
411
        0,                      /* left clip coordinate */
 
412
        255,            /* right clip coordinate */
 
413
 
 
414
        0x200,          /* base palette entry */
 
415
        0x100,          /* maximum number of colors */
 
416
 
 
417
        {{ 0x7fff,0,0,0,0,0,0,0 }},     /* mask for the code index */
 
418
        {{ 0,0x00f0,0,0,0,0,0,0 }},     /* mask for the color */
 
419
        {{ 0,0,0xffc0,0,0,0,0,0 }},     /* mask for the X position */
 
420
        {{ 0,0,0,0xffc0,0,0,0,0 }},     /* mask for the Y position */
 
421
        {{ 0,0,0,0,0xffff,0,0,0 }},     /* mask for the scale factor */
 
422
        {{ 0x8000,0,0,0,0,0,0,0 }},     /* mask for the horizontal flip */
 
423
        {{ 0,0,0,0,0,0x00ff,0,0 }},     /* mask for the order */
 
424
        {{ 0 }},                                        /* mask for the priority */
 
425
        {{ 0 }}                                         /* mask for the VRAM target */
 
426
};
 
427
 
 
428
static const atarirle_desc modesc_pitfight =
 
429
{
 
430
        "gfx3",         /* region where the GFX data lives */
 
431
        256,            /* number of entries in sprite RAM */
 
432
        40,                     /* left clip coordinate */
 
433
        295,            /* right clip coordinate */
 
434
 
 
435
        0x200,          /* base palette entry */
 
436
        0x100,          /* maximum number of colors */
 
437
 
 
438
        {{ 0x7fff,0,0,0,0,0,0,0 }},     /* mask for the code index */
 
439
        {{ 0,0x00f0,0,0,0,0,0,0 }},     /* mask for the color */
 
440
        {{ 0,0,0xffc0,0,0,0,0,0 }},     /* mask for the X position */
 
441
        {{ 0,0,0,0xffc0,0,0,0,0 }},     /* mask for the Y position */
 
442
        {{ 0,0,0,0,0xffff,0,0,0 }},     /* mask for the scale factor */
 
443
        {{ 0x8000,0,0,0,0,0,0,0 }},     /* mask for the horizontal flip */
 
444
        {{ 0,0,0,0,0,0,0x00ff,0 }},     /* mask for the order */
 
445
        {{ 0 }},                                        /* mask for the priority */
 
446
        {{ 0 }}                                         /* mask for the VRAM target */
 
447
};
 
448
 
404
449
/*************************************
405
450
 *
406
451
 *  Machine driver
427
472
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
428
473
        /* note: these parameters are from published specs, not derived */
429
474
        MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
 
475
        MCFG_SCREEN_UPDATE(atarig1)
 
476
        MCFG_SCREEN_EOF(atarig1)
430
477
 
431
478
        MCFG_VIDEO_START(atarig1)
432
 
        MCFG_VIDEO_EOF(atarirle)
433
 
        MCFG_VIDEO_UPDATE(atarig1)
434
479
 
435
480
        /* sound hardware */
436
481
        MCFG_FRAGMENT_ADD(jsa_ii_mono)
437
482
MACHINE_CONFIG_END
438
483
 
 
484
static MACHINE_CONFIG_DERIVED( hydra, atarig1 )
 
485
        MCFG_ATARIRLE_ADD( "rle", modesc_hydra )
 
486
MACHINE_CONFIG_END
 
487
 
 
488
static MACHINE_CONFIG_DERIVED( pitfight, atarig1 )
 
489
        MCFG_ATARIRLE_ADD( "rle", modesc_pitfight )
 
490
MACHINE_CONFIG_END
439
491
 
440
492
 
441
493
/*************************************
595
647
        ROM_LOAD( "136079-1027.bin",  0x000000, 0x20000, CRC(f9135b9b) SHA1(48c0ad0d3e592d191d1385e30530bdb69a095452) ) /* alphanumerics */
596
648
 
597
649
        ROM_REGION16_BE( 0x100000, "gfx3", 0 )
598
 
        ROM_LOAD16_BYTE( "136079-1001.bin", 0x00001, 0x10000, NO_DUMP CRC(3f757a53) SHA1(be2b7f8b907ef9ea24b24b7210ead70cdbad3506) )
599
 
        ROM_LOAD16_BYTE( "136079-1002.bin", 0x00000, 0x10000, NO_DUMP CRC(a1169469) SHA1(b5ab65ca9d98ef1e79518eaa519fba0cee92c86e) )
600
 
        ROM_LOAD16_BYTE( "136079-1003.bin", 0x20001, 0x10000, NO_DUMP CRC(aa21ec33) SHA1(dec65b670c64b3630f6ccbbcc3212f6771908de9) )
601
 
        ROM_LOAD16_BYTE( "136079-1004.bin", 0x20000, 0x10000, NO_DUMP CRC(c0a2be66) SHA1(b1e454d8b8c80a3f3d087a6eccd555c1ee1e5be6) )
602
 
        ROM_LOAD16_BYTE( "136079-1005.bin", 0x40001, 0x10000, NO_DUMP CRC(80c285b3) SHA1(bfcb342d2ea5d91562bfca7fac27744682c1d9af) )
603
 
        ROM_LOAD16_BYTE( "136079-1006.bin", 0x40000, 0x10000, NO_DUMP CRC(ad831c59) SHA1(bd6b52fe4ecfacb5a8c7edb9a67f7d2ed51122e2) )
604
 
        ROM_LOAD16_BYTE( "136079-1007.bin", 0x60001, 0x10000, NO_DUMP CRC(e0688cc0) SHA1(984266a4f0a4b38be06a20f346851c4d8643512c) )
605
 
        ROM_LOAD16_BYTE( "136079-1008.bin", 0x60000, 0x10000, NO_DUMP CRC(e6827f6b) SHA1(fd8ca175a065e199a383597f12fbf241f101b608) )
606
 
        ROM_LOAD16_BYTE( "136079-1009.bin", 0x80001, 0x10000, NO_DUMP CRC(33624d07) SHA1(7847c51c75ad2f0432ebeb7a224ae833a03b5d87) )
607
 
        ROM_LOAD16_BYTE( "136079-1010.bin", 0x80000, 0x10000, NO_DUMP CRC(9de4c689) SHA1(2ceb3db68ab368105c324a7763ff90448ecd3c49) )
608
 
        ROM_LOAD16_BYTE( "136079-1011.bin", 0xa0001, 0x10000, NO_DUMP CRC(d55c6e49) SHA1(dd49b4082d645770a3e5bf7f4b043f2ecc84bf89) )
609
 
        ROM_LOAD16_BYTE( "136079-1012.bin", 0xa0000, 0x10000, NO_DUMP CRC(43af45d0) SHA1(8fc14d534a2f0b3e6df0090c3dd5284b0028aa04) )
610
 
        ROM_LOAD16_BYTE( "136079-1013.bin", 0xc0001, 0x10000, NO_DUMP CRC(2647a82b) SHA1(b261919842a8277bff15bf6e0f16ca046b580f77) )
611
 
        ROM_LOAD16_BYTE( "136079-1014.bin", 0xc0000, 0x10000, NO_DUMP CRC(8897d5e9) SHA1(3a5cdc7bf633118453f0028b16f5c22b78cd5904) )
612
 
        ROM_LOAD16_BYTE( "136079-1015.bin", 0xe0001, 0x10000, NO_DUMP CRC(cf7f69fd) SHA1(93866f66ae7f4071abc66bd310bd15847e2a950a) )
613
 
        ROM_LOAD16_BYTE( "136079-1016.bin", 0xe0000, 0x10000, NO_DUMP CRC(61aaf14f) SHA1(946caff64902ebdda991372b54c29bd0a0fa13c3) )
 
650
        ROM_LOAD16_BYTE( "136079-1001.bin", 0x00001, 0x10000, BAD_DUMP CRC(3f757a53) SHA1(be2b7f8b907ef9ea24b24b7210ead70cdbad3506) ) // not dumped from this pcb, rom taken from another set instead
 
651
        ROM_LOAD16_BYTE( "136079-1002.bin", 0x00000, 0x10000, BAD_DUMP CRC(a1169469) SHA1(b5ab65ca9d98ef1e79518eaa519fba0cee92c86e) ) // "
 
652
        ROM_LOAD16_BYTE( "136079-1003.bin", 0x20001, 0x10000, BAD_DUMP CRC(aa21ec33) SHA1(dec65b670c64b3630f6ccbbcc3212f6771908de9) ) // "
 
653
        ROM_LOAD16_BYTE( "136079-1004.bin", 0x20000, 0x10000, BAD_DUMP CRC(c0a2be66) SHA1(b1e454d8b8c80a3f3d087a6eccd555c1ee1e5be6) ) // "
 
654
        ROM_LOAD16_BYTE( "136079-1005.bin", 0x40001, 0x10000, BAD_DUMP CRC(80c285b3) SHA1(bfcb342d2ea5d91562bfca7fac27744682c1d9af) ) // "
 
655
        ROM_LOAD16_BYTE( "136079-1006.bin", 0x40000, 0x10000, BAD_DUMP CRC(ad831c59) SHA1(bd6b52fe4ecfacb5a8c7edb9a67f7d2ed51122e2) ) // "
 
656
        ROM_LOAD16_BYTE( "136079-1007.bin", 0x60001, 0x10000, BAD_DUMP CRC(e0688cc0) SHA1(984266a4f0a4b38be06a20f346851c4d8643512c) ) // "
 
657
        ROM_LOAD16_BYTE( "136079-1008.bin", 0x60000, 0x10000, BAD_DUMP CRC(e6827f6b) SHA1(fd8ca175a065e199a383597f12fbf241f101b608) ) // "
 
658
        ROM_LOAD16_BYTE( "136079-1009.bin", 0x80001, 0x10000, BAD_DUMP CRC(33624d07) SHA1(7847c51c75ad2f0432ebeb7a224ae833a03b5d87) ) // "
 
659
        ROM_LOAD16_BYTE( "136079-1010.bin", 0x80000, 0x10000, BAD_DUMP CRC(9de4c689) SHA1(2ceb3db68ab368105c324a7763ff90448ecd3c49) ) // "
 
660
        ROM_LOAD16_BYTE( "136079-1011.bin", 0xa0001, 0x10000, BAD_DUMP CRC(d55c6e49) SHA1(dd49b4082d645770a3e5bf7f4b043f2ecc84bf89) ) // "
 
661
        ROM_LOAD16_BYTE( "136079-1012.bin", 0xa0000, 0x10000, BAD_DUMP CRC(43af45d0) SHA1(8fc14d534a2f0b3e6df0090c3dd5284b0028aa04) ) // "
 
662
        ROM_LOAD16_BYTE( "136079-1013.bin", 0xc0001, 0x10000, BAD_DUMP CRC(2647a82b) SHA1(b261919842a8277bff15bf6e0f16ca046b580f77) ) // "
 
663
        ROM_LOAD16_BYTE( "136079-1014.bin", 0xc0000, 0x10000, BAD_DUMP CRC(8897d5e9) SHA1(3a5cdc7bf633118453f0028b16f5c22b78cd5904) ) // "
 
664
        ROM_LOAD16_BYTE( "136079-1015.bin", 0xe0001, 0x10000, BAD_DUMP CRC(cf7f69fd) SHA1(93866f66ae7f4071abc66bd310bd15847e2a950a) ) // "
 
665
        ROM_LOAD16_BYTE( "136079-1016.bin", 0xe0000, 0x10000, BAD_DUMP CRC(61aaf14f) SHA1(946caff64902ebdda991372b54c29bd0a0fa13c3) ) // "
614
666
 
615
667
        ROM_REGION( 0x40000, "adpcm", 0 )
616
 
        ROM_LOAD( "136079-1037.bin",  0x00000, 0x10000, NO_DUMP CRC(b974d3d0) SHA1(67ecb17386f4be00c03661de14deff77b8ca85d0)  )
617
 
        ROM_LOAD( "136079-1038.bin",  0x10000, 0x10000, NO_DUMP CRC(a2eda15b) SHA1(358888ffdeb3d0e98f59e239de6d7e1f7e15aca2)  )
618
 
        ROM_LOAD( "136079-1039.bin",  0x20000, 0x10000, NO_DUMP CRC(eb9eaeb7) SHA1(cd8e076b07588879f1a0e6c0fb9de9889480bebb)  )
 
668
        ROM_LOAD( "136079-1037.bin",  0x00000, 0x10000, BAD_DUMP CRC(b974d3d0) SHA1(67ecb17386f4be00c03661de14deff77b8ca85d0)  ) // not dumped from this pcb, rom taken from another set instead
 
669
        ROM_LOAD( "136079-1038.bin",  0x10000, 0x10000, BAD_DUMP CRC(a2eda15b) SHA1(358888ffdeb3d0e98f59e239de6d7e1f7e15aca2)  ) // "
 
670
        ROM_LOAD( "136079-1039.bin",  0x20000, 0x10000, BAD_DUMP CRC(eb9eaeb7) SHA1(cd8e076b07588879f1a0e6c0fb9de9889480bebb)  ) // "
619
671
 
620
672
        ROM_REGION( 0x0600, "proms", 0 )        /* microcode for growth renderer */
621
673
        ROM_LOAD( "136079-1040.bin",  0x0000, 0x0200, CRC(43d6f3d4) SHA1(a072099df1db8db3589130c67a86a362e03d70ff) )
1166
1218
 *
1167
1219
 *************************************/
1168
1220
 
1169
 
static void init_g1_common(running_machine *machine, offs_t slapstic_base, int slapstic, int is_pitfight)
 
1221
static void init_g1_common(running_machine &machine, offs_t slapstic_base, int slapstic, int is_pitfight)
1170
1222
{
1171
 
        atarig1_state *state = machine->driver_data<atarig1_state>();
 
1223
        atarig1_state *state = machine.driver_data<atarig1_state>();
1172
1224
 
1173
 
        state->eeprom_default = NULL;
 
1225
        state->m_eeprom_default = NULL;
1174
1226
        if (slapstic == -1)
1175
1227
        {
1176
1228
                pitfightb_cheap_slapstic_init(machine);
1177
 
                state_save_register_global(machine, state->bslapstic_bank);
1178
 
                state_save_register_global(machine, state->bslapstic_primed);
1179
 
                state_save_register_postload(machine, pitfightb_state_postload, NULL);
 
1229
                state->save_item(NAME(state->m_bslapstic_bank));
 
1230
                state->save_item(NAME(state->m_bslapstic_primed));
 
1231
                machine.state().register_postload(pitfightb_state_postload, NULL);
1180
1232
        }
1181
1233
        else if (slapstic != 0)
1182
 
                atarigen_slapstic_init(machine->device("maincpu"), slapstic_base, 0, slapstic);
 
1234
                atarigen_slapstic_init(machine.device("maincpu"), slapstic_base, 0, slapstic);
1183
1235
        atarijsa_init(machine, "IN0", 0x4000);
1184
1236
 
1185
 
        state->is_pitfight = is_pitfight;
 
1237
        state->m_is_pitfight = is_pitfight;
1186
1238
}
1187
1239
 
1188
1240
static DRIVER_INIT( hydra )    { init_g1_common(machine, 0x078000, 116, 0); }
1201
1253
 *
1202
1254
 *************************************/
1203
1255
 
1204
 
GAME( 1990, hydra,    0,        atarig1, hydra,    hydra,    ROT0, "Atari Games", "Hydra", GAME_SUPPORTS_SAVE )
1205
 
GAME( 1990, hydrap,   hydra,    atarig1, hydra,    hydrap,   ROT0, "Atari Games", "Hydra (prototype 5/14/90)", GAME_SUPPORTS_SAVE )
1206
 
GAME( 1990, hydrap2,  hydra,    atarig1, hydra,    hydrap,   ROT0, "Atari Games", "Hydra (prototype 5/25/90)", GAME_SUPPORTS_SAVE )
 
1256
GAME( 1990, hydra,    0,        hydra, hydra,    hydra,    ROT0, "Atari Games", "Hydra", GAME_SUPPORTS_SAVE )
 
1257
GAME( 1990, hydrap,   hydra,    hydra, hydra,    hydrap,   ROT0, "Atari Games", "Hydra (prototype 5/14/90)", GAME_SUPPORTS_SAVE )
 
1258
GAME( 1990, hydrap2,  hydra,    hydra, hydra,    hydrap,   ROT0, "Atari Games", "Hydra (prototype 5/25/90)", GAME_SUPPORTS_SAVE )
1207
1259
 
1208
 
GAME( 1990, pitfight,  0,        atarig1, pitfight, pitfight9, ROT0, "Atari Games", "Pit Fighter (rev 9)", GAME_SUPPORTS_SAVE )
1209
 
GAME( 1990, pitfight7, pitfight, atarig1, pitfight, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 7)", GAME_SUPPORTS_SAVE )
1210
 
GAME( 1990, pitfight6, pitfight, atarig1, pitfight, pitfightj, ROT0, "Atari Games", "Pit Fighter (rev 6)", GAME_SUPPORTS_SAVE )
1211
 
GAME( 1990, pitfight5, pitfight, atarig1, pitfight, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 5)", GAME_SUPPORTS_SAVE )
1212
 
GAME( 1990, pitfight4, pitfight, atarig1, pitfight, pitfight,  ROT0, "Atari Games", "Pit Fighter (rev 4)", GAME_SUPPORTS_SAVE )
1213
 
GAME( 1990, pitfight3, pitfight, atarig1, pitfight, pitfight,  ROT0, "Atari Games", "Pit Fighter (rev 3)", GAME_SUPPORTS_SAVE )
1214
 
GAME( 1990, pitfightj, pitfight, atarig1, pitfightj,pitfightj, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", GAME_SUPPORTS_SAVE )
1215
 
GAME( 1990, pitfightb, pitfight, atarig1, pitfight, pitfightb, ROT0, "bootleg",     "Pit Fighter (bootleg)", GAME_SUPPORTS_SAVE )
 
1260
GAME( 1990, pitfight,  0,        pitfight, pitfight, pitfight9, ROT0, "Atari Games", "Pit Fighter (rev 9)", GAME_SUPPORTS_SAVE )
 
1261
GAME( 1990, pitfight7, pitfight, pitfight, pitfight, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 7)", GAME_SUPPORTS_SAVE )
 
1262
GAME( 1990, pitfight6, pitfight, pitfight, pitfight, pitfightj, ROT0, "Atari Games", "Pit Fighter (rev 6)", GAME_SUPPORTS_SAVE )
 
1263
GAME( 1990, pitfight5, pitfight, pitfight, pitfight, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 5)", GAME_SUPPORTS_SAVE )
 
1264
GAME( 1990, pitfight4, pitfight, pitfight, pitfight, pitfight,  ROT0, "Atari Games", "Pit Fighter (rev 4)", GAME_SUPPORTS_SAVE )
 
1265
GAME( 1990, pitfight3, pitfight, pitfight, pitfight, pitfight,  ROT0, "Atari Games", "Pit Fighter (rev 3)", GAME_SUPPORTS_SAVE )
 
1266
GAME( 1990, pitfightj, pitfight, pitfight, pitfightj,pitfightj, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", GAME_SUPPORTS_SAVE )
 
1267
GAME( 1990, pitfightb, pitfight, pitfight, pitfight, pitfightb, ROT0, "bootleg",     "Pit Fighter (bootleg)", GAME_SUPPORTS_SAVE )