mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: Machine -> machine cleanups This patch changes "Machine" to "machine", when the runnin-machine parameter is already available. In some cases I could even remove the dprecat.h. I will look for some occurances where it can be easily changed and afterward take a step at adding the running_machine parameter in a few places.
This commit is contained in:
parent
86e9f195a9
commit
bddaca5de2
@ -88,7 +88,7 @@ void debug_console_init(running_machine *machine)
|
||||
|
||||
/* print the opening lines */
|
||||
debug_console_printf("MAME new debugger version %s\n", build_version);
|
||||
debug_console_printf("Currently targeting %s (%s)\n", Machine->gamedrv->name, Machine->gamedrv->description);
|
||||
debug_console_printf("Currently targeting %s (%s)\n", machine->gamedrv->name, machine->gamedrv->description);
|
||||
|
||||
/* request callback upon exiting */
|
||||
add_exit_callback(machine, debug_console_exit);
|
||||
|
@ -209,7 +209,7 @@ void debug_cpu_init(running_machine *machine)
|
||||
/* loop over CPUs and build up their info */
|
||||
for (cpunum = 0; cpunum < MAX_CPU; cpunum++)
|
||||
{
|
||||
cpu_type cputype = Machine->config->cpu[cpunum].type;
|
||||
cpu_type cputype = machine->config->cpu[cpunum].type;
|
||||
|
||||
/* if this is a dummy, stop looking */
|
||||
if (cputype == CPU_DUMMY)
|
||||
|
@ -484,7 +484,7 @@ void memcard_eject(running_machine *machine)
|
||||
|
||||
/* create a name */
|
||||
memcard_name(memcard_inserted, name);
|
||||
fname = astring_assemble_3(astring_alloc(), Machine->basename, PATH_SEPARATOR, name);
|
||||
fname = astring_assemble_3(astring_alloc(), machine->basename, PATH_SEPARATOR, name);
|
||||
|
||||
/* open the file; if we can't, it's an error */
|
||||
filerr = mame_fopen(SEARCHPATH_MEMCARD, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
|
||||
@ -684,24 +684,24 @@ INTERRUPT_GEN( irq7_line_assert ) { irqn_line_set(machine, cpunum, 7, ASSERT_LIN
|
||||
8-bit reset read/write handlers
|
||||
-------------------------------------------------*/
|
||||
|
||||
WRITE8_HANDLER( watchdog_reset_w ) { watchdog_reset(Machine); }
|
||||
READ8_HANDLER( watchdog_reset_r ) { watchdog_reset(Machine); return 0xff; }
|
||||
WRITE8_HANDLER( watchdog_reset_w ) { watchdog_reset(machine); }
|
||||
READ8_HANDLER( watchdog_reset_r ) { watchdog_reset(machine); return 0xff; }
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
16-bit reset read/write handlers
|
||||
-------------------------------------------------*/
|
||||
|
||||
WRITE16_HANDLER( watchdog_reset16_w ) { watchdog_reset(Machine); }
|
||||
READ16_HANDLER( watchdog_reset16_r ) { watchdog_reset(Machine); return 0xffff; }
|
||||
WRITE16_HANDLER( watchdog_reset16_w ) { watchdog_reset(machine); }
|
||||
READ16_HANDLER( watchdog_reset16_r ) { watchdog_reset(machine); return 0xffff; }
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
32-bit reset read/write handlers
|
||||
-------------------------------------------------*/
|
||||
|
||||
WRITE32_HANDLER( watchdog_reset32_w ) { watchdog_reset(Machine); }
|
||||
READ32_HANDLER( watchdog_reset32_r ) { watchdog_reset(Machine); return 0xffffffff; }
|
||||
WRITE32_HANDLER( watchdog_reset32_w ) { watchdog_reset(machine); }
|
||||
READ32_HANDLER( watchdog_reset32_r ) { watchdog_reset(machine); return 0xffffffff; }
|
||||
|
||||
|
||||
|
||||
|
@ -244,7 +244,7 @@ static void sound_exit(running_machine *machine)
|
||||
|
||||
/* stop all the sound chips */
|
||||
for (sndnum = 0; sndnum < MAX_SOUND; sndnum++)
|
||||
if (Machine->config->sound[sndnum].type != SOUND_DUMMY)
|
||||
if (machine->config->sound[sndnum].type != SOUND_DUMMY)
|
||||
sndintrf_exit_sound(sndnum);
|
||||
|
||||
/* reset variables */
|
||||
@ -501,7 +501,7 @@ static void sound_reset(running_machine *machine)
|
||||
|
||||
/* reset all the sound chips */
|
||||
for (sndnum = 0; sndnum < MAX_SOUND; sndnum++)
|
||||
if (Machine->config->sound[sndnum].type != SOUND_DUMMY)
|
||||
if (machine->config->sound[sndnum].type != SOUND_DUMMY)
|
||||
sndnum_reset(sndnum);
|
||||
}
|
||||
|
||||
|
@ -119,12 +119,12 @@ void ui_gfx_init(running_machine *machine)
|
||||
/* set up the graphics state */
|
||||
for (gfx = 0; gfx < MAX_GFX_ELEMENTS; gfx++)
|
||||
{
|
||||
state->gfxset.rotate[gfx] = Machine->gamedrv->flags & ORIENTATION_MASK;
|
||||
state->gfxset.rotate[gfx] = machine->gamedrv->flags & ORIENTATION_MASK;
|
||||
state->gfxset.count[gfx] = 16;
|
||||
}
|
||||
|
||||
/* set up the tilemap state */
|
||||
state->tilemap.rotate = Machine->gamedrv->flags & ORIENTATION_MASK;
|
||||
state->tilemap.rotate = machine->gamedrv->flags & ORIENTATION_MASK;
|
||||
}
|
||||
|
||||
|
||||
@ -155,11 +155,11 @@ UINT32 ui_gfx_ui_handler(running_machine *machine, UINT32 uistate)
|
||||
ui_gfx_state *state = &ui_gfx;
|
||||
|
||||
/* if we have nothing, implicitly cancel */
|
||||
if (Machine->config->total_colors == 0 && Machine->colortable == NULL && Machine->gfx[0] == NULL && tilemap_count() == 0)
|
||||
if (machine->config->total_colors == 0 && machine->colortable == NULL && machine->gfx[0] == NULL && tilemap_count() == 0)
|
||||
goto cancel;
|
||||
|
||||
/* if we're not paused, mark the bitmap dirty */
|
||||
if (!mame_is_paused(Machine))
|
||||
if (!mame_is_paused(machine))
|
||||
state->bitmap_dirty = TRUE;
|
||||
|
||||
/* switch off the state to display something */
|
||||
@ -168,7 +168,7 @@ again:
|
||||
{
|
||||
case 0:
|
||||
/* if we have a palette, display it */
|
||||
if (Machine->config->total_colors > 0)
|
||||
if (machine->config->total_colors > 0)
|
||||
{
|
||||
palette_handler(state);
|
||||
break;
|
||||
@ -179,7 +179,7 @@ again:
|
||||
|
||||
case 1:
|
||||
/* if we have graphics sets, display them */
|
||||
if (Machine->gfx[0] != NULL)
|
||||
if (machine->gfx[0] != NULL)
|
||||
{
|
||||
gfxset_handler(state);
|
||||
break;
|
||||
@ -208,7 +208,7 @@ again:
|
||||
}
|
||||
|
||||
if (input_ui_pressed(IPT_UI_PAUSE))
|
||||
mame_pause(Machine, !mame_is_paused(Machine));
|
||||
mame_pause(machine, !mame_is_paused(machine));
|
||||
|
||||
if (input_ui_pressed(IPT_UI_CANCEL) || input_ui_pressed(IPT_UI_SHOW_GFX))
|
||||
goto cancel;
|
||||
@ -217,7 +217,7 @@ again:
|
||||
|
||||
cancel:
|
||||
if (!uistate)
|
||||
mame_pause(Machine, FALSE);
|
||||
mame_pause(machine, FALSE);
|
||||
state->bitmap_dirty = TRUE;
|
||||
return UI_HANDLER_CANCEL;
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ Static Program ROM (48K bytes) 4000-FFFF R D0-D7
|
||||
****************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "sound/5220intf.h"
|
||||
#include "sound/2151intf.h"
|
||||
@ -123,7 +122,7 @@ void atarijsa_init(running_machine *machine, int testport, int testmask)
|
||||
has_tms5220 = has_oki6295 = has_pokey = has_ym2151 = 0;
|
||||
for (i = 0; i < MAX_SOUND; i++)
|
||||
{
|
||||
switch (Machine->config->sound[i].type)
|
||||
switch (machine->config->sound[i].type)
|
||||
{
|
||||
case SOUND_TMS5220:
|
||||
has_tms5220 = 1;
|
||||
|
@ -35,7 +35,7 @@ WRITE8_HANDLER( gottlieb_sh_w )
|
||||
{
|
||||
if (sndti_exists(SOUND_SAMPLES, 0))
|
||||
{
|
||||
if (!strcmp(Machine->gamedrv->name,"reactor")) /* reactor */
|
||||
if (!strcmp(machine->gamedrv->name,"reactor")) /* reactor */
|
||||
{
|
||||
switch (data ^ 0x3f)
|
||||
{
|
||||
@ -297,5 +297,5 @@ WRITE8_HANDLER( gottlieb_nmi_rate_w )
|
||||
|
||||
WRITE8_HANDLER( gottlieb_cause_dac_nmi_w )
|
||||
{
|
||||
cpunum_set_input_line(Machine, cpu_gettotalcpu()-2, INPUT_LINE_NMI, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, cpu_gettotalcpu()-2, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
*************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "turbo.h"
|
||||
#include "sound/samples.h"
|
||||
|
||||
@ -72,7 +71,7 @@ if (!((data >> 4) & 1)) mame_printf_debug("/TRIG4\n");
|
||||
|
||||
WRITE8_HANDLER( turbo_sound_a_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[0];
|
||||
state->sound_state[0] = data;
|
||||
|
||||
@ -120,7 +119,7 @@ WRITE8_HANDLER( turbo_sound_a_w )
|
||||
|
||||
WRITE8_HANDLER( turbo_sound_b_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[1];
|
||||
state->sound_state[1] = data;
|
||||
|
||||
@ -142,7 +141,7 @@ WRITE8_HANDLER( turbo_sound_b_w )
|
||||
|
||||
WRITE8_HANDLER( turbo_sound_c_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
|
||||
/* OSEL1-2 */
|
||||
state->turbo_osel = (state->turbo_osel & 1) | ((data & 3) << 1);
|
||||
@ -292,7 +291,7 @@ MACHINE_DRIVER_END
|
||||
|
||||
WRITE8_HANDLER( subroc3d_sound_a_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->sound_state[0] = data;
|
||||
|
||||
/* DIS0-3 contained in bits 0-3 */
|
||||
@ -322,7 +321,7 @@ INLINE void subroc3d_update_volume(int leftchan, UINT8 dis, UINT8 dir)
|
||||
|
||||
WRITE8_HANDLER( subroc3d_sound_b_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[1];
|
||||
state->sound_state[1] = data;
|
||||
|
||||
@ -377,7 +376,7 @@ WRITE8_HANDLER( subroc3d_sound_b_w )
|
||||
|
||||
WRITE8_HANDLER( subroc3d_sound_c_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[2];
|
||||
state->sound_state[2] = data;
|
||||
|
||||
@ -501,7 +500,7 @@ static void buckrog_update_samples(turbo_state *state)
|
||||
|
||||
WRITE8_HANDLER( buckrog_sound_a_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[0];
|
||||
state->sound_state[0] = data;
|
||||
|
||||
@ -526,7 +525,7 @@ WRITE8_HANDLER( buckrog_sound_a_w )
|
||||
|
||||
WRITE8_HANDLER( buckrog_sound_b_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
UINT8 diff = data ^ state->sound_state[1];
|
||||
state->sound_state[1] = data;
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/namco.h"
|
||||
#include "sound/dac.h"
|
||||
@ -64,7 +63,7 @@ static WRITE8_HANDLER( irqack_w )
|
||||
cpu_interrupt_enable(0, bit);
|
||||
|
||||
if (!bit)
|
||||
cpunum_set_input_line(Machine, 0, 0, CLEAR_LINE );
|
||||
cpunum_set_input_line(machine, 0, 0, CLEAR_LINE );
|
||||
}
|
||||
|
||||
|
||||
@ -161,7 +160,7 @@ static WRITE8_HANDLER( _20pacgal_coin_counter_w )
|
||||
|
||||
static WRITE8_HANDLER( rom_bank_select_w )
|
||||
{
|
||||
_20pacgal_state *state = Machine->driver_data;
|
||||
_20pacgal_state *state = machine->driver_data;
|
||||
|
||||
state->game_selected = data & 1;
|
||||
|
||||
@ -172,7 +171,7 @@ static WRITE8_HANDLER( rom_bank_select_w )
|
||||
|
||||
static WRITE8_HANDLER( rom_48000_w )
|
||||
{
|
||||
_20pacgal_state *state = Machine->driver_data;
|
||||
_20pacgal_state *state = machine->driver_data;
|
||||
|
||||
if (state->game_selected)
|
||||
{
|
||||
|
@ -346,7 +346,7 @@ static WRITE16_HANDLER( paddlema_soundlatch_w )
|
||||
if (ACCESSING_BYTE_0)
|
||||
{
|
||||
soundlatch_w(machine, 0, data);
|
||||
cpunum_set_input_line(Machine, 1, 0, HOLD_LINE);
|
||||
cpunum_set_input_line(machine, 1, 0, HOLD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ static WRITE16_HANDLER( tnexspce_soundlatch_w )
|
||||
if (ACCESSING_BYTE_0)
|
||||
{
|
||||
soundlatch_w(machine, 0, data);
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
//ZT
|
||||
@ -418,7 +418,7 @@ static READ16_HANDLER( kyros_alpha_trigger_r )
|
||||
{
|
||||
if (microcontroller_id == 0x00ff) /* Super Stingry */
|
||||
{
|
||||
if (trigstate >= 12 || !strcmp(Machine->gamedrv->name, "jongbou")) /* arbitrary value ! */
|
||||
if (trigstate >= 12 || !strcmp(machine->gamedrv->name, "jongbou")) /* arbitrary value ! */
|
||||
{
|
||||
trigstate = 0;
|
||||
microcontroller_data = 0x21; // timer
|
||||
@ -477,7 +477,7 @@ static READ16_HANDLER( alpha_II_trigger_r )
|
||||
|
||||
if ((coin_id&0xff) == 0x22)
|
||||
{
|
||||
if(!strcmp(Machine->gamedrv->name, "btlfildb"))
|
||||
if(!strcmp(machine->gamedrv->name, "btlfildb"))
|
||||
coinvalue = (readinputportbytag("IN4")>>0) & 7;
|
||||
else
|
||||
coinvalue = (~readinputportbytag("IN4")>>0) & 7;
|
||||
@ -500,7 +500,7 @@ static READ16_HANDLER( alpha_II_trigger_r )
|
||||
|
||||
if ((coin_id>>8) == 0x22)
|
||||
{
|
||||
if(!strcmp(Machine->gamedrv->name, "btlfildb"))
|
||||
if(!strcmp(machine->gamedrv->name, "btlfildb"))
|
||||
coinvalue = (readinputportbytag("IN4")>>0) & 7;
|
||||
else
|
||||
coinvalue = (~readinputportbytag("IN4")>>0) & 7;
|
||||
|
@ -584,7 +584,6 @@ Stephh's inputs notes (based on some tests on the "parent" set) :
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/qsound.h"
|
||||
@ -756,11 +755,11 @@ static WRITE16_HANDLER( cps2_eeprom_port_w )
|
||||
/* bit 7 - */
|
||||
|
||||
/* Z80 Reset */
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
coin_counter_w(0, data & 0x0001);
|
||||
if( (strncmp(Machine->gamedrv->name,"pzloop2",8)==0) ||
|
||||
(strncmp(Machine->gamedrv->name,"pzloop2j",8)==0) )
|
||||
if( (strncmp(machine->gamedrv->name,"pzloop2",8)==0) ||
|
||||
(strncmp(machine->gamedrv->name,"pzloop2j",8)==0) )
|
||||
{
|
||||
// Puzz Loop 2 uses coin counter 2 input to switch between stick and paddle controls
|
||||
readpaddle = data & 0x0002;
|
||||
@ -770,7 +769,7 @@ static WRITE16_HANDLER( cps2_eeprom_port_w )
|
||||
coin_counter_w(1, data & 0x0002);
|
||||
}
|
||||
|
||||
if(strncmp(Machine->gamedrv->name,"mmatrix",7)==0) // Mars Matrix seems to require the coin lockout bit to be reversed
|
||||
if(strncmp(machine->gamedrv->name,"mmatrix",7)==0) // Mars Matrix seems to require the coin lockout bit to be reversed
|
||||
{
|
||||
coin_lockout_w(0,data & 0x0010);
|
||||
coin_lockout_w(1,data & 0x0020);
|
||||
|
@ -216,7 +216,7 @@ static WRITE8_HANDLER( ddragon_bankswitch_w )
|
||||
if (data & 0x10)
|
||||
dd_sub_cpu_busy = 0;
|
||||
else if (dd_sub_cpu_busy == 0)
|
||||
cpunum_set_input_line(Machine, 1, sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
|
||||
cpunum_set_input_line(machine, 1, sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
|
||||
|
||||
memory_set_bank(1, (data & 0xe0) >> 5);
|
||||
}
|
||||
@ -244,7 +244,7 @@ static READ8_HANDLER( darktowr_mcu_bank_r )
|
||||
so just hack around the protection here. (The hacks are 'right' as I have
|
||||
the original source code & notes to this version of TStrike to examine).
|
||||
*/
|
||||
if (!strcmp(Machine->gamedrv->name, "tstrike"))
|
||||
if (!strcmp(machine->gamedrv->name, "tstrike"))
|
||||
{
|
||||
/* Static protection checks at boot-up */
|
||||
if (activecpu_get_pc() == 0x9ace)
|
||||
@ -291,7 +291,7 @@ static WRITE8_HANDLER( darktowr_bankswitch_w )
|
||||
if (data & 0x10)
|
||||
dd_sub_cpu_busy = 0;
|
||||
else if (dd_sub_cpu_busy == 0)
|
||||
cpunum_set_input_line(Machine, 1, sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
|
||||
cpunum_set_input_line(machine, 1, sprite_irq, (sprite_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE);
|
||||
|
||||
memory_set_bank(1, newbank);
|
||||
if (newbank == 4 && oldbank != 4)
|
||||
@ -313,15 +313,15 @@ static WRITE8_HANDLER( ddragon_interrupt_w )
|
||||
switch (offset)
|
||||
{
|
||||
case 0: /* 380b - NMI ack */
|
||||
cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE);
|
||||
break;
|
||||
|
||||
case 1: /* 380c - FIRQ ack */
|
||||
cpunum_set_input_line(Machine, 0, M6809_FIRQ_LINE, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, M6809_FIRQ_LINE, CLEAR_LINE);
|
||||
break;
|
||||
|
||||
case 2: /* 380d - IRQ ack */
|
||||
cpunum_set_input_line(Machine, 0, M6809_IRQ_LINE, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, CLEAR_LINE);
|
||||
break;
|
||||
|
||||
case 3: /* 380e - SND irq */
|
||||
@ -338,13 +338,13 @@ static WRITE8_HANDLER( ddragon_interrupt_w )
|
||||
|
||||
static WRITE8_HANDLER( ddragon2_sub_irq_ack_w )
|
||||
{
|
||||
cpunum_set_input_line(Machine, 1, sprite_irq, CLEAR_LINE );
|
||||
cpunum_set_input_line(machine, 1, sprite_irq, CLEAR_LINE );
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( ddragon2_sub_irq_w )
|
||||
{
|
||||
cpunum_set_input_line(Machine, 0, M6809_IRQ_LINE, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -391,8 +391,8 @@ static WRITE8_HANDLER( ddragon_hd63701_internal_registers_w )
|
||||
it's quite obvious from the Double Dragon 2 code, below). */
|
||||
if (data & 3)
|
||||
{
|
||||
cpunum_set_input_line(Machine, 0, M6809_IRQ_LINE, ASSERT_LINE);
|
||||
cpunum_set_input_line(Machine, 1, sprite_irq, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, M6809_IRQ_LINE, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1, sprite_irq, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -570,8 +570,8 @@ ADDRESS_MAP_END
|
||||
/* might not be 100% accurate, check bits written */
|
||||
static WRITE8_HANDLER( ddragnba_port_w )
|
||||
{
|
||||
cpunum_set_input_line(Machine, 0,M6809_IRQ_LINE,ASSERT_LINE);
|
||||
cpunum_set_input_line(Machine, 1,sprite_irq, CLEAR_LINE );
|
||||
cpunum_set_input_line(machine, 0,M6809_IRQ_LINE,ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1,sprite_irq, CLEAR_LINE );
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( ddragnba_sub_portmap, ADDRESS_SPACE_IO, 8 )
|
||||
|
@ -80,7 +80,7 @@ TODO:
|
||||
|
||||
static WRITE8_HANDLER( io_select_w )
|
||||
{
|
||||
gameplan_state *state = Machine->driver_data;
|
||||
gameplan_state *state = machine->driver_data;
|
||||
|
||||
switch (data)
|
||||
{
|
||||
@ -96,7 +96,7 @@ static WRITE8_HANDLER( io_select_w )
|
||||
|
||||
static READ8_HANDLER( io_port_r )
|
||||
{
|
||||
gameplan_state *state = Machine->driver_data;
|
||||
gameplan_state *state = machine->driver_data;
|
||||
|
||||
return readinputport(state->current_port);
|
||||
}
|
||||
@ -127,13 +127,13 @@ static const struct via6522_interface via_1_interface =
|
||||
|
||||
static WRITE8_HANDLER( audio_reset_w )
|
||||
{
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( audio_cmd_w )
|
||||
{
|
||||
gameplan_state *state = Machine->driver_data;
|
||||
gameplan_state *state = machine->driver_data;
|
||||
|
||||
state->audio_cmd = data & 0x7f;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ static WRITE8_HANDLER( led_board_w )
|
||||
{
|
||||
static const UINT8 ls247_map[16] =
|
||||
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x58,0x4c,0x62,0x69,0x78,0x00 };
|
||||
grchamp_state *state = Machine->driver_data;
|
||||
grchamp_state *state = machine->driver_data;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -354,28 +354,28 @@ INLINE UINT8 get_pc3259_bits(grchamp_state *state, int offs)
|
||||
|
||||
static READ8_HANDLER( pc3259_0_r )
|
||||
{
|
||||
grchamp_state *state = Machine->driver_data;
|
||||
grchamp_state *state = machine->driver_data;
|
||||
return get_pc3259_bits(state, 0);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( pc3259_1_r )
|
||||
{
|
||||
grchamp_state *state = Machine->driver_data;
|
||||
grchamp_state *state = machine->driver_data;
|
||||
return get_pc3259_bits(state, 1);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( pc3259_2_r )
|
||||
{
|
||||
grchamp_state *state = Machine->driver_data;
|
||||
grchamp_state *state = machine->driver_data;
|
||||
return get_pc3259_bits(state, 2);
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( pc3259_3_r )
|
||||
{
|
||||
grchamp_state *state = Machine->driver_data;
|
||||
grchamp_state *state = machine->driver_data;
|
||||
return get_pc3259_bits(state, 3);
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@ static READ8_HANDLER( pc3259_3_r )
|
||||
|
||||
static READ8_HANDLER( sub_to_main_comm_r )
|
||||
{
|
||||
grchamp_state *state = Machine->driver_data;
|
||||
grchamp_state *state = machine->driver_data;
|
||||
return state->comm_latch;
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ static WRITE8_HANDLER( main_to_sub_comm_w )
|
||||
|
||||
static READ8_HANDLER( main_to_sub_comm_r )
|
||||
{
|
||||
grchamp_state *state = Machine->driver_data;
|
||||
grchamp_state *state = machine->driver_data;
|
||||
return state->comm_latch2[offset];
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ static VIDEO_START( looping )
|
||||
|
||||
static WRITE8_HANDLER( flip_screen_x_w )
|
||||
{
|
||||
looping_state *state = Machine->driver_data;
|
||||
looping_state *state = machine->driver_data;
|
||||
flip_screen_x_set(~data & 0x01);
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, flip_screen_get() ? 128 : 0);
|
||||
}
|
||||
@ -198,7 +198,7 @@ static WRITE8_HANDLER( flip_screen_x_w )
|
||||
|
||||
static WRITE8_HANDLER( flip_screen_y_w )
|
||||
{
|
||||
looping_state *state = Machine->driver_data;
|
||||
looping_state *state = machine->driver_data;
|
||||
flip_screen_y_set(~data & 0x01);
|
||||
tilemap_set_scrollx(state->bg_tilemap, 0, flip_screen_get() ? 128 : 0);
|
||||
}
|
||||
@ -206,7 +206,7 @@ static WRITE8_HANDLER( flip_screen_y_w )
|
||||
|
||||
static WRITE8_HANDLER( looping_videoram_w )
|
||||
{
|
||||
looping_state *state = Machine->driver_data;
|
||||
looping_state *state = machine->driver_data;
|
||||
state->videoram[offset] = data;
|
||||
tilemap_mark_tile_dirty(state->bg_tilemap, offset);
|
||||
}
|
||||
@ -214,7 +214,7 @@ static WRITE8_HANDLER( looping_videoram_w )
|
||||
|
||||
static WRITE8_HANDLER( looping_colorram_w )
|
||||
{
|
||||
looping_state *state = Machine->driver_data;
|
||||
looping_state *state = machine->driver_data;
|
||||
int i;
|
||||
|
||||
state->colorram[offset] = data;
|
||||
@ -363,7 +363,7 @@ static WRITE8_HANDLER( looping_sound_sw )
|
||||
0007 = AFA
|
||||
*/
|
||||
|
||||
looping_state *state = Machine->driver_data;
|
||||
looping_state *state = machine->driver_data;
|
||||
state->sound[offset + 1] = data ^ 1;
|
||||
DAC_data_w(0, ((state->sound[2] << 7) + (state->sound[3] << 6)) * state->sound[7]);
|
||||
}
|
||||
|
@ -101,7 +101,6 @@ Notes (couriersud)
|
||||
|
||||
***************************************************************************/
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/samples.h"
|
||||
#include "m10.h"
|
||||
|
||||
@ -139,7 +138,7 @@ static PALETTE_INIT( m10 )
|
||||
|
||||
static MACHINE_RESET( irem )
|
||||
{
|
||||
m10_state *state = Machine->driver_data;
|
||||
m10_state *state = machine->driver_data;
|
||||
|
||||
state_save_register_global(state->bottomline);
|
||||
state_save_register_global(state->flip);
|
||||
@ -172,7 +171,7 @@ static MACHINE_RESET( irem )
|
||||
|
||||
static WRITE8_HANDLER( m10_ctrl_w )
|
||||
{
|
||||
m10_state *state = Machine->driver_data;
|
||||
m10_state *state = machine->driver_data;
|
||||
|
||||
#if DEBUG
|
||||
if (data & 0x40)
|
||||
@ -249,7 +248,7 @@ static WRITE8_HANDLER( m10_ctrl_w )
|
||||
|
||||
static WRITE8_HANDLER( m11_ctrl_w )
|
||||
{
|
||||
m10_state *state = Machine->driver_data;
|
||||
m10_state *state = machine->driver_data;
|
||||
|
||||
#if DEBUG
|
||||
if (data & 0x4C)
|
||||
@ -282,7 +281,7 @@ static WRITE8_HANDLER( m11_ctrl_w )
|
||||
|
||||
static WRITE8_HANDLER( m15_ctrl_w )
|
||||
{
|
||||
m10_state *state = Machine->driver_data;
|
||||
m10_state *state = machine->driver_data;
|
||||
|
||||
#if DEBUG
|
||||
if (data & 0xF0)
|
||||
@ -411,7 +410,7 @@ static WRITE8_HANDLER( m15_a100_w )
|
||||
static READ8_HANDLER( m10_a700_r )
|
||||
{
|
||||
//printf("rd:%d\n",video_screen_get_vpos(machine->primary_screen));
|
||||
cpunum_set_input_line(Machine, 0, 0, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, CLEAR_LINE);
|
||||
return 0x00;
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ static WRITE8_HANDLER( banked_ram_w )
|
||||
mastboy_vram[offs] = data^0xff;
|
||||
|
||||
/* Decode the new tile */
|
||||
decodechar(Machine->gfx[0], offs/32, mastboy_vram);
|
||||
decodechar(machine->gfx[0], offs/32, mastboy_vram);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -656,7 +656,7 @@ static const struct MSM5205interface msm5205_interface =
|
||||
static WRITE8_HANDLER( mastboy_irq0_ack_w )
|
||||
{
|
||||
mastboy_irq0_ack = data;
|
||||
if ((data&1)==1) cpunum_set_input_line(Machine, 0,0, CLEAR_LINE);
|
||||
if ((data&1)==1) cpunum_set_input_line(machine, 0,0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static INTERRUPT_GEN( mastboy_interrupt )
|
||||
|
@ -494,7 +494,7 @@ static READ32_HANDLER(videoctl_r)
|
||||
|
||||
static READ32_HANDLER(copro_prg_r)
|
||||
{
|
||||
if ((strcmp(Machine->gamedrv->name, "manxtt" ) == 0) || (strcmp(Machine->gamedrv->name, "srallyc" ) == 0))
|
||||
if ((strcmp(machine->gamedrv->name, "manxtt" ) == 0) || (strcmp(machine->gamedrv->name, "srallyc" ) == 0))
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
@ -530,7 +530,7 @@ static WRITE32_HANDLER( copro_ctl1_w )
|
||||
logerror("Boot copro, %d dwords\n", model2_coprocnt);
|
||||
if (dsp_type != DSP_TYPE_TGPX4)
|
||||
{
|
||||
cpunum_set_input_line(Machine, 2, INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 2, INPUT_LINE_HALT, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -550,7 +550,7 @@ static WRITE32_HANDLER(copro_function_port_w)
|
||||
|
||||
static READ32_HANDLER(copro_fifo_r)
|
||||
{
|
||||
if ((strcmp(Machine->gamedrv->name, "manxtt" ) == 0) || (strcmp(Machine->gamedrv->name, "srallyc" ) == 0))
|
||||
if ((strcmp(machine->gamedrv->name, "manxtt" ) == 0) || (strcmp(machine->gamedrv->name, "srallyc" ) == 0))
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
@ -589,10 +589,10 @@ static int iop_write_num = 0;
|
||||
static UINT32 iop_data = 0;
|
||||
static WRITE32_HANDLER(copro_sharc_iop_w)
|
||||
{
|
||||
if ((strcmp(Machine->gamedrv->name, "schamp" ) == 0) ||
|
||||
(strcmp(Machine->gamedrv->name, "fvipers" ) == 0) ||
|
||||
(strcmp(Machine->gamedrv->name, "vstriker" ) == 0) ||
|
||||
(strcmp(Machine->gamedrv->name, "gunblade" ) == 0))
|
||||
if ((strcmp(machine->gamedrv->name, "schamp" ) == 0) ||
|
||||
(strcmp(machine->gamedrv->name, "fvipers" ) == 0) ||
|
||||
(strcmp(machine->gamedrv->name, "vstriker" ) == 0) ||
|
||||
(strcmp(machine->gamedrv->name, "gunblade" ) == 0))
|
||||
{
|
||||
cpuintrf_push_context(2);
|
||||
sharc_external_iop_write(offset, data);
|
||||
@ -659,7 +659,7 @@ static WRITE32_HANDLER( geo_sharc_ctl1_w )
|
||||
else
|
||||
{
|
||||
logerror("Boot geo, %d dwords\n", model2_geocnt);
|
||||
cpunum_set_input_line(Machine, 3, INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 3, INPUT_LINE_HALT, CLEAR_LINE);
|
||||
//cpu_spinuntil_time(ATTOTIME_IN_USEC(1000)); // Give the SHARC enough time to boot itself
|
||||
}
|
||||
}
|
||||
@ -669,7 +669,7 @@ static WRITE32_HANDLER( geo_sharc_ctl1_w )
|
||||
|
||||
static READ32_HANDLER(geo_sharc_fifo_r)
|
||||
{
|
||||
if ((strcmp(Machine->gamedrv->name, "manxtt" ) == 0) || (strcmp(Machine->gamedrv->name, "srallyc" ) == 0))
|
||||
if ((strcmp(machine->gamedrv->name, "manxtt" ) == 0) || (strcmp(machine->gamedrv->name, "srallyc" ) == 0))
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
@ -700,7 +700,7 @@ static int geo_iop_write_num = 0;
|
||||
static UINT32 geo_iop_data = 0;
|
||||
static WRITE32_HANDLER(geo_sharc_iop_w)
|
||||
{
|
||||
if ((strcmp(Machine->gamedrv->name, "schamp" ) == 0))
|
||||
if ((strcmp(machine->gamedrv->name, "schamp" ) == 0))
|
||||
{
|
||||
cpuintrf_push_context(3);
|
||||
sharc_external_iop_write(offset, data);
|
||||
|
@ -1015,9 +1015,9 @@ static void model3_init(running_machine *machine, int step)
|
||||
model3_tap_reset();
|
||||
|
||||
if(step < 0x20) {
|
||||
if( mame_stricmp(Machine->gamedrv->name, "vs215") == 0 ||
|
||||
mame_stricmp(Machine->gamedrv->name, "vs29815") == 0 ||
|
||||
mame_stricmp(Machine->gamedrv->name, "bass") == 0 )
|
||||
if( mame_stricmp(machine->gamedrv->name, "vs215") == 0 ||
|
||||
mame_stricmp(machine->gamedrv->name, "vs29815") == 0 ||
|
||||
mame_stricmp(machine->gamedrv->name, "bass") == 0 )
|
||||
{
|
||||
mpc106_init();
|
||||
} else {
|
||||
@ -1420,13 +1420,13 @@ static READ64_HANDLER(model3_security_r)
|
||||
case 0x00/8: return 0; /* status */
|
||||
case 0x1c/8: /* security board data read */
|
||||
{
|
||||
if (mame_stricmp(Machine->gamedrv->name, "vs299") == 0 ||
|
||||
mame_stricmp(Machine->gamedrv->name, "vs2v991") == 0)
|
||||
if (mame_stricmp(machine->gamedrv->name, "vs299") == 0 ||
|
||||
mame_stricmp(machine->gamedrv->name, "vs2v991") == 0)
|
||||
{
|
||||
return (UINT64)vs299_prot_data[prot_data_ptr++] << 48;
|
||||
}
|
||||
else if (mame_stricmp(Machine->gamedrv->name, "swtrilgy") == 0 ||
|
||||
mame_stricmp(Machine->gamedrv->name, "swtrilga") == 0)
|
||||
else if (mame_stricmp(machine->gamedrv->name, "swtrilgy") == 0 ||
|
||||
mame_stricmp(machine->gamedrv->name, "swtrilga") == 0)
|
||||
{
|
||||
UINT64 data = (UINT64)swt_prot_data[prot_data_ptr++] << 16;
|
||||
if (prot_data_ptr > 0x38)
|
||||
@ -1435,7 +1435,7 @@ static READ64_HANDLER(model3_security_r)
|
||||
}
|
||||
return data;
|
||||
}
|
||||
else if (mame_stricmp(Machine->gamedrv->name, "fvipers2") == 0)
|
||||
else if (mame_stricmp(machine->gamedrv->name, "fvipers2") == 0)
|
||||
{
|
||||
UINT64 data = (UINT64)fvipers2_prot_data[prot_data_ptr++] << 16;
|
||||
if (prot_data_ptr >= 0x41)
|
||||
@ -1444,8 +1444,8 @@ static READ64_HANDLER(model3_security_r)
|
||||
}
|
||||
return data;
|
||||
}
|
||||
else if (mame_stricmp(Machine->gamedrv->name, "spikeout") == 0 ||
|
||||
mame_stricmp(Machine->gamedrv->name, "spikeofe") == 0)
|
||||
else if (mame_stricmp(machine->gamedrv->name, "spikeout") == 0 ||
|
||||
mame_stricmp(machine->gamedrv->name, "spikeofe") == 0)
|
||||
{
|
||||
UINT64 data = (UINT64)spikeout_prot_data[prot_data_ptr++] << 16;
|
||||
if (prot_data_ptr >= 0x55)
|
||||
@ -1454,7 +1454,7 @@ static READ64_HANDLER(model3_security_r)
|
||||
}
|
||||
return data;
|
||||
}
|
||||
else if (mame_stricmp(Machine->gamedrv->name, "eca") == 0)
|
||||
else if (mame_stricmp(machine->gamedrv->name, "eca") == 0)
|
||||
{
|
||||
UINT64 data = (UINT64)eca_prot_data[prot_data_ptr++] << 16;
|
||||
if (prot_data_ptr >= 0x31)
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* Mogura Desse */
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
static UINT8 *mogura_tileram;
|
||||
@ -117,7 +116,7 @@ static WRITE8_HANDLER ( mogura_gfxram_w )
|
||||
{
|
||||
mogura_gfxram[offset] = data ;
|
||||
|
||||
decodechar(Machine->gfx[0], offset/16, mogura_gfxram);
|
||||
decodechar(machine->gfx[0], offset/16, mogura_gfxram);
|
||||
|
||||
tilemap_mark_all_tiles_dirty(mogura_tilemap);
|
||||
}
|
||||
|
@ -922,7 +922,6 @@ Notes:
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/mips/psx.h"
|
||||
#include "cpu/h83002/h83002.h"
|
||||
#include "includes/psx.h"
|
||||
@ -984,8 +983,8 @@ static UINT32 m_n_bankoffset;
|
||||
static WRITE32_HANDLER( bankoffset_w )
|
||||
{
|
||||
// Golgo 13 has different banking (maybe the keycus controls it?)
|
||||
if( strcmp( Machine->gamedrv->name, "golgo13" ) == 0 ||
|
||||
strcmp( Machine->gamedrv->name, "g13knd" ) == 0 )
|
||||
if( strcmp( machine->gamedrv->name, "golgo13" ) == 0 ||
|
||||
strcmp( machine->gamedrv->name, "g13knd" ) == 0 )
|
||||
{
|
||||
if( ( data & 8 ) != 0 )
|
||||
{
|
||||
@ -1300,7 +1299,7 @@ static READ8_HANDLER( s12_mcu_rtc_r )
|
||||
mame_system_time systime;
|
||||
static const int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
|
||||
|
||||
mame_get_current_datetime(Machine, &systime);
|
||||
mame_get_current_datetime(machine, &systime);
|
||||
|
||||
switch (s12_rtcstate)
|
||||
{
|
||||
|
@ -1170,11 +1170,11 @@ static WRITE32_HANDLER( namcos22_system_controller_w )
|
||||
{ /* SUBCPU enable for Super System 22 */
|
||||
if (data)
|
||||
{
|
||||
cpunum_set_input_line(Machine, 3, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
cpunum_set_input_line(Machine, 3,INPUT_LINE_RESET,ASSERT_LINE); /* M37710 MCU */
|
||||
cpunum_set_input_line(machine, 3,INPUT_LINE_RESET,ASSERT_LINE); /* M37710 MCU */
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1196,19 +1196,19 @@ static WRITE32_HANDLER( namcos22_system_controller_w )
|
||||
{
|
||||
if( newReg == 0 )
|
||||
{ /* disable DSPs */
|
||||
cpunum_set_input_line(Machine, 1,INPUT_LINE_RESET,ASSERT_LINE); /* master DSP */
|
||||
cpunum_set_input_line(Machine, 2,INPUT_LINE_RESET,ASSERT_LINE); /* slave DSP */
|
||||
cpunum_set_input_line(machine, 1,INPUT_LINE_RESET,ASSERT_LINE); /* master DSP */
|
||||
cpunum_set_input_line(machine, 2,INPUT_LINE_RESET,ASSERT_LINE); /* slave DSP */
|
||||
mbEnableDspIrqs = 0;
|
||||
}
|
||||
else if( newReg==1 )
|
||||
{ /*enable dsp and rendering subsystem */
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
namcos22_enable_slave_simulation();
|
||||
mbEnableDspIrqs = 1;
|
||||
}
|
||||
else if( newReg==0xff )
|
||||
{ /* used to upload game-specific code to master/slave dsps */
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
mbEnableDspIrqs = 0;
|
||||
}
|
||||
}
|
||||
@ -1589,7 +1589,7 @@ static WRITE8_HANDLER( mcu_port5_w )
|
||||
// bit 1 = fan
|
||||
// bit 2 = button light
|
||||
|
||||
if (!strcmp(Machine->gamedrv->name, "propcycl"))
|
||||
if (!strcmp(machine->gamedrv->name, "propcycl"))
|
||||
{
|
||||
output_set_value("fan0", data & 1);
|
||||
set_led_status(0, data & 2);
|
||||
@ -1630,7 +1630,7 @@ static READ8_HANDLER( propcycle_mcu_adc_r )
|
||||
int i;
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
cpunum_set_input_line(Machine, 3, M37710_LINE_TIMERA3TICK, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 3, M37710_LINE_TIMERA3TICK, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -528,7 +528,7 @@ static WRITE32_HANDLER( s23_txtchar_w )
|
||||
{
|
||||
COMBINE_DATA(&namcos23_charram[offset] );
|
||||
|
||||
decodechar( Machine->gfx[0],offset/32,(UINT8 *)namcos23_charram );
|
||||
decodechar( machine->gfx[0],offset/32,(UINT8 *)namcos23_charram );
|
||||
|
||||
tilemap_mark_all_tiles_dirty(bgtilemap);
|
||||
}
|
||||
@ -608,12 +608,12 @@ static WRITE32_HANDLER( s23_mcuen_w )
|
||||
if (data)
|
||||
{
|
||||
logerror("S23: booting H8/3002\n");
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
logerror("S23: stopping H8/3002\n");
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -701,7 +701,7 @@ static READ8_HANDLER( s23_mcu_rtc_r )
|
||||
mame_system_time systime;
|
||||
static const int weekday[7] = { 7, 1, 2, 3, 4, 5, 6 };
|
||||
|
||||
mame_get_current_datetime(Machine, &systime);
|
||||
mame_get_current_datetime(machine, &systime);
|
||||
|
||||
switch (s23_rtcstate)
|
||||
{
|
||||
|
@ -173,9 +173,9 @@ static int tmpz84c011_pio_r(running_machine *machine, int offset)
|
||||
{
|
||||
int portdata;
|
||||
|
||||
if ((!strcmp(Machine->gamedrv->name, "mscoutm")) ||
|
||||
(!strcmp(Machine->gamedrv->name, "imekura")) ||
|
||||
(!strcmp(Machine->gamedrv->name, "mjegolf")))
|
||||
if ((!strcmp(machine->gamedrv->name, "mscoutm")) ||
|
||||
(!strcmp(machine->gamedrv->name, "imekura")) ||
|
||||
(!strcmp(machine->gamedrv->name, "mjegolf")))
|
||||
{
|
||||
|
||||
switch (offset)
|
||||
@ -352,9 +352,9 @@ static int tmpz84c011_pio_r(running_machine *machine, int offset)
|
||||
|
||||
static void tmpz84c011_pio_w(running_machine *machine, int offset, int data)
|
||||
{
|
||||
if ((!strcmp(Machine->gamedrv->name, "imekura")) ||
|
||||
(!strcmp(Machine->gamedrv->name, "mscoutm")) ||
|
||||
(!strcmp(Machine->gamedrv->name, "mjegolf")))
|
||||
if ((!strcmp(machine->gamedrv->name, "imekura")) ||
|
||||
(!strcmp(machine->gamedrv->name, "mscoutm")) ||
|
||||
(!strcmp(machine->gamedrv->name, "mjegolf")))
|
||||
{
|
||||
|
||||
switch (offset)
|
||||
|
@ -50,7 +50,7 @@ static WRITE32_HANDLER( paletteram32_w )
|
||||
{
|
||||
COMBINE_DATA(&paletteram32[offset]);
|
||||
data = paletteram32[offset];
|
||||
palette_set_color_rgb(Machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0));
|
||||
palette_set_color_rgb(machine, offset, pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0));
|
||||
}
|
||||
|
||||
|
||||
@ -511,8 +511,8 @@ READ32_HANDLER(K001604_reg_r)
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0x54/4: return mame_rand(Machine) << 16; break;
|
||||
case 0x5c/4: return mame_rand(Machine) << 16 | mame_rand(Machine); break;
|
||||
case 0x54/4: return mame_rand(machine) << 16; break;
|
||||
case 0x5c/4: return mame_rand(machine) << 16 | mame_rand(machine); break;
|
||||
}
|
||||
|
||||
return K001604_reg[chip][offset];
|
||||
@ -630,11 +630,11 @@ static WRITE32_HANDLER( sysreg_w )
|
||||
{
|
||||
if (data & 0x80) // CG Board 1 IRQ Ack
|
||||
{
|
||||
//cpunum_set_input_line(Machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE);
|
||||
//cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE);
|
||||
}
|
||||
if (data & 0x40) // CG Board 0 IRQ Ack
|
||||
{
|
||||
//cpunum_set_input_line(Machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
//cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -736,7 +736,7 @@ static WRITE32_HANDLER( lanc2_w )
|
||||
}
|
||||
if (offset == 4)
|
||||
{
|
||||
if (mame_stricmp(Machine->gamedrv->name, "thrilld") == 0)
|
||||
if (mame_stricmp(machine->gamedrv->name, "thrilld") == 0)
|
||||
{
|
||||
work_ram[(0x3ffed0/4) + 0] = 0x472a3731;
|
||||
work_ram[(0x3ffed0/4) + 1] = 0x33202020;
|
||||
|
@ -389,7 +389,7 @@ static WRITE16_HANDLER( rom_5987_bank_w )
|
||||
/* tile banking */
|
||||
if (offset < 8)
|
||||
{
|
||||
int maxbanks = Machine->gfx[0]->total_elements / 1024;
|
||||
int maxbanks = machine->gfx[0]->total_elements / 1024;
|
||||
if (data >= maxbanks)
|
||||
data %= maxbanks;
|
||||
segaic16_tilemap_set_bank(0, offset, data);
|
||||
@ -556,7 +556,7 @@ static WRITE8_HANDLER( soundbank_w )
|
||||
static WRITE8_HANDLER( mcu_data_w )
|
||||
{
|
||||
mcu_data = data;
|
||||
cpunum_set_input_line(Machine, 2, 1, PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 2, 1, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -870,13 +870,13 @@ static WRITE16_HANDLER(irq_w)
|
||||
break;
|
||||
case 2:
|
||||
irq_allow0 = data;
|
||||
cpunum_set_input_line(Machine, 0, IRQ_TIMER+1, irq_timer_pend0 && (irq_allow0 & (1 << IRQ_TIMER)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpunum_set_input_line(Machine, 0, IRQ_YM2151+1, irq_yms && (irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, IRQ_TIMER+1, irq_timer_pend0 && (irq_allow0 & (1 << IRQ_TIMER)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, IRQ_YM2151+1, irq_yms && (irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
break;
|
||||
case 3:
|
||||
irq_allow1 = data;
|
||||
cpunum_set_input_line(Machine, 1, IRQ_TIMER+1, irq_timer_pend1 && (irq_allow1 & (1 << IRQ_TIMER)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpunum_set_input_line(Machine, 1, IRQ_YM2151+1, irq_yms && (irq_allow1 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, IRQ_TIMER+1, irq_timer_pend1 && (irq_allow1 & (1 << IRQ_TIMER)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, IRQ_YM2151+1, irq_yms && (irq_allow1 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -896,19 +896,19 @@ static READ16_HANDLER(irq_r)
|
||||
/* These hacks are for Gain Ground */
|
||||
/* otherwise the interrupt occurs before the correct state has been
|
||||
set and the game crashes before booting */
|
||||
if (!strcmp(Machine->gamedrv->name,"gground"))
|
||||
if (!strcmp(machine->gamedrv->name,"gground"))
|
||||
{
|
||||
|
||||
if (activecpu_get_pc()==0x0084aa)
|
||||
{
|
||||
ggground_kludge = 1;
|
||||
return mame_rand(Machine);
|
||||
return mame_rand(machine);
|
||||
|
||||
}
|
||||
if (activecpu_get_pc()==0x084ba)
|
||||
{
|
||||
/* Clear IRQ line so IRQ doesn't happen too early */
|
||||
cpunum_set_input_line(Machine, 1, 5, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, 5, CLEAR_LINE);
|
||||
|
||||
/* set a timer to generate an irq at the needed point */
|
||||
if (ggground_kludge == 1)
|
||||
@ -920,19 +920,19 @@ static READ16_HANDLER(irq_r)
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp(Machine->gamedrv->name,"ggroundj"))
|
||||
if (!strcmp(machine->gamedrv->name,"ggroundj"))
|
||||
{
|
||||
|
||||
if (activecpu_get_pc()==0x0084ac)
|
||||
{
|
||||
ggground_kludge = 1;
|
||||
return mame_rand(Machine);
|
||||
return mame_rand(machine);
|
||||
|
||||
}
|
||||
if (activecpu_get_pc()==0x084bc)
|
||||
{
|
||||
/* Clear IRQ line so IRQ doesn't happen too early */
|
||||
cpunum_set_input_line(Machine, 1, 5, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, 5, CLEAR_LINE);
|
||||
|
||||
/* set a timer to generate an irq at the needed point */
|
||||
if (ggground_kludge == 1)
|
||||
@ -947,11 +947,11 @@ static READ16_HANDLER(irq_r)
|
||||
switch(offset) {
|
||||
case 2:
|
||||
irq_timer_pend0 = 0;
|
||||
cpunum_set_input_line(Machine, 0, IRQ_TIMER+1, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, IRQ_TIMER+1, CLEAR_LINE);
|
||||
break;
|
||||
case 3:
|
||||
irq_timer_pend1 = 0;
|
||||
cpunum_set_input_line(Machine, 1, IRQ_TIMER+1, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, IRQ_TIMER+1, CLEAR_LINE);
|
||||
break;
|
||||
}
|
||||
return 0xffff;
|
||||
|
@ -41,7 +41,6 @@ Verify Color PROM resistor values (Last 8 colors)
|
||||
****************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "stactics.h"
|
||||
#include "stactics.lh"
|
||||
|
||||
@ -65,7 +64,7 @@ static CUSTOM_INPUT( get_motor_not_ready )
|
||||
|
||||
static READ8_HANDLER( vert_pos_r )
|
||||
{
|
||||
stactics_state *state = Machine->driver_data;
|
||||
stactics_state *state = machine->driver_data;
|
||||
|
||||
return 0x70 - state->vert_pos;
|
||||
}
|
||||
@ -73,7 +72,7 @@ static READ8_HANDLER( vert_pos_r )
|
||||
|
||||
static READ8_HANDLER( horiz_pos_r )
|
||||
{
|
||||
stactics_state *state = Machine->driver_data;
|
||||
stactics_state *state = machine->driver_data;
|
||||
|
||||
return state->horiz_pos + 0x88;
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ static void stv_SMPC_w8 (running_machine *machine, int offset, UINT8 data)
|
||||
{
|
||||
mame_system_time systime;
|
||||
|
||||
mame_get_base_datetime(Machine, &systime);
|
||||
mame_get_base_datetime(machine, &systime);
|
||||
|
||||
// if(LOG_SMPC) logerror ("8-bit SMPC Write to Offset %02x with Data %02x\n", offset, data);
|
||||
smpc_ram[offset] = data;
|
||||
@ -630,7 +630,7 @@ static void stv_SMPC_w8 (running_machine *machine, int offset, UINT8 data)
|
||||
if(LOG_SMPC) logerror ("SMPC: Slave OFF\n");
|
||||
smpc_ram[0x5f]=0x03;
|
||||
stv_enable_slave_sh2 = 0;
|
||||
cpu_trigger(Machine, 1000);
|
||||
cpu_trigger(machine, 1000);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
break;
|
||||
case 0x06:
|
||||
@ -794,7 +794,7 @@ static WRITE32_HANDLER ( stv_SMPC_w32 )
|
||||
|
||||
offset += byte;
|
||||
|
||||
stv_SMPC_w8(Machine, offset,writedata);
|
||||
stv_SMPC_w8(machine, offset,writedata);
|
||||
}
|
||||
|
||||
|
||||
@ -971,7 +971,7 @@ static READ32_HANDLER ( stv_io_r32 )
|
||||
}
|
||||
case 0x47:
|
||||
{
|
||||
if ( strcmp(Machine->gamedrv->name,"critcrsh") == 0 )
|
||||
if ( strcmp(machine->gamedrv->name,"critcrsh") == 0 )
|
||||
{
|
||||
int data1 = 0, data2 = 0;
|
||||
|
||||
@ -992,7 +992,7 @@ static READ32_HANDLER ( stv_io_r32 )
|
||||
return (readinputport(2) << 16) | (readinputport(3));
|
||||
}
|
||||
case 1:
|
||||
if ( strcmp(Machine->gamedrv->name,"critcrsh") == 0 )
|
||||
if ( strcmp(machine->gamedrv->name,"critcrsh") == 0 )
|
||||
{
|
||||
return ((readinputport(4) << 16) & ((readinputport(2) & 1) ? 0xffef0000 : 0xffff0000)) | (ioga[1]);
|
||||
}
|
||||
@ -1292,14 +1292,14 @@ static WRITE32_HANDLER( stv_scu_w32 )
|
||||
/*Sound IRQ*/
|
||||
if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1)
|
||||
{
|
||||
//cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46);
|
||||
//cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46);
|
||||
logerror("SCSP: Main CPU interrupt\n");
|
||||
#if 0
|
||||
if((scu_dst_0 & 0x7ffffff) != 0x05a00000)
|
||||
{
|
||||
if(!(stv_scu[40] & 0x1000))
|
||||
{
|
||||
cpunum_set_input_line_and_vector(Machine, 0, 3, HOLD_LINE, 0x4c);
|
||||
cpunum_set_input_line_and_vector(machine, 0, 3, HOLD_LINE, 0x4c);
|
||||
logerror("SCU: Illegal DMA interrupt\n");
|
||||
}
|
||||
}
|
||||
@ -1353,7 +1353,7 @@ static WRITE32_HANDLER( stv_scu_w32 )
|
||||
/*Sound IRQ*/
|
||||
if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1)
|
||||
{
|
||||
//cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46);
|
||||
//cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46);
|
||||
logerror("SCSP: Main CPU interrupt\n");
|
||||
}
|
||||
}
|
||||
@ -1403,7 +1403,7 @@ static WRITE32_HANDLER( stv_scu_w32 )
|
||||
/*Sound IRQ*/
|
||||
if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1)
|
||||
{
|
||||
//cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46);
|
||||
//cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46);
|
||||
logerror("SCSP: Main CPU interrupt\n");
|
||||
}
|
||||
}
|
||||
@ -2049,7 +2049,7 @@ static WRITE32_HANDLER( minit_w )
|
||||
{
|
||||
logerror("cpu #%d (PC=%08X) MINIT write = %08x\n",cpu_getactivecpu(), activecpu_get_pc(),data);
|
||||
cpu_boost_interleave(minit_boost_timeslice, ATTOTIME_IN_USEC(minit_boost));
|
||||
cpu_trigger(Machine, 1000);
|
||||
cpu_trigger(machine, 1000);
|
||||
cpunum_set_info_int(1, CPUINFO_INT_SH2_FRT_INPUT, PULSE_LINE);
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ static READ32_HANDLER( skns_hit_r )
|
||||
switch(adr) {
|
||||
case 0x28:
|
||||
case 0x2a:
|
||||
return (UINT16)mame_rand(Machine);
|
||||
return (UINT16)mame_rand(machine);
|
||||
case 0x00:
|
||||
case 0x10:
|
||||
return (UINT16)hit.x_in;
|
||||
@ -753,27 +753,27 @@ static WRITE32_HANDLER( skns_io_w )
|
||||
if(ACCESSING_BYTE_1)
|
||||
{ /* Interrupt Clear, do we need these? */
|
||||
/* if(data&0x01)
|
||||
cpunum_set_input_line(Machine, 0,1,CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0,1,CLEAR_LINE);
|
||||
if(data&0x02)
|
||||
cpunum_set_input_line(Machine, 0,3,CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0,3,CLEAR_LINE);
|
||||
if(data&0x04)
|
||||
cpunum_set_input_line(Machine, 0,5,CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0,5,CLEAR_LINE);
|
||||
if(data&0x08)
|
||||
cpunum_set_input_line(Machine, 0,7,CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0,7,CLEAR_LINE);
|
||||
if(data&0x10)
|
||||
cpunum_set_input_line(Machine, 0,9,CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0,9,CLEAR_LINE);
|
||||
if(data&0x20)
|
||||
cpunum_set_input_line(Machine, 0,0xb,CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0,0xb,CLEAR_LINE);
|
||||
if(data&0x40)
|
||||
cpunum_set_input_line(Machine, 0,0xd,CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0,0xd,CLEAR_LINE);
|
||||
if(data&0x80)
|
||||
cpunum_set_input_line(Machine, 0,0xf,CLEAR_LINE);*/
|
||||
cpunum_set_input_line(machine, 0,0xf,CLEAR_LINE);*/
|
||||
|
||||
/* idle skip for vblokbrk/sarukani, i can't find a better place to put it :-( but i think it works ok unless its making the game too fast */
|
||||
if (activecpu_get_pc()==0x04013B44)
|
||||
{
|
||||
if (!strcmp(Machine->gamedrv->name,"vblokbrk") ||
|
||||
!strcmp(Machine->gamedrv->name,"sarukani"))
|
||||
if (!strcmp(machine->gamedrv->name,"vblokbrk") ||
|
||||
!strcmp(machine->gamedrv->name,"sarukani"))
|
||||
cpu_spinuntil_int();
|
||||
}
|
||||
|
||||
@ -795,7 +795,7 @@ static READ32_HANDLER( skns_msm6242_r )
|
||||
mame_system_time systime;
|
||||
long value;
|
||||
|
||||
mame_get_base_datetime(Machine, &systime);
|
||||
mame_get_base_datetime(machine, &systime);
|
||||
// The clock is not y2k-compatible, wrap back 10 years, screw the leap years
|
||||
// tm->tm_year -= 10;
|
||||
|
||||
|
@ -846,7 +846,7 @@ static WRITE16_HANDLER( cpua_ctrl_w ) /* assumes Z80 sandwiched between 68Ks */
|
||||
parse_control();
|
||||
|
||||
// Chase HQ: handle the lights
|
||||
if ((!strcmp(Machine->gamedrv->name, "chasehq")) || (!strcmp(Machine->gamedrv->name, "chasehqj")))
|
||||
if ((!strcmp(machine->gamedrv->name, "chasehq")) || (!strcmp(machine->gamedrv->name, "chasehqj")))
|
||||
{
|
||||
output_set_lamp_value(0, (data&0x20) ? 1 : 0);
|
||||
output_set_lamp_value(1, (data&0x40) ? 1 : 0);
|
||||
@ -1304,7 +1304,7 @@ static READ16_HANDLER( chasehq_motor_r )
|
||||
switch (offset)
|
||||
{
|
||||
case 0x0:
|
||||
return (mame_rand(Machine) &0xff); /* motor status ?? */
|
||||
return (mame_rand(machine) &0xff); /* motor status ?? */
|
||||
|
||||
case 0x101:
|
||||
return 0x55; /* motor cpu status ? */
|
||||
|
@ -61,7 +61,6 @@ Technology = NMOS
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/ay8910.h"
|
||||
|
||||
static tilemap *bg_tilemap;
|
||||
@ -142,7 +141,7 @@ static WRITE8_HANDLER( trvmadns_banking_w )
|
||||
static WRITE8_HANDLER( trvmadns_gfxram_w )
|
||||
{
|
||||
trvmadns_gfxram[offset] = data;
|
||||
decodechar(Machine->gfx[0], offset/16, trvmadns_gfxram);
|
||||
decodechar(machine->gfx[0], offset/16, trvmadns_gfxram);
|
||||
|
||||
tilemap_mark_all_tiles_dirty(bg_tilemap);
|
||||
}
|
||||
@ -159,7 +158,7 @@ static WRITE8_HANDLER( trvmadns_palette_w )
|
||||
g = (paletteram[offset | 1] & 0xf0) >> 4;
|
||||
b = paletteram[offset | 1] & 0xf;
|
||||
|
||||
palette_set_color_rgb(Machine, offset >> 1, pal4bit(r), pal4bit(g), pal4bit(b));
|
||||
palette_set_color_rgb(machine, offset >> 1, pal4bit(r), pal4bit(g), pal4bit(b));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -185,7 +184,7 @@ static WRITE8_HANDLER( trvmadns_tileram_w )
|
||||
{
|
||||
if(activecpu_get_previouspc()==0x29e9)// || activecpu_get_previouspc()==0x1b3f) //29f5
|
||||
{
|
||||
cpunum_set_input_line(Machine, 0, 0, HOLD_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, HOLD_LINE);
|
||||
}
|
||||
// else
|
||||
// printf("%x \n", activecpu_get_previouspc());
|
||||
|
@ -35,14 +35,13 @@ Notes:
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "gameplan.h"
|
||||
|
||||
static READ8_HANDLER( trvquest_question_r )
|
||||
{
|
||||
gameplan_state *state = Machine->driver_data;
|
||||
gameplan_state *state = machine->driver_data;
|
||||
|
||||
return memory_region(REGION_USER1)[*state->trvquest_question * 0x2000 + offset];
|
||||
}
|
||||
|
@ -104,19 +104,19 @@ static READ8_HANDLER( unknown_d938_r )
|
||||
static WRITE8_HANDLER( sound_command1_w )
|
||||
{
|
||||
sound_command1 = data;
|
||||
cpunum_set_input_line(Machine, 1, 0, HOLD_LINE );
|
||||
cpunum_set_input_line(machine, 1, 0, HOLD_LINE );
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( sound_command2_w )
|
||||
{
|
||||
sound_command2 = data;
|
||||
cpunum_set_input_line(Machine, 2, 0, HOLD_LINE );
|
||||
cpunum_set_input_line(machine, 2, 0, HOLD_LINE );
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( sound_command3_w )
|
||||
{
|
||||
sound_command3 = data;
|
||||
cpunum_set_input_line(Machine, 3, 0, HOLD_LINE );
|
||||
cpunum_set_input_line(machine, 3, 0, HOLD_LINE );
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( flip_screen_w )
|
||||
@ -365,9 +365,9 @@ static INTERRUPT_GEN( vsgongf_sound_interrupt ){
|
||||
|
||||
static READ8_HANDLER( vsgongf_a006_r ){
|
||||
/* sound CPU busy? */
|
||||
if (!strcmp(Machine->gamedrv->name,"vsgongf")) return 0x80;
|
||||
if (!strcmp(Machine->gamedrv->name,"ringfgt")) return 0x80;
|
||||
if (!strcmp(Machine->gamedrv->name,"ringfgt2")) return 0xc0;
|
||||
if (!strcmp(machine->gamedrv->name,"vsgongf")) return 0x80;
|
||||
if (!strcmp(machine->gamedrv->name,"ringfgt")) return 0x80;
|
||||
if (!strcmp(machine->gamedrv->name,"ringfgt2")) return 0xc0;
|
||||
|
||||
logerror ("unhandled read from a006\n");
|
||||
return 0x00;
|
||||
@ -375,9 +375,9 @@ static READ8_HANDLER( vsgongf_a006_r ){
|
||||
|
||||
static READ8_HANDLER( vsgongf_a100_r ){
|
||||
/* protection? */
|
||||
if (!strcmp(Machine->gamedrv->name,"vsgongf")) return 0xaa;
|
||||
if (!strcmp(Machine->gamedrv->name,"ringfgt")) return 0x63;
|
||||
if (!strcmp(Machine->gamedrv->name,"ringfgt2")) return 0x6a;
|
||||
if (!strcmp(machine->gamedrv->name,"vsgongf")) return 0xaa;
|
||||
if (!strcmp(machine->gamedrv->name,"ringfgt")) return 0x63;
|
||||
if (!strcmp(machine->gamedrv->name,"ringfgt2")) return 0x6a;
|
||||
|
||||
logerror ("unhandled read from a100\n");
|
||||
return 0x00;
|
||||
|
@ -145,7 +145,6 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/8255ppi.h"
|
||||
#include "turbo.h"
|
||||
#include "machine/segacrpt.h"
|
||||
@ -212,7 +211,7 @@ static MACHINE_RESET( buckrog )
|
||||
static WRITE8_HANDLER( turbo_ppi0a_w )
|
||||
{
|
||||
/* bit0-7 = 0PA0-7 */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_opa = data;
|
||||
}
|
||||
|
||||
@ -220,7 +219,7 @@ static WRITE8_HANDLER( turbo_ppi0a_w )
|
||||
static WRITE8_HANDLER( turbo_ppi0b_w )
|
||||
{
|
||||
/* bit0-7 = 0PB0-7 */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_opb = data;
|
||||
}
|
||||
|
||||
@ -228,7 +227,7 @@ static WRITE8_HANDLER( turbo_ppi0b_w )
|
||||
static WRITE8_HANDLER( turbo_ppi0c_w )
|
||||
{
|
||||
/* bit0-7 = 0PC0-7 */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_opc = data;
|
||||
}
|
||||
|
||||
@ -236,7 +235,7 @@ static WRITE8_HANDLER( turbo_ppi0c_w )
|
||||
static WRITE8_HANDLER( turbo_ppi1a_w )
|
||||
{
|
||||
/* bit0-7 = 1PA0-7 */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_ipa = data;
|
||||
}
|
||||
|
||||
@ -244,7 +243,7 @@ static WRITE8_HANDLER( turbo_ppi1a_w )
|
||||
static WRITE8_HANDLER( turbo_ppi1b_w )
|
||||
{
|
||||
/* bit0-7 = 1PB0-7 */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_ipb = data;
|
||||
}
|
||||
|
||||
@ -252,7 +251,7 @@ static WRITE8_HANDLER( turbo_ppi1b_w )
|
||||
static WRITE8_HANDLER( turbo_ppi1c_w )
|
||||
{
|
||||
/* bit0-7 = 1PC0-7 */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_ipc = data;
|
||||
}
|
||||
|
||||
@ -262,7 +261,7 @@ static WRITE8_HANDLER( turbo_ppi3c_w )
|
||||
/* bit 0-3 = PLA0-3 */
|
||||
/* bit 4-6 = COL0-2 */
|
||||
/* bit 7 = n/c */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_fbpla = data & 0x0f;
|
||||
state->turbo_fbcol = (data >> 4) & 0x07;
|
||||
}
|
||||
@ -285,7 +284,7 @@ static WRITE8_HANDLER( subroc3d_ppi0a_w )
|
||||
{
|
||||
/* bit 0-3 = PLY0-3 */
|
||||
/* bit 4-7 = n/c */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->subroc3d_ply = data & 0x0f;
|
||||
}
|
||||
|
||||
@ -293,7 +292,7 @@ static WRITE8_HANDLER( subroc3d_ppi0a_w )
|
||||
static WRITE8_HANDLER( subroc3d_ppi0c_w )
|
||||
{
|
||||
/* bit 0-3 = COL0-3 */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->subroc3d_col = data & 0x0f;
|
||||
}
|
||||
|
||||
@ -305,7 +304,7 @@ static WRITE8_HANDLER( subroc3d_ppi0b_w )
|
||||
/* bit 2 = STLA (START LAMP) */
|
||||
/* bit 3 = NOUSE (n/c) */
|
||||
/* bit 4 = FLIP (not really flip, just offset) */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
coin_counter_w(0, data & 0x01);
|
||||
coin_counter_w(1, data & 0x02);
|
||||
set_led_status(0, data & 0x04);
|
||||
@ -323,7 +322,7 @@ static WRITE8_HANDLER( subroc3d_ppi0b_w )
|
||||
static WRITE8_HANDLER( buckrog_ppi0a_w )
|
||||
{
|
||||
/* bit 0-7 = data to be read on the /IOREQ */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->buckrog_command = data;
|
||||
}
|
||||
|
||||
@ -332,7 +331,7 @@ static WRITE8_HANDLER( buckrog_ppi0b_w )
|
||||
{
|
||||
/* bit 0-5 = MOV0-5 */
|
||||
/* bit 6-7 = n/c */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->buckrog_mov = data & 0x3f;
|
||||
}
|
||||
|
||||
@ -343,9 +342,9 @@ static WRITE8_HANDLER( buckrog_ppi0c_w )
|
||||
/* bit 3-5 = n/c */
|
||||
/* bit 6 = /IOREQ on the 2nd CPU */
|
||||
/* bit 7 = /INT on the 2nd CPU */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->buckrog_fchg = data & 0x07;
|
||||
cpunum_set_input_line(Machine, 1, 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1, 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -357,7 +356,7 @@ static WRITE8_HANDLER( buckrog_ppi1c_w )
|
||||
/* bit 5 = COM2 (COIN METER 2) */
|
||||
/* bit 6 = STLA (START LAMP) */
|
||||
/* bit 7 = NOUSE (BODY SONIC) */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->buckrog_obch = data & 0x07;
|
||||
coin_counter_w(0, data & 0x10);
|
||||
coin_counter_w(1, data & 0x20);
|
||||
@ -399,7 +398,7 @@ static void update_outputs(i8279_state *chip, UINT16 which)
|
||||
|
||||
static READ8_HANDLER( turbo_8279_r )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
i8279_state *chip = &state->i8279;
|
||||
UINT8 result = 0xff;
|
||||
UINT8 addr;
|
||||
@ -440,7 +439,7 @@ static READ8_HANDLER( turbo_8279_r )
|
||||
|
||||
static WRITE8_HANDLER( turbo_8279_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
i8279_state *chip = &state->i8279;
|
||||
UINT8 addr;
|
||||
|
||||
@ -544,7 +543,7 @@ static WRITE8_HANDLER( turbo_8279_w )
|
||||
|
||||
static READ8_HANDLER( turbo_collision_r )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
|
||||
return readinputport(3) | (state->turbo_collision & 15);
|
||||
}
|
||||
@ -552,7 +551,7 @@ static READ8_HANDLER( turbo_collision_r )
|
||||
|
||||
static WRITE8_HANDLER( turbo_collision_clear_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
|
||||
state->turbo_collision = 0;
|
||||
}
|
||||
@ -560,14 +559,14 @@ static WRITE8_HANDLER( turbo_collision_clear_w )
|
||||
|
||||
static READ8_HANDLER( turbo_analog_r )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
return readinputport(4) - state->turbo_last_analog;
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( turbo_analog_reset_w )
|
||||
{
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
state->turbo_last_analog = readinputport(4);
|
||||
}
|
||||
|
||||
@ -599,7 +598,7 @@ static WRITE8_HANDLER( turbo_coin_and_lamp_w )
|
||||
static READ8_HANDLER( buckrog_cpu2_command_r )
|
||||
{
|
||||
/* assert ACK */
|
||||
turbo_state *state = Machine->driver_data;
|
||||
turbo_state *state = machine->driver_data;
|
||||
ppi8255_set_portC(0, 0x00);
|
||||
return state->buckrog_command;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ static READ8_HANDLER( zaccaria_prot1_r )
|
||||
return 0x40; /* Jack Rabbit */
|
||||
|
||||
case 6:
|
||||
if (Machine->gamedrv == &driver_monymony)
|
||||
if (machine->gamedrv == &driver_monymony)
|
||||
return 0x70; /* Money Money */
|
||||
return 0xa0; /* Jack Rabbit */
|
||||
|
||||
|
@ -27,11 +27,11 @@ WRITE8_HANDLER( bublbobl_bankswitch_w )
|
||||
/* bit 3 n.c. */
|
||||
|
||||
/* bit 4 resets second Z80 */
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
/* bit 5 resets mcu */
|
||||
if (Machine->config->cpu[3].type != CPU_DUMMY) // only if we have a MCU
|
||||
cpunum_set_input_line(Machine, 3, INPUT_LINE_RESET, (data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (machine->config->cpu[3].type != CPU_DUMMY) // only if we have a MCU
|
||||
cpunum_set_input_line(machine, 3, INPUT_LINE_RESET, (data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
|
||||
|
||||
/* bit 6 enables display */
|
||||
bublbobl_video_enable = data & 0x40;
|
||||
@ -60,7 +60,7 @@ WRITE8_HANDLER( tokio_videoctrl_w )
|
||||
|
||||
WRITE8_HANDLER( bublbobl_nmitrigger_w )
|
||||
{
|
||||
cpunum_set_input_line(Machine, 1,INPUT_LINE_NMI,PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,PULSE_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ WRITE8_HANDLER( bublbobl_sh_nmi_enable_w )
|
||||
sound_nmi_enable = 1;
|
||||
if (pending_nmi)
|
||||
{
|
||||
cpunum_set_input_line(Machine, 2,INPUT_LINE_NMI,PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 2,INPUT_LINE_NMI,PULSE_LINE);
|
||||
pending_nmi = 0;
|
||||
}
|
||||
}
|
||||
@ -200,7 +200,7 @@ WRITE8_HANDLER( bublbobl_mcu_port1_w )
|
||||
{
|
||||
// logerror("triggering IRQ on main CPU\n");
|
||||
cpunum_set_input_line_vector(0,0,bublbobl_mcu_sharedram[0]);
|
||||
cpunum_set_input_line(Machine, 0,0,HOLD_LINE);
|
||||
cpunum_set_input_line(machine, 0,0,HOLD_LINE);
|
||||
}
|
||||
|
||||
// bit 7: select read or write shared RAM
|
||||
@ -295,7 +295,7 @@ READ8_HANDLER( boblbobl_ic43_a_r )
|
||||
if (offset == 0)
|
||||
return ic43_a << 4;
|
||||
else
|
||||
return mame_rand(Machine) & 0xff;
|
||||
return mame_rand(machine) & 0xff;
|
||||
}
|
||||
|
||||
WRITE8_HANDLER( boblbobl_ic43_a_w )
|
||||
@ -475,10 +475,10 @@ logerror("%04x: 68705 unknown write to address %04x\n",activecpu_get_pc(),addres
|
||||
if ((ddrB & 0x20) && (~data & 0x20) && (portB_out & 0x20))
|
||||
{
|
||||
/* hack to get random EXTEND letters (who is supposed to do this? 68705? PAL?) */
|
||||
bublbobl_mcu_sharedram[0x7c] = mame_rand(Machine)%6;
|
||||
bublbobl_mcu_sharedram[0x7c] = mame_rand(machine)%6;
|
||||
|
||||
cpunum_set_input_line_vector(0,0,bublbobl_mcu_sharedram[0]);
|
||||
cpunum_set_input_line(Machine, 0,0,HOLD_LINE);
|
||||
cpunum_set_input_line(machine, 0,0,HOLD_LINE);
|
||||
}
|
||||
if ((ddrB & 0x40) && (~data & 0x40) && (portB_out & 0x40))
|
||||
{
|
||||
|
@ -21,11 +21,11 @@ bit 0 = ? (unused?)
|
||||
*/
|
||||
WRITE8_HANDLER( mexico86_f008_w )
|
||||
{
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (data & 4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (Machine->config->cpu[2].type != CPU_DUMMY)
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (data & 4) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (machine->config->cpu[2].type != CPU_DUMMY)
|
||||
{
|
||||
// mexico 86, knight boy
|
||||
cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, (data & 2) ? CLEAR_LINE : ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data & 2) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -314,8 +314,8 @@ WRITE8_HANDLER( mexico86_68705_portB_w )
|
||||
if ((ddrB & 0x20) && (data & 0x20) && (~portB_out & 0x20))
|
||||
{
|
||||
cpunum_set_input_line_vector(0,0,mexico86_protection_ram[0]);
|
||||
//cpunum_set_input_line(Machine, 0,0,PULSE_LINE);
|
||||
cpunum_set_input_line(Machine, 0, 0, HOLD_LINE); //AT: HOLD_LINE works better in Z80 interrupt mode 1.
|
||||
//cpunum_set_input_line(machine, 0,0,PULSE_LINE);
|
||||
cpunum_set_input_line(machine, 0, 0, HOLD_LINE); //AT: HOLD_LINE works better in Z80 interrupt mode 1.
|
||||
}
|
||||
if ((ddrB & 0x40) && (~data & 0x40) && (portB_out & 0x40))
|
||||
{
|
||||
|
@ -133,7 +133,6 @@ TODO:
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/namcoio.h"
|
||||
#include "machine/namco50.h"
|
||||
#include "sound/namco52.h"
|
||||
@ -218,9 +217,9 @@ static void namcoio_51XX_write(running_machine *machine,int chip,int data)
|
||||
static int namcoio_51XX_kludge = 0;
|
||||
|
||||
/* Only compute namcoio_51XX_kludge when gamedrv changes */
|
||||
if (namcoio_51XX_driver != Machine->gamedrv)
|
||||
if (namcoio_51XX_driver != machine->gamedrv)
|
||||
{
|
||||
namcoio_51XX_driver = Machine->gamedrv;
|
||||
namcoio_51XX_driver = machine->gamedrv;
|
||||
if (strcmp(namcoio_51XX_driver->name, "xevious") == 0 ||
|
||||
strcmp(namcoio_51XX_driver->parent, "xevious") == 0)
|
||||
namcoio_51XX_kludge = 1;
|
||||
|
@ -13,7 +13,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/i8x41/i8x41.h"
|
||||
#include "includes/tnzs.h"
|
||||
|
||||
@ -722,9 +721,9 @@ WRITE8_HANDLER( tnzs_bankswitch_w )
|
||||
|
||||
/* bit 4 resets the second CPU */
|
||||
if (data & 0x10)
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
|
||||
else
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
|
||||
|
||||
/* bits 0-2 select RAM/ROM bank */
|
||||
memory_set_bankptr (1, &RAM[0x10000 + 0x4000 * (data & 0x07)]);
|
||||
@ -743,8 +742,8 @@ WRITE8_HANDLER( tnzs_bankswitch1_w )
|
||||
/* bit 2 resets the mcu */
|
||||
if (data & 0x04)
|
||||
{
|
||||
if (Machine->config->cpu[2].type == CPU_I8X41)
|
||||
cpunum_set_input_line(Machine, 2, INPUT_LINE_RESET, PULSE_LINE);
|
||||
if (machine->config->cpu[2].type == CPU_I8X41)
|
||||
cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, PULSE_LINE);
|
||||
}
|
||||
/* Coin count and lockout is handled by the i8742 */
|
||||
break;
|
||||
|
@ -99,7 +99,7 @@ WRITE16_HANDLER( demonwld_dsp_bio_w )
|
||||
if (data == 0) {
|
||||
if (dsp_execute) {
|
||||
logerror("Turning 68000 on\n");
|
||||
cpunum_set_input_line(Machine, 0, INPUT_LINE_HALT, CLEAR_LINE);
|
||||
cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, CLEAR_LINE);
|
||||
dsp_execute = 0;
|
||||
}
|
||||
demonwld_dsp_BIO = ASSERT_LINE;
|
||||
@ -226,10 +226,10 @@ WRITE16_HANDLER( toaplan1_reset_sound )
|
||||
if (ACCESSING_BYTE_0 && (data == 0))
|
||||
{
|
||||
logerror("PC:%04x Resetting Sound CPU and Sound chip (%08x)\n",activecpu_get_previouspc(),data);
|
||||
if (Machine->config->sound[0].type == SOUND_YM3812)
|
||||
if (machine->config->sound[0].type == SOUND_YM3812)
|
||||
sndti_reset(SOUND_YM3812, 0);
|
||||
if (Machine->config->cpu[1].type == CPU_Z80)
|
||||
cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, PULSE_LINE);
|
||||
if (machine->config->cpu[1].type == CPU_Z80)
|
||||
cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user