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

« back to all changes in this revision

Viewing changes to src/mame/drivers/astinvad.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:
47
47
        astinvad_state(running_machine &machine, const driver_device_config_base &config)
48
48
                : driver_device(machine, config) { }
49
49
 
50
 
        UINT8 *    colorram;
51
 
        UINT8 *    videoram;
52
 
        size_t     videoram_size;
53
 
 
54
 
        emu_timer  *int_timer;
55
 
        UINT8      sound_state[2];
56
 
        UINT8      screen_flip;
57
 
        UINT8      screen_red;
58
 
        UINT8      flip_yoffs;
59
 
        UINT8      color_latch;
60
 
 
61
 
        device_t *maincpu;
62
 
        device_t *ppi8255_0;
63
 
        device_t *ppi8255_1;
64
 
        device_t *samples;
 
50
        UINT8 *    m_colorram;
 
51
        UINT8 *    m_videoram;
 
52
        size_t     m_videoram_size;
 
53
 
 
54
        emu_timer  *m_int_timer;
 
55
        UINT8      m_sound_state[2];
 
56
        UINT8      m_screen_flip;
 
57
        UINT8      m_screen_red;
 
58
        UINT8      m_flip_yoffs;
 
59
        UINT8      m_color_latch;
 
60
 
 
61
        device_t *m_maincpu;
 
62
        device_t *m_ppi8255_0;
 
63
        device_t *m_ppi8255_1;
 
64
        device_t *m_samples;
65
65
};
66
66
 
67
67
 
104
104
 
105
105
static VIDEO_START( spaceint )
106
106
{
107
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
108
 
        state->colorram = auto_alloc_array(machine, UINT8, state->videoram_size);
 
107
        astinvad_state *state = machine.driver_data<astinvad_state>();
 
108
        state->m_colorram = auto_alloc_array(machine, UINT8, state->m_videoram_size);
109
109
 
110
 
        state_save_register_global(machine, state->color_latch);
111
 
        state_save_register_global_pointer(machine, state->colorram, state->videoram_size);
 
110
        state->save_item(NAME(state->m_color_latch));
 
111
        state->save_pointer(NAME(state->m_colorram), state->m_videoram_size);
112
112
}
113
113
 
114
114
 
115
115
static WRITE8_HANDLER( color_latch_w )
116
116
{
117
 
        astinvad_state *state = space->machine->driver_data<astinvad_state>();
118
 
        state->color_latch = data & 0x0f;
 
117
        astinvad_state *state = space->machine().driver_data<astinvad_state>();
 
118
        state->m_color_latch = data & 0x0f;
119
119
}
120
120
 
121
121
 
122
122
static WRITE8_HANDLER( spaceint_videoram_w )
123
123
{
124
 
        astinvad_state *state = space->machine->driver_data<astinvad_state>();
125
 
        state->videoram[offset] = data;
126
 
        state->colorram[offset] = state->color_latch;
 
124
        astinvad_state *state = space->machine().driver_data<astinvad_state>();
 
125
        state->m_videoram[offset] = data;
 
126
        state->m_colorram[offset] = state->m_color_latch;
127
127
}
128
128
 
129
129
 
134
134
 *
135
135
 *************************************/
136
136
 
137
 
static void plot_byte( running_machine *machine, bitmap_t *bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color )
 
137
static void plot_byte( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color )
138
138
{
139
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
 
139
        astinvad_state *state = machine.driver_data<astinvad_state>();
140
140
        pen_t fore_pen = MAKE_RGB(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1));
141
 
        UINT8 flip_xor = state->screen_flip & 7;
 
141
        UINT8 flip_xor = state->m_screen_flip & 7;
142
142
 
143
143
        *BITMAP_ADDR32(bitmap, y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK;
144
144
        *BITMAP_ADDR32(bitmap, y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK;
151
151
}
152
152
 
153
153
 
154
 
static VIDEO_UPDATE( astinvad )
 
154
static SCREEN_UPDATE( astinvad )
155
155
{
156
 
        astinvad_state *state = screen->machine->driver_data<astinvad_state>();
157
 
        const UINT8 *color_prom = screen->machine->region("proms")->base();
158
 
        UINT8 yoffs = state->flip_yoffs & state->screen_flip;
 
156
        astinvad_state *state = screen->machine().driver_data<astinvad_state>();
 
157
        const UINT8 *color_prom = screen->machine().region("proms")->base();
 
158
        UINT8 yoffs = state->m_flip_yoffs & state->m_screen_flip;
159
159
        int x, y;
160
160
 
161
161
        /* render the visible pixels */
162
162
        for (y = cliprect->min_y; y <= cliprect->max_y; y++)
163
163
                for (x = cliprect->min_x & ~7; x <= cliprect->max_x; x += 8)
164
164
                {
165
 
                        UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (state->screen_flip ? 0 : 4);
166
 
                        UINT8 data = state->videoram[(((y ^ state->screen_flip) + yoffs) << 5) | ((x ^ state->screen_flip) >> 3)];
167
 
                        plot_byte(screen->machine, bitmap, y, x, data, state->screen_red ? 1 : color);
 
165
                        UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (state->m_screen_flip ? 0 : 4);
 
166
                        UINT8 data = state->m_videoram[(((y ^ state->m_screen_flip) + yoffs) << 5) | ((x ^ state->m_screen_flip) >> 3)];
 
167
                        plot_byte(screen->machine(), bitmap, y, x, data, state->m_screen_red ? 1 : color);
168
168
                }
169
169
 
170
170
        return 0;
171
171
}
172
172
 
173
173
 
174
 
static VIDEO_UPDATE( spaceint )
 
174
static SCREEN_UPDATE( spaceint )
175
175
{
176
 
        astinvad_state *state = screen->machine->driver_data<astinvad_state>();
177
 
        const UINT8 *color_prom = screen->machine->region("proms")->base();
 
176
        astinvad_state *state = screen->machine().driver_data<astinvad_state>();
 
177
        const UINT8 *color_prom = screen->machine().region("proms")->base();
178
178
        int offs;
179
179
 
180
 
        for (offs = 0; offs < state->videoram_size; offs++)
 
180
        for (offs = 0; offs < state->m_videoram_size; offs++)
181
181
        {
182
 
                UINT8 data = state->videoram[offs];
183
 
                UINT8 color = state->colorram[offs];
 
182
                UINT8 data = state->m_videoram[offs];
 
183
                UINT8 color = state->m_colorram[offs];
184
184
 
185
185
                UINT8 y = ~offs;
186
186
                UINT8 x = offs >> 8 << 3;
189
189
                offs_t n = ((offs >> 5) & 0xf0) | color;
190
190
                color = color_prom[n] & 0x07;
191
191
 
192
 
                plot_byte(screen->machine, bitmap, y, x, data, color);
 
192
                plot_byte(screen->machine(), bitmap, y, x, data, color);
193
193
        }
194
194
 
195
195
        return 0;
205
205
 
206
206
static TIMER_CALLBACK( kamikaze_int_off )
207
207
{
208
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
209
 
        cpu_set_input_line(state->maincpu, 0, CLEAR_LINE);
 
208
        astinvad_state *state = machine.driver_data<astinvad_state>();
 
209
        device_set_input_line(state->m_maincpu, 0, CLEAR_LINE);
210
210
}
211
211
 
212
212
 
213
213
static TIMER_CALLBACK( kamizake_int_gen )
214
214
{
215
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
 
215
        astinvad_state *state = machine.driver_data<astinvad_state>();
216
216
        /* interrupts are asserted on every state change of the 128V line */
217
 
        cpu_set_input_line(state->maincpu, 0, ASSERT_LINE);
 
217
        device_set_input_line(state->m_maincpu, 0, ASSERT_LINE);
218
218
        param ^= 128;
219
 
        timer_adjust_oneshot(state->int_timer, machine->primary_screen->time_until_pos(param), param);
 
219
        state->m_int_timer->adjust(machine.primary_screen->time_until_pos(param), param);
220
220
 
221
221
        /* an RC circuit turns the interrupt off after a short amount of time */
222
 
        timer_set(machine, double_to_attotime(300 * 0.1e-6), NULL, 0, kamikaze_int_off);
 
222
        machine.scheduler().timer_set(attotime::from_double(300 * 0.1e-6), FUNC(kamikaze_int_off));
223
223
}
224
224
 
225
225
 
226
226
static MACHINE_START( kamikaze )
227
227
{
228
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
229
 
 
230
 
        state->maincpu = machine->device("maincpu");
231
 
        state->ppi8255_0 = machine->device("ppi8255_0");
232
 
        state->ppi8255_1 = machine->device("ppi8255_1");
233
 
        state->samples = machine->device("samples");
234
 
 
235
 
        state->int_timer = timer_alloc(machine, kamizake_int_gen, NULL);
236
 
        timer_adjust_oneshot(state->int_timer, machine->primary_screen->time_until_pos(128), 128);
237
 
 
238
 
        state_save_register_global(machine, state->screen_flip);
239
 
        state_save_register_global(machine, state->screen_red);
240
 
        state_save_register_global_array(machine, state->sound_state);
 
228
        astinvad_state *state = machine.driver_data<astinvad_state>();
 
229
 
 
230
        state->m_maincpu = machine.device("maincpu");
 
231
        state->m_ppi8255_0 = machine.device("ppi8255_0");
 
232
        state->m_ppi8255_1 = machine.device("ppi8255_1");
 
233
        state->m_samples = machine.device("samples");
 
234
 
 
235
        state->m_int_timer = machine.scheduler().timer_alloc(FUNC(kamizake_int_gen));
 
236
        state->m_int_timer->adjust(machine.primary_screen->time_until_pos(128), 128);
 
237
 
 
238
        state->save_item(NAME(state->m_screen_flip));
 
239
        state->save_item(NAME(state->m_screen_red));
 
240
        state->save_item(NAME(state->m_sound_state));
241
241
}
242
242
 
243
243
static MACHINE_RESET( kamikaze )
244
244
{
245
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
 
245
        astinvad_state *state = machine.driver_data<astinvad_state>();
246
246
 
247
 
        state->screen_flip = 0;
248
 
        state->screen_red = 0;
249
 
        state->sound_state[0] = 0;
250
 
        state->sound_state[1] = 0;
 
247
        state->m_screen_flip = 0;
 
248
        state->m_screen_red = 0;
 
249
        state->m_sound_state[0] = 0;
 
250
        state->m_sound_state[1] = 0;
251
251
}
252
252
 
253
253
 
254
254
static MACHINE_START( spaceint )
255
255
{
256
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
257
 
 
258
 
        state->maincpu = machine->device("maincpu");
259
 
        state->samples = machine->device("samples");
260
 
 
261
 
        state_save_register_global(machine, state->screen_flip);
262
 
        state_save_register_global_array(machine, state->sound_state);
 
256
        astinvad_state *state = machine.driver_data<astinvad_state>();
 
257
 
 
258
        state->m_maincpu = machine.device("maincpu");
 
259
        state->m_samples = machine.device("samples");
 
260
 
 
261
        state->save_item(NAME(state->m_screen_flip));
 
262
        state->save_item(NAME(state->m_sound_state));
263
263
}
264
264
 
265
265
static MACHINE_RESET( spaceint )
266
266
{
267
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
 
267
        astinvad_state *state = machine.driver_data<astinvad_state>();
268
268
 
269
 
        state->screen_flip = 0;
270
 
        state->sound_state[0] = 0;
271
 
        state->sound_state[1] = 0;
272
 
        state->color_latch = 0;
 
269
        state->m_screen_flip = 0;
 
270
        state->m_sound_state[0] = 0;
 
271
        state->m_sound_state[1] = 0;
 
272
        state->m_color_latch = 0;
273
273
}
274
274
 
275
275
 
276
276
static INPUT_CHANGED( spaceint_coin_inserted )
277
277
{
278
 
        astinvad_state *state = field->port->machine->driver_data<astinvad_state>();
 
278
        astinvad_state *state = field->port->machine().driver_data<astinvad_state>();
279
279
        /* coin insertion causes an NMI */
280
 
        cpu_set_input_line(state->maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
 
280
        device_set_input_line(state->m_maincpu, INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE);
281
281
}
282
282
 
283
283
 
290
290
 
291
291
static READ8_HANDLER( kamikaze_ppi_r )
292
292
{
293
 
        astinvad_state *state = space->machine->driver_data<astinvad_state>();
 
293
        astinvad_state *state = space->machine().driver_data<astinvad_state>();
294
294
        UINT8 result = 0xff;
295
295
 
296
296
        /* the address lines are used for /CS; yes, they can overlap! */
297
297
        if (!(offset & 4))
298
 
                result &= ppi8255_r(state->ppi8255_0, offset);
 
298
                result &= ppi8255_r(state->m_ppi8255_0, offset);
299
299
        if (!(offset & 8))
300
 
                result &= ppi8255_r(state->ppi8255_1, offset);
 
300
                result &= ppi8255_r(state->m_ppi8255_1, offset);
301
301
        return result;
302
302
}
303
303
 
304
304
 
305
305
static WRITE8_HANDLER( kamikaze_ppi_w )
306
306
{
307
 
        astinvad_state *state = space->machine->driver_data<astinvad_state>();
 
307
        astinvad_state *state = space->machine().driver_data<astinvad_state>();
308
308
 
309
309
        /* the address lines are used for /CS; yes, they can overlap! */
310
310
        if (!(offset & 4))
311
 
                ppi8255_w(state->ppi8255_0, offset, data);
 
311
                ppi8255_w(state->m_ppi8255_0, offset, data);
312
312
        if (!(offset & 8))
313
 
                ppi8255_w(state->ppi8255_1, offset, data);
 
313
                ppi8255_w(state->m_ppi8255_1, offset, data);
314
314
}
315
315
 
316
316
 
323
323
 
324
324
static WRITE8_DEVICE_HANDLER( astinvad_sound1_w )
325
325
{
326
 
        astinvad_state *state = device->machine->driver_data<astinvad_state>();
327
 
        int bits_gone_hi = data & ~state->sound_state[0];
328
 
        state->sound_state[0] = data;
329
 
 
330
 
        if (bits_gone_hi & 0x01) sample_start(state->samples, 0, SND_UFO, 1);
331
 
        if (!(data & 0x01))      sample_stop(state->samples, 0);
332
 
        if (bits_gone_hi & 0x02) sample_start(state->samples, 1, SND_SHOT, 0);
333
 
        if (bits_gone_hi & 0x04) sample_start(state->samples, 2, SND_BASEHIT, 0);
334
 
        if (bits_gone_hi & 0x08) sample_start(state->samples, 3, SND_INVADERHIT, 0);
335
 
 
336
 
        sound_global_enable(device->machine, data & 0x20);
337
 
        state->screen_red = data & 0x04;
 
326
        astinvad_state *state = device->machine().driver_data<astinvad_state>();
 
327
        int bits_gone_hi = data & ~state->m_sound_state[0];
 
328
        state->m_sound_state[0] = data;
 
329
 
 
330
        if (bits_gone_hi & 0x01) sample_start(state->m_samples, 0, SND_UFO, 1);
 
331
        if (!(data & 0x01))      sample_stop(state->m_samples, 0);
 
332
        if (bits_gone_hi & 0x02) sample_start(state->m_samples, 1, SND_SHOT, 0);
 
333
        if (bits_gone_hi & 0x04) sample_start(state->m_samples, 2, SND_BASEHIT, 0);
 
334
        if (bits_gone_hi & 0x08) sample_start(state->m_samples, 3, SND_INVADERHIT, 0);
 
335
 
 
336
        device->machine().sound().system_enable(data & 0x20);
 
337
        state->m_screen_red = data & 0x04;
338
338
}
339
339
 
340
340
 
341
341
static WRITE8_DEVICE_HANDLER( astinvad_sound2_w )
342
342
{
343
 
        astinvad_state *state = device->machine->driver_data<astinvad_state>();
344
 
        int bits_gone_hi = data & ~state->sound_state[1];
345
 
        state->sound_state[1] = data;
346
 
 
347
 
        if (bits_gone_hi & 0x01) sample_start(state->samples, 5, SND_FLEET1, 0);
348
 
        if (bits_gone_hi & 0x02) sample_start(state->samples, 5, SND_FLEET2, 0);
349
 
        if (bits_gone_hi & 0x04) sample_start(state->samples, 5, SND_FLEET3, 0);
350
 
        if (bits_gone_hi & 0x08) sample_start(state->samples, 5, SND_FLEET4, 0);
351
 
        if (bits_gone_hi & 0x10) sample_start(state->samples, 4, SND_UFOHIT, 0);
352
 
 
353
 
        state->screen_flip = (input_port_read(device->machine, "CABINET") & data & 0x20) ? 0xff : 0x00;
 
343
        astinvad_state *state = device->machine().driver_data<astinvad_state>();
 
344
        int bits_gone_hi = data & ~state->m_sound_state[1];
 
345
        state->m_sound_state[1] = data;
 
346
 
 
347
        if (bits_gone_hi & 0x01) sample_start(state->m_samples, 5, SND_FLEET1, 0);
 
348
        if (bits_gone_hi & 0x02) sample_start(state->m_samples, 5, SND_FLEET2, 0);
 
349
        if (bits_gone_hi & 0x04) sample_start(state->m_samples, 5, SND_FLEET3, 0);
 
350
        if (bits_gone_hi & 0x08) sample_start(state->m_samples, 5, SND_FLEET4, 0);
 
351
        if (bits_gone_hi & 0x10) sample_start(state->m_samples, 4, SND_UFOHIT, 0);
 
352
 
 
353
        state->m_screen_flip = (input_port_read(device->machine(), "CABINET") & data & 0x20) ? 0xff : 0x00;
354
354
}
355
355
 
356
356
 
357
357
static WRITE8_HANDLER( spaceint_sound1_w )
358
358
{
359
 
        astinvad_state *state = space->machine->driver_data<astinvad_state>();
360
 
        int bits_gone_hi = data & ~state->sound_state[0];
361
 
        state->sound_state[0] = data;
362
 
 
363
 
        if (bits_gone_hi & 0x01) sample_start(state->samples, 1, SND_SHOT, 0);
364
 
        if (bits_gone_hi & 0x02) sample_start(state->samples, 2, SND_BASEHIT, 0);
365
 
        if (bits_gone_hi & 0x04) sample_start(state->samples, 4, SND_UFOHIT, 0);
366
 
        if (bits_gone_hi & 0x08) sample_start(state->samples, 0, SND_UFO, 1);
367
 
        if (!(data & 0x08))      sample_stop(state->samples, 0);
368
 
 
369
 
        if (bits_gone_hi & 0x10) sample_start(state->samples, 5, SND_FLEET1, 0);
370
 
        if (bits_gone_hi & 0x20) sample_start(state->samples, 5, SND_FLEET2, 0);
371
 
        if (bits_gone_hi & 0x40) sample_start(state->samples, 5, SND_FLEET3, 0);
372
 
        if (bits_gone_hi & 0x80) sample_start(state->samples, 5, SND_FLEET4, 0);
 
359
        astinvad_state *state = space->machine().driver_data<astinvad_state>();
 
360
        int bits_gone_hi = data & ~state->m_sound_state[0];
 
361
        state->m_sound_state[0] = data;
 
362
 
 
363
        if (bits_gone_hi & 0x01) sample_start(state->m_samples, 1, SND_SHOT, 0);
 
364
        if (bits_gone_hi & 0x02) sample_start(state->m_samples, 2, SND_BASEHIT, 0);
 
365
        if (bits_gone_hi & 0x04) sample_start(state->m_samples, 4, SND_UFOHIT, 0);
 
366
        if (bits_gone_hi & 0x08) sample_start(state->m_samples, 0, SND_UFO, 1);
 
367
        if (!(data & 0x08))      sample_stop(state->m_samples, 0);
 
368
 
 
369
        if (bits_gone_hi & 0x10) sample_start(state->m_samples, 5, SND_FLEET1, 0);
 
370
        if (bits_gone_hi & 0x20) sample_start(state->m_samples, 5, SND_FLEET2, 0);
 
371
        if (bits_gone_hi & 0x40) sample_start(state->m_samples, 5, SND_FLEET3, 0);
 
372
        if (bits_gone_hi & 0x80) sample_start(state->m_samples, 5, SND_FLEET4, 0);
373
373
}
374
374
 
375
375
 
376
376
static WRITE8_HANDLER( spaceint_sound2_w )
377
377
{
378
 
        astinvad_state *state = space->machine->driver_data<astinvad_state>();
379
 
        int bits_gone_hi = data & ~state->sound_state[1];
380
 
        state->sound_state[1] = data;
381
 
 
382
 
        sound_global_enable(space->machine, data & 0x02);
383
 
 
384
 
        if (bits_gone_hi & 0x04) sample_start(state->samples, 3, SND_INVADERHIT, 0);
385
 
 
386
 
        state->screen_flip = (input_port_read(space->machine, "CABINET") & data & 0x80) ? 0xff : 0x00;
 
378
        astinvad_state *state = space->machine().driver_data<astinvad_state>();
 
379
        int bits_gone_hi = data & ~state->m_sound_state[1];
 
380
        state->m_sound_state[1] = data;
 
381
 
 
382
        space->machine().sound().system_enable(data & 0x02);
 
383
 
 
384
        if (bits_gone_hi & 0x04) sample_start(state->m_samples, 3, SND_INVADERHIT, 0);
 
385
 
 
386
        state->m_screen_flip = (input_port_read(space->machine(), "CABINET") & data & 0x80) ? 0xff : 0x00;
387
387
}
388
388
 
389
389
 
394
394
 *
395
395
 *************************************/
396
396
 
397
 
static ADDRESS_MAP_START( kamikaze_map, ADDRESS_SPACE_PROGRAM, 8 )
 
397
static ADDRESS_MAP_START( kamikaze_map, AS_PROGRAM, 8 )
398
398
        ADDRESS_MAP_GLOBAL_MASK(0x3fff)
399
399
        AM_RANGE(0x0000, 0x1bff) AM_ROM
400
400
        AM_RANGE(0x1c00, 0x1fff) AM_RAM
401
 
        AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(astinvad_state, videoram, videoram_size)
 
401
        AM_RANGE(0x2000, 0x3fff) AM_RAM AM_BASE_SIZE_MEMBER(astinvad_state, m_videoram, m_videoram_size)
402
402
ADDRESS_MAP_END
403
403
 
404
404
 
405
 
static ADDRESS_MAP_START( spaceint_map, ADDRESS_SPACE_PROGRAM, 8 )
 
405
static ADDRESS_MAP_START( spaceint_map, AS_PROGRAM, 8 )
406
406
        AM_RANGE(0x0000, 0x1fff) AM_ROM
407
407
        AM_RANGE(0x2000, 0x23ff) AM_RAM
408
 
        AM_RANGE(0x4000, 0x5fff) AM_RAM_WRITE(spaceint_videoram_w) AM_BASE_SIZE_MEMBER(astinvad_state, videoram, videoram_size)
 
408
        AM_RANGE(0x4000, 0x5fff) AM_RAM_WRITE(spaceint_videoram_w) AM_BASE_SIZE_MEMBER(astinvad_state, m_videoram, m_videoram_size)
409
409
ADDRESS_MAP_END
410
410
 
411
411
 
412
 
static ADDRESS_MAP_START( kamikaze_portmap, ADDRESS_SPACE_IO, 8 )
 
412
static ADDRESS_MAP_START( kamikaze_portmap, AS_IO, 8 )
413
413
        ADDRESS_MAP_GLOBAL_MASK(0xff)
414
414
        AM_RANGE(0x00, 0xff) AM_READWRITE(kamikaze_ppi_r, kamikaze_ppi_w)
415
415
ADDRESS_MAP_END
416
416
 
417
417
 
418
 
static ADDRESS_MAP_START( spaceint_portmap, ADDRESS_SPACE_IO, 8 )
 
418
static ADDRESS_MAP_START( spaceint_portmap, AS_IO, 8 )
419
419
        ADDRESS_MAP_GLOBAL_MASK(0xff)
420
420
        AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
421
421
        AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
598
598
        MCFG_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] )
599
599
 
600
600
        /* video hardware */
601
 
        MCFG_VIDEO_UPDATE(astinvad)
602
 
 
603
601
        MCFG_SCREEN_ADD("screen", RASTER)
604
602
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
605
603
        MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 320, 0, 256, 256, 32, 256)
 
604
        MCFG_SCREEN_UPDATE(astinvad)
606
605
 
607
606
        /* sound hardware */
608
607
        MCFG_SPEAKER_STANDARD_MONO("mono")
634
633
 
635
634
        /* video hardware */
636
635
        MCFG_VIDEO_START(spaceint)
637
 
        MCFG_VIDEO_UPDATE(spaceint)
638
636
 
639
637
        MCFG_SCREEN_ADD("screen", RASTER)
640
638
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
641
639
        MCFG_SCREEN_SIZE(32*8, 32*8)
642
640
        MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
643
641
        MCFG_SCREEN_REFRESH_RATE(60)
 
642
        MCFG_SCREEN_UPDATE(spaceint)
644
643
 
645
644
        /* sound hardware */
646
645
        MCFG_SPEAKER_STANDARD_MONO("mono")
744
743
 
745
744
static DRIVER_INIT( kamikaze )
746
745
{
747
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
 
746
        astinvad_state *state = machine.driver_data<astinvad_state>();
748
747
 
749
748
        /* the flip screen logic adds 32 to the Y after flipping */
750
 
        state->flip_yoffs = 32;
 
749
        state->m_flip_yoffs = 32;
751
750
}
752
751
 
753
752
 
754
753
static DRIVER_INIT( spcking2 )
755
754
{
756
 
        astinvad_state *state = machine->driver_data<astinvad_state>();
 
755
        astinvad_state *state = machine.driver_data<astinvad_state>();
757
756
 
758
757
        /* don't have the schematics, but the blanking must center the screen here */
759
 
        state->flip_yoffs = 0;
 
758
        state->m_flip_yoffs = 0;
760
759
}
761
760
 
762
761