From: Atari Ace [mailto:atari_ace@verizon.net]

Subject: [patch] Missed Machine->machine changes

Hi mamedev,

A short incremental to my last deprecat.h patches.  This one is the
result of a slightly improved fixup script, which finds more cases
where Machine can be replaced with machine.  Six more files lose
deprecat.h.

~aa
This commit is contained in:
Aaron Giles 2008-05-22 03:24:45 +00:00
parent a300da2178
commit defcc8895b
23 changed files with 57 additions and 63 deletions

View File

@ -2453,11 +2453,11 @@ static void memory_init_locate(running_machine *machine)
if (entry->baseptr != NULL)
*entry->baseptr = entry->memory;
if (entry->baseptroffs_plus1 != 0)
*(void **)((UINT8 *)Machine->driver_data + entry->baseptroffs_plus1 - 1) = entry->memory;
*(void **)((UINT8 *)machine->driver_data + entry->baseptroffs_plus1 - 1) = entry->memory;
if (entry->sizeptr != NULL)
*entry->sizeptr = entry->byteend - entry->bytestart + 1;
if (entry->sizeptroffs_plus1 != 0)
*(size_t *)((UINT8 *)Machine->driver_data + entry->sizeptroffs_plus1 - 1) = entry->byteend - entry->bytestart + 1;
*(size_t *)((UINT8 *)machine->driver_data + entry->sizeptroffs_plus1 - 1) = entry->byteend - entry->bytestart + 1;
}
}

View File

@ -161,7 +161,7 @@ void cage_init(running_machine *machine, int boot_region, offs_t speedup)
memory_set_bankptr(10, memory_region(boot_region));
memory_set_bankptr(11, memory_region(boot_region + 1));
cage_cpu = mame_find_cpu_index(Machine, "cage");
cage_cpu = mame_find_cpu_index(machine, "cage");
cage_cpu_clock_period = ATTOTIME_IN_HZ(cpunum_get_clock(cage_cpu));
cage_cpu_h1_clock_period = attotime_mul(cage_cpu_clock_period, 2);

View File

@ -935,16 +935,16 @@ void dcs2_init(running_machine *machine, int dram_in_mb, offs_t polling_offset)
memset(&dcs, 0, sizeof(dcs));
/* find the DCS CPU and the sound ROMs */
dcs.cpunum = mame_find_cpu_index(Machine, "dcs2");
dcs.cpunum = mame_find_cpu_index(machine, "dcs2");
dcs.rev = 2;
if ((INT8)dcs.cpunum == -1)
{
dcs.cpunum = mame_find_cpu_index(Machine, "dsio");
dcs.cpunum = mame_find_cpu_index(machine, "dsio");
dcs.rev = 3;
}
if ((INT8)dcs.cpunum == -1)
{
dcs.cpunum = mame_find_cpu_index(Machine, "denver");
dcs.cpunum = mame_find_cpu_index(machine, "denver");
dcs.rev = 4;
}
dcs.channels = 2;
@ -989,7 +989,7 @@ void dcs2_init(running_machine *machine, int dram_in_mb, offs_t polling_offset)
dcs_register_state();
/* reset the system */
dcs_reset(Machine, NULL, 0);
dcs_reset(machine, NULL, 0);
}

View File

@ -261,13 +261,13 @@ void cojag_sound_init(running_machine *machine)
jaguar_wave_rom[0x200 + i] = (int)(32767. * sin(2.0 * M_PI * (double)i / (double)0x80));
/* F1DA00 = traingle wave with noise */
jaguar_wave_rom[0x280 + i] = jaguar_wave_rom[0x000 + i] * (mame_rand(Machine) % 32768) / 32768;
jaguar_wave_rom[0x280 + i] = jaguar_wave_rom[0x000 + i] * (mame_rand(machine) % 32768) / 32768;
/* F1DC00 = spike */
jaguar_wave_rom[0x300 + i] = (i == 0x40) ? 32767 : 0;
/* F1DE00 = white noise */
jaguar_wave_rom[0x380 + i] = mame_rand(Machine) % 32768;
jaguar_wave_rom[0x380 + i] = mame_rand(machine) % 32768;
}
#if ENABLE_SPEEDUP_HACKS

View File

@ -67,7 +67,7 @@ static void update_irq_state(running_machine *machine)
for (i = 4; i >= 0; i--)
if (irq_state[i])
{
cpunum_set_input_line(Machine, 0, i, ASSERT_LINE);
cpunum_set_input_line(machine, 0, i, ASSERT_LINE);
return;
}

View File

@ -32,7 +32,6 @@ Notes:
***************************************************************************/
#include "driver.h"
#include "deprecat.h"
#include "cpu/z80/z80.h"
#include "sound/okim6295.h"
#include "sound/3812intf.h"
@ -308,7 +307,7 @@ GFXDECODE_END
static void irqhandler(running_machine *machine, int linestate)
{
/* system 16c doesn't have the sound CPU */
if (Machine->config->cpu[1].type != CPU_DUMMY)
if (machine->config->cpu[1].type != CPU_DUMMY)
cpunum_set_input_line(machine, 1,0,linestate);
}

View File

@ -250,7 +250,7 @@ static void jchan_mcu_run(running_machine *machine)
mcu_ram[mcu_offset + 6] = 0x3939; mcu_ram[mcu_offset + 7] = 0x3420;
break;
case 0x3e:
if ( strcmp(Machine->gamedrv->name, "jchan") == 0 ) /* $f72 ($f6a-$fc6) */
if ( strcmp(machine->gamedrv->name, "jchan") == 0 ) /* $f72 ($f6a-$fc6) */
{
/* MCU writes the string "1995/05/24 The kung-Fu Master Jackie Chan " to shared ram */
mcu_ram[mcu_offset + 0] = 0x3139; mcu_ram[mcu_offset + 1] = 0x3935;
@ -265,7 +265,7 @@ static void jchan_mcu_run(running_machine *machine)
mcu_ram[mcu_offset + 18] = 0x2043; mcu_ram[mcu_offset + 19] = 0x6861;
mcu_ram[mcu_offset + 20] = 0x6E20; mcu_ram[mcu_offset + 21] = 0x2020;
}
else if ( strcmp(Machine->gamedrv->name, "jchan2") == 0 )
else if ( strcmp(machine->gamedrv->name, "jchan2") == 0 )
{
/* MCU writes the string "1995/10/24 Fists Of Fire" to shared ram */
mcu_ram[mcu_offset + 0] = 0x3139; mcu_ram[mcu_offset + 1] = 0x3935;
@ -341,7 +341,7 @@ are loaded in RAM then saved with cmd 0x42 (see code @ $5196 & $50d4)
mcu_ram[mcu_offset + 63] = 0x0062;
#endif
mame_file *f;
if ((f = nvram_fopen(Machine, OPEN_FLAG_READ)) != 0)
if ((f = nvram_fopen(machine, OPEN_FLAG_READ)) != 0)
{
mame_fread(f,&mcu_ram[mcu_offset], 128);
mame_fclose(f);
@ -353,7 +353,7 @@ are loaded in RAM then saved with cmd 0x42 (see code @ $5196 & $50d4)
case 0x42: /* save game settings to 93C46 EEPROM ($50d4) */
{
mame_file *f;
if ((f = nvram_fopen(Machine, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS)) != 0)
if ((f = nvram_fopen(machine, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS)) != 0)
{
mame_fwrite(f,&mcu_ram[mcu_offset], 128);
mame_fclose(f);

View File

@ -4316,7 +4316,7 @@ static void genesis_render_videobuffer_to_screenbuffer(running_machine *machine,
case 0xa000: // shadow set, highlight set - not possible
case 0xe000: // shadow set, highlight set, normal set, not possible
lineptr[x] = megadrive_vdp_palette_lookup_highlight[mame_rand(Machine)&0x3f];
lineptr[x] = megadrive_vdp_palette_lookup_highlight[mame_rand(machine)&0x3f];
break;

View File

@ -167,12 +167,12 @@ static void update_irq_state(running_machine *machine)
{
if (irq & (1 << i))
{
cpunum_set_input_line(Machine, 0, metro_irq_levels[i]&7, ASSERT_LINE);
cpunum_set_input_line(machine, 0, metro_irq_levels[i]&7, ASSERT_LINE);
return;
}
i++;
}
cpunum_set_input_line(Machine, 0, 0, ASSERT_LINE);
cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
}
else
{

View File

@ -5,7 +5,6 @@
***************************************************************************/
#include "driver.h"
#include "deprecat.h"
static UINT8* mgolf_video_ram;
@ -82,7 +81,7 @@ static void update_plunger(running_machine *machine)
time_released = timer_get_time();
if (!mask)
cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, PULSE_LINE);
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
}
else
time_pushed = timer_get_time();

View File

@ -1356,7 +1356,7 @@ static void voodoo_stall(running_machine *machine, int stall)
/* resume execution */
cpuintrf_push_context(0);
galileo_perform_dma(Machine, which);
galileo_perform_dma(machine, which);
cpuintrf_pop_context();
break;
}
@ -1366,12 +1366,12 @@ static void voodoo_stall(running_machine *machine, int stall)
{
/* if the CPU had a pending write, do it now */
if (cpu_stalled_on_voodoo)
voodoo_0_w(Machine, cpu_stalled_offset, cpu_stalled_data, cpu_stalled_mem_mask);
voodoo_0_w(machine, cpu_stalled_offset, cpu_stalled_data, cpu_stalled_mem_mask);
cpu_stalled_on_voodoo = FALSE;
/* resume CPU execution */
if (LOG_DMA) logerror("Resuming CPU on voodoo\n");
cpu_trigger(Machine, 45678);
cpu_trigger(machine, 45678);
}
}
}

View File

@ -1054,7 +1054,7 @@ static void system16b_generic_init(running_machine *machine, int _rom_board)
disable_screen_blanking = 0;
/* see if we have a sound CPU and a UPD7759 chip */
has_sound_cpu = (mame_find_cpu_index(Machine, "sound") != -1);
has_sound_cpu = (mame_find_cpu_index(machine, "sound") != -1);
}

View File

@ -11,7 +11,6 @@
*************************************************************************/
#include "driver.h"
#include "deprecat.h"
#include "videopin.h"
#include "videopin.lh"
#include "sound/discrete.h"
@ -37,7 +36,7 @@ static void update_plunger(running_machine *machine)
time_released = timer_get_time();
if (!mask)
cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, ASSERT_LINE);
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, ASSERT_LINE);
}
else
time_pushed = timer_get_time();

View File

@ -391,7 +391,7 @@ static void zn_driver_init( running_machine *machine )
n_game = 0;
while( zn_config_table[ n_game ].s_name != NULL )
{
if( strcmp( Machine->gamedrv->name, zn_config_table[ n_game ].s_name ) == 0 )
if( strcmp( machine->gamedrv->name, zn_config_table[ n_game ].s_name ) == 0 )
{
znsec_init( 0, zn_config_table[ n_game ].p_n_mainsec );
znsec_init( 1, zn_config_table[ n_game ].p_n_gamesec );

View File

@ -135,13 +135,13 @@ void a600xl_mmu(running_machine *machine, UINT8 new_mmu)
/* check if self-test ROM changed */
if ( new_mmu & 0x80 )
{
logerror("%s MMU SELFTEST RAM\n", Machine->gamedrv->name);
logerror("%s MMU SELFTEST RAM\n", machine->gamedrv->name);
rbank2 = SMH_NOP;
wbank2 = SMH_NOP;
}
else
{
logerror("%s MMU SELFTEST ROM\n", Machine->gamedrv->name);
logerror("%s MMU SELFTEST ROM\n", machine->gamedrv->name);
rbank2 = SMH_BANK2;
wbank2 = SMH_UNMAP;
}
@ -159,7 +159,7 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
/* check if memory C000-FFFF changed */
if( new_mmu & 0x01 )
{
logerror("%s MMU BIOS ROM\n", Machine->gamedrv->name);
logerror("%s MMU BIOS ROM\n", machine->gamedrv->name);
rbank3 = SMH_BANK3;
wbank3 = SMH_UNMAP;
base3 = memory_region(REGION_CPU1)+0x14000; /* 8K lo BIOS */
@ -169,7 +169,7 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
}
else
{
logerror("%s MMU BIOS RAM\n", Machine->gamedrv->name);
logerror("%s MMU BIOS RAM\n", machine->gamedrv->name);
rbank3 = SMH_BANK3;
wbank3 = SMH_BANK3;
base3 = memory_region(REGION_CPU1)+0x0c000; /* 8K RAM */
@ -185,14 +185,14 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
/* check if BASIC changed */
if( new_mmu & 0x02 )
{
logerror("%s MMU BASIC RAM\n", Machine->gamedrv->name);
logerror("%s MMU BASIC RAM\n", machine->gamedrv->name);
rbank1 = SMH_BANK1;
wbank1 = SMH_BANK1;
base1 = memory_region(REGION_CPU1)+0x0a000; /* 8K RAM */
}
else
{
logerror("%s MMU BASIC ROM\n", Machine->gamedrv->name);
logerror("%s MMU BASIC ROM\n", machine->gamedrv->name);
rbank1 = SMH_BANK1;
wbank1 = SMH_UNMAP;
base1 = memory_region(REGION_CPU1)+0x10000; /* 8K BASIC */
@ -203,14 +203,14 @@ void a800xl_mmu(running_machine *machine, UINT8 new_mmu)
/* check if self-test ROM changed */
if( new_mmu & 0x80 )
{
logerror("%s MMU SELFTEST RAM\n", Machine->gamedrv->name);
logerror("%s MMU SELFTEST RAM\n", machine->gamedrv->name);
rbank2 = SMH_BANK2;
wbank2 = SMH_BANK2;
base2 = memory_region(REGION_CPU1)+0x05000; /* 0x0800 bytes */
}
else
{
logerror("%s MMU SELFTEST ROM\n", Machine->gamedrv->name);
logerror("%s MMU SELFTEST ROM\n", machine->gamedrv->name);
rbank2 = SMH_BANK2;
wbank2 = SMH_UNMAP;
base2 = memory_region(REGION_CPU1)+0x15000; /* 0x0800 bytes */
@ -749,32 +749,32 @@ static void atari_machine_start(running_machine *machine, int type, const pia682
gtia_init(machine, &gtia_intf);
/* pokey */
add_reset_callback(Machine, pokey_reset);
add_reset_callback(machine, pokey_reset);
/* PIA */
if (pia_intf)
{
pia_config(0, pia_intf);
add_reset_callback(Machine, _pia_reset);
add_reset_callback(machine, _pia_reset);
}
/* ANTIC */
add_reset_callback(Machine, _antic_reset);
add_reset_callback(machine, _antic_reset);
/* cartridge */
if (has_cart)
add_reset_callback(Machine, cart_reset);
add_reset_callback(machine, cart_reset);
#ifdef MESS
{
offs_t ram_top;
offs_t ram_size;
if (!strcmp(Machine->gamedrv->name, "a400")
|| !strcmp(Machine->gamedrv->name, "a400pal")
|| !strcmp(Machine->gamedrv->name, "a800")
|| !strcmp(Machine->gamedrv->name, "a800pal")
|| !strcmp(Machine->gamedrv->name, "a800xl"))
if (!strcmp(machine->gamedrv->name, "a400")
|| !strcmp(machine->gamedrv->name, "a400pal")
|| !strcmp(machine->gamedrv->name, "a800")
|| !strcmp(machine->gamedrv->name, "a800pal")
|| !strcmp(machine->gamedrv->name, "a800xl"))
{
ram_size = 0xA000;
}

View File

@ -1680,7 +1680,7 @@ void konamigx_mixer(running_machine *machine, bitmap_t *bitmap, const rectangle
}
color &= K055555_COLORMASK;
if (drawmode >= 4) palette_set_shadow_mode(Machine, order & 0x0f);
if (drawmode >= 4) palette_set_shadow_mode(machine, order & 0x0f);
if (!(mixerflags & GXMIX_NOZBUF))
{

View File

@ -218,7 +218,7 @@ static void memory_mapper_w(running_machine *machine, struct memory_mapper_chip
/* 03 - maybe controls halt and reset lines together? */
if ((oldval ^ chip->regs[offset]) & 3)
{
cpunum_set_input_line(Machine, chip->cpunum, INPUT_LINE_RESET, (chip->regs[offset] & 3) == 3 ? ASSERT_LINE : CLEAR_LINE);
cpunum_set_input_line(machine, chip->cpunum, INPUT_LINE_RESET, (chip->regs[offset] & 3) == 3 ? ASSERT_LINE : CLEAR_LINE);
if ((chip->regs[offset] & 3) == 3)
fd1094_machine_init();
}
@ -232,7 +232,7 @@ static void memory_mapper_w(running_machine *machine, struct memory_mapper_chip
case 0x04:
/* controls IRQ lines to 68000, negative logic -- write $B to signal IRQ4 */
if ((chip->regs[offset] & 7) != 7)
cpunum_set_input_line(Machine, chip->cpunum, (~chip->regs[offset] & 7), HOLD_LINE);
cpunum_set_input_line(machine, chip->cpunum, (~chip->regs[offset] & 7), HOLD_LINE);
break;
case 0x05:

View File

@ -1523,7 +1523,7 @@ static void generic_atari_interrupt(running_machine *machine, void (*handle_keyb
handle_keyboard(machine);
/* do nothing new for the rest of the frame */
antic.modelines = video_screen_get_height(Machine->primary_screen) - VBL_START;
antic.modelines = video_screen_get_height(machine->primary_screen) - VBL_START;
antic_renderer = antic_mode_0_xx;
/* if the CPU want's to be interrupted at vertical blank... */
@ -1532,7 +1532,7 @@ static void generic_atari_interrupt(running_machine *machine, void (*handle_keyb
LOG((" cause VBL NMI\n"));
/* set the VBL NMI status bit */
antic.r.nmist |= VBL_NMI;
cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, PULSE_LINE);
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
}
}

View File

@ -1,5 +1,4 @@
#include "driver.h"
#include "deprecat.h"
#include "video/konamiic.h"
#include "f1gp.h"
@ -292,7 +291,7 @@ static void f1gpb_draw_sprites(running_machine *machine, bitmap_t *bitmap,const
if((spriteram16[attr_start + 1] & 0x00f0) && (spriteram16[attr_start + 1] & 0x00f0) != 0xc0)
{
printf("attr %X\n",spriteram16[attr_start + 1] & 0x00f0);
code = mame_rand(Machine);
code = mame_rand(machine);
}
/*

View File

@ -9,7 +9,6 @@
***************************************************************************/
#include "driver.h"
#include "deprecat.h"
#include "cpu/m6502/m6502.h"
#include "includes/atari.h"
#include "video/gtia.h"
@ -69,7 +68,7 @@ void gtia_init(running_machine *machine, const gtia_interface *intf)
memset(&gtia, 0, sizeof(gtia));
gtia.intf = *intf;
add_reset_callback(Machine, gtia_reset);
add_reset_callback(machine, gtia_reset);
/* state saves */
gtia_state(machine);

View File

@ -5,7 +5,6 @@
**************************************************************************/
#include "driver.h"
#include "deprecat.h"
#include "eminline.h"
#include "includes/midzeus.h"
#include "video/poly.h"
@ -526,7 +525,7 @@ static void zeus_register16_w(running_machine *machine, offs_t offset, UINT16 da
{
/* writes to register $CC need to force a partial update */
if ((offset & ~1) == 0xcc)
video_screen_update_partial(Machine->primary_screen, video_screen_get_vpos(Machine->primary_screen));
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
/* write to high part on odd addresses */
if (offset & 1)
@ -550,7 +549,7 @@ static void zeus_register32_w(running_machine *machine, offs_t offset, UINT32 da
{
/* writes to register $CC need to force a partial update */
if ((offset & ~1) == 0xcc)
video_screen_update_partial(Machine->primary_screen, video_screen_get_vpos(Machine->primary_screen));
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
/* always write to low word? */
zeusbase[offset & ~1] = data;
@ -717,7 +716,7 @@ static void zeus_register_update(running_machine *machine, offs_t offset)
case 0xc6:
case 0xc8:
case 0xca:
video_screen_update_partial(Machine->primary_screen, video_screen_get_vpos(Machine->primary_screen));
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
{
int vtotal = zeusbase[0xca] >> 16;
int htotal = zeusbase[0xc6] >> 16;
@ -729,7 +728,7 @@ static void zeus_register_update(running_machine *machine, offs_t offset)
visarea.max_y = zeusbase[0xc8] & 0xffff;
if (htotal > 0 && vtotal > 0 && visarea.min_x < visarea.max_x && visarea.max_y < vtotal)
{
video_screen_configure(Machine->primary_screen, htotal, vtotal, &visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 8.0 / (htotal * vtotal)));
video_screen_configure(machine->primary_screen, htotal, vtotal, &visarea, HZ_TO_ATTOSECONDS((double)MIDZEUS_VIDEO_CLOCK / 8.0 / (htotal * vtotal)));
zeus_cliprect = visarea;
zeus_cliprect.max_x -= zeus_cliprect.min_x;
zeus_cliprect.min_x = 0;
@ -738,7 +737,7 @@ static void zeus_register_update(running_machine *machine, offs_t offset)
break;
case 0xcc:
video_screen_update_partial(Machine->primary_screen, video_screen_get_vpos(Machine->primary_screen));
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
log_fifo = input_code_pressed(KEYCODE_L);
break;

View File

@ -624,8 +624,8 @@ static void psx_gpu_init( running_machine *machine )
int n_level2;
int n_shade;
int n_shaded;
int width = video_screen_get_width(Machine->primary_screen);
int height = video_screen_get_height(Machine->primary_screen);
int width = video_screen_get_width(machine->primary_screen);
int height = video_screen_get_height(machine->primary_screen);
#if defined( MAME_DEBUG )
DebugMeshInit();

View File

@ -62,7 +62,7 @@ static void taitojc_tile_update(running_machine *machine)
if (taitojc_dirty_map[i])
{
taitojc_dirty_map[i] = 0;
decodechar(Machine->gfx[taitojc_gfx_index], i, (UINT8 *)taitojc_char_ram);
decodechar(machine->gfx[taitojc_gfx_index], i, (UINT8 *)taitojc_char_ram);
}
}
tilemap_mark_all_tiles_dirty(taitojc_tilemap);