address space compilation errors.

This commit is contained in:
smf- 2008-11-15 11:41:15 +00:00
parent 0182454e02
commit da9ccc6f75
15 changed files with 56 additions and 41 deletions

View File

@ -30,15 +30,15 @@
void crbaloon_audio_set_music_freq(running_machine *machine, UINT8 freq) void crbaloon_audio_set_music_freq(const address_space *space, UINT8 freq)
{ {
discrete_sound_w(machine, CRBALOON_MUSIC_DATA, freq); discrete_sound_w(space, CRBALOON_MUSIC_DATA, freq);
} }
void crbaloon_audio_set_music_enable(running_machine *machine, int enabled) void crbaloon_audio_set_music_enable(const address_space *space, int enabled)
{ {
discrete_sound_w(machine, CRBALOON_MUSIC_EN, enabled); discrete_sound_w(space, CRBALOON_MUSIC_EN, enabled);
} }
@ -64,9 +64,9 @@ void crbaloon_audio_set_appear_enable(int enabled)
} }
void crbaloon_audio_set_laugh_enable(running_machine *machine, int enabled) void crbaloon_audio_set_laugh_enable(const address_space *space, int enabled)
{ {
discrete_sound_w(machine, CRBALOON_LAUGH_EN, enabled); discrete_sound_w(space, CRBALOON_LAUGH_EN, enabled);
} }

View File

@ -166,7 +166,7 @@ static WRITE8_HANDLER( port_sound_w )
sound_global_enable((data & 0x02) ? TRUE : FALSE); sound_global_enable((data & 0x02) ? TRUE : FALSE);
/* D2 - unlabeled - music enable */ /* D2 - unlabeled - music enable */
crbaloon_audio_set_music_enable(space->machine, (data & 0x04) ? TRUE : FALSE); crbaloon_audio_set_music_enable(space, (data & 0x04) ? TRUE : FALSE);
/* D3 - EXPLOSION */ /* D3 - EXPLOSION */
crbaloon_audio_set_explosion_enable((data & 0x08) ? TRUE : FALSE); crbaloon_audio_set_explosion_enable((data & 0x08) ? TRUE : FALSE);
@ -178,7 +178,7 @@ static WRITE8_HANDLER( port_sound_w )
crbaloon_audio_set_appear_enable((data & 0x20) ? TRUE : FALSE); crbaloon_audio_set_appear_enable((data & 0x20) ? TRUE : FALSE);
/* D6 - unlabeled - laugh enable */ /* D6 - unlabeled - laugh enable */
crbaloon_audio_set_laugh_enable(space->machine, (data & 0x40) ? TRUE : FALSE); crbaloon_audio_set_laugh_enable(space, (data & 0x40) ? TRUE : FALSE);
/* D7 - unlabeled - goes to PC3259 pin 16 */ /* D7 - unlabeled - goes to PC3259 pin 16 */
@ -188,7 +188,7 @@ static WRITE8_HANDLER( port_sound_w )
static WRITE8_HANDLER( port_music_w ) static WRITE8_HANDLER( port_music_w )
{ {
crbaloon_audio_set_music_freq(space->machine, data); crbaloon_audio_set_music_freq(space, data);
} }
@ -344,7 +344,7 @@ GFXDECODE_END
static MACHINE_RESET( crballoon ) static MACHINE_RESET( crballoon )
{ {
address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO);
pc3092_reset(); pc3092_reset();
port_sound_w(space, 0, 0); port_sound_w(space, 0, 0);

View File

@ -305,7 +305,8 @@ static int m6295_bank;
static UINT16 m6295_key_delay; static UINT16 m6295_key_delay;
static INTERRUPT_GEN( kickgoal_interrupt ) static INTERRUPT_GEN( kickgoal_interrupt )
{ {
const address_space *space = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM); const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
if ((okim6295_status_0_r(space,0) & 0x08) == 0) if ((okim6295_status_0_r(space,0) & 0x08) == 0)
{ {
switch(kickgoal_melody_loop) switch(kickgoal_melody_loop)

View File

@ -173,8 +173,10 @@ static WRITE8_HANDLER( wardner_ramrom_bank_sw )
STATE_POSTLOAD( wardner_restore_bank ) STATE_POSTLOAD( wardner_restore_bank )
{ {
wardner_ramrom_bank_sw(machine,0,1); /* Dummy value to ensure restoration */ const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
wardner_ramrom_bank_sw(machine,0,wardner_membank);
wardner_ramrom_bank_sw(space,0,1); /* Dummy value to ensure restoration */
wardner_ramrom_bank_sw(space,0,wardner_membank);
} }

View File

@ -180,15 +180,15 @@ static WRITE8_HANDLER( sound_bankswitch_w )
static WRITE16_HANDLER( warriorb_sound_w ) static WRITE16_HANDLER( warriorb_sound_w )
{ {
if (offset == 0) if (offset == 0)
taitosound_port_w (space->machine, 0, data & 0xff); taitosound_port_w (space, 0, data & 0xff);
else if (offset == 1) else if (offset == 1)
taitosound_comm_w (space->machine, 0, data & 0xff); taitosound_comm_w (space, 0, data & 0xff);
} }
static READ16_HANDLER( warriorb_sound_r ) static READ16_HANDLER( warriorb_sound_r )
{ {
if (offset == 1) if (offset == 1)
return ((taitosound_comm_r (space->machine,0) & 0xff)); return ((taitosound_comm_r (space,0) & 0xff));
else return 0; else return 0;
} }

View File

@ -113,7 +113,7 @@ static READ16_HANDLER( wwfwfest_paletteram16_xxxxBBBBGGGGRRRR_word_r )
static WRITE16_HANDLER( wwfwfest_paletteram16_xxxxBBBBGGGGRRRR_word_w ) static WRITE16_HANDLER( wwfwfest_paletteram16_xxxxBBBBGGGGRRRR_word_w )
{ {
offset = (offset & 0x000f) | (offset & 0x7fc0) >> 2; offset = (offset & 0x000f) | (offset & 0x7fc0) >> 2;
paletteram16_xxxxBBBBGGGGRRRR_word_w (space->machine, offset, data, mem_mask); paletteram16_xxxxBBBBGGGGRRRR_word_w (space, offset, data, mem_mask);
} }
/*- Priority Control -*/ /*- Priority Control -*/
@ -356,7 +356,9 @@ static const ym2151_interface ym2151_config =
static VIDEO_EOF( wwfwfest ) static VIDEO_EOF( wwfwfest )
{ {
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

@ -10,12 +10,12 @@ Crazy Ballooon
/*----------- defined in audio/crbaloon.c -----------*/ /*----------- defined in audio/crbaloon.c -----------*/
void crbaloon_audio_set_music_freq(running_machine *machine, UINT8 freq); void crbaloon_audio_set_music_freq(const address_space *space, UINT8 freq);
void crbaloon_audio_set_music_enable(running_machine *machine, int enabled); void crbaloon_audio_set_music_enable(const address_space *space, int enabled);
void crbaloon_audio_set_explosion_enable(int enabled); void crbaloon_audio_set_explosion_enable(int enabled);
void crbaloon_audio_set_breath_enable(int enabled); void crbaloon_audio_set_breath_enable(int enabled);
void crbaloon_audio_set_appear_enable(int enabled); void crbaloon_audio_set_appear_enable(int enabled);
void crbaloon_audio_set_laugh_enable(running_machine *machine, int enabled); void crbaloon_audio_set_laugh_enable(const address_space *space, int enabled);
MACHINE_DRIVER_EXTERN( crbaloon_audio ); MACHINE_DRIVER_EXTERN( crbaloon_audio );

View File

@ -7,8 +7,10 @@ static int scanline=0;
INTERRUPT_GEN( beezer_interrupt ) INTERRUPT_GEN( beezer_interrupt )
{ {
const address_space *space = cpu_get_address_space(device->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
scanline = (scanline + 1) % 0x80; scanline = (scanline + 1) % 0x80;
via_0_ca2_w (device->machine, 0, scanline & 0x10); via_0_ca2_w (space, 0, scanline & 0x10);
if ((scanline & 0x78) == 0x78) if ((scanline & 0x78) == 0x78)
cpu_set_input_line(device, M6809_FIRQ_LINE, ASSERT_LINE); cpu_set_input_line(device, M6809_FIRQ_LINE, ASSERT_LINE);
else else

View File

@ -216,6 +216,7 @@ popmessage("gfxctrl = %02x",gfxctrl);
VIDEO_EOF( crshrace ) VIDEO_EOF( crshrace )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
buffer_spriteram16_w(space,0,0,0xffff); buffer_spriteram16_w(space,0,0,0xffff);
buffer_spriteram16_2_w(space,0,0,0xffff); buffer_spriteram16_2_w(space,0,0,0xffff);
} }

View File

@ -227,6 +227,8 @@ VIDEO_UPDATE( dogfgt )
if (lastflip != flip_screen_get() || lastpixcolor != pixcolor) if (lastflip != flip_screen_get() || lastpixcolor != pixcolor)
{ {
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
lastflip = flip_screen_get(); lastflip = flip_screen_get();
lastpixcolor = pixcolor; lastpixcolor = pixcolor;

View File

@ -208,7 +208,7 @@ static TILE_GET_INFO( ojankoy_get_tile_info )
******************************************************************************/ ******************************************************************************/
void ojankoc_flipscreen(running_machine *machine, int data) void ojankoc_flipscreen(const address_space *space, int data)
{ {
static int ojankoc_flipscreen_old = 0; static int ojankoc_flipscreen_old = 0;
int x, y; int x, y;
@ -222,13 +222,13 @@ void ojankoc_flipscreen(running_machine *machine, int data)
for (x = 0; x < 0x100; x++) { for (x = 0; x < 0x100; x++) {
color1 = ojankohs_videoram[0x0000 + ((y * 256) + x)]; color1 = ojankohs_videoram[0x0000 + ((y * 256) + x)];
color2 = ojankohs_videoram[0x3fff - ((y * 256) + x)]; color2 = ojankohs_videoram[0x3fff - ((y * 256) + x)];
ojankoc_videoram_w(machine, 0x0000 + ((y * 256) + x), color2); ojankoc_videoram_w(space, 0x0000 + ((y * 256) + x), color2);
ojankoc_videoram_w(machine, 0x3fff - ((y * 256) + x), color1); ojankoc_videoram_w(space, 0x3fff - ((y * 256) + x), color1);
color1 = ojankohs_videoram[0x4000 + ((y * 256) + x)]; color1 = ojankohs_videoram[0x4000 + ((y * 256) + x)];
color2 = ojankohs_videoram[0x7fff - ((y * 256) + x)]; color2 = ojankohs_videoram[0x7fff - ((y * 256) + x)];
ojankoc_videoram_w(machine, 0x4000 + ((y * 256) + x), color2); ojankoc_videoram_w(space, 0x4000 + ((y * 256) + x), color2);
ojankoc_videoram_w(machine, 0x7fff - ((y * 256) + x), color1); ojankoc_videoram_w(space, 0x7fff - ((y * 256) + x), color1);
} }
} }
@ -321,9 +321,11 @@ VIDEO_UPDATE( ojankoc )
if (ojankoc_screen_refresh) if (ojankoc_screen_refresh)
{ {
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* redraw bitmap */ /* redraw bitmap */
for (offs = 0; offs < 0x8000; offs++) { for (offs = 0; offs < 0x8000; offs++) {
ojankoc_videoram_w(screen->machine, offs, ojankohs_videoram[offs]); ojankoc_videoram_w(space, offs, ojankohs_videoram[offs]);
} }
ojankoc_screen_refresh = 0; ojankoc_screen_refresh = 0;
} }

View File

@ -161,9 +161,10 @@ WRITE16_HANDLER( hitice_pixel_scroll_w )
static void hitice_clear_pixel_bitmap(running_machine *machine) static void hitice_clear_pixel_bitmap(running_machine *machine)
{ {
int i; int i;
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
for (i = 0;i < 0x40000;i++) for (i = 0;i < 0x40000;i++)
hitice_pixelram_w(machine,i,0,0xffff); hitice_pixelram_w(space,i,0,0xffff);
} }
static TILE_GET_INFO( get_bg_tile_info ) static TILE_GET_INFO( get_bg_tile_info )

View File

@ -5023,46 +5023,46 @@ WRITE8_HANDLER( TC0220IOC_portreg_w )
READ16_HANDLER( TC0220IOC_halfword_port_r ) READ16_HANDLER( TC0220IOC_halfword_port_r )
{ {
return TC0220IOC_port_r( space->machine, offset ); return TC0220IOC_port_r( space, offset );
} }
WRITE16_HANDLER( TC0220IOC_halfword_port_w ) WRITE16_HANDLER( TC0220IOC_halfword_port_w )
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
TC0220IOC_port_w( space->machine, offset, data & 0xff ); TC0220IOC_port_w( space, offset, data & 0xff );
} }
READ16_HANDLER( TC0220IOC_halfword_portreg_r ) READ16_HANDLER( TC0220IOC_halfword_portreg_r )
{ {
return TC0220IOC_portreg_r( space->machine, offset ); return TC0220IOC_portreg_r( space, offset );
} }
WRITE16_HANDLER( TC0220IOC_halfword_portreg_w ) WRITE16_HANDLER( TC0220IOC_halfword_portreg_w )
{ {
if (ACCESSING_BITS_0_7) if (ACCESSING_BITS_0_7)
TC0220IOC_portreg_w( space->machine, offset, data & 0xff ); TC0220IOC_portreg_w( space, offset, data & 0xff );
} }
READ16_HANDLER( TC0220IOC_halfword_byteswap_port_r ) READ16_HANDLER( TC0220IOC_halfword_byteswap_port_r )
{ {
return TC0220IOC_port_r( space->machine, offset ) << 8; return TC0220IOC_port_r( space, offset ) << 8;
} }
WRITE16_HANDLER( TC0220IOC_halfword_byteswap_port_w ) WRITE16_HANDLER( TC0220IOC_halfword_byteswap_port_w )
{ {
if (ACCESSING_BITS_8_15) if (ACCESSING_BITS_8_15)
TC0220IOC_port_w( space->machine, offset, (data>>8) & 0xff ); TC0220IOC_port_w( space, offset, (data>>8) & 0xff );
} }
READ16_HANDLER( TC0220IOC_halfword_byteswap_portreg_r ) READ16_HANDLER( TC0220IOC_halfword_byteswap_portreg_r )
{ {
return TC0220IOC_portreg_r( space->machine, offset )<<8; return TC0220IOC_portreg_r( space, offset )<<8;
} }
WRITE16_HANDLER( TC0220IOC_halfword_byteswap_portreg_w ) WRITE16_HANDLER( TC0220IOC_halfword_byteswap_portreg_w )
{ {
if (ACCESSING_BITS_8_15) if (ACCESSING_BITS_8_15)
TC0220IOC_portreg_w( space->machine, offset, (data>>8) & 0xff ); TC0220IOC_portreg_w( space, offset, (data>>8) & 0xff );
} }
READ16_HANDLER( TC0220IOC_halfword_r ) READ16_HANDLER( TC0220IOC_halfword_r )

View File

@ -1083,12 +1083,12 @@ static void toaplan2_scroll_reg_data_w(running_machine *machine, offs_t offset,
WRITE16_HANDLER( toaplan2_0_scroll_reg_data_w ) WRITE16_HANDLER( toaplan2_0_scroll_reg_data_w )
{ {
toaplan2_scroll_reg_data_w(space, offset, data, mem_mask, 0); toaplan2_scroll_reg_data_w(space->machine, offset, data, mem_mask, 0);
} }
WRITE16_HANDLER( toaplan2_1_scroll_reg_data_w ) WRITE16_HANDLER( toaplan2_1_scroll_reg_data_w )
{ {
toaplan2_scroll_reg_data_w(space, offset, data, mem_mask, 1); toaplan2_scroll_reg_data_w(space->machine, offset, data, mem_mask, 1);
} }
@ -1113,7 +1113,7 @@ WRITE16_HANDLER( pipibibi_scroll_w )
} }
toaplan2_scroll_reg[0] = offset; toaplan2_scroll_reg[0] = offset;
toaplan2_scroll_reg_data_w(space, offset, data, mem_mask, 0); toaplan2_scroll_reg_data_w(space->machine, offset, data, mem_mask, 0);
} }
} }

View File

@ -514,8 +514,10 @@ VIDEO_UPDATE( toaplan0 )
VIDEO_EOF( toaplan0 ) VIDEO_EOF( toaplan0 )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* Spriteram is always 1 frame ahead, suggesting spriteram buffering. /* Spriteram is always 1 frame ahead, suggesting spriteram buffering.
There are no CPU output registers that control this so we There are no CPU output registers that control this so we
assume it happens automatically every frame, at the end of vblank */ assume it happens automatically every frame, at the end of vblank */
buffer_spriteram16_w(machine,0,0,0xffff); buffer_spriteram16_w(space,0,0,0xffff);
} }