Another batch of compile fixes.

This commit is contained in:
R. Belmont 2008-11-15 03:23:21 +00:00
parent 3ada625d3b
commit 84f62ff4bf
7 changed files with 36 additions and 19 deletions

View File

@ -66,7 +66,9 @@ static READ8_DEVICE_HANDLER( portC_r )
static READ8_DEVICE_HANDLER( port1_r ) static READ8_DEVICE_HANDLER( port1_r )
{ {
return input_port_read(device->machine, "IN0") | (ticket_dispenser_0_r(device->machine, 0) >> 5); const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
return input_port_read(device->machine, "IN0") | (ticket_dispenser_0_r(space, 0) >> 5);
} }
static WRITE8_DEVICE_HANDLER( lamps_w ) static WRITE8_DEVICE_HANDLER( lamps_w )
@ -85,15 +87,17 @@ static WRITE8_DEVICE_HANDLER( lamps_w )
static WRITE8_DEVICE_HANDLER( sound_w ) static WRITE8_DEVICE_HANDLER( sound_w )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* bit 3 - coin lockout (lamp6 in test modes, set to lamp 10 as in getrivia.c) */ /* bit 3 - coin lockout (lamp6 in test modes, set to lamp 10 as in getrivia.c) */
coin_lockout_global_w(~data & 0x08); coin_lockout_global_w(~data & 0x08);
set_led_status(9,data & 0x08); set_led_status(9,data & 0x08);
/* bit 5 - ticket out in trivia games */ /* bit 5 - ticket out in trivia games */
ticket_dispenser_w(device->machine, 0, (data & 0x20)<< 2); ticket_dispenser_w(space, 0, (data & 0x20)<< 2);
/* bit 6 enables NMI */ /* bit 6 enables NMI */
interrupt_enable_w(device->machine, 0,data & 0x40); interrupt_enable_w(space, 0,data & 0x40);
/* bit 7 goes directly to the sound amplifier */ /* bit 7 goes directly to the sound amplifier */
dac_data_w(0,((data & 0x80) >> 7) * 255); dac_data_w(0,((data & 0x80) >> 7) * 255);

View File

@ -658,7 +658,7 @@ static READ32_HANDLER(gcu0_r)
static WRITE32_HANDLER(gcu0_w) static WRITE32_HANDLER(gcu0_w)
{ {
GCU_w(space, 0, offset, data, mem_mask); GCU_w(space->machine, 0, offset, data, mem_mask);
} }
static READ32_HANDLER(gcu1_r) static READ32_HANDLER(gcu1_r)
@ -668,7 +668,7 @@ static READ32_HANDLER(gcu1_r)
static WRITE32_HANDLER(gcu1_w) static WRITE32_HANDLER(gcu1_w)
{ {
GCU_w(space, 1, offset, data, mem_mask); GCU_w(space->machine, 1, offset, data, mem_mask);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1173,12 +1173,12 @@ static READ32_HANDLER( atapi_command_r )
// printf("atapi_command_r: %08X, %08X\n", offset, mem_mask); // printf("atapi_command_r: %08X, %08X\n", offset, mem_mask);
if (ACCESSING_BITS_16_31) if (ACCESSING_BITS_16_31)
{ {
r = atapi_command_reg_r(space, offset*2); r = atapi_command_reg_r(space->machine, offset*2);
return ATAPI_ENDIAN(r) << 16; return ATAPI_ENDIAN(r) << 16;
} }
else else
{ {
r = atapi_command_reg_r(space, (offset*2) + 1); r = atapi_command_reg_r(space->machine, (offset*2) + 1);
return ATAPI_ENDIAN(r) << 0; return ATAPI_ENDIAN(r) << 0;
} }
} }
@ -1189,11 +1189,11 @@ static WRITE32_HANDLER( atapi_command_w )
if (ACCESSING_BITS_16_31) if (ACCESSING_BITS_16_31)
{ {
atapi_command_reg_w(space, offset*2, ATAPI_ENDIAN((data >> 16) & 0xffff)); atapi_command_reg_w(space->machine, offset*2, ATAPI_ENDIAN((data >> 16) & 0xffff));
} }
else else
{ {
atapi_command_reg_w(space, (offset*2) + 1, ATAPI_ENDIAN((data >> 0) & 0xffff)); atapi_command_reg_w(space->machine, (offset*2) + 1, ATAPI_ENDIAN((data >> 0) & 0xffff));
} }
} }

View File

@ -178,7 +178,9 @@ static void r6532_irq(const device_config *device, int state)
static void r6532_soundlatch_w(const device_config *device, UINT8 newdata, UINT8 olddata) static void r6532_soundlatch_w(const device_config *device, UINT8 newdata, UINT8 olddata)
{ {
soundlatch_w(device->machine, 0, newdata); const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
soundlatch_w(space, 0, newdata);
} }

View File

@ -137,15 +137,17 @@ static WRITE8_DEVICE_HANDLER( lamps_w )
static WRITE8_DEVICE_HANDLER( sound_w ) static WRITE8_DEVICE_HANDLER( sound_w )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* bit 3 - coin lockout, lamp10 in poker / lamp6 in trivia test modes */ /* bit 3 - coin lockout, lamp10 in poker / lamp6 in trivia test modes */
coin_lockout_global_w(~data & 0x08); coin_lockout_global_w(~data & 0x08);
set_led_status(9,data & 0x08); set_led_status(9,data & 0x08);
/* bit 5 - ticket out in trivia games */ /* bit 5 - ticket out in trivia games */
ticket_dispenser_w(device->machine,0, (data & 0x20)<< 2); ticket_dispenser_w(space, 0, (data & 0x20)<< 2);
/* bit 6 enables NMI */ /* bit 6 enables NMI */
interrupt_enable_w(device->machine,0,data & 0x40); interrupt_enable_w(space, 0, data & 0x40);
/* bit 7 goes directly to the sound amplifier */ /* bit 7 goes directly to the sound amplifier */
dac_data_w(0,((data & 0x80) >> 7) * 255); dac_data_w(0,((data & 0x80) >> 7) * 255);
@ -176,11 +178,13 @@ static WRITE8_DEVICE_HANDLER( lamps2_w )
static WRITE8_DEVICE_HANDLER( nmi_w ) static WRITE8_DEVICE_HANDLER( nmi_w )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* bit 4 - play/raise button lamp, lamp 9 in selection test mode */ /* bit 4 - play/raise button lamp, lamp 9 in selection test mode */
set_led_status(8,data & 0x10); set_led_status(8,data & 0x10);
/* bit 6 enables NMI */ /* bit 6 enables NMI */
interrupt_enable_w(device->machine,0,data & 0x40); interrupt_enable_w(space, 0, data & 0x40);
} }
static WRITE8_HANDLER( banksel_1_1_w ) static WRITE8_HANDLER( banksel_1_1_w )

View File

@ -431,7 +431,7 @@ WRITE8_HANDLER( combascb_bankselect_w )
MACHINE_RESET( combasc ) MACHINE_RESET( combasc )
{ {
UINT8 *MEM = memory_region(machine, "main") + 0x38000; UINT8 *MEM = memory_region(machine, "main") + 0x38000;
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
combasc_io_ram = MEM + 0x0000; combasc_io_ram = MEM + 0x0000;
combasc_page[0] = MEM + 0x4000; combasc_page[0] = MEM + 0x4000;
@ -442,7 +442,7 @@ MACHINE_RESET( combasc )
memset( combasc_page[1], 0x00, 0x2000 ); memset( combasc_page[1], 0x00, 0x2000 );
combasc_bank_select = -1; combasc_bank_select = -1;
combasc_bankselect_w( machine,0,0 ); combasc_bankselect_w(space, 0, 0);
} }
WRITE8_HANDLER( combasc_pf_control_w ) WRITE8_HANDLER( combasc_pf_control_w )

View File

@ -904,10 +904,14 @@ VIDEO_START( popbingo )
VIDEO_EOF( dooyong ) VIDEO_EOF( dooyong )
{ {
buffer_spriteram_w(machine, 0, 0); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
buffer_spriteram_w(space, 0, 0);
} }
VIDEO_EOF( rshark ) VIDEO_EOF( rshark )
{ {
buffer_spriteram16_w(machine, 0, 0, 0xffff); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
buffer_spriteram16_w(space, 0, 0, 0xffff);
} }

View File

@ -142,8 +142,10 @@ static WRITE8_HANDLER( leprechn_video_command_w )
static TIMER_CALLBACK( clear_screen_done_callback ) static TIMER_CALLBACK( clear_screen_done_callback )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* indicate that the we are done clearing the screen */ /* indicate that the we are done clearing the screen */
via_0_ca1_w(machine, 0, 0); via_0_ca1_w(space, 0, 0);
} }
@ -262,9 +264,10 @@ static const struct via6522_interface trvquest_via_0_interface =
static TIMER_CALLBACK( via_0_ca1_timer_callback ) static TIMER_CALLBACK( via_0_ca1_timer_callback )
{ {
gameplan_state *state = machine->driver_data; gameplan_state *state = machine->driver_data;
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* !VBLANK is connected to CA1 */ /* !VBLANK is connected to CA1 */
via_0_ca1_w(machine, 0, (UINT8)param); via_0_ca1_w(space, 0, (UINT8)param);
if (param) if (param)
timer_adjust_oneshot(state->via_0_ca1_timer, video_screen_get_time_until_pos(machine->primary_screen, VBSTART, 0), 0); timer_adjust_oneshot(state->via_0_ca1_timer, video_screen_get_time_until_pos(machine->primary_screen, VBSTART, 0), 0);