Made a few more number-to-tag conversions. Also, removed chd.h includes from cps2.c (leftover of pre-decrypt versions, I guess)

This commit is contained in:
Fabio Priuli 2009-05-05 09:08:33 +00:00
parent 08c182fbe7
commit ca876a8a0a
11 changed files with 21 additions and 23 deletions

View File

@ -63,7 +63,7 @@ WRITE8_HANDLER( cyberbal_sound_bank_select_w )
memory_set_bankptr(space->machine, 8, &bank_base[0x1000 * ((data >> 6) & 3)]);
coin_counter_w(1, (data >> 5) & 1);
coin_counter_w(0, (data >> 4) & 1);
cpu_set_input_line(space->machine->cpu[3], INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(space->machine, "dac", INPUT_LINE_RESET, (data & 0x08) ? CLEAR_LINE : ASSERT_LINE);
if (!(data & 0x01)) devtag_reset(space->machine, "ym");
}
@ -97,8 +97,8 @@ WRITE8_HANDLER( cyberbal_sound_68k_6502_w )
static void update_sound_68k_interrupts(running_machine *machine)
{
cpu_set_input_line(machine->cpu[3], 6, fast_68k_int ? ASSERT_LINE : CLEAR_LINE);
cpu_set_input_line(machine->cpu[3], 2, io_68k_int ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine, "dac", 6, fast_68k_int ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(machine, "dac", 2, io_68k_int ? ASSERT_LINE : CLEAR_LINE);
}

View File

@ -114,7 +114,7 @@ static double freq_to_step;
static WRITE_LINE_DEVICE_HANDLER( update_irq_state )
{
const device_config *pia = devtag_get_device(device->machine, "pia1");
cpu_set_input_line(device->machine->cpu[1], M6502_IRQ_LINE, (pia6821_get_irq_b(pia) | riot_irq_state) ? ASSERT_LINE : CLEAR_LINE);
cputag_set_input_line(device->machine, "audiocpu", M6502_IRQ_LINE, (pia6821_get_irq_b(pia) | riot_irq_state) ? ASSERT_LINE : CLEAR_LINE);
}
@ -462,7 +462,7 @@ static void r6532_irq(const device_config *device, int state)
static void r6532_porta_w(const device_config *device, UINT8 newdata, UINT8 olddata)
{
if (has_mc3417)
cpu_set_input_line(device->machine->cpu[2], INPUT_LINE_RESET, (newdata & 0x10) ? CLEAR_LINE : ASSERT_LINE);
cputag_set_input_line(device->machine, "cvsd", INPUT_LINE_RESET, (newdata & 0x10) ? CLEAR_LINE : ASSERT_LINE);
}

View File

@ -201,7 +201,7 @@ static void spacefev_sound_pins_changed(running_machine *machine)
}
if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5)))
{
generic_pulse_irq_line(machine->cpu[1], 0);
generic_pulse_irq_line(cputag_get_cpu(machine, "audiocpu"), 0);
}
}
@ -225,7 +225,7 @@ static void sheriff_sound_pins_changed(running_machine *machine)
}
if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5)))
{
generic_pulse_irq_line(machine->cpu[1], 0);
generic_pulse_irq_line(cputag_get_cpu(machine, "audiocpu"), 0);
}
}
@ -240,7 +240,7 @@ static void helifire_sound_pins_changed(running_machine *machine)
if (changes & (1 << 6))
{
generic_pulse_irq_line(machine->cpu[1], 0);
generic_pulse_irq_line(cputag_get_cpu(machine, "audiocpu"), 0);
}
}

View File

@ -590,7 +590,6 @@ Stephh's inputs notes (based on some tests on the "parent" set) :
#include "cpu/m68000/m68000.h"
#include "sound/qsound.h"
#include "sound/okim6295.h" // gigamn2 bootleg
#include "chd.h"
#include "cps1.h" /* External CPS1 definitions */

View File

@ -68,7 +68,6 @@
#include "driver.h"
#include "cpu/m68000/m68000.h"
//#include "genesis.h"
#include "megadriv.h"
#include "sound/okim6295.h"
#include "sound/sn76496.h"

View File

@ -145,7 +145,7 @@ void asic65_config(running_machine *machine, int asictype)
void asic65_reset(running_machine *machine, int state)
{
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
/* rom-based means reset and clear states */
if (asic65.cpu != NULL)

View File

@ -721,7 +721,7 @@ static void cps2_decrypt(running_machine *machine, const UINT32 *master_key, UIN
}
memory_set_decrypted_region(space, 0x000000, length - 1, dec);
m68k_set_encrypted_opcode_range(machine->cpu[0],0,length);
m68k_set_encrypted_opcode_range(cputag_get_cpu(machine, "maincpu"), 0, length);
}

View File

@ -53,15 +53,15 @@ void deco102_decrypt_cpu(running_machine *machine, const char *cputag, int addre
const address_space *space = cputag_get_address_space(machine, cputag, ADDRESS_SPACE_PROGRAM);
UINT16 *rom = (UINT16 *)memory_region(machine, cputag);
int size = memory_region_length(machine, cputag);
UINT16 *opcodes = auto_alloc_array(machine, UINT16, size/2);
UINT16 *buf = alloc_array_or_die(UINT16, size/2);
UINT16 *opcodes = auto_alloc_array(machine, UINT16, size / 2);
UINT16 *buf = alloc_array_or_die(UINT16, size / 2);
memcpy(buf,rom,size);
memcpy(buf, rom, size);
memory_set_decrypted_region(space, 0, size - 1, opcodes);
m68k_set_encrypted_opcode_range(machine->cpu[0],0,size);
m68k_set_encrypted_opcode_range(cputag_get_cpu(machine, cputag), 0, size);
for (i = 0;i < size/2;i++)
for (i = 0; i < size / 2; i++)
{
int src;

View File

@ -871,8 +871,8 @@ WRITE16_HANDLER( copdxbl_0_w )
/*WRONG*/
case (0x65c/2):
{
soundlatch_w(space,1,data&0xff);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE );
soundlatch_w(space, 1, data & 0xff);
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE );
break;
}
/*video regs (not scrollram,something else)*/
@ -888,8 +888,8 @@ WRITE16_HANDLER( copdxbl_0_w )
/*bootleg sound HW*/
/*case (0x740/2):
{
soundlatch_w(1,data&0x00ff);
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, PULSE_LINE );
soundlatch_w(space, 1, data & 0x00ff);
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_NMI, PULSE_LINE );
break;
}*/
}

View File

@ -154,7 +154,7 @@ static int is_ntsc(running_machine *machine)
static void gtia_reset(running_machine *machine)
{
int i;
const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
/* reset the GTIA read/write/helper registers */
for (i = 0; i < 32; i++)

View File

@ -1012,7 +1012,7 @@ static void toaplan2_scroll_reg_data_w(running_machine *machine, offs_t offset,
if (ym && (sound_get_type(ym) == SOUND_YM3812))
{
cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, PULSE_LINE);
cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
devtag_reset(machine, "ym");
}
}