address space compilation errors.

This commit is contained in:
smf- 2008-11-15 10:31:01 +00:00
parent e926e13aa3
commit 763ddc92e6
8 changed files with 42 additions and 33 deletions

View File

@ -457,7 +457,7 @@ static void update_control_lines(running_machine *machine)
if ((cage_control & 2) && cage_to_cpu_ready) if ((cage_control & 2) && cage_to_cpu_ready)
reason |= CAGE_IRQ_REASON_DATA_READY; reason |= CAGE_IRQ_REASON_DATA_READY;
(*cage_irqhandler)(Machine, reason); (*cage_irqhandler)(machine, reason);
} }
/* set the IOF input lines */ /* set the IOF input lines */
@ -513,9 +513,9 @@ static READ32_HANDLER( cage_io_status_r )
UINT16 main_from_cage_r(const address_space *space) UINT16 main_from_cage_r(const address_space *space)
{ {
if (LOG_COMM) if (LOG_COMM)
logerror("%06X:main read data = %04X\n", cpu_get_pc(Machine->activecpu), soundlatch_word_r(space, 0, 0)); logerror("%06X:main read data = %04X\n", cpu_get_pc(space->machine->activecpu), soundlatch_word_r(space, 0, 0));
cage_to_cpu_ready = 0; cage_to_cpu_ready = 0;
update_control_lines(Machine); update_control_lines(space->machine);
return soundlatch_word_r(space, 0, 0xffff); return soundlatch_word_r(space, 0, 0xffff);
} }
@ -557,7 +557,7 @@ void cage_control_w(running_machine *machine, UINT16 data)
/* CPU is reset if both control lines are 0 */ /* CPU is reset if both control lines are 0 */
if (!(cage_control & 3)) if (!(cage_control & 3))
{ {
cpu_set_input_line(Machine->cpu[cage_cpu], INPUT_LINE_RESET, ASSERT_LINE); cpu_set_input_line(machine->cpu[cage_cpu], INPUT_LINE_RESET, ASSERT_LINE);
dma_enabled = 0; dma_enabled = 0;
dma_timer_enabled = 0; dma_timer_enabled = 0;
@ -574,7 +574,7 @@ void cage_control_w(running_machine *machine, UINT16 data)
cage_to_cpu_ready = 0; cage_to_cpu_ready = 0;
} }
else else
cpu_set_input_line(Machine->cpu[cage_cpu], INPUT_LINE_RESET, CLEAR_LINE); cpu_set_input_line(machine->cpu[cage_cpu], INPUT_LINE_RESET, CLEAR_LINE);
/* update the control state */ /* update the control state */
update_control_lines(machine); update_control_lines(machine);

View File

@ -591,7 +591,7 @@ static INTERRUPT_GEN( slave_interrupt )
static MACHINE_RESET( airbustr ) static MACHINE_RESET( airbustr )
{ {
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);
soundlatch_status = soundlatch2_status = 0; soundlatch_status = soundlatch2_status = 0;
master_addr = 0xff; master_addr = 0xff;
slave_addr = 0xfd; slave_addr = 0xfd;

View File

@ -692,7 +692,8 @@ static void a800_setbank(running_machine *machine, int n)
static void pokey_reset(running_machine *machine) static void pokey_reset(running_machine *machine)
{ {
pokey1_w(machine,15,0); const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
pokey1_w(space,15,0);
} }

View File

@ -1183,6 +1183,8 @@ static TIMER_CALLBACK( antic_steal_cycles )
*****************************************************************************/ *****************************************************************************/
static TIMER_CALLBACK( antic_scanline_render ) static TIMER_CALLBACK( antic_scanline_render )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
VIDEO *video = antic.video[antic.scanline]; VIDEO *video = antic.video[antic.scanline];
LOG((" @cycle #%3d render mode $%X lines to go #%d\n", cycle(machine), (antic.cmd & 0x0f), antic.modelines)); LOG((" @cycle #%3d render mode $%X lines to go #%d\n", cycle(machine), (antic.cmd & 0x0f), antic.modelines));
@ -1198,16 +1200,16 @@ static TIMER_CALLBACK( antic_scanline_render )
if( antic.w.dmactl & DMA_MISSILE ) if( antic.w.dmactl & DMA_MISSILE )
{ {
antic.steal_cycles += 1; antic.steal_cycles += 1;
atari_gtia_w(machine, 0x11, RDPMGFXD(machine->cpu[0], 3*256)); atari_gtia_w(space, 0x11, RDPMGFXD(machine->cpu[0], 3*256));
} }
/* transport player data to GTIA ? */ /* transport player data to GTIA ? */
if( antic.w.dmactl & DMA_PLAYER ) if( antic.w.dmactl & DMA_PLAYER )
{ {
antic.steal_cycles += 4; antic.steal_cycles += 4;
atari_gtia_w(machine, 0x0d, RDPMGFXD(machine->cpu[0], 4*256)); atari_gtia_w(space, 0x0d, RDPMGFXD(machine->cpu[0], 4*256));
atari_gtia_w(machine, 0x0e, RDPMGFXD(machine->cpu[0], 5*256)); atari_gtia_w(space, 0x0e, RDPMGFXD(machine->cpu[0], 5*256));
atari_gtia_w(machine, 0x0f, RDPMGFXD(machine->cpu[0], 6*256)); atari_gtia_w(space, 0x0f, RDPMGFXD(machine->cpu[0], 6*256));
atari_gtia_w(machine, 0x10, RDPMGFXD(machine->cpu[0], 7*256)); atari_gtia_w(space, 0x10, RDPMGFXD(machine->cpu[0], 7*256));
} }
} }
else else
@ -1217,17 +1219,17 @@ static TIMER_CALLBACK( antic_scanline_render )
{ {
if( (antic.scanline & 1) == 0 ) /* even line ? */ if( (antic.scanline & 1) == 0 ) /* even line ? */
antic.steal_cycles += 1; antic.steal_cycles += 1;
atari_gtia_w(machine, 0x11, RDPMGFXS(machine->cpu[0], 3*128)); atari_gtia_w(space, 0x11, RDPMGFXS(machine->cpu[0], 3*128));
} }
/* transport player data to GTIA ? */ /* transport player data to GTIA ? */
if( antic.w.dmactl & DMA_PLAYER ) if( antic.w.dmactl & DMA_PLAYER )
{ {
if( (antic.scanline & 1) == 0 ) /* even line ? */ if( (antic.scanline & 1) == 0 ) /* even line ? */
antic.steal_cycles += 4; antic.steal_cycles += 4;
atari_gtia_w(machine, 0x0d, RDPMGFXS(machine->cpu[0], 4*128)); atari_gtia_w(space, 0x0d, RDPMGFXS(machine->cpu[0], 4*128));
atari_gtia_w(machine, 0x0e, RDPMGFXS(machine->cpu[0], 5*128)); atari_gtia_w(space, 0x0e, RDPMGFXS(machine->cpu[0], 5*128));
atari_gtia_w(machine, 0x0f, RDPMGFXS(machine->cpu[0], 6*128)); atari_gtia_w(space, 0x0f, RDPMGFXS(machine->cpu[0], 6*128));
atari_gtia_w(machine, 0x10, RDPMGFXS(machine->cpu[0], 7*128)); atari_gtia_w(space, 0x10, RDPMGFXS(machine->cpu[0], 7*128));
} }
} }
} }

View File

@ -509,6 +509,8 @@ VIDEO_UPDATE( gaelco2_dual )
VIDEO_EOF( gaelco2 ) VIDEO_EOF( gaelco2 )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* sprites are one frame ahead */ /* sprites are one frame ahead */
buffer_spriteram16_w(machine, 0, 0, 0xffff); buffer_spriteram16_w(space, 0, 0, 0xffff);
} }

View File

@ -155,9 +155,11 @@ static int is_ntsc(running_machine *machine)
static void gtia_reset(running_machine *machine) static void gtia_reset(running_machine *machine)
{ {
int i; int i;
/* reset the GTIA read/write/helper registers */ const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
/* reset the GTIA read/write/helper registers */
for (i = 0; i < 32; i++) for (i = 0; i < 32; i++)
atari_gtia_w(machine,i,0); atari_gtia_w(space,i,0);
memset(&gtia.r, 0, sizeof(gtia.r)); memset(&gtia.r, 0, sizeof(gtia.r));
if (is_ntsc(machine)) if (is_ntsc(machine))
gtia.r.pal = 0xff; gtia.r.pal = 0xff;

View File

@ -308,7 +308,7 @@ INLINE void consume_rle(int count)
* *
*************************************/ *************************************/
static void perform_blit(running_machine *machine) static void perform_blit(const address_space *space)
{ {
offs_t addr = tms_state.regs[TMS34061_XYADDRESS] | ((tms_state.regs[TMS34061_XYOFFSET] & 0x300) << 8); offs_t addr = tms_state.regs[TMS34061_XYADDRESS] | ((tms_state.regs[TMS34061_XYOFFSET] & 0x300) << 8);
UINT8 shift = (BLITTER_FLAGS & BLITFLAG_SHIFT) ? 4 : 0; UINT8 shift = (BLITTER_FLAGS & BLITFLAG_SHIFT) ? 4 : 0;
@ -317,7 +317,7 @@ static void perform_blit(running_machine *machine)
int xdir = (BLITTER_FLAGS & BLITFLAG_XFLIP) ? -1 : 1; int xdir = (BLITTER_FLAGS & BLITFLAG_XFLIP) ? -1 : 1;
int xflip = (BLITTER_FLAGS & BLITFLAG_XFLIP); int xflip = (BLITTER_FLAGS & BLITFLAG_XFLIP);
int rle = (BLITTER_FLAGS & BLITFLAG_RLE); int rle = (BLITTER_FLAGS & BLITFLAG_RLE);
int color = tms34061_latch_r(machine, 0); int color = tms34061_latch_r(space, 0);
int width = BLITTER_WIDTH; int width = BLITTER_WIDTH;
int height = BLITTER_HEIGHT; int height = BLITTER_HEIGHT;
UINT8 transmaskhi, transmasklo; UINT8 transmaskhi, transmasklo;
@ -328,7 +328,7 @@ static void perform_blit(running_machine *machine)
/* debugging */ /* debugging */
if (FULL_LOGGING) if (FULL_LOGGING)
logerror("Blit: scan=%d src=%06x @ (%05x) for %dx%d ... flags=%02x\n", logerror("Blit: scan=%d src=%06x @ (%05x) for %dx%d ... flags=%02x\n",
video_screen_get_vpos(machine->primary_screen), video_screen_get_vpos(space->machine->primary_screen),
(*itech8_grom_bank << 16) | (BLITTER_ADDRHI << 8) | BLITTER_ADDRLO, (*itech8_grom_bank << 16) | (BLITTER_ADDRHI << 8) | BLITTER_ADDRLO,
tms_state.regs[TMS34061_XYADDRESS] | ((tms_state.regs[TMS34061_XYOFFSET] & 0x300) << 8), tms_state.regs[TMS34061_XYADDRESS] | ((tms_state.regs[TMS34061_XYOFFSET] & 0x300) << 8),
BLITTER_WIDTH, BLITTER_HEIGHT, BLITTER_FLAGS); BLITTER_WIDTH, BLITTER_HEIGHT, BLITTER_FLAGS);
@ -519,7 +519,7 @@ WRITE8_HANDLER( itech8_blitter_w )
} }
/* perform the blit */ /* perform the blit */
perform_blit(space->machine); perform_blit(space);
blit_in_progress = 1; blit_in_progress = 1;
/* set a timer to go off when we're done */ /* set a timer to go off when we're done */

View File

@ -182,7 +182,7 @@ static void leland_video_addr_w(int offset, int data, int num)
* *
*************************************/ *************************************/
static int leland_vram_port_r(running_machine *machine, int offset, int num) static int leland_vram_port_r(const address_space *space, int offset, int num)
{ {
struct vram_state_data *state = vram_state + num; struct vram_state_data *state = vram_state + num;
int addr = state->addr; int addr = state->addr;
@ -209,14 +209,14 @@ static int leland_vram_port_r(running_machine *machine, int offset, int num)
default: default:
logerror("CPU #%d %04x Warning: Unknown video port %02x read (address=%04x)\n", logerror("CPU #%d %04x Warning: Unknown video port %02x read (address=%04x)\n",
cpunum_get_active(),cpu_get_pc(machine->activecpu), offset, addr); cpunum_get_active(),cpu_get_pc(space->machine->activecpu), offset, addr);
ret = 0; ret = 0;
break; break;
} }
state->addr = addr; state->addr = addr;
if (LOG_COMM && addr >= 0xf000) if (LOG_COMM && addr >= 0xf000)
logerror("%04X:%s comm read %04X = %02X\n", cpu_get_previouspc(machine->activecpu), num ? "slave" : "master", addr, ret); logerror("%04X:%s comm read %04X = %02X\n", cpu_get_previouspc(space->machine->activecpu), num ? "slave" : "master", addr, ret);
return ret; return ret;
} }
@ -229,7 +229,7 @@ static int leland_vram_port_r(running_machine *machine, int offset, int num)
* *
*************************************/ *************************************/
static void leland_vram_port_w(running_machine *machine, int offset, int data, int num) static void leland_vram_port_w(const address_space *space, int offset, int data, int num)
{ {
struct vram_state_data *state = vram_state + num; struct vram_state_data *state = vram_state + num;
int addr = state->addr; int addr = state->addr;
@ -238,12 +238,12 @@ static void leland_vram_port_w(running_machine *machine, int offset, int data, i
/* don't fully understand why this is needed. Isn't the /* don't fully understand why this is needed. Isn't the
video RAM just one big RAM? */ video RAM just one big RAM? */
int scanline = video_screen_get_vpos(machine->primary_screen); int scanline = video_screen_get_vpos(space->machine->primary_screen);
if (scanline > 0) if (scanline > 0)
video_screen_update_partial(machine->primary_screen, scanline - 1); video_screen_update_partial(space->machine->primary_screen, scanline - 1);
if (LOG_COMM && addr >= 0xf000) if (LOG_COMM && addr >= 0xf000)
logerror("%04X:%s comm write %04X = %02X\n", cpu_get_previouspc(machine->activecpu), num ? "slave" : "master", addr, data); logerror("%04X:%s comm write %04X = %02X\n", cpu_get_previouspc(space->machine->activecpu), num ? "slave" : "master", addr, data);
/* based on the low 3 bits of the offset, update the destination */ /* based on the low 3 bits of the offset, update the destination */
switch (offset & 7) switch (offset & 7)
@ -295,7 +295,7 @@ static void leland_vram_port_w(running_machine *machine, int offset, int data, i
default: default:
logerror("CPU #%d %04x Warning: Unknown video port write (address=%04x value=%02x)\n", logerror("CPU #%d %04x Warning: Unknown video port write (address=%04x value=%02x)\n",
cpunum_get_active(),cpu_get_pc(machine->activecpu), offset, addr); cpunum_get_active(),cpu_get_pc(space->machine->activecpu), offset, addr);
break; break;
} }
@ -319,10 +319,12 @@ WRITE8_HANDLER( leland_master_video_addr_w )
static TIMER_CALLBACK( leland_delayed_mvram_w ) static TIMER_CALLBACK( leland_delayed_mvram_w )
{ {
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
int num = (param >> 16) & 1; int num = (param >> 16) & 1;
int offset = (param >> 8) & 0xff; int offset = (param >> 8) & 0xff;
int data = param & 0xff; int data = param & 0xff;
leland_vram_port_w(machine, offset, data, num); leland_vram_port_w(space, offset, data, num);
} }