Initial round of atarigen cleanup.
This commit is contained in:
parent
d185880c34
commit
43f00aa98f
@ -150,7 +150,7 @@ void atarijsa_init(running_machine &machine, const char *testport, int testmask)
|
||||
jsacpu->space(AS_PROGRAM).install_readwrite_handler(0x2c00, 0x2c0f, read8_delegate(FUNC(pokey_device::read),pokey), write8_delegate(FUNC(pokey_device::write),pokey));
|
||||
|
||||
init_save_state(machine);
|
||||
atarijsa_reset();
|
||||
atarijsa_reset(machine);
|
||||
|
||||
/* initialize JSA III ADPCM */
|
||||
{
|
||||
@ -175,10 +175,10 @@ void atarijsa_init(running_machine &machine, const char *testport, int testmask)
|
||||
}
|
||||
|
||||
|
||||
void atarijsa_reset(void)
|
||||
void atarijsa_reset(running_machine &machine)
|
||||
{
|
||||
/* reset the sound I/O system */
|
||||
atarigen_sound_io_reset(jsacpu);
|
||||
machine.driver_data<atarigen_state>()->sound_io_reset();
|
||||
|
||||
/* reset the static states */
|
||||
overall_volume = 100;
|
||||
@ -213,7 +213,7 @@ static READ8_HANDLER( jsa1_io_r )
|
||||
break;
|
||||
|
||||
case 0x002: /* /RDP */
|
||||
result = atarigen_6502_sound_r(space, offset);
|
||||
result = atarigen->m6502_sound_r(space, offset);
|
||||
break;
|
||||
|
||||
case 0x004: /* /RDIO */
|
||||
@ -238,7 +238,7 @@ static READ8_HANDLER( jsa1_io_r )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
atarigen->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /VOICE */
|
||||
@ -264,7 +264,7 @@ static WRITE8_HANDLER( jsa1_io_w )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /VOICE */
|
||||
@ -273,7 +273,7 @@ static WRITE8_HANDLER( jsa1_io_w )
|
||||
break;
|
||||
|
||||
case 0x202: /* /WRP */
|
||||
atarigen_6502_sound_w(space, offset, data);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_sound_w(space, offset, data);
|
||||
break;
|
||||
|
||||
case 0x204: /* WRIO */
|
||||
@ -346,7 +346,7 @@ static READ8_HANDLER( jsa2_io_r )
|
||||
break;
|
||||
|
||||
case 0x002: /* /RDP */
|
||||
result = atarigen_6502_sound_r(space, offset);
|
||||
result = atarigen->m6502_sound_r(space, offset);
|
||||
break;
|
||||
|
||||
case 0x004: /* /RDIO */
|
||||
@ -367,7 +367,7 @@ static READ8_HANDLER( jsa2_io_r )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
atarigen->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /WRV */
|
||||
@ -393,7 +393,7 @@ static WRITE8_HANDLER( jsa2_io_w )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /WRV */
|
||||
@ -404,7 +404,7 @@ static WRITE8_HANDLER( jsa2_io_w )
|
||||
break;
|
||||
|
||||
case 0x202: /* /WRP */
|
||||
atarigen_6502_sound_w(space, offset, data);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_sound_w(space, offset, data);
|
||||
break;
|
||||
|
||||
case 0x204: /* /WRIO */
|
||||
@ -469,7 +469,7 @@ static READ8_HANDLER( jsa3_io_r )
|
||||
break;
|
||||
|
||||
case 0x002: /* /RDP */
|
||||
result = atarigen_6502_sound_r(space, offset);
|
||||
result = atarigen->m6502_sound_r(space, offset);
|
||||
break;
|
||||
|
||||
case 0x004: /* /RDIO */
|
||||
@ -490,7 +490,7 @@ static READ8_HANDLER( jsa3_io_r )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
atarigen->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /WRV */
|
||||
@ -520,7 +520,7 @@ static WRITE8_HANDLER( jsa3_io_w )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /WRV */
|
||||
@ -529,7 +529,7 @@ static WRITE8_HANDLER( jsa3_io_w )
|
||||
break;
|
||||
|
||||
case 0x202: /* /WRP */
|
||||
atarigen_6502_sound_w(space, offset, data);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_sound_w(space, offset, data);
|
||||
break;
|
||||
|
||||
case 0x204: /* /WRIO */
|
||||
@ -603,7 +603,7 @@ static READ8_HANDLER( jsa3s_io_r )
|
||||
break;
|
||||
|
||||
case 0x002: /* /RDP */
|
||||
result = atarigen_6502_sound_r(space, offset);
|
||||
result = atarigen->m6502_sound_r(space, offset);
|
||||
break;
|
||||
|
||||
case 0x004: /* /RDIO */
|
||||
@ -624,7 +624,7 @@ static READ8_HANDLER( jsa3s_io_r )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
atarigen->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /WRV */
|
||||
@ -654,7 +654,7 @@ static WRITE8_HANDLER( jsa3s_io_w )
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /WRV */
|
||||
@ -663,7 +663,7 @@ static WRITE8_HANDLER( jsa3s_io_w )
|
||||
break;
|
||||
|
||||
case 0x202: /* /WRP */
|
||||
atarigen_6502_sound_w(space, offset, data);
|
||||
space.machine().driver_data<atarigen_state>()->m6502_sound_w(space, offset, data);
|
||||
break;
|
||||
|
||||
case 0x204: /* /WRIO */
|
||||
@ -732,12 +732,13 @@ WRITE8_DEVICE_HANDLER( ym2151_ctl_w )
|
||||
|
||||
static void update_all_volumes(running_machine &machine )
|
||||
{
|
||||
if (pokey != NULL) atarigen_set_pokey_vol(machine, (overall_volume * pokey_volume / 100) * ym2151_ct1);
|
||||
atarigen_state *state = machine.driver_data<atarigen_state>();
|
||||
if (pokey != NULL) state->set_pokey_volume((overall_volume * pokey_volume / 100) * ym2151_ct1);
|
||||
//if (pokey != NULL) atarigen_set_pokey_stereo_vol(machine, (overall_volume * pokey_volume / 100) * ym2151_ct1, (overall_volume * pokey_volume / 100) * ym2151_ct2);
|
||||
if (ym2151 != NULL) atarigen_set_ym2151_vol(machine, overall_volume * ym2151_volume / 100);
|
||||
if (tms5220 != NULL) atarigen_set_tms5220_vol(machine, (overall_volume * tms5220_volume / 100) * ym2151_ct1);
|
||||
if (ym2151 != NULL) state->set_ym2151_volume(overall_volume * ym2151_volume / 100);
|
||||
if (tms5220 != NULL) state->set_tms5220_volume((overall_volume * tms5220_volume / 100) * ym2151_ct1);
|
||||
//if (tms5220 != NULL) atarigen_set_tms5220_stereo_vol(machine, (overall_volume * tms5220_volume / 100) * ym2151_ct1, (overall_volume * tms5220_volume / 100) * ym2151_ct2);
|
||||
if (oki6295 != NULL || oki6295_l != NULL || oki6295_r != NULL) atarigen_set_oki6295_vol(machine, overall_volume * oki6295_volume / 100);
|
||||
if (oki6295 != NULL || oki6295_l != NULL || oki6295_r != NULL) state->set_oki6295_volume(overall_volume * oki6295_volume / 100);
|
||||
}
|
||||
|
||||
|
||||
@ -794,7 +795,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_i_stereo )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa1_map)
|
||||
MCFG_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(atarigen_state, m6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
@ -838,7 +839,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_i_mono_speech )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa1_map)
|
||||
MCFG_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(atarigen_state, m6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -860,7 +861,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_ii_mono )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa2_map)
|
||||
MCFG_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(atarigen_state, m6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -904,7 +905,7 @@ MACHINE_CONFIG_FRAGMENT( jsa_iiis_stereo )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("jsa", M6502, JSA_MASTER_CLOCK/2)
|
||||
MCFG_CPU_PROGRAM_MAP(atarijsa3s_map)
|
||||
MCFG_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(atarigen_state, m6502_irq_gen, (double)JSA_MASTER_CLOCK/4/16/16/14)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
void atarijsa_init(running_machine &machine, const char *testport, int testmask);
|
||||
void atarijsa_reset(void);
|
||||
void atarijsa_reset(running_machine &machine);
|
||||
|
||||
|
||||
MACHINE_CONFIG_EXTERN( jsa_i_stereo );
|
||||
|
@ -82,18 +82,17 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void arcadecl_state::update_interrupts()
|
||||
{
|
||||
arcadecl_state *state = machine.driver_data<arcadecl_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static void scanline_update(screen_device &screen, int scanline)
|
||||
void arcadecl_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
/* generate 32V signals */
|
||||
if ((scanline & 32) == 0)
|
||||
atarigen_scanline_int_gen(screen.machine().device("maincpu"));
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
}
|
||||
|
||||
|
||||
@ -104,18 +103,10 @@ static void scanline_update(screen_device &screen, int scanline)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_START_MEMBER(arcadecl_state,arcadecl)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(arcadecl_state,arcadecl)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32);
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 32);
|
||||
}
|
||||
|
||||
|
||||
@ -139,7 +130,7 @@ WRITE16_MEMBER(arcadecl_state::latch_w)
|
||||
{
|
||||
okim6295_device *oki = machine().device<okim6295_device>("oki");
|
||||
oki->set_bank_base((data & 0x80) ? 0x40000 : 0x00000);
|
||||
atarigen_set_oki6295_vol(machine(), (data & 0x001f) * 100 / 0x1f);
|
||||
set_oki6295_volume((data & 0x001f) * 100 / 0x1f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +161,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, arcadecl_state )
|
||||
AM_RANGE(0x640060, 0x64006f) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0x641000, 0x641fff) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
AM_RANGE(0x642000, 0x642001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0xff00)
|
||||
AM_RANGE(0x646000, 0x646fff) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0x646000, 0x646fff) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0x647000, 0x647fff) AM_WRITE(watchdog_reset16_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -330,7 +321,6 @@ static MACHINE_CONFIG_START( arcadecl, arcadecl_state )
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(arcadecl_state,arcadecl)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(arcadecl_state,arcadecl)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -32,29 +32,25 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void atarig1_state::update_interrupts()
|
||||
{
|
||||
atarig1_state *state = machine.driver_data<atarig1_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(atarig1_state,atarig1)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
save_item(NAME(m_which_input));
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(atarig1_state,atarig1)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_slapstic_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, atarig1_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -209,13 +205,13 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarig1_state )
|
||||
AM_RANGE(0x078000, 0x07ffff) AM_ROM /* hydra slapstic goes here */
|
||||
AM_RANGE(0xf80000, 0xf80001) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xf88000, 0xf8ffff) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xf90000, 0xf90001) AM_WRITE_LEGACY(atarigen_sound_upper_w)
|
||||
AM_RANGE(0xf98000, 0xf98001) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xf90000, 0xf90001) AM_WRITE8(sound_w, 0xff00)
|
||||
AM_RANGE(0xf98000, 0xf98001) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0xfa0000, 0xfa0001) AM_WRITE(mo_control_w)
|
||||
AM_RANGE(0xfb0000, 0xfb0001) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0xfc0000, 0xfc0001) AM_READ(special_port0_r)
|
||||
AM_RANGE(0xfc8000, 0xfc8007) AM_READWRITE(a2d_data_r, a2d_select_w)
|
||||
AM_RANGE(0xfd0000, 0xfd0001) AM_READ_LEGACY(atarigen_sound_upper_r)
|
||||
AM_RANGE(0xfd0000, 0xfd0001) AM_READ8(sound_r, 0xff00)
|
||||
AM_RANGE(0xfd8000, 0xfdffff) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
/* AM_RANGE(0xfe0000, 0xfe7fff) AM_READ_LEGACY(from_r)*/
|
||||
AM_RANGE(0xfe8000, 0xfe89ff) AM_RAM_WRITE_LEGACY(atarigen_666_paletteram_w) AM_SHARE("paletteram")
|
||||
@ -1222,7 +1218,7 @@ static void init_g1_common(running_machine &machine, offs_t slapstic_base, int s
|
||||
machine.save().register_postload(save_prepost_delegate(FUNC(pitfightb_state_postload), &machine));
|
||||
}
|
||||
else if (slapstic != 0)
|
||||
atarigen_slapstic_init(machine.device("maincpu"), slapstic_base, 0, slapstic);
|
||||
state->slapstic_configure(*machine.device<cpu_device>("maincpu"), slapstic_base, 0, slapstic);
|
||||
atarijsa_init(machine, "IN0", 0x4000);
|
||||
|
||||
state->m_is_pitfight = is_pitfight;
|
||||
|
@ -31,17 +31,16 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void atarig42_state::update_interrupts()
|
||||
{
|
||||
atarig42_state *state = machine.driver_data<atarig42_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(5, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(5, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(atarig42_state,atarig42)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
|
||||
save_item(NAME(m_analog_data));
|
||||
save_item(NAME(m_sloop_bank));
|
||||
@ -53,11 +52,9 @@ MACHINE_START_MEMBER(atarig42_state,atarig42)
|
||||
|
||||
MACHINE_RESET_MEMBER(atarig42_state,atarig42)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, atarig42_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +107,7 @@ WRITE16_MEMBER(atarig42_state::io_latch_w)
|
||||
{
|
||||
/* bit 4 resets the sound CPU */
|
||||
machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (!(data & 0x10)) atarijsa_reset();
|
||||
if (!(data & 0x10)) atarijsa_reset(machine());
|
||||
|
||||
/* bit 5 is /XRESET, probably related to the ASIC */
|
||||
|
||||
@ -343,8 +340,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarig42_state )
|
||||
AM_RANGE(0xe00010, 0xe00011) AM_READ(special_port2_r)
|
||||
AM_RANGE(0xe00012, 0xe00013) AM_READ_PORT("JSAIII")
|
||||
AM_RANGE(0xe00020, 0xe00027) AM_READWRITE(a2d_data_r, a2d_select_w)
|
||||
AM_RANGE(0xe00030, 0xe00031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0xe00040, 0xe00041) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0xe00030, 0xe00031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0xe00040, 0xe00041) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0xe00050, 0xe00051) AM_WRITE(io_latch_w)
|
||||
AM_RANGE(0xe00060, 0xe00061) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xe03000, 0xe03001) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
|
@ -47,27 +47,18 @@ static void cage_irq_callback(running_machine &machine, int reason);
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void atarigt_state::update_interrupts()
|
||||
{
|
||||
atarigt_state *state = machine.driver_data<atarigt_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(3, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(atarigt_state,atarigt)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
machine().device("maincpu")->execute().set_input_line(3, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(6, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(atarigt_state,atarigt)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, atarigt_scanline_update, 8);
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
}
|
||||
|
||||
|
||||
@ -612,7 +603,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 32, atarigt_state )
|
||||
AM_RANGE(0xd80000, 0xdfffff) AM_READWRITE(colorram_protection_r, colorram_protection_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0xe04000, 0xe04003) AM_WRITE(led_w)
|
||||
AM_RANGE(0xe08000, 0xe08003) AM_WRITE(latch_w)
|
||||
AM_RANGE(0xe0a000, 0xe0a003) AM_WRITE_LEGACY(atarigen_scanline_int_ack32_w)
|
||||
AM_RANGE(0xe0a000, 0xe0a003) AM_WRITE16(scanline_int_ack_w, 0xffffffff)
|
||||
AM_RANGE(0xe0c000, 0xe0c003) AM_WRITE_LEGACY(atarigen_video_int_ack32_w)
|
||||
AM_RANGE(0xe0e000, 0xe0e003) AM_WRITENOP//watchdog_reset_w },
|
||||
AM_RANGE(0xe80000, 0xe80003) AM_READ_PORT("P1_P2")
|
||||
@ -811,9 +802,8 @@ static MACHINE_CONFIG_START( atarigt, atarigt_state )
|
||||
MCFG_CPU_ADD("maincpu", M68EC020, ATARI_CLOCK_50MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
MCFG_CPU_PERIODIC_INT(atarigen_scanline_int_gen, 250)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(atarigen_state, scanline_int_gen, 250)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(atarigt_state,atarigt)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(atarigt_state,atarigt)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -33,27 +33,18 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void atarigx2_state::update_interrupts()
|
||||
{
|
||||
atarigx2_state *state = machine.driver_data<atarigx2_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(5, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(atarigx2_state,atarigx2)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
machine().device("maincpu")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(5, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(atarigx2_state,atarigx2)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, atarigx2_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -1157,14 +1148,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 32, atarigx2_state )
|
||||
AM_RANGE(0xd7a200, 0xd7a203) AM_WRITE(mo_command_w) AM_SHARE("mo_command")
|
||||
AM_RANGE(0xd70000, 0xd7ffff) AM_RAM
|
||||
AM_RANGE(0xd80000, 0xd9ffff) AM_WRITE_LEGACY(atarigen_eeprom_enable32_w)
|
||||
AM_RANGE(0xe06000, 0xe06003) AM_WRITE_LEGACY(atarigen_sound_upper32_w)
|
||||
AM_RANGE(0xe06000, 0xe06003) AM_WRITE8(sound_w, 0xff000000)
|
||||
AM_RANGE(0xe08000, 0xe08003) AM_WRITE(latch_w)
|
||||
AM_RANGE(0xe0c000, 0xe0c003) AM_WRITE_LEGACY(atarigen_video_int_ack32_w)
|
||||
AM_RANGE(0xe0e000, 0xe0e003) AM_WRITENOP//watchdog_reset_w },
|
||||
AM_RANGE(0xe80000, 0xe80003) AM_READ_PORT("P1_P2")
|
||||
AM_RANGE(0xe82000, 0xe82003) AM_READ(special_port2_r)
|
||||
AM_RANGE(0xe82004, 0xe82007) AM_READ(special_port3_r)
|
||||
AM_RANGE(0xe86000, 0xe86003) AM_READ_LEGACY(atarigen_sound_upper32_r)
|
||||
AM_RANGE(0xe86000, 0xe86003) AM_READ8(sound_r, 0xff000000)
|
||||
AM_RANGE(0xff8000, 0xffffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -1433,7 +1424,6 @@ static MACHINE_CONFIG_START( atarigx2, atarigx2_state )
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(atarigx2_state,atarigx2)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(atarigx2_state,atarigx2)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -207,19 +207,18 @@ RoadBlasters (aka Future Vette):005*
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void atarisy1_state::update_interrupts()
|
||||
{
|
||||
atarisy1_state *state = machine.driver_data<atarisy1_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_joystick_int && state->m_joystick_int_enable ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(3, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, m_joystick_int && m_joystick_int_enable ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(3, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(atarisy1_state,atarisy1)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
|
||||
save_item(NAME(m_joystick_int));
|
||||
save_item(NAME(m_joystick_int_enable));
|
||||
@ -229,12 +228,7 @@ MACHINE_START_MEMBER(atarisy1_state,atarisy1)
|
||||
|
||||
MACHINE_RESET_MEMBER(atarisy1_state,atarisy1)
|
||||
{
|
||||
|
||||
/* initialize the system */
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_slapstic_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_sound_io_reset(machine().device("audiocpu"));
|
||||
atarigen_state::machine_reset();
|
||||
|
||||
/* reset the joystick parameters */
|
||||
m_joystick_value = 0;
|
||||
@ -254,7 +248,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::delayed_joystick_int)
|
||||
{
|
||||
m_joystick_value = param;
|
||||
m_joystick_int = 1;
|
||||
atarigen_update_interrupts(machine());
|
||||
update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -281,7 +275,7 @@ READ16_MEMBER(atarisy1_state::joystick_r)
|
||||
/* clear any existing interrupt and set a timer for a new one */
|
||||
m_joystick_int = 0;
|
||||
m_joystick_timer->adjust(attotime::from_usec(50), newval);
|
||||
atarigen_update_interrupts(machine());
|
||||
update_interrupts();
|
||||
|
||||
return m_joystick_value;
|
||||
}
|
||||
@ -485,9 +479,9 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarisy1_state )
|
||||
AM_RANGE(0xf20000, 0xf20007) AM_READ(trakball_r)
|
||||
AM_RANGE(0xf40000, 0xf4001f) AM_READWRITE(joystick_r, joystick_w)
|
||||
AM_RANGE(0xf60000, 0xf60003) AM_READ(port4_r)
|
||||
AM_RANGE(0xf80000, 0xf80001) AM_WRITE_LEGACY(atarigen_sound_w) /* used by roadbls2 */
|
||||
AM_RANGE(0xfc0000, 0xfc0001) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0xfe0000, 0xfe0001) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0xf80000, 0xf80001) AM_WRITE8(sound_w, 0x00ff) /* used by roadbls2 */
|
||||
AM_RANGE(0xfc0000, 0xfc0001) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0xfe0000, 0xfe0001) AM_WRITE8(sound_w, 0x00ff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -502,7 +496,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, atarisy1_state )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("via6522_0", via6522_device, read, write)
|
||||
AM_RANGE(0x1800, 0x1801) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
|
||||
AM_RANGE(0x1810, 0x1810) AM_READWRITE_LEGACY(atarigen_6502_sound_r, atarigen_6502_sound_w)
|
||||
AM_RANGE(0x1810, 0x1810) AM_READWRITE(m6502_sound_r, m6502_sound_w)
|
||||
AM_RANGE(0x1820, 0x1820) AM_READ(switch_6502_r)
|
||||
AM_RANGE(0x1824, 0x1825) AM_WRITE(led_w)
|
||||
AM_RANGE(0x1870, 0x187f) AM_DEVREADWRITE("pokey", pokey_device, read, write)
|
||||
@ -2326,8 +2320,7 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(atarisy1_state,marble)
|
||||
{
|
||||
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x080000, 0, 103);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x080000, 0, 103);
|
||||
|
||||
m_joystick_type = 0; /* none */
|
||||
m_trackball_type = 1; /* rotated */
|
||||
@ -2336,8 +2329,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,marble)
|
||||
|
||||
DRIVER_INIT_MEMBER(atarisy1_state,peterpak)
|
||||
{
|
||||
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x080000, 0, 107);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x080000, 0, 107);
|
||||
|
||||
m_joystick_type = 1; /* digital */
|
||||
m_trackball_type = 0; /* none */
|
||||
@ -2346,8 +2338,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,peterpak)
|
||||
|
||||
DRIVER_INIT_MEMBER(atarisy1_state,indytemp)
|
||||
{
|
||||
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x080000, 0, 105);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x080000, 0, 105);
|
||||
|
||||
m_joystick_type = 1; /* digital */
|
||||
m_trackball_type = 0; /* none */
|
||||
@ -2356,8 +2347,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,indytemp)
|
||||
|
||||
DRIVER_INIT_MEMBER(atarisy1_state,roadrunn)
|
||||
{
|
||||
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x080000, 0, 108);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x080000, 0, 108);
|
||||
|
||||
m_joystick_type = 2; /* analog */
|
||||
m_trackball_type = 0; /* none */
|
||||
@ -2366,8 +2356,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,roadrunn)
|
||||
|
||||
DRIVER_INIT_MEMBER(atarisy1_state,roadb109)
|
||||
{
|
||||
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x080000, 0, 109);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x080000, 0, 109);
|
||||
|
||||
m_joystick_type = 3; /* pedal */
|
||||
m_trackball_type = 2; /* steering wheel */
|
||||
@ -2376,8 +2365,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,roadb109)
|
||||
|
||||
DRIVER_INIT_MEMBER(atarisy1_state,roadb110)
|
||||
{
|
||||
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x080000, 0, 110);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x080000, 0, 110);
|
||||
|
||||
m_joystick_type = 3; /* pedal */
|
||||
m_trackball_type = 2; /* steering wheel */
|
||||
|
@ -155,29 +155,27 @@ static void bankselect_postload(running_machine &machine);
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void atarisy2_state::update_interrupts()
|
||||
{
|
||||
atarisy2_state *state = machine.driver_data<atarisy2_state>();
|
||||
|
||||
if (state->m_video_int_state)
|
||||
machine.device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
|
||||
if (m_video_int_state)
|
||||
machine().device("maincpu")->execute().set_input_line(3, ASSERT_LINE);
|
||||
else
|
||||
machine.device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(3, CLEAR_LINE);
|
||||
|
||||
if (state->m_scanline_int_state)
|
||||
machine.device("maincpu")->execute().set_input_line(2, ASSERT_LINE);
|
||||
if (m_scanline_int_state)
|
||||
machine().device("maincpu")->execute().set_input_line(2, ASSERT_LINE);
|
||||
else
|
||||
machine.device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, CLEAR_LINE);
|
||||
|
||||
if (state->m_p2portwr_state)
|
||||
machine.device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
|
||||
if (m_p2portwr_state)
|
||||
machine().device("maincpu")->execute().set_input_line(1, ASSERT_LINE);
|
||||
else
|
||||
machine.device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, CLEAR_LINE);
|
||||
|
||||
if (state->m_p2portrd_state)
|
||||
machine.device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
if (m_p2portrd_state)
|
||||
machine().device("maincpu")->execute().set_input_line(0, ASSERT_LINE);
|
||||
else
|
||||
machine.device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(0, CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -188,15 +186,14 @@ static void update_interrupts(running_machine &machine)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void scanline_update(screen_device &screen, int scanline)
|
||||
void atarisy2_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
atarisy2_state *state = screen.machine().driver_data<atarisy2_state>();
|
||||
if (scanline <= screen.height())
|
||||
{
|
||||
/* generate the 32V interrupt (IRQ 2) */
|
||||
if ((scanline % 64) == 0)
|
||||
if (state->m_interrupt_enable & 4)
|
||||
atarigen_scanline_int_gen(screen.machine().device("maincpu"));
|
||||
if (m_interrupt_enable & 4)
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -222,7 +219,7 @@ DIRECT_UPDATE_MEMBER( atarisy2_state::atarisy2_direct_handler )
|
||||
|
||||
MACHINE_START_MEMBER(atarisy2_state,atarisy2)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
|
||||
save_item(NAME(m_interrupt_enable));
|
||||
save_item(NAME(m_which_adc));
|
||||
@ -235,12 +232,9 @@ MACHINE_START_MEMBER(atarisy2_state,atarisy2)
|
||||
|
||||
MACHINE_RESET_MEMBER(atarisy2_state,atarisy2)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_state::machine_reset();
|
||||
slapstic_reset();
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_sound_io_reset(machine().device("soundcpu"));
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 64);
|
||||
scanline_timer_reset(*machine().primary_screen, 64);
|
||||
|
||||
address_space &main = machine().device<t11_device>("maincpu")->space(AS_PROGRAM);
|
||||
main.set_direct_update_handler(direct_update_delegate(FUNC(atarisy2_state::atarisy2_direct_handler), this));
|
||||
@ -272,7 +266,7 @@ WRITE16_MEMBER(atarisy2_state::int0_ack_w)
|
||||
{
|
||||
/* reset sound IRQ */
|
||||
m_p2portrd_state = 0;
|
||||
atarigen_update_interrupts(machine());
|
||||
update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -280,7 +274,7 @@ WRITE16_MEMBER(atarisy2_state::int1_ack_w)
|
||||
{
|
||||
/* reset sound CPU */
|
||||
if (ACCESSING_BITS_0_7)
|
||||
machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -671,7 +665,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w)
|
||||
if (!(data & 0x02)) rbott += 1.0/47;
|
||||
if (!(data & 0x04)) rbott += 1.0/22;
|
||||
gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott)));
|
||||
atarigen_set_ym2151_vol(machine(), gain * 100);
|
||||
set_ym2151_volume(gain * 100);
|
||||
|
||||
/* bits 3-4 control the volume of the POKEYs, using 47k and 100k resistors */
|
||||
rtop = 1.0/(1.0/100 + 1.0/100);
|
||||
@ -679,7 +673,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w)
|
||||
if (!(data & 0x08)) rbott += 1.0/47;
|
||||
if (!(data & 0x10)) rbott += 1.0/22;
|
||||
gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott)));
|
||||
atarigen_set_pokey_vol(machine(), gain * 100);
|
||||
set_pokey_volume(gain * 100);
|
||||
|
||||
/* bits 5-7 control the volume of the TMS5220, using 22k, 47k, and 100k resistors */
|
||||
rtop = 1.0/(1.0/100 + 1.0/100);
|
||||
@ -688,7 +682,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w)
|
||||
if (!(data & 0x40)) rbott += 1.0/47;
|
||||
if (!(data & 0x80)) rbott += 1.0/22;
|
||||
gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott)));
|
||||
atarigen_set_tms5220_vol(machine(), gain * 100);
|
||||
set_tms5220_volume(gain * 100);
|
||||
}
|
||||
|
||||
|
||||
@ -705,7 +699,7 @@ WRITE8_MEMBER(atarisy2_state::sound_reset_w)
|
||||
return;
|
||||
|
||||
/* a large number of signals are reset when this happens */
|
||||
atarigen_sound_io_reset(machine().device("soundcpu"));
|
||||
sound_io_reset();
|
||||
machine().device("ymsnd")->reset();
|
||||
if (m_has_tms5220)
|
||||
{
|
||||
@ -717,37 +711,34 @@ WRITE8_MEMBER(atarisy2_state::sound_reset_w)
|
||||
|
||||
READ16_MEMBER(atarisy2_state::sound_r)
|
||||
{
|
||||
|
||||
/* clear the p2portwr state on a p1portrd */
|
||||
m_p2portwr_state = 0;
|
||||
atarigen_update_interrupts(machine());
|
||||
update_interrupts();
|
||||
|
||||
/* handle it normally otherwise */
|
||||
return atarigen_sound_r(space,offset,0xffff);
|
||||
return atarigen_state::sound_r(space,offset) | 0xff00;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(atarisy2_state::sound_6502_w)
|
||||
{
|
||||
|
||||
/* clock the state through */
|
||||
m_p2portwr_state = (m_interrupt_enable & 2) != 0;
|
||||
atarigen_update_interrupts(machine());
|
||||
update_interrupts();
|
||||
|
||||
/* handle it normally otherwise */
|
||||
atarigen_6502_sound_w(space, offset, data);
|
||||
m6502_sound_w(space, offset, data);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(atarisy2_state::sound_6502_r)
|
||||
{
|
||||
|
||||
/* clock the state through */
|
||||
m_p2portrd_state = (m_interrupt_enable & 1) != 0;
|
||||
atarigen_update_interrupts(machine());
|
||||
update_interrupts();
|
||||
|
||||
/* handle it normally otherwise */
|
||||
return atarigen_6502_sound_r(space, offset);
|
||||
return m6502_sound_r(space, offset);
|
||||
}
|
||||
|
||||
|
||||
@ -802,10 +793,10 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarisy2_state )
|
||||
AM_RANGE(0x1480, 0x1487) AM_MIRROR(0x0078) AM_WRITE(adc_strobe_w)
|
||||
AM_RANGE(0x1580, 0x1581) AM_MIRROR(0x001e) AM_WRITE(int0_ack_w)
|
||||
AM_RANGE(0x15a0, 0x15a1) AM_MIRROR(0x001e) AM_WRITE(int1_ack_w)
|
||||
AM_RANGE(0x15c0, 0x15c1) AM_MIRROR(0x001e) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0x15c0, 0x15c1) AM_MIRROR(0x001e) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0x15e0, 0x15e1) AM_MIRROR(0x001e) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0x1600, 0x1601) AM_MIRROR(0x007e) AM_WRITE(int_enable_w)
|
||||
AM_RANGE(0x1680, 0x1681) AM_MIRROR(0x007e) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x1680, 0x1681) AM_MIRROR(0x007e) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0x1700, 0x1701) AM_MIRROR(0x007e) AM_WRITE_LEGACY(atarisy2_xscroll_w) AM_SHARE("xscroll")
|
||||
AM_RANGE(0x1780, 0x1781) AM_MIRROR(0x007e) AM_WRITE_LEGACY(atarisy2_yscroll_w) AM_SHARE("yscroll")
|
||||
AM_RANGE(0x1800, 0x1801) AM_MIRROR(0x03fe) AM_READ(switch_r) AM_WRITE(watchdog_reset16_w)
|
||||
@ -839,7 +830,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, atarisy2_state )
|
||||
AM_RANGE(0x1872, 0x1873) AM_MIRROR(0x2780) AM_WRITE(tms5220_strobe_w)
|
||||
AM_RANGE(0x1874, 0x1874) AM_MIRROR(0x2781) AM_WRITE(sound_6502_w)
|
||||
AM_RANGE(0x1876, 0x1876) AM_MIRROR(0x2781) AM_WRITE(coincount_w)
|
||||
AM_RANGE(0x1878, 0x1878) AM_MIRROR(0x2781) AM_WRITE_LEGACY(atarigen_6502_irq_ack_w)
|
||||
AM_RANGE(0x1878, 0x1878) AM_MIRROR(0x2781) AM_WRITE(m6502_irq_ack_w)
|
||||
AM_RANGE(0x187a, 0x187a) AM_MIRROR(0x2781) AM_WRITE(mixer_w)
|
||||
AM_RANGE(0x187c, 0x187c) AM_MIRROR(0x2781) AM_WRITE(switch_6502_w)
|
||||
AM_RANGE(0x187e, 0x187e) AM_MIRROR(0x2781) AM_WRITE(sound_reset_w)
|
||||
@ -1262,9 +1253,9 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state )
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", atarisy2_state, vblank_int)
|
||||
|
||||
MCFG_CPU_ADD("soundcpu", M6502, SOUND_CLOCK/8)
|
||||
MCFG_CPU_ADD("audiocpu", M6502, SOUND_CLOCK/8)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
MCFG_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)MASTER_CLOCK/2/16/16/16/10)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(atarigen_state, m6502_irq_gen, (double)MASTER_CLOCK/2/16/16/16/10)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(atarisy2_state,atarisy2)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(atarisy2_state,atarisy2)
|
||||
@ -1330,7 +1321,7 @@ ROM_START( paperboy )
|
||||
ROM_LOAD16_BYTE( "cpu_l06.rv2", 0x070000, 0x004000, CRC(8a754466) SHA1(2c4c6ca797c7f4349c2893d8c0ba7e2658fdca99) )
|
||||
ROM_LOAD16_BYTE( "cpu_s06.rv2", 0x070001, 0x004000, CRC(224209f9) SHA1(c41269bfadb8fff1c8ff0f6ea0b8e8b34feb49d6) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "cpu_a02.rv3", 0x004000, 0x004000, CRC(ba251bc4) SHA1(768e42608263205e412e651082ffa2a083b04644) )
|
||||
ROM_LOAD( "cpu_b02.rv2", 0x008000, 0x004000, CRC(e4e7a8b9) SHA1(f11a0cf40d5c51ff180f0fa1cf676f95090a1010) )
|
||||
ROM_LOAD( "cpu_c02.rv2", 0x00c000, 0x004000, CRC(d44c2aa2) SHA1(f1b00e36d87f6d77746cf003198c7f19aa2f4fab) )
|
||||
@ -1372,7 +1363,7 @@ ROM_START( paperboyr2 )
|
||||
ROM_LOAD16_BYTE( "cpu_l06.rv2", 0x070000, 0x004000, CRC(8a754466) SHA1(2c4c6ca797c7f4349c2893d8c0ba7e2658fdca99) )
|
||||
ROM_LOAD16_BYTE( "cpu_s06.rv2", 0x070001, 0x004000, CRC(224209f9) SHA1(c41269bfadb8fff1c8ff0f6ea0b8e8b34feb49d6) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "cpu_a02.rv2", 0x004000, 0x004000, CRC(4a759092) SHA1(26909df77f53ac19e205411b90558488badc82bd) )
|
||||
ROM_LOAD( "cpu_b02.rv2", 0x008000, 0x004000, CRC(e4e7a8b9) SHA1(f11a0cf40d5c51ff180f0fa1cf676f95090a1010) )
|
||||
ROM_LOAD( "cpu_c02.rv2", 0x00c000, 0x004000, CRC(d44c2aa2) SHA1(f1b00e36d87f6d77746cf003198c7f19aa2f4fab) )
|
||||
@ -1414,7 +1405,7 @@ ROM_START( paperboyr1 )
|
||||
ROM_LOAD16_BYTE( "cpu_l06.rv1", 0x070000, 0x004000, CRC(ccbc58a6) SHA1(dd66317146c295524f83b8d40c20164e873752b5) )
|
||||
ROM_LOAD16_BYTE( "cpu_s06.rv1", 0x070001, 0x004000, CRC(a7f14643) SHA1(d73c8ec2493617fce2e6822e8a6cde16a2de5965) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "cpu_a02.rv1", 0x004000, 0x004000, CRC(5479a788) SHA1(4cc5145e75ac6370f54eea33531f1f96160ee82b) )
|
||||
ROM_LOAD( "cpu_b02.rv1", 0x008000, 0x004000, CRC(de4147c6) SHA1(c997510b2018291924abddfe604a8f738fd8035c) )
|
||||
ROM_LOAD( "cpu_c02.rv1", 0x00c000, 0x004000, CRC(b71505fc) SHA1(15fd156038861cb715fce10f1c56f3ded851be39) )
|
||||
@ -1454,7 +1445,7 @@ ROM_START( 720 )
|
||||
ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) )
|
||||
ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136047-2134.2a", 0x004000, 0x004000, CRC(0db4ca28) SHA1(71c2e0eee0eee418bdd2f806bd6ce5ae1c72bf69) )
|
||||
ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) )
|
||||
ROM_LOAD( "136047-2136.2cd", 0x00c000, 0x004000, CRC(00b06bec) SHA1(cd771eea329e0f6ab5bff1035f931800cc5da545) )
|
||||
@ -1522,7 +1513,7 @@ ROM_START( 720r3 )
|
||||
ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) )
|
||||
ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) )
|
||||
ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) )
|
||||
ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) )
|
||||
@ -1590,7 +1581,7 @@ ROM_START( 720r2 )
|
||||
ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) )
|
||||
ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) )
|
||||
ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) )
|
||||
ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) )
|
||||
@ -1658,7 +1649,7 @@ ROM_START( 720r1 )
|
||||
ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) )
|
||||
ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) )
|
||||
ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) )
|
||||
ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) )
|
||||
@ -1726,7 +1717,7 @@ ROM_START( 720g )
|
||||
ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) )
|
||||
ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136047-2134.2a", 0x004000, 0x004000, CRC(0db4ca28) SHA1(71c2e0eee0eee418bdd2f806bd6ce5ae1c72bf69) )
|
||||
ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) )
|
||||
ROM_LOAD( "136047-2136.2cd", 0x00c000, 0x004000, CRC(00b06bec) SHA1(cd771eea329e0f6ab5bff1035f931800cc5da545) )
|
||||
@ -1794,7 +1785,7 @@ ROM_START( 720gr1 )
|
||||
ROM_LOAD16_BYTE( "136047-1130.6k", 0x050000, 0x010000, CRC(93fba845) SHA1(4de5867272af63be696855f2a4dff99476b213ad) )
|
||||
ROM_LOAD16_BYTE( "136047-1133.6r", 0x050001, 0x010000, CRC(53c177be) SHA1(a60c81899944e0dda9886e6697edc4d9309ca8f4) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136047-1134.2a", 0x004000, 0x004000, CRC(09a418c2) SHA1(017491bbcd0def695a23ab17b1e4fbd1fdf4d5d1) )
|
||||
ROM_LOAD( "136047-1135.2b", 0x008000, 0x004000, CRC(b1f157d0) SHA1(26355324d49baa02acb777940d7f49d074a75fe5) )
|
||||
ROM_LOAD( "136047-1136.2cd", 0x00c000, 0x004000, CRC(dad40e6d) SHA1(a94bc1b5f0a5218e9e44cd32f2ca6268b48072c2) )
|
||||
@ -1863,7 +1854,7 @@ ROM_START( ssprint )
|
||||
ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) )
|
||||
ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136042-419.2bc", 0x008000, 0x004000, CRC(b277915a) SHA1(e0e8cd713950f45352b7c1de986b5b0b5c1703b3) )
|
||||
ROM_LOAD( "136042-420.2d", 0x00c000, 0x004000, CRC(170b2c53) SHA1(c6d5657da29cf637cea940406fcff9a7328964f8) )
|
||||
|
||||
@ -1910,7 +1901,7 @@ ROM_START( ssprints )
|
||||
ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) )
|
||||
ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) )
|
||||
ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) )
|
||||
|
||||
@ -1957,7 +1948,7 @@ ROM_START( ssprintf )
|
||||
ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) )
|
||||
ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) )
|
||||
ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) )
|
||||
|
||||
@ -2004,7 +1995,7 @@ ROM_START( ssprintg )
|
||||
ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) )
|
||||
ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) )
|
||||
ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) )
|
||||
|
||||
@ -2051,7 +2042,7 @@ ROM_START( ssprint3 )
|
||||
ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) )
|
||||
ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136042-319.2bc", 0x008000, 0x004000, CRC(c7f31c16) SHA1(cfacf22405da5e3cf95059ea6b9677a5a8471496) )
|
||||
ROM_LOAD( "136042-320.2d", 0x00c000, 0x004000, CRC(9815ece9) SHA1(95239e15fe3e3f9a66e0f4dae365f763656cb70b) )
|
||||
|
||||
@ -2098,7 +2089,7 @@ ROM_START( ssprintg1 )
|
||||
ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) )
|
||||
ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) )
|
||||
ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) )
|
||||
|
||||
@ -2145,7 +2136,7 @@ ROM_START( ssprint1 )
|
||||
ROM_LOAD16_BYTE( "136042-126.6l", 0x070000, 0x008000, CRC(92f5392c) SHA1(064ccf24a68440caa565c0467ba4bf4246133698) )
|
||||
ROM_LOAD16_BYTE( "136042-122.6s", 0x070001, 0x008000, CRC(0381f362) SHA1(e33b6d4949cdee33f27cedf00ef20f1ce5011e24) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136042-119.2bc", 0x008000, 0x004000, CRC(0c810231) SHA1(a5a637e12df7eae234fdc2d3957d122c196c65cd) )
|
||||
ROM_LOAD( "136042-120.2d", 0x00c000, 0x004000, CRC(647b7481) SHA1(51b1b09919eee3d98e65d48e3a2af8321ccf8a02) )
|
||||
|
||||
@ -2192,7 +2183,7 @@ ROM_START( csprints )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2237,7 +2228,7 @@ ROM_START( csprint )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2282,7 +2273,7 @@ ROM_START( csprints1 )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2327,7 +2318,7 @@ ROM_START( csprintf )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2372,7 +2363,7 @@ ROM_START( csprintg )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2417,7 +2408,7 @@ ROM_START( csprint2 )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2462,7 +2453,7 @@ ROM_START( csprintg1 )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2507,7 +2498,7 @@ ROM_START( csprint1 )
|
||||
ROM_LOAD16_BYTE( "136045-1123.6l", 0x070000, 0x008000, CRC(0a4d216a) SHA1(53a4af7673c9dae1f6f2f13dce3c38a31ee12ee2) )
|
||||
ROM_LOAD16_BYTE( "136045-1120.6s", 0x070001, 0x008000, CRC(103f3fde) SHA1(9a0e82c3294369858b7a6c978143d8145a8df5a2) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136045-1118.2bc", 0x008000, 0x004000, CRC(eba41b2f) SHA1(a0d6e9f4609f2587b0fad6845e75653c10bf4249) )
|
||||
ROM_LOAD( "136045-1119.2d", 0x00c000, 0x004000, CRC(9e49043a) SHA1(ec467fe1cd59c51e43c3acd83d300f5b3309a47a) )
|
||||
|
||||
@ -2552,7 +2543,7 @@ ROM_START( apb )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) )
|
||||
ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) )
|
||||
ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) )
|
||||
@ -2623,7 +2614,7 @@ ROM_START( apb6 )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) )
|
||||
ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) )
|
||||
ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) )
|
||||
@ -2694,7 +2685,7 @@ ROM_START( apb5 )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) )
|
||||
ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) )
|
||||
ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) )
|
||||
@ -2765,7 +2756,7 @@ ROM_START( apb4 )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) )
|
||||
ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) )
|
||||
ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) )
|
||||
@ -2836,7 +2827,7 @@ ROM_START( apb3 )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-1134.2a", 0x004000, 0x004000, CRC(a65748b9) SHA1(20d51300382543f09e47bee7273b9074e5a4618a) )
|
||||
ROM_LOAD( "136051-1135.2bc", 0x008000, 0x004000, CRC(e9692cea) SHA1(2b2d9638e012d326777e2e730e28cbacea6d9a72) )
|
||||
ROM_LOAD( "136051-1136.2d", 0x00c000, 0x004000, CRC(92fc7657) SHA1(cfda3a191a5f7ee4157f9d226bcf3dd601cabee1) )
|
||||
@ -2907,7 +2898,7 @@ ROM_START( apb2 )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-1134.2a", 0x004000, 0x004000, CRC(a65748b9) SHA1(20d51300382543f09e47bee7273b9074e5a4618a) )
|
||||
ROM_LOAD( "136051-1135.2bc", 0x008000, 0x004000, CRC(e9692cea) SHA1(2b2d9638e012d326777e2e730e28cbacea6d9a72) )
|
||||
ROM_LOAD( "136051-1136.2d", 0x00c000, 0x004000, CRC(92fc7657) SHA1(cfda3a191a5f7ee4157f9d226bcf3dd601cabee1) )
|
||||
@ -2978,7 +2969,7 @@ ROM_START( apb1 )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-1134.2a", 0x004000, 0x004000, CRC(a65748b9) SHA1(20d51300382543f09e47bee7273b9074e5a4618a) )
|
||||
ROM_LOAD( "136051-1135.2bc", 0x008000, 0x004000, CRC(e9692cea) SHA1(2b2d9638e012d326777e2e730e28cbacea6d9a72) )
|
||||
ROM_LOAD( "136051-1136.2d", 0x00c000, 0x004000, CRC(92fc7657) SHA1(cfda3a191a5f7ee4157f9d226bcf3dd601cabee1) )
|
||||
@ -3049,7 +3040,7 @@ ROM_START( apbg )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-4134.2a", 0x004000, 0x004000, CRC(45e03b0e) SHA1(d58f5e1095fd6a7c0253fcc9f0e55812c1677387) )
|
||||
ROM_LOAD( "136051-4135.2bc", 0x008000, 0x004000, CRC(b4ca24b2) SHA1(86461da310b334f6b32c0e079de6852792284cc6) )
|
||||
ROM_LOAD( "136051-4136.2d", 0x00c000, 0x004000, CRC(11efaabf) SHA1(76446b09bf7cacd713ab88d58793460c9d1a8b9b) )
|
||||
@ -3120,7 +3111,7 @@ ROM_START( apbf )
|
||||
ROM_LOAD16_BYTE( "136051-1132.6l", 0x070000, 0x010000, CRC(6d0e7a4e) SHA1(75aae74571c50d36639d0ae69b0614e5aedeb6e3) )
|
||||
ROM_LOAD16_BYTE( "136051-1133.6s", 0x070001, 0x010000, CRC(af88d429) SHA1(432720afd4179d3df871226e0eb576d2ffde44c1) )
|
||||
|
||||
ROM_REGION( 0x10000, "soundcpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for 6502 code */
|
||||
ROM_LOAD( "136051-5134.2a", 0x004000, 0x004000, CRC(1c8bdeed) SHA1(bbdbbb9a4903f98842d9a697410a2e3a2069284c) )
|
||||
ROM_LOAD( "136051-5135.2bc", 0x008000, 0x004000, CRC(ed6adb91) SHA1(b1f1f0d1bda445a53de798fb6847c605afe53e3c) )
|
||||
ROM_LOAD( "136051-5136.2d", 0x00c000, 0x004000, CRC(341f8486) SHA1(4cea39c0d8551ce7193e51de341f7297a94b8d9b) )
|
||||
|
@ -177,30 +177,28 @@ Measurements -
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void badlands_state::update_interrupts()
|
||||
{
|
||||
badlands_state *state = machine.driver_data<badlands_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static void scanline_update(screen_device &screen, int scanline)
|
||||
void badlands_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
address_space &space = screen.machine().device("audiocpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = subdevice("audiocpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
/* sound IRQ is on 32V */
|
||||
if (scanline & 32)
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
else if (!(screen.machine().root_device().ioport("FE4000")->read() & 0x40))
|
||||
atarigen_6502_irq_gen(screen.machine().device("audiocpu"));
|
||||
m6502_irq_ack_r(space, 0);
|
||||
else if (!(ioport("FE4000")->read() & 0x40))
|
||||
m6502_irq_gen(*screen.machine().device("audiocpu"));
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(badlands_state,badlands)
|
||||
{
|
||||
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
|
||||
save_item(NAME(m_pedal_value));
|
||||
}
|
||||
@ -208,14 +206,11 @@ MACHINE_START_MEMBER(badlands_state,badlands)
|
||||
|
||||
MACHINE_RESET_MEMBER(badlands_state,badlands)
|
||||
{
|
||||
|
||||
m_pedal_value[0] = m_pedal_value[1] = 0x80;
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32);
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 32);
|
||||
|
||||
atarigen_sound_io_reset(machine().device("audiocpu"));
|
||||
memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000);
|
||||
}
|
||||
|
||||
@ -289,7 +284,7 @@ READ8_MEMBER(badlands_state::audio_io_r)
|
||||
break;
|
||||
|
||||
case 0x002: /* /RDP */
|
||||
result = atarigen_6502_sound_r(space, offset);
|
||||
result = m6502_sound_r(space, offset);
|
||||
break;
|
||||
|
||||
case 0x004: /* /RDIO */
|
||||
@ -311,7 +306,7 @@ READ8_MEMBER(badlands_state::audio_io_r)
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* /VOICE */
|
||||
@ -328,7 +323,6 @@ READ8_MEMBER(badlands_state::audio_io_r)
|
||||
|
||||
WRITE8_MEMBER(badlands_state::audio_io_w)
|
||||
{
|
||||
|
||||
switch (offset & 0x206)
|
||||
{
|
||||
case 0x000: /* n/c */
|
||||
@ -338,7 +332,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w)
|
||||
break;
|
||||
|
||||
case 0x006: /* /IRQACK */
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
m6502_irq_ack_r(space, 0);
|
||||
break;
|
||||
|
||||
case 0x200: /* n/c */
|
||||
@ -346,7 +340,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w)
|
||||
break;
|
||||
|
||||
case 0x202: /* /WRP */
|
||||
atarigen_6502_sound_w(space, offset, data);
|
||||
m6502_sound_w(space, offset, data);
|
||||
break;
|
||||
|
||||
case 0x204: /* WRIO */
|
||||
@ -376,7 +370,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w)
|
||||
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, badlands_state )
|
||||
AM_RANGE(0x000000, 0x03ffff) AM_ROM
|
||||
AM_RANGE(0xfc0000, 0xfc1fff) AM_READ(sound_busy_r) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xfc0000, 0xfc1fff) AM_READ(sound_busy_r) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0xfd0000, 0xfd1fff) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
AM_RANGE(0xfe0000, 0xfe1fff) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xfe2000, 0xfe3fff) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
@ -385,8 +379,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, badlands_state )
|
||||
AM_RANGE(0xfe6002, 0xfe6003) AM_READ_PORT("FE6002")
|
||||
AM_RANGE(0xfe6004, 0xfe6005) AM_READ(pedal_0_r)
|
||||
AM_RANGE(0xfe6006, 0xfe6007) AM_READ(pedal_1_r)
|
||||
AM_RANGE(0xfe8000, 0xfe9fff) AM_WRITE_LEGACY(atarigen_sound_upper_w)
|
||||
AM_RANGE(0xfea000, 0xfebfff) AM_READ_LEGACY(atarigen_sound_upper_r)
|
||||
AM_RANGE(0xfe8000, 0xfe9fff) AM_WRITE8(sound_w, 0xff00)
|
||||
AM_RANGE(0xfea000, 0xfebfff) AM_READ8(sound_r, 0xff00)
|
||||
AM_RANGE(0xfec000, 0xfedfff) AM_WRITE_LEGACY(badlands_pf_bank_w)
|
||||
AM_RANGE(0xfee000, 0xfeffff) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xffc000, 0xffc3ff) AM_RAM_WRITE_LEGACY(atarigen_expanded_666_paletteram_w) AM_SHARE("paletteram")
|
||||
@ -672,33 +666,14 @@ static GFXDECODE_START( badlandsb )
|
||||
GFXDECODE_ENTRY( "gfx2", 0, molayout, 128, 8 )
|
||||
GFXDECODE_END
|
||||
|
||||
static void update_interrupts_bootleg(running_machine &machine)
|
||||
{
|
||||
badlands_state *state = machine.driver_data<badlands_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static void scanline_update_bootleg(screen_device &screen, int scanline)
|
||||
{
|
||||
/* sound IRQ is on 32V */
|
||||
// if (scanline & 32)
|
||||
// atarigen_6502_irq_ack_r(screen.machine(), 0);
|
||||
// else if (!(machine.root_device().ioport("FE4000")->read() & 0x40))
|
||||
// atarigen_6502_irq_gen(screen.machine().device("audiocpu"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(badlands_state,badlandsb)
|
||||
{
|
||||
// m_pedal_value[0] = m_pedal_value[1] = 0x80;
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts_bootleg);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update_bootleg, 32);
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 32);
|
||||
|
||||
// atarigen_sound_io_reset(machine().device("audiocpu"));
|
||||
// memcpy(m_bank_base, &m_bank_source_data[0x0000], 0x1000);
|
||||
}
|
||||
|
||||
|
@ -31,17 +31,16 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void batman_state::update_interrupts()
|
||||
{
|
||||
batman_state *state = machine.driver_data<batman_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(batman_state,batman)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
|
||||
save_item(NAME(m_latch_data));
|
||||
save_item(NAME(m_alpha_tile_bank));
|
||||
@ -50,12 +49,10 @@ MACHINE_START_MEMBER(batman_state,batman)
|
||||
|
||||
MACHINE_RESET_MEMBER(batman_state,batman)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_state::machine_reset();
|
||||
atarivc_reset(*machine().primary_screen, m_atarivc_eof_data, 2);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, batman_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -134,8 +131,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, batman_state )
|
||||
AM_RANGE(0x260000, 0x260001) AM_MIRROR(0x11ff8c) AM_READ_PORT("260000")
|
||||
AM_RANGE(0x260002, 0x260003) AM_MIRROR(0x11ff8c) AM_READ_PORT("260002")
|
||||
AM_RANGE(0x260010, 0x260011) AM_MIRROR(0x11ff8e) AM_READ(special_port2_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_MIRROR(0x11ff8e) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260040, 0x260041) AM_MIRROR(0x11ff8e) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x260030, 0x260031) AM_MIRROR(0x11ff8e) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x260040, 0x260041) AM_MIRROR(0x11ff8e) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0x260050, 0x260051) AM_MIRROR(0x11ff8e) AM_WRITE(latch_w)
|
||||
AM_RANGE(0x260060, 0x260061) AM_MIRROR(0x11ff8e) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0x2a0000, 0x2a0001) AM_MIRROR(0x11fffe) AM_WRITE(watchdog_reset16_w)
|
||||
|
@ -169,19 +169,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(beathead_state::scanline_callback)
|
||||
}
|
||||
|
||||
|
||||
void beathead_state::machine_start()
|
||||
{
|
||||
atarigen_init(machine());
|
||||
}
|
||||
|
||||
|
||||
static void update_interrupts(running_machine &machine) { machine.driver_data<beathead_state>()->update_interrupts(); }
|
||||
void beathead_state::machine_reset()
|
||||
{
|
||||
/* reset the common subsystems */
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, ::update_interrupts);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
atarijsa_reset(machine());
|
||||
|
||||
/* the code is temporarily mapped at 0 at startup */
|
||||
/* just copying the first 0x40 bytes is sufficient */
|
||||
@ -221,7 +213,7 @@ void beathead_state::update_interrupts()
|
||||
{
|
||||
m_irq_line_state = gen_int;
|
||||
//if (m_irq_line_state != CLEAR_LINE)
|
||||
machine().device("maincpu")->execute().set_input_line(ASAP_IRQ0, m_irq_line_state);
|
||||
subdevice("maincpu")->execute().set_input_line(ASAP_IRQ0, m_irq_line_state);
|
||||
//else
|
||||
//asap_set_irq_line(ASAP_IRQ0, m_irq_line_state);
|
||||
}
|
||||
@ -300,19 +292,6 @@ READ32_MEMBER( beathead_state::input_2_r )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ32_MEMBER( beathead_state::sound_data_r )
|
||||
{
|
||||
return atarigen_sound_r(space, offset, 0xffff);
|
||||
}
|
||||
|
||||
|
||||
WRITE32_MEMBER( beathead_state::sound_data_w )
|
||||
{
|
||||
if (ACCESSING_BITS_0_7)
|
||||
atarigen_sound_w(space, offset, data, mem_mask);
|
||||
}
|
||||
|
||||
|
||||
WRITE32_MEMBER( beathead_state::sound_reset_w )
|
||||
{
|
||||
logerror("Sound reset = %d\n", !offset);
|
||||
@ -344,7 +323,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 32, beathead_state)
|
||||
AM_RANGE(0x00000000, 0x0001ffff) AM_RAM AM_SHARE("ram_base")
|
||||
AM_RANGE(0x01800000, 0x01bfffff) AM_ROM AM_REGION("user1", 0) AM_SHARE("rom_base")
|
||||
AM_RANGE(0x40000000, 0x400007ff) AM_RAM_WRITE(eeprom_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0x41000000, 0x41000003) AM_READWRITE(sound_data_r, sound_data_w)
|
||||
AM_RANGE(0x41000000, 0x41000003) AM_READWRITE8(sound_r, sound_w, 0x000000ff)
|
||||
AM_RANGE(0x41000100, 0x41000103) AM_READ(interrupt_control_r)
|
||||
AM_RANGE(0x41000100, 0x4100011f) AM_WRITE(interrupt_control_w)
|
||||
AM_RANGE(0x41000200, 0x41000203) AM_READ_PORT("IN1")
|
||||
|
@ -32,34 +32,25 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void blstroid_state::update_interrupts()
|
||||
{
|
||||
blstroid_state *state = machine.driver_data<blstroid_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(1, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(2, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine().device("maincpu")->execute().set_input_line(4, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
WRITE16_MEMBER(blstroid_state::blstroid_halt_until_hblank_0_w)
|
||||
{
|
||||
atarigen_halt_until_hblank_0(*machine().primary_screen);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(blstroid_state,blstroid)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
halt_until_hblank_0(space.device(), *machine().primary_screen);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(blstroid_state,blstroid)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, blstroid_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -93,14 +84,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, blstroid_state )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x7c0000) AM_ROM
|
||||
AM_RANGE(0xff8000, 0xff8001) AM_MIRROR(0x7f81fe) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xff8200, 0xff8201) AM_MIRROR(0x7f81fe) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0xff8200, 0xff8201) AM_MIRROR(0x7f81fe) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0xff8400, 0xff8401) AM_MIRROR(0x7f81fe) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x7f81fe) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xff8800, 0xff89ff) AM_MIRROR(0x7f8000) AM_WRITEONLY AM_SHARE("priorityram")
|
||||
AM_RANGE(0xff8a00, 0xff8a01) AM_MIRROR(0x7f81fe) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0xff8c00, 0xff8c01) AM_MIRROR(0x7f81fe) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xff8a00, 0xff8a01) AM_MIRROR(0x7f81fe) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0xff8c00, 0xff8c01) AM_MIRROR(0x7f81fe) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0xff8e00, 0xff8e01) AM_MIRROR(0x7f81fe) AM_WRITE(blstroid_halt_until_hblank_0_w)
|
||||
AM_RANGE(0xff9400, 0xff9401) AM_MIRROR(0x7f83fe) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0xff9400, 0xff9401) AM_MIRROR(0x7f83fe) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0xff9800, 0xff9801) AM_MIRROR(0x7f83f8) AM_READ_PORT("DIAL0")
|
||||
AM_RANGE(0xff9804, 0xff9805) AM_MIRROR(0x7f83f8) AM_READ_PORT("DIAL1")
|
||||
AM_RANGE(0xff9c00, 0xff9c03) AM_MIRROR(0x7f83fc) AM_READ(inputs_r)
|
||||
@ -206,7 +197,6 @@ static MACHINE_CONFIG_START( blstroid, blstroid_state )
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(blstroid_state,blstroid)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(blstroid_state,blstroid)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -36,17 +36,24 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void cyberbal_state::update_interrupts()
|
||||
{
|
||||
cyberbal_state *state = machine.driver_data<cyberbal_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("extra")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
if (subdevice("extra") != NULL)
|
||||
{
|
||||
subdevice("maincpu")->execute().set_input_line(1, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("extra")->execute().set_input_line(1, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
else
|
||||
{
|
||||
subdevice("maincpu")->execute().set_input_line(1, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(3, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(cyberbal_state,cyberbal)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
|
||||
save_item(NAME(m_fast_68k_int));
|
||||
save_item(NAME(m_io_68k_int));
|
||||
@ -59,12 +66,8 @@ MACHINE_START_MEMBER(cyberbal_state,cyberbal)
|
||||
|
||||
MACHINE_RESET_MEMBER(cyberbal_state,cyberbal)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_slapstic_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, cyberbal_scanline_update, 8);
|
||||
atarigen_sound_io_reset(machine().device("audiocpu"));
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
|
||||
cyberbal_sound_reset(machine());
|
||||
|
||||
@ -73,21 +76,11 @@ MACHINE_RESET_MEMBER(cyberbal_state,cyberbal)
|
||||
}
|
||||
|
||||
|
||||
static void cyberbal2p_update_interrupts(running_machine &machine)
|
||||
{
|
||||
cyberbal_state *state = machine.driver_data<cyberbal_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(3, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(cyberbal_state,cyberbal2p)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, cyberbal2p_update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, cyberbal_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -145,12 +138,12 @@ WRITE16_MEMBER(cyberbal_state::p2_reset_w)
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, cyberbal_state )
|
||||
AM_RANGE(0x000000, 0x03ffff) AM_ROM
|
||||
AM_RANGE(0xfc0000, 0xfc0fff) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
AM_RANGE(0xfc8000, 0xfcffff) AM_READ_LEGACY(atarigen_sound_upper_r)
|
||||
AM_RANGE(0xfc8000, 0xfcffff) AM_READ8(sound_r, 0xff00)
|
||||
AM_RANGE(0xfd0000, 0xfd1fff) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xfd2000, 0xfd3fff) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xfd2000, 0xfd3fff) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0xfd4000, 0xfd5fff) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xfd6000, 0xfd7fff) AM_WRITE(p2_reset_w)
|
||||
AM_RANGE(0xfd8000, 0xfd9fff) AM_WRITE_LEGACY(atarigen_sound_upper_w)
|
||||
AM_RANGE(0xfd8000, 0xfd9fff) AM_WRITE8(sound_w, 0xff00)
|
||||
AM_RANGE(0xfe0000, 0xfe0fff) AM_READ(special_port0_r)
|
||||
AM_RANGE(0xfe1000, 0xfe1fff) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0xfe8000, 0xfe8fff) AM_RAM_WRITE_LEGACY(cyberbal_paletteram_1_w) AM_SHARE("paletteram_1")
|
||||
@ -206,10 +199,10 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cyberbal_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM
|
||||
AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
|
||||
AM_RANGE(0x2800, 0x2801) AM_WRITE(cyberbal_sound_68k_6502_w)
|
||||
AM_RANGE(0x2802, 0x2803) AM_READWRITE_LEGACY(atarigen_6502_irq_ack_r, atarigen_6502_irq_ack_w)
|
||||
AM_RANGE(0x2804, 0x2805) AM_WRITE_LEGACY(atarigen_6502_sound_w)
|
||||
AM_RANGE(0x2802, 0x2803) AM_READWRITE(m6502_irq_ack_r, m6502_irq_ack_w)
|
||||
AM_RANGE(0x2804, 0x2805) AM_WRITE(m6502_sound_w)
|
||||
AM_RANGE(0x2806, 0x2807) AM_WRITE(cyberbal_sound_bank_select_w)
|
||||
AM_RANGE(0x2c00, 0x2c01) AM_READ_LEGACY(atarigen_6502_sound_r)
|
||||
AM_RANGE(0x2c00, 0x2c01) AM_READ(m6502_sound_r)
|
||||
AM_RANGE(0x2c02, 0x2c03) AM_READ(cyberbal_special_port3_r)
|
||||
AM_RANGE(0x2c04, 0x2c05) AM_READ(cyberbal_sound_68k_6502_r)
|
||||
AM_RANGE(0x2c06, 0x2c07) AM_READ(cyberbal_sound_6502_stat_r)
|
||||
@ -247,14 +240,14 @@ static ADDRESS_MAP_START( cyberbal2p_map, AS_PROGRAM, 16, cyberbal_state )
|
||||
AM_RANGE(0xfc0000, 0xfc0003) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0xfc2000, 0xfc2003) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0xfc4000, 0xfc4003) AM_READ(special_port2_r)
|
||||
AM_RANGE(0xfc6000, 0xfc6003) AM_READ_LEGACY(atarigen_sound_upper_r)
|
||||
AM_RANGE(0xfc6000, 0xfc6003) AM_READ8(sound_r, 0xff00)
|
||||
AM_RANGE(0xfc8000, 0xfc8fff) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
AM_RANGE(0xfca000, 0xfcafff) AM_RAM_WRITE_LEGACY(atarigen_666_paletteram_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0xfd0000, 0xfd0003) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xfd2000, 0xfd2003) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xfd2000, 0xfd2003) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0xfd4000, 0xfd4003) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xfd6000, 0xfd6003) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0xfd8000, 0xfd8003) AM_WRITE_LEGACY(atarigen_sound_upper_w)
|
||||
AM_RANGE(0xfd8000, 0xfd8003) AM_WRITE8(sound_w, 0xff00)
|
||||
AM_RANGE(0xfe0000, 0xfe0003) AM_READ(sound_state_r)
|
||||
AM_RANGE(0xff0000, 0xff1fff) AM_RAM_WRITE_LEGACY(atarigen_playfield_w) AM_SHARE("playfield")
|
||||
AM_RANGE(0xff2000, 0xff2fff) AM_RAM_WRITE_LEGACY(atarigen_alpha_w) AM_SHARE("alpha")
|
||||
@ -419,7 +412,7 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state )
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
MCFG_CPU_PERIODIC_INT(atarigen_6502_irq_gen, (double)ATARI_CLOCK_14MHz/4/4/16/16/14)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(atarigen_state, m6502_irq_gen, (double)ATARI_CLOCK_14MHz/4/4/16/16/14)
|
||||
|
||||
MCFG_CPU_ADD("extra", M68000, ATARI_CLOCK_14MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(extra_map)
|
||||
@ -988,13 +981,13 @@ ROM_END
|
||||
|
||||
DRIVER_INIT_MEMBER(cyberbal_state,cyberbal)
|
||||
{
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x018000, 0, 0);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x018000, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
DRIVER_INIT_MEMBER(cyberbal_state,cyberbalt)
|
||||
{
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x018000, 0, 116);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x018000, 0, 116);
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,32 +37,22 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void eprom_state::update_interrupts()
|
||||
{
|
||||
eprom_state *state = machine.driver_data<eprom_state>();
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
if (subdevice("extra") != NULL)
|
||||
subdevice("extra")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
if (machine.device("extra") != NULL)
|
||||
machine.device("extra")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(eprom_state,eprom)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
subdevice("maincpu")->execute().set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(eprom_state,eprom)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, eprom_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -163,12 +153,12 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, eprom_state )
|
||||
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
|
||||
AM_RANGE(0x260010, 0x26001f) AM_READ(special_port1_r)
|
||||
AM_RANGE(0x260020, 0x26002f) AM_READ(adc_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x2e0000, 0x2e0001) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x360000, 0x360001) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0x360010, 0x360011) AM_WRITE(eprom_latch_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0x3e0000, 0x3e0fff) AM_RAM AM_SHARE("paletteram")
|
||||
AM_RANGE(0x3f0000, 0x3f1fff) AM_WRITE_LEGACY(atarigen_playfield_w) AM_SHARE("playfield")
|
||||
AM_RANGE(0x3f2000, 0x3f3fff) AM_READWRITE_LEGACY(atarimo_0_spriteram_r, atarimo_0_spriteram_w)
|
||||
@ -188,12 +178,12 @@ static ADDRESS_MAP_START( guts_map, AS_PROGRAM, 16, eprom_state )
|
||||
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
|
||||
AM_RANGE(0x260010, 0x26001f) AM_READ(special_port1_r)
|
||||
AM_RANGE(0x260020, 0x26002f) AM_READ(adc_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x2e0000, 0x2e0001) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x360000, 0x360001) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
// AM_RANGE(0x360010, 0x360011) AM_WRITE(eprom_latch_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0x3e0000, 0x3e0fff) AM_RAM AM_SHARE("paletteram")
|
||||
AM_RANGE(0xff0000, 0xff1fff) AM_WRITE_LEGACY(atarigen_playfield_upper_w) AM_SHARE("playfield_up")
|
||||
AM_RANGE(0xff8000, 0xff9fff) AM_WRITE_LEGACY(atarigen_playfield_w) AM_SHARE("playfield")
|
||||
@ -219,11 +209,11 @@ static ADDRESS_MAP_START( extra_map, AS_PROGRAM, 16, eprom_state )
|
||||
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
|
||||
AM_RANGE(0x260010, 0x26001f) AM_READ(special_port1_r)
|
||||
AM_RANGE(0x260020, 0x26002f) AM_READ(adc_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x360000, 0x360001) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0x360010, 0x360011) AM_WRITE(eprom_latch_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE8(sound_w, 0x00ff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -413,7 +403,6 @@ static MACHINE_CONFIG_START( eprom, eprom_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(eprom_state,eprom)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(eprom_state,eprom)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
@ -444,7 +433,6 @@ static MACHINE_CONFIG_START( klaxp, eprom_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(600))
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(eprom_state,eprom)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(eprom_state,eprom)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
@ -475,7 +463,6 @@ static MACHINE_CONFIG_START( guts, eprom_state )
|
||||
|
||||
MCFG_QUANTUM_TIME(attotime::from_hz(600))
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(eprom_state,eprom)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(eprom_state,eprom)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -104,16 +104,15 @@ WRITE16_MEMBER(foodf_state::nvram_recall_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void foodf_state::update_interrupts()
|
||||
{
|
||||
foodf_state *state = machine.driver_data<foodf_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(3, state->m_scanline_int_state && state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(1, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(2, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(3, m_scanline_int_state && m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update)
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update_timer)
|
||||
{
|
||||
int scanline = param;
|
||||
|
||||
@ -123,7 +122,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update)
|
||||
mystery yet */
|
||||
|
||||
/* INT 1 is on 32V */
|
||||
atarigen_scanline_int_gen(machine().device("maincpu"));
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
|
||||
/* advance to the next interrupt */
|
||||
scanline += 64;
|
||||
@ -137,14 +136,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update)
|
||||
|
||||
MACHINE_START_MEMBER(foodf_state,foodf)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
save_item(NAME(m_whichport));
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(foodf_state,foodf)
|
||||
{
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
timer_device *scan_timer = machine().device<timer_device>("scan_timer");
|
||||
scan_timer->adjust(machine().primary_screen->time_until_pos(0));
|
||||
}
|
||||
@ -164,7 +162,7 @@ WRITE8_MEMBER(foodf_state::digital_w)
|
||||
m_nvram->store(data & 0x02);
|
||||
|
||||
if (!(data & 0x04))
|
||||
atarigen_scanline_int_ack_w(space,0,0,0xffff);
|
||||
scanline_int_ack_w(space,0,0);
|
||||
if (!(data & 0x08))
|
||||
atarigen_video_int_ack_w(space,0,0,0xffff);
|
||||
|
||||
@ -363,7 +361,7 @@ static MACHINE_CONFIG_START( foodf, foodf_state )
|
||||
|
||||
MCFG_WATCHDOG_VBLANK_INIT(8)
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD("scan_timer", foodf_state, scanline_update)
|
||||
MCFG_TIMER_DRIVER_ADD("scan_timer", foodf_state, scanline_update_timer)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_GFXDECODE(foodf)
|
||||
|
@ -135,44 +135,38 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void gauntlet_state::update_interrupts()
|
||||
{
|
||||
gauntlet_state *state = machine.driver_data<gauntlet_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static void scanline_update(screen_device &screen, int scanline)
|
||||
void gauntlet_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
address_space &space = screen.machine().device("audiocpu")->memory().space(AS_PROGRAM);
|
||||
address_space &space = subdevice("audiocpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
/* sound IRQ is on 32V */
|
||||
if (scanline & 32)
|
||||
atarigen_6502_irq_gen(screen.machine().device("audiocpu"));
|
||||
m6502_irq_gen(*subdevice("audiocpu"));
|
||||
else
|
||||
atarigen_6502_irq_ack_r(space, 0);
|
||||
m6502_irq_ack_r(space, 0);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(gauntlet_state,gauntlet)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
|
||||
atarigen_state::machine_start();
|
||||
save_item(NAME(m_sound_reset_val));
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(gauntlet_state,gauntlet)
|
||||
{
|
||||
|
||||
m_sound_reset_val = 1;
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_slapstic_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32);
|
||||
atarigen_sound_io_reset(machine().device("audiocpu"));
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 32);
|
||||
}
|
||||
|
||||
|
||||
@ -209,15 +203,15 @@ WRITE16_MEMBER(gauntlet_state::sound_reset_w)
|
||||
if ((oldword ^ m_sound_reset_val) & 1)
|
||||
{
|
||||
machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (m_sound_reset_val & 1) ? CLEAR_LINE : ASSERT_LINE);
|
||||
atarigen_sound_reset(machine());
|
||||
sound_cpu_reset();
|
||||
if (m_sound_reset_val & 1)
|
||||
{
|
||||
machine().device("ymsnd")->reset();
|
||||
machine().device("tms")->reset();
|
||||
tms5220_set_frequency(machine().device("tms"), ATARI_CLOCK_14MHz/2 / 11);
|
||||
atarigen_set_ym2151_vol(machine(), 0);
|
||||
atarigen_set_pokey_vol(machine(), 0);
|
||||
atarigen_set_tms5220_vol(machine(), 0);
|
||||
set_ym2151_volume(0);
|
||||
set_pokey_volume(0);
|
||||
set_tms5220_volume(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -284,9 +278,9 @@ WRITE8_MEMBER(gauntlet_state::sound_ctl_w)
|
||||
|
||||
WRITE8_MEMBER(gauntlet_state::mixer_w)
|
||||
{
|
||||
atarigen_set_ym2151_vol(machine(), (data & 7) * 100 / 7);
|
||||
atarigen_set_pokey_vol(machine(), ((data >> 3) & 3) * 100 / 3);
|
||||
atarigen_set_tms5220_vol(machine(), ((data >> 5) & 7) * 100 / 7);
|
||||
set_ym2151_volume((data & 7) * 100 / 7);
|
||||
set_pokey_volume(((data >> 3) & 3) * 100 / 3);
|
||||
set_tms5220_volume(((data >> 5) & 7) * 100 / 7);
|
||||
}
|
||||
|
||||
|
||||
@ -312,12 +306,12 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, gauntlet_state )
|
||||
AM_RANGE(0x803004, 0x803005) AM_MIRROR(0x2fcef0) AM_READ_PORT("803004")
|
||||
AM_RANGE(0x803006, 0x803007) AM_MIRROR(0x2fcef0) AM_READ_PORT("803006")
|
||||
AM_RANGE(0x803008, 0x803009) AM_MIRROR(0x2fcef0) AM_READ(port4_r)
|
||||
AM_RANGE(0x80300e, 0x80300f) AM_MIRROR(0x2fcef0) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x80300e, 0x80300f) AM_MIRROR(0x2fcef0) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x803100, 0x803101) AM_MIRROR(0x2fce8e) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x803120, 0x803121) AM_MIRROR(0x2fce8e) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0x803140, 0x803141) AM_MIRROR(0x2fce8e) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0x803150, 0x803151) AM_MIRROR(0x2fce8e) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0x803170, 0x803171) AM_MIRROR(0x2fce8e) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x803170, 0x803171) AM_MIRROR(0x2fce8e) AM_WRITE8(sound_w, 0x00ff)
|
||||
|
||||
/* VBUS */
|
||||
AM_RANGE(0x900000, 0x901fff) AM_MIRROR(0x2c8000) AM_RAM_WRITE_LEGACY(atarigen_playfield_w) AM_SHARE("playfield")
|
||||
@ -342,14 +336,14 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gauntlet_state )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x2000) AM_RAM
|
||||
AM_RANGE(0x1000, 0x100f) AM_MIRROR(0x27c0) AM_WRITE_LEGACY(atarigen_6502_sound_w)
|
||||
AM_RANGE(0x1010, 0x101f) AM_MIRROR(0x27c0) AM_READ_LEGACY(atarigen_6502_sound_r)
|
||||
AM_RANGE(0x1000, 0x100f) AM_MIRROR(0x27c0) AM_WRITE(m6502_sound_w)
|
||||
AM_RANGE(0x1010, 0x101f) AM_MIRROR(0x27c0) AM_READ(m6502_sound_r)
|
||||
AM_RANGE(0x1020, 0x102f) AM_MIRROR(0x27c0) AM_READ_PORT("COIN") AM_WRITE(mixer_w)
|
||||
AM_RANGE(0x1030, 0x103f) AM_MIRROR(0x27c0) AM_READWRITE(switch_6502_r, sound_ctl_w)
|
||||
AM_RANGE(0x1800, 0x180f) AM_MIRROR(0x27c0) AM_DEVREADWRITE("pokey", pokey_device, read, write)
|
||||
AM_RANGE(0x1810, 0x1811) AM_MIRROR(0x27ce) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
|
||||
AM_RANGE(0x1820, 0x182f) AM_MIRROR(0x27c0) AM_DEVWRITE_LEGACY("tms", tms5220_data_w)
|
||||
AM_RANGE(0x1830, 0x183f) AM_MIRROR(0x27c0) AM_READWRITE_LEGACY(atarigen_6502_irq_ack_r, atarigen_6502_irq_ack_w)
|
||||
AM_RANGE(0x1830, 0x183f) AM_MIRROR(0x27c0) AM_READWRITE(m6502_irq_ack_r, m6502_irq_ack_w)
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -1621,7 +1615,7 @@ static void gauntlet_common_init(running_machine &machine, int slapstic, int vin
|
||||
gauntlet_state *state = machine.driver_data<gauntlet_state>();
|
||||
UINT8 *rom = state->memregion("maincpu")->base();
|
||||
state->m_eeprom_default = NULL;
|
||||
atarigen_slapstic_init(machine.device("maincpu"), 0x038000, 0, slapstic);
|
||||
state->slapstic_configure(*machine.device<cpu_device>("maincpu"), 0x038000, 0, slapstic);
|
||||
|
||||
/* swap the top and bottom halves of the main CPU ROM images */
|
||||
atarigen_swap_mem(rom + 0x000000, rom + 0x008000, 0x8000);
|
||||
|
@ -471,7 +471,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( multisync_68k_map, AS_PROGRAM, 16, harddriv_state )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x600000, 0x603fff) AM_READWRITE_LEGACY(atarigen_sound_upper_r, atarigen_sound_upper_w)
|
||||
AM_RANGE(0x600000, 0x603fff) AM_READWRITE8(sound_r, sound_w, 0xff00)
|
||||
AM_RANGE(0x604000, 0x607fff) AM_READWRITE_LEGACY(hd68k_sound_reset_r, hd68k_nwr_w)
|
||||
AM_RANGE(0x608000, 0x60bfff) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x60c000, 0x60ffff) AM_READWRITE_LEGACY(hd68k_port0_r, hd68k_irq_ack_w)
|
||||
|
@ -31,24 +31,23 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void klax_state::update_interrupts()
|
||||
{
|
||||
klax_state *state = machine.driver_data<klax_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_video_int_state || state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_video_int_state || m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static void scanline_update(screen_device &screen, int scanline)
|
||||
void klax_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
/* generate 32V signals */
|
||||
if ((scanline & 32) == 0 && !(screen.machine().root_device().ioport("P1")->read() & 0x800))
|
||||
atarigen_scanline_int_gen(screen.machine().device("maincpu"));
|
||||
if ((scanline & 32) == 0 && !(ioport("P1")->read() & 0x800))
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
}
|
||||
|
||||
|
||||
WRITE16_MEMBER(klax_state::interrupt_ack_w)
|
||||
{
|
||||
atarigen_scanline_int_ack_w(space, offset, data, mem_mask);
|
||||
scanline_int_ack_w(space, offset, data, mem_mask);
|
||||
atarigen_video_int_ack_w(space, offset, data, mem_mask);
|
||||
}
|
||||
|
||||
@ -60,18 +59,10 @@ WRITE16_MEMBER(klax_state::interrupt_ack_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_START_MEMBER(klax_state,klax)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(klax_state,klax)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32);
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 32);
|
||||
}
|
||||
|
||||
|
||||
@ -171,7 +162,6 @@ static MACHINE_CONFIG_START( klax, klax_state )
|
||||
MCFG_CPU_PROGRAM_MAP(klax_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(klax_state,klax)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(klax_state,klax)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -31,11 +31,10 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void offtwall_state::update_interrupts()
|
||||
{
|
||||
offtwall_state *state = machine.driver_data<offtwall_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -46,19 +45,11 @@ static void update_interrupts(running_machine &machine)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_START_MEMBER(offtwall_state,offtwall)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(offtwall_state,offtwall)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_state::machine_reset();
|
||||
atarivc_reset(*machine().primary_screen, m_atarivc_eof_data, 1);
|
||||
atarijsa_reset();
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -103,7 +94,7 @@ WRITE16_MEMBER(offtwall_state::io_latch_w)
|
||||
{
|
||||
/* bit 4 resets the sound CPU */
|
||||
machine().device("jsa")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (!(data & 0x10)) atarijsa_reset();
|
||||
if (!(data & 0x10)) atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
logerror("sound control = %04X\n", data);
|
||||
@ -281,8 +272,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, offtwall_state )
|
||||
AM_RANGE(0x260020, 0x260021) AM_READ_PORT("260020")
|
||||
AM_RANGE(0x260022, 0x260023) AM_READ_PORT("260022")
|
||||
AM_RANGE(0x260024, 0x260025) AM_READ_PORT("260024")
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260040, 0x260041) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x260040, 0x260041) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0x260050, 0x260051) AM_WRITE(io_latch_w)
|
||||
AM_RANGE(0x260060, 0x260061) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0x2a0000, 0x2a0001) AM_WRITE(watchdog_reset16_w)
|
||||
@ -404,7 +395,6 @@ static MACHINE_CONFIG_START( offtwall, offtwall_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(offtwall_state,offtwall)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(offtwall_state,offtwall)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -39,18 +39,17 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void rampart_state::update_interrupts()
|
||||
{
|
||||
rampart_state *state = machine.driver_data<rampart_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static void scanline_update(screen_device &screen, int scanline)
|
||||
void rampart_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
/* generate 32V signals */
|
||||
if ((scanline & 32) == 0)
|
||||
atarigen_scanline_int_gen(screen.machine().device("maincpu"));
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
}
|
||||
|
||||
|
||||
@ -61,19 +60,10 @@ static void scanline_update(screen_device &screen, int scanline)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_START_MEMBER(rampart_state,rampart)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(rampart_state,rampart)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_slapstic_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32);
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 32);
|
||||
}
|
||||
|
||||
|
||||
@ -114,10 +104,10 @@ WRITE16_MEMBER(rampart_state::latch_w)
|
||||
/* lower byte being modified? */
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
atarigen_set_oki6295_vol(machine(), (data & 0x0020) ? 100 : 0);
|
||||
set_oki6295_volume((data & 0x0020) ? 100 : 0);
|
||||
if (!(data & 0x0010))
|
||||
machine().device("oki")->reset();
|
||||
atarigen_set_ym2413_vol(machine(), ((data >> 1) & 7) * 100 / 7);
|
||||
set_ym2413_volume(((data >> 1) & 7) * 100 / 7);
|
||||
if (!(data & 0x0001))
|
||||
machine().device("ymsnd")->reset();
|
||||
}
|
||||
@ -155,7 +145,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, rampart_state )
|
||||
AM_RANGE(0x6c0004, 0x6c0005) AM_MIRROR(0x019ff8) AM_READ_PORT("TRACK2")
|
||||
AM_RANGE(0x6c0006, 0x6c0007) AM_MIRROR(0x019ff8) AM_READ_PORT("TRACK3")
|
||||
AM_RANGE(0x726000, 0x726001) AM_MIRROR(0x019ffe) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x7e6000, 0x7e6001) AM_MIRROR(0x019ffe) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0x7e6000, 0x7e6001) AM_MIRROR(0x019ffe) AM_WRITE(scanline_int_ack_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -348,7 +338,6 @@ static MACHINE_CONFIG_START( rampart, rampart_state )
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(rampart_state,rampart)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(rampart_state,rampart)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
MCFG_WATCHDOG_VBLANK_INIT(8)
|
||||
@ -481,7 +470,7 @@ DRIVER_INIT_MEMBER(rampart_state,rampart)
|
||||
UINT8 *rom = machine().root_device().memregion("maincpu")->base();
|
||||
|
||||
memcpy(&rom[0x140000], &rom[0x40000], 0x8000);
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x140000, 0x438000, 118);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x140000, 0x438000, 118);
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,10 +32,9 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void relief_state::update_interrupts()
|
||||
{
|
||||
relief_state *state = machine.driver_data<relief_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -65,17 +64,9 @@ WRITE16_MEMBER(relief_state::relief_atarivc_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_START_MEMBER(relief_state,relief)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(relief_state,relief)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_state::machine_reset();
|
||||
atarivc_reset(*machine().primary_screen, m_atarivc_eof_data, 2);
|
||||
|
||||
machine().device<okim6295_device>("oki")->set_bank_base(0);
|
||||
@ -113,7 +104,7 @@ WRITE16_MEMBER(relief_state::audio_control_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
m_ym2413_volume = (data >> 1) & 15;
|
||||
atarigen_set_ym2413_vol(machine(), (m_ym2413_volume * m_overall_volume * 100) / (127 * 15));
|
||||
set_ym2413_volume((m_ym2413_volume * m_overall_volume * 100) / (127 * 15));
|
||||
m_adpcm_bank_base = (0x040000 * ((data >> 6) & 3)) | (m_adpcm_bank_base & 0x100000);
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
@ -129,8 +120,8 @@ WRITE16_MEMBER(relief_state::audio_volume_w)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
m_overall_volume = data & 127;
|
||||
atarigen_set_ym2413_vol(machine(), (m_ym2413_volume * m_overall_volume * 100) / (127 * 15));
|
||||
atarigen_set_oki6295_vol(machine(), m_overall_volume * 100 / 127);
|
||||
set_ym2413_volume((m_ym2413_volume * m_overall_volume * 100) / (127 * 15));
|
||||
set_oki6295_volume(m_overall_volume * 100 / 127);
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,7 +287,6 @@ static MACHINE_CONFIG_START( relief, relief_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(relief_state,relief)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(relief_state,relief)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -31,10 +31,9 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void shuuz_state::update_interrupts()
|
||||
{
|
||||
shuuz_state *state = machine.driver_data<shuuz_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -64,17 +63,9 @@ WRITE16_MEMBER(shuuz_state::shuuz_atarivc_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_START_MEMBER(shuuz_state,shuuz)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(shuuz_state,shuuz)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_state::machine_reset();
|
||||
atarivc_reset(*machine().primary_screen, m_atarivc_eof_data, 1);
|
||||
}
|
||||
|
||||
@ -263,7 +254,6 @@ static MACHINE_CONFIG_START( shuuz, shuuz_state )
|
||||
MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(shuuz_state,shuuz)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(shuuz_state,shuuz)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -31,59 +31,49 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void skullxbo_state::update_interrupts()
|
||||
{
|
||||
skullxbo_state *state = machine.driver_data<skullxbo_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(1, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(2, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
TIMER_CALLBACK_MEMBER(skullxbo_state::irq_gen)
|
||||
{
|
||||
atarigen_scanline_int_gen(machine().device("maincpu"));
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
}
|
||||
|
||||
|
||||
static void alpha_row_update(screen_device &screen, int scanline)
|
||||
void skullxbo_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
skullxbo_state *state = screen.machine().driver_data<skullxbo_state>();
|
||||
UINT16 *check = &state->m_alpha[(scanline / 8) * 64 + 42];
|
||||
UINT16 *check = &m_alpha[(scanline / 8) * 64 + 42];
|
||||
|
||||
/* check for interrupts in the alpha ram */
|
||||
/* the interrupt occurs on the HBLANK of the 6th scanline following */
|
||||
if (check < &state->m_alpha[0x7c0] && (*check & 0x8000))
|
||||
if (check < &m_alpha[0x7c0] && (*check & 0x8000))
|
||||
{
|
||||
int width = screen.width();
|
||||
attotime period = screen.time_until_pos(screen.vpos() + 6, width * 0.9);
|
||||
screen.machine().scheduler().timer_set(period, timer_expired_delegate(FUNC(skullxbo_state::irq_gen),state));
|
||||
machine().scheduler().timer_set(period, timer_expired_delegate(FUNC(skullxbo_state::irq_gen), this));
|
||||
}
|
||||
|
||||
/* update the playfield and motion objects */
|
||||
skullxbo_scanline_update(screen.machine(), scanline);
|
||||
skullxbo_scanline_update(machine(), scanline);
|
||||
}
|
||||
|
||||
|
||||
WRITE16_MEMBER(skullxbo_state::skullxbo_halt_until_hblank_0_w)
|
||||
{
|
||||
atarigen_halt_until_hblank_0(*machine().primary_screen);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(skullxbo_state,skullxbo)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
halt_until_hblank_0(space.device(), *machine().primary_screen);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(skullxbo_state,skullxbo)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, alpha_row_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -129,21 +119,21 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, skullxbo_state )
|
||||
AM_RANGE(0xff0800, 0xff0bff) AM_WRITE(skullxbo_halt_until_hblank_0_w)
|
||||
AM_RANGE(0xff0c00, 0xff0fff) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xff1000, 0xff13ff) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0xff1400, 0xff17ff) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0xff1800, 0xff1bff) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xff1400, 0xff17ff) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0xff1800, 0xff1bff) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0xff1c00, 0xff1c7f) AM_WRITE_LEGACY(skullxbo_playfieldlatch_w)
|
||||
AM_RANGE(0xff1c80, 0xff1cff) AM_WRITE_LEGACY(skullxbo_xscroll_w) AM_SHARE("xscroll")
|
||||
AM_RANGE(0xff1d00, 0xff1d7f) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0xff1d00, 0xff1d7f) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0xff1d80, 0xff1dff) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xff1e00, 0xff1e7f) AM_WRITE_LEGACY(skullxbo_playfieldlatch_w)
|
||||
AM_RANGE(0xff1e80, 0xff1eff) AM_WRITE_LEGACY(skullxbo_xscroll_w)
|
||||
AM_RANGE(0xff1f00, 0xff1f7f) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0xff1f00, 0xff1f7f) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0xff1f80, 0xff1fff) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xff2000, 0xff2fff) AM_RAM_WRITE_LEGACY(atarigen_666_paletteram_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0xff4000, 0xff47ff) AM_WRITE_LEGACY(skullxbo_yscroll_w) AM_SHARE("yscroll")
|
||||
AM_RANGE(0xff4800, 0xff4fff) AM_WRITE(skullxbo_mobwr_w)
|
||||
AM_RANGE(0xff6000, 0xff6fff) AM_WRITE_LEGACY(atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
AM_RANGE(0xff5000, 0xff5001) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0xff5000, 0xff5001) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0xff5800, 0xff5801) AM_READ_PORT("FF5800")
|
||||
AM_RANGE(0xff5802, 0xff5803) AM_READ(special_port1_r)
|
||||
AM_RANGE(0xff6000, 0xff6fff) AM_READ_LEGACY(atarigen_eeprom_r)
|
||||
@ -259,7 +249,6 @@ static MACHINE_CONFIG_START( skullxbo, skullxbo_state )
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(skullxbo_state,skullxbo)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(skullxbo_state,skullxbo)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -32,30 +32,26 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void thunderj_state::update_interrupts()
|
||||
{
|
||||
thunderj_state *state = machine.driver_data<thunderj_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("extra")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("extra")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(thunderj_state,thunderj)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
|
||||
atarigen_state::machine_start();
|
||||
save_item(NAME(m_alpha_tile_bank));
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(thunderj_state,thunderj)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_state::machine_reset();
|
||||
atarivc_reset(*machine().primary_screen, m_atarivc_eof_data, 2);
|
||||
atarijsa_reset();
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -155,11 +151,11 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, thunderj_state )
|
||||
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
|
||||
AM_RANGE(0x260010, 0x260011) AM_READ_PORT("260010")
|
||||
AM_RANGE(0x260012, 0x260013) AM_READ(special_port2_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x2e0000, 0x2e0001) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x360010, 0x360011) AM_WRITE(latch_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0x3e0000, 0x3e0fff) AM_RAM_WRITE_LEGACY(atarigen_666_paletteram_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0x3effc0, 0x3effff) AM_READWRITE(thunderj_atarivc_r, thunderj_atarivc_w) AM_SHARE("atarivc_data")
|
||||
AM_RANGE(0x3f0000, 0x3f1fff) AM_RAM_WRITE_LEGACY(atarigen_playfield2_latched_msb_w) AM_SHARE("playfield2")
|
||||
@ -187,11 +183,11 @@ static ADDRESS_MAP_START( extra_map, AS_PROGRAM, 16, thunderj_state )
|
||||
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
|
||||
AM_RANGE(0x260010, 0x260011) AM_READ_PORT("260010")
|
||||
AM_RANGE(0x260012, 0x260013) AM_READ(special_port2_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x360000, 0x360001) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0x360010, 0x360011) AM_WRITE(latch_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE8(sound_w, 0x00ff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
|
@ -34,27 +34,18 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void toobin_state::update_interrupts()
|
||||
{
|
||||
toobin_state *state = machine.driver_data<toobin_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(3, state->m_scanline_int_state && state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(toobin_state,toobin)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
subdevice("maincpu")->execute().set_input_line(1, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(2, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(3, m_scanline_int_state && m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(toobin_state,toobin)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +66,7 @@ WRITE16_MEMBER(toobin_state::interrupt_scan_w)
|
||||
if (oldword != newword)
|
||||
{
|
||||
m_interrupt_scan[offset] = newword;
|
||||
atarigen_scanline_int_set(*machine().primary_screen, newword & 0x1ff);
|
||||
scanline_int_set(*machine().primary_screen, newword & 0x1ff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,18 +104,18 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, toobin_state )
|
||||
AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE_LEGACY(toobin_paletteram_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0xff6000, 0xff6001) AM_READNOP /* who knows? read at controls time */
|
||||
AM_RANGE(0xff8000, 0xff8001) AM_MIRROR(0x4500fe) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xff8100, 0xff8101) AM_MIRROR(0x4500fe) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0xff8100, 0xff8101) AM_MIRROR(0x4500fe) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0xff8300, 0xff8301) AM_MIRROR(0x45003e) AM_WRITE_LEGACY(toobin_intensity_w)
|
||||
AM_RANGE(0xff8340, 0xff8341) AM_MIRROR(0x45003e) AM_WRITE(interrupt_scan_w) AM_SHARE("interrupt_scan")
|
||||
AM_RANGE(0xff8380, 0xff8381) AM_MIRROR(0x45003e) AM_READWRITE_LEGACY(atarimo_0_slipram_r, toobin_slip_w)
|
||||
AM_RANGE(0xff83c0, 0xff83c1) AM_MIRROR(0x45003e) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0xff8400, 0xff8401) AM_MIRROR(0x4500fe) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xff83c0, 0xff83c1) AM_MIRROR(0x45003e) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0xff8400, 0xff8401) AM_MIRROR(0x4500fe) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0xff8500, 0xff8501) AM_MIRROR(0x4500fe) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x4500fe) AM_WRITE_LEGACY(toobin_xscroll_w) AM_SHARE("xscroll")
|
||||
AM_RANGE(0xff8700, 0xff8701) AM_MIRROR(0x4500fe) AM_WRITE_LEGACY(toobin_yscroll_w) AM_SHARE("yscroll")
|
||||
AM_RANGE(0xff8800, 0xff8801) AM_MIRROR(0x4507fe) AM_READ_PORT("FF8800")
|
||||
AM_RANGE(0xff9000, 0xff9001) AM_MIRROR(0x4507fe) AM_READ(special_port1_r)
|
||||
AM_RANGE(0xff9800, 0xff9801) AM_MIRROR(0x4507fe) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0xff9800, 0xff9801) AM_MIRROR(0x4507fe) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0xffa000, 0xffafff) AM_MIRROR(0x451000) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
AM_RANGE(0xffc000, 0xffffff) AM_MIRROR(0x450000) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
@ -227,7 +218,6 @@ static MACHINE_CONFIG_START( toobin, toobin_state )
|
||||
MCFG_CPU_ADD("maincpu", M68010, MASTER_CLOCK/4)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(toobin_state,toobin)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(toobin_state,toobin)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
MCFG_WATCHDOG_VBLANK_INIT(8)
|
||||
|
@ -31,27 +31,18 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void vindictr_state::update_interrupts()
|
||||
{
|
||||
vindictr_state *state = machine.driver_data<vindictr_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(4, state->m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(6, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(vindictr_state,vindictr)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
subdevice("maincpu")->execute().set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(vindictr_state,vindictr)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarigen_scanline_timer_reset(*machine().primary_screen, vindictr_scanline_update, 8);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
scanline_timer_reset(*machine().primary_screen, 8);
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -88,12 +79,12 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, vindictr_state )
|
||||
AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000")
|
||||
AM_RANGE(0x260010, 0x26001f) AM_READ(port1_r)
|
||||
AM_RANGE(0x260020, 0x26002f) AM_READ_PORT("260020")
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0x260030, 0x260031) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0x2e0000, 0x2e0001) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x360000, 0x360001) AM_WRITE_LEGACY(atarigen_scanline_int_ack_w)
|
||||
AM_RANGE(0x360000, 0x360001) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0x360010, 0x360011) AM_WRITENOP
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0x360020, 0x360021) AM_WRITE(sound_reset_w)
|
||||
AM_RANGE(0x360030, 0x360031) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0x3e0000, 0x3e0fff) AM_RAM_WRITE_LEGACY(vindictr_paletteram_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0x3f0000, 0x3f1fff) AM_MIRROR(0x8000) AM_RAM_WRITE_LEGACY(atarigen_playfield_w) AM_SHARE("playfield")
|
||||
AM_RANGE(0x3f2000, 0x3f3fff) AM_MIRROR(0x8000) AM_READWRITE_LEGACY(atarimo_0_spriteram_r, atarimo_0_spriteram_w)
|
||||
@ -198,7 +189,6 @@ static MACHINE_CONFIG_START( vindictr, vindictr_state )
|
||||
MCFG_CPU_ADD("maincpu", M68010, ATARI_CLOCK_14MHz/2)
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(vindictr_state,vindictr)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(vindictr_state,vindictr)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
|
@ -32,27 +32,17 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void update_interrupts(running_machine &machine)
|
||||
void xybots_state::update_interrupts()
|
||||
{
|
||||
xybots_state *state = machine.driver_data<xybots_state>();
|
||||
machine.device("maincpu")->execute().set_input_line(1, state->m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
machine.device("maincpu")->execute().set_input_line(2, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_START_MEMBER(xybots_state,xybots)
|
||||
{
|
||||
atarigen_init(machine());
|
||||
subdevice("maincpu")->execute().set_input_line(1, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
subdevice("maincpu")->execute().set_input_line(2, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
MACHINE_RESET_MEMBER(xybots_state,xybots)
|
||||
{
|
||||
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_slapstic_reset(this);
|
||||
atarigen_interrupt_reset(this, update_interrupts);
|
||||
atarijsa_reset();
|
||||
atarigen_state::machine_reset();
|
||||
atarijsa_reset(machine());
|
||||
}
|
||||
|
||||
|
||||
@ -92,14 +82,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, xybots_state )
|
||||
AM_RANGE(0xffb000, 0xffbfff) AM_MIRROR(0x7f8000) AM_RAM_WRITE_LEGACY(atarigen_playfield_w) AM_SHARE("playfield")
|
||||
AM_RANGE(0xffc000, 0xffc7ff) AM_MIRROR(0x7f8800) AM_RAM_WRITE(paletteram_IIIIRRRRGGGGBBBB_word_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0xffd000, 0xffdfff) AM_MIRROR(0x7f8000) AM_READWRITE_LEGACY(atarigen_eeprom_r, atarigen_eeprom_w) AM_SHARE("eeprom")
|
||||
AM_RANGE(0xffe000, 0xffe0ff) AM_MIRROR(0x7f8000) AM_READ_LEGACY(atarigen_sound_r)
|
||||
AM_RANGE(0xffe000, 0xffe0ff) AM_MIRROR(0x7f8000) AM_READ8(sound_r, 0x00ff)
|
||||
AM_RANGE(0xffe100, 0xffe1ff) AM_MIRROR(0x7f8000) AM_READ_PORT("FFE100")
|
||||
AM_RANGE(0xffe200, 0xffe2ff) AM_MIRROR(0x7f8000) AM_READ(special_port1_r)
|
||||
AM_RANGE(0xffe800, 0xffe8ff) AM_MIRROR(0x7f8000) AM_WRITE_LEGACY(atarigen_eeprom_enable_w)
|
||||
AM_RANGE(0xffe900, 0xffe9ff) AM_MIRROR(0x7f8000) AM_WRITE_LEGACY(atarigen_sound_w)
|
||||
AM_RANGE(0xffe900, 0xffe9ff) AM_MIRROR(0x7f8000) AM_WRITE8(sound_w, 0x00ff)
|
||||
AM_RANGE(0xffea00, 0xffeaff) AM_MIRROR(0x7f8000) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xffeb00, 0xffebff) AM_MIRROR(0x7f8000) AM_WRITE_LEGACY(atarigen_video_int_ack_w)
|
||||
AM_RANGE(0xffee00, 0xffeeff) AM_MIRROR(0x7f8000) AM_WRITE_LEGACY(atarigen_sound_reset_w)
|
||||
AM_RANGE(0xffee00, 0xffeeff) AM_MIRROR(0x7f8000) AM_WRITE(sound_reset_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -197,7 +187,6 @@ static MACHINE_CONFIG_START( xybots, xybots_state )
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT("screen", atarigen_video_int_gen)
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(xybots_state,xybots)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(xybots_state,xybots)
|
||||
MCFG_NVRAM_ADD_1FILL("eeprom")
|
||||
|
||||
@ -391,7 +380,7 @@ ROM_END
|
||||
DRIVER_INIT_MEMBER(xybots_state,xybots)
|
||||
{
|
||||
m_h256 = 0x0400;
|
||||
atarigen_slapstic_init(machine().device("maincpu"), 0x008000, 0, 107);
|
||||
slapstic_configure(*machine().device<cpu_device>("maincpu"), 0x008000, 0, 107);
|
||||
atarijsa_init(machine(), "FFE200", 0x0100);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,8 @@ public:
|
||||
|
||||
required_shared_ptr<UINT16> m_bitmap;
|
||||
UINT8 m_has_mo;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_WRITE16_MEMBER(latch_w);
|
||||
DECLARE_DRIVER_INIT(sparkz);
|
||||
DECLARE_MACHINE_START(arcadecl);
|
||||
|
@ -30,6 +30,8 @@ public:
|
||||
UINT16 m_playfield_yscroll;
|
||||
|
||||
device_t * m_rle;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_WRITE16_MEMBER(mo_control_w);
|
||||
DECLARE_WRITE16_MEMBER(mo_command_w);
|
||||
DECLARE_READ16_MEMBER(special_port0_r);
|
||||
|
@ -32,6 +32,8 @@ public:
|
||||
|
||||
device_t * m_rle;
|
||||
UINT32 m_last_accesses[8];
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ16_MEMBER(special_port2_r);
|
||||
DECLARE_WRITE16_MEMBER(a2d_select_w);
|
||||
DECLARE_READ16_MEMBER(a2d_data_r);
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
UINT8 m_protdata[0x800];
|
||||
|
||||
device_t * m_rle;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ32_MEMBER(special_port2_r);
|
||||
DECLARE_READ32_MEMBER(special_port3_r);
|
||||
DECLARE_READ32_MEMBER(analog_port0_r);
|
||||
|
@ -29,6 +29,8 @@ public:
|
||||
UINT16 m_last_write_offset;
|
||||
|
||||
device_t * m_rle;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ32_MEMBER(special_port2_r);
|
||||
DECLARE_READ32_MEMBER(special_port3_r);
|
||||
DECLARE_READ32_MEMBER(a2d_data_r);
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
UINT8 m_bank_color_shift[MAX_GFX_ELEMENTS];
|
||||
|
||||
UINT8 m_cur[2][2];
|
||||
virtual void update_interrupts();
|
||||
DECLARE_READ16_MEMBER(joystick_r);
|
||||
DECLARE_WRITE16_MEMBER(joystick_w);
|
||||
DECLARE_READ16_MEMBER(trakball_r);
|
||||
|
@ -49,6 +49,8 @@ public:
|
||||
UINT32 m_spin_center_count;
|
||||
|
||||
UINT16 m_vram[0x8000/2];
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_WRITE16_MEMBER(int0_ack_w);
|
||||
DECLARE_WRITE16_MEMBER(int1_ack_w);
|
||||
DECLARE_WRITE16_MEMBER(int_enable_w);
|
||||
|
@ -18,6 +18,8 @@ public:
|
||||
UINT8 * m_bank_source_data;
|
||||
|
||||
UINT8 m_playfield_tile_bank;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ16_MEMBER(sound_busy_r);
|
||||
DECLARE_READ16_MEMBER(pedal_0_r);
|
||||
DECLARE_READ16_MEMBER(pedal_1_r);
|
||||
|
@ -15,6 +15,8 @@ public:
|
||||
UINT16 m_latch_data;
|
||||
|
||||
UINT8 m_alpha_tile_bank;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ16_MEMBER(batman_atarivc_r);
|
||||
DECLARE_WRITE16_MEMBER(batman_atarivc_w);
|
||||
DECLARE_READ16_MEMBER(special_port2_r);
|
||||
|
@ -53,7 +53,6 @@ public:
|
||||
m_ram_base(*this, "ram_base"),
|
||||
m_rom_base(*this, "rom_base") { }
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
|
||||
virtual void video_start();
|
||||
@ -92,7 +91,7 @@ public:
|
||||
UINT32 * m_movie_speedup_data;
|
||||
|
||||
// in drivers/beathead.c
|
||||
void update_interrupts();
|
||||
virtual void update_interrupts();
|
||||
DECLARE_WRITE32_MEMBER( interrupt_control_w );
|
||||
DECLARE_READ32_MEMBER( interrupt_control_r );
|
||||
DECLARE_WRITE32_MEMBER( eeprom_data_w );
|
||||
|
@ -14,6 +14,8 @@ public:
|
||||
m_priorityram(*this, "priorityram") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_priorityram;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_WRITE16_MEMBER(blstroid_halt_until_hblank_0_w);
|
||||
DECLARE_READ16_MEMBER(inputs_r);
|
||||
DECLARE_DRIVER_INIT(blstroid);
|
||||
|
@ -28,6 +28,8 @@ public:
|
||||
UINT8 m_sound_data_from_6502;
|
||||
UINT8 m_sound_data_from_68k_ready;
|
||||
UINT8 m_sound_data_from_6502_ready;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ16_MEMBER(special_port0_r);
|
||||
DECLARE_READ16_MEMBER(special_port2_r);
|
||||
DECLARE_READ16_MEMBER(sound_state_r);
|
||||
|
@ -16,6 +16,8 @@ public:
|
||||
int m_video_disable;
|
||||
UINT16 * m_sync_data;
|
||||
int m_last_offset;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ16_MEMBER(special_port1_r);
|
||||
DECLARE_READ16_MEMBER(adc_r);
|
||||
DECLARE_WRITE16_MEMBER(eprom_latch_w);
|
||||
|
@ -24,6 +24,7 @@ public:
|
||||
|
||||
UINT8 m_whichport;
|
||||
required_shared_ptr<UINT16> m_spriteram;
|
||||
virtual void update_interrupts();
|
||||
DECLARE_WRITE16_MEMBER(nvram_recall_w);
|
||||
DECLARE_WRITE8_MEMBER(digital_w);
|
||||
DECLARE_READ16_MEMBER(analog_r);
|
||||
@ -36,5 +37,5 @@ public:
|
||||
DECLARE_MACHINE_RESET(foodf);
|
||||
DECLARE_VIDEO_START(foodf);
|
||||
UINT32 screen_update_foodf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(scanline_update);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(scanline_update_timer);
|
||||
};
|
||||
|
@ -16,6 +16,8 @@ public:
|
||||
UINT8 m_vindctr2_screen_refresh;
|
||||
UINT8 m_playfield_tile_bank;
|
||||
UINT8 m_playfield_color_bank;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ16_MEMBER(port4_r);
|
||||
DECLARE_WRITE16_MEMBER(sound_reset_w);
|
||||
DECLARE_READ8_MEMBER(switch_6502_r);
|
||||
|
@ -173,6 +173,7 @@ public:
|
||||
|
||||
INT8 m_gfx_finescroll;
|
||||
UINT8 m_gfx_palettebank;
|
||||
virtual void update_interrupts();
|
||||
DECLARE_READ16_MEMBER(steeltal_dummy_r);
|
||||
DECLARE_READ32_MEMBER(rddsp_unmap_r);
|
||||
DECLARE_READ16_MEMBER(hd68k_snd_data_r);
|
||||
|
@ -11,6 +11,8 @@ class klax_state : public atarigen_state
|
||||
public:
|
||||
klax_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: atarigen_state(mconfig, type, tag) { }
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_WRITE16_MEMBER(interrupt_ack_w);
|
||||
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
|
||||
DECLARE_MACHINE_START(klax);
|
||||
|
@ -36,6 +36,8 @@ public:
|
||||
protected:
|
||||
virtual void machine_start();
|
||||
virtual void video_start();
|
||||
|
||||
virtual void update_interrupts() { }
|
||||
|
||||
struct planet;
|
||||
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
|
||||
UINT16 *m_spritecache_count;
|
||||
UINT16 *m_unknown_verify_base;
|
||||
virtual void update_interrupts();
|
||||
DECLARE_READ16_MEMBER(offtwall_atarivc_r);
|
||||
DECLARE_WRITE16_MEMBER(offtwall_atarivc_w);
|
||||
DECLARE_READ16_MEMBER(special_port3_r);
|
||||
|
@ -15,6 +15,8 @@ public:
|
||||
|
||||
required_shared_ptr<UINT16> m_bitmap;
|
||||
UINT8 m_has_mo;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_WRITE16_MEMBER(latch_w);
|
||||
DECLARE_DRIVER_INIT(rampart);
|
||||
DECLARE_MACHINE_START(rampart);
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
UINT8 m_ym2413_volume;
|
||||
UINT8 m_overall_volume;
|
||||
UINT32 m_adpcm_bank_base;
|
||||
virtual void update_interrupts();
|
||||
DECLARE_READ16_MEMBER(relief_atarivc_r);
|
||||
DECLARE_WRITE16_MEMBER(relief_atarivc_w);
|
||||
DECLARE_READ16_MEMBER(special_port2_r);
|
||||
|
@ -13,6 +13,7 @@ public:
|
||||
: atarigen_state(mconfig, type, tag) { }
|
||||
|
||||
int m_cur[2];
|
||||
virtual void update_interrupts();
|
||||
DECLARE_READ16_MEMBER(shuuz_atarivc_r);
|
||||
DECLARE_WRITE16_MEMBER(shuuz_atarivc_w);
|
||||
DECLARE_WRITE16_MEMBER(latch_w);
|
||||
|
@ -11,6 +11,8 @@ class skullxbo_state : public atarigen_state
|
||||
public:
|
||||
skullxbo_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: atarigen_state(mconfig, type, tag) { }
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_WRITE16_MEMBER(skullxbo_halt_until_hblank_0_w);
|
||||
DECLARE_READ16_MEMBER(special_port1_r);
|
||||
DECLARE_WRITE16_MEMBER(skullxbo_mobwr_w);
|
||||
|
@ -13,6 +13,7 @@ public:
|
||||
: atarigen_state(mconfig, type, tag) { }
|
||||
|
||||
UINT8 m_alpha_tile_bank;
|
||||
virtual void update_interrupts();
|
||||
DECLARE_READ16_MEMBER(special_port2_r);
|
||||
DECLARE_WRITE16_MEMBER(latch_w);
|
||||
DECLARE_READ16_MEMBER(thunderj_atarivc_r);
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
|
||||
double m_brightness;
|
||||
bitmap_ind16 m_pfbitmap;
|
||||
virtual void update_interrupts();
|
||||
DECLARE_WRITE16_MEMBER(interrupt_scan_w);
|
||||
DECLARE_READ16_MEMBER(special_port1_r);
|
||||
DECLARE_DRIVER_INIT(toobin);
|
||||
|
@ -15,6 +15,8 @@ public:
|
||||
UINT8 m_playfield_tile_bank;
|
||||
UINT16 m_playfield_xscroll;
|
||||
UINT16 m_playfield_yscroll;
|
||||
virtual void update_interrupts();
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
DECLARE_READ16_MEMBER(port1_r);
|
||||
DECLARE_DRIVER_INIT(vindictr);
|
||||
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
|
||||
|
@ -13,6 +13,7 @@ public:
|
||||
: atarigen_state(mconfig, type, tag) { }
|
||||
|
||||
UINT16 m_h256;
|
||||
virtual void update_interrupts();
|
||||
DECLARE_READ16_MEMBER(special_port1_r);
|
||||
DECLARE_DRIVER_INIT(xybots);
|
||||
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,7 @@
|
||||
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/er2055.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -59,10 +60,6 @@
|
||||
TYPES & STRUCTURES
|
||||
***************************************************************************/
|
||||
|
||||
typedef void (*atarigen_int_func)(running_machine &machine);
|
||||
|
||||
typedef void (*atarigen_scanline_func)(screen_device &screen, int scanline);
|
||||
|
||||
struct atarivc_state_desc
|
||||
{
|
||||
UINT32 latch1; /* latch #1 value (-1 means disabled) */
|
||||
@ -92,34 +89,82 @@ struct atarigen_screen_timer
|
||||
class atarigen_state : public driver_device
|
||||
{
|
||||
public:
|
||||
atarigen_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_earom(*this, "earom"),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_eeprom32(*this, "eeprom"),
|
||||
m_playfield(*this, "playfield"),
|
||||
m_playfield2(*this, "playfield2"),
|
||||
m_playfield_upper(*this, "playfield_up"),
|
||||
m_alpha(*this, "alpha"),
|
||||
m_alpha2(*this, "alpha2"),
|
||||
m_xscroll(*this, "xscroll"),
|
||||
m_yscroll(*this, "yscroll"),
|
||||
m_playfield32(*this, "playfield32"),
|
||||
m_alpha32(*this, "alpha32"),
|
||||
m_atarivc_data(*this, "atarivc_data"),
|
||||
m_atarivc_eof_data(*this, "atarivc_eof")
|
||||
{ }
|
||||
// construction/destruction
|
||||
atarigen_state(const machine_config &mconfig, device_type type, const char *tag);
|
||||
|
||||
// users must call through to these
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
virtual void device_post_load();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
|
||||
// callbacks provided by the derived class
|
||||
virtual void update_interrupts() = 0;
|
||||
virtual void scanline_update(screen_device &screen, int scanline);
|
||||
|
||||
// interrupt handling
|
||||
void scanline_int_set(screen_device &screen, int scanline);
|
||||
INTERRUPT_GEN_MEMBER(scanline_int_gen);
|
||||
DECLARE_WRITE16_MEMBER(scanline_int_ack_w);
|
||||
|
||||
// slapstic helpers
|
||||
void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, int chipnum);
|
||||
void slapstic_update_bank(int bank);
|
||||
DECLARE_DIRECT_UPDATE_MEMBER(slapstic_setdirect);
|
||||
DECLARE_WRITE16_MEMBER(slapstic_w);
|
||||
DECLARE_READ16_MEMBER(slapstic_r);
|
||||
|
||||
// sound I/O helpers
|
||||
void sound_io_reset();
|
||||
INTERRUPT_GEN_MEMBER(m6502_irq_gen);
|
||||
DECLARE_READ8_MEMBER(m6502_irq_ack_r);
|
||||
DECLARE_WRITE8_MEMBER(m6502_irq_ack_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(ym2151_irq_gen);
|
||||
DECLARE_WRITE16_MEMBER(sound_reset_w);
|
||||
void sound_cpu_reset();
|
||||
DECLARE_WRITE8_MEMBER(sound_w);
|
||||
DECLARE_READ8_MEMBER(sound_r);
|
||||
DECLARE_WRITE8_MEMBER(m6502_sound_w);
|
||||
DECLARE_READ8_MEMBER(m6502_sound_r);
|
||||
void update_m6502_irq();
|
||||
void delayed_sound_reset(int param);
|
||||
void delayed_sound_write(int data);
|
||||
void delayed_6502_write(int data);
|
||||
|
||||
// sound helpers
|
||||
void set_volume_by_type(int volume, device_type type);
|
||||
void set_ym2151_volume(int volume);
|
||||
void set_ym2413_volume(int volume);
|
||||
void set_pokey_volume(int volume);
|
||||
void set_tms5220_volume(int volume);
|
||||
void set_oki6295_volume(int volume);
|
||||
|
||||
// scanline timing
|
||||
void scanline_timer_reset(screen_device &screen, int frequency);
|
||||
void scanline_timer(emu_timer &timer, screen_device &screen, int scanline);
|
||||
|
||||
// video controller
|
||||
void atarivc_eof_update(emu_timer &timer, screen_device &screen);
|
||||
|
||||
// video helpers
|
||||
void halt_until_hblank_0(device_t &device, screen_device &screen);
|
||||
|
||||
// vector and early raster EAROM interface
|
||||
DECLARE_READ8_MEMBER( earom_r );
|
||||
DECLARE_WRITE8_MEMBER( earom_w );
|
||||
DECLARE_WRITE8_MEMBER( earom_control_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( ym2151_irq_gen );
|
||||
|
||||
// timer IDs
|
||||
enum
|
||||
{
|
||||
TID_SCANLINE_INTERRUPT,
|
||||
TID_SOUND_RESET,
|
||||
TID_SOUND_WRITE,
|
||||
TID_6502_WRITE,
|
||||
TID_SCANLINE_TIMER,
|
||||
TID_ATARIVC_EOF,
|
||||
TID_UNHALT_CPU
|
||||
};
|
||||
|
||||
// vector and early raster EAROM interface
|
||||
optional_device<er2055_device> m_earom;
|
||||
@ -149,36 +194,33 @@ public:
|
||||
optional_shared_ptr<UINT32> m_playfield32;
|
||||
optional_shared_ptr<UINT32> m_alpha32;
|
||||
|
||||
tilemap_t * m_playfield_tilemap;
|
||||
tilemap_t * m_playfield2_tilemap;
|
||||
tilemap_t * m_alpha_tilemap;
|
||||
tilemap_t * m_alpha2_tilemap;
|
||||
tilemap_t * m_playfield_tilemap;
|
||||
tilemap_t * m_playfield2_tilemap;
|
||||
tilemap_t * m_alpha_tilemap;
|
||||
tilemap_t * m_alpha2_tilemap;
|
||||
|
||||
optional_shared_ptr<UINT16> m_atarivc_data;
|
||||
optional_shared_ptr<UINT16> m_atarivc_eof_data;
|
||||
atarivc_state_desc m_atarivc_state;
|
||||
atarivc_state_desc m_atarivc_state;
|
||||
|
||||
/* internal state */
|
||||
atarigen_int_func m_update_int_callback;
|
||||
|
||||
UINT8 m_eeprom_unlocked;
|
||||
bool m_eeprom_unlocked;
|
||||
|
||||
UINT8 m_slapstic_num;
|
||||
UINT16 * m_slapstic;
|
||||
UINT8 m_slapstic_bank;
|
||||
void * m_slapstic_bank0;
|
||||
dynamic_buffer m_slapstic_bank0;
|
||||
offs_t m_slapstic_last_pc;
|
||||
offs_t m_slapstic_last_address;
|
||||
offs_t m_slapstic_base;
|
||||
offs_t m_slapstic_mirror;
|
||||
|
||||
device_t * m_sound_cpu;
|
||||
optional_device<m6502_device> m_sound_cpu;
|
||||
UINT8 m_cpu_to_sound;
|
||||
UINT8 m_sound_to_cpu;
|
||||
UINT8 m_timed_int;
|
||||
UINT8 m_ym2151_int;
|
||||
|
||||
atarigen_scanline_func m_scanline_callback;
|
||||
UINT32 m_scanlines_per_callback;
|
||||
|
||||
UINT32 m_actual_vc_latch0;
|
||||
@ -189,8 +231,6 @@ public:
|
||||
UINT32 m_playfield2_latch;
|
||||
|
||||
atarigen_screen_timer m_screen_timer[2];
|
||||
|
||||
DECLARE_DIRECT_UPDATE_MEMBER(atarigen_slapstic_setdirect);
|
||||
};
|
||||
|
||||
|
||||
@ -199,25 +239,10 @@ public:
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
OVERALL INIT
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
void atarigen_init(running_machine &machine);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
INTERRUPT HANDLING
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
void atarigen_interrupt_reset(atarigen_state *state, atarigen_int_func update_int);
|
||||
void atarigen_update_interrupts(running_machine &machine);
|
||||
|
||||
void atarigen_scanline_int_set(screen_device &screen, int scanline);
|
||||
INTERRUPT_GEN( atarigen_scanline_int_gen );
|
||||
DECLARE_WRITE16_HANDLER( atarigen_scanline_int_ack_w );
|
||||
DECLARE_WRITE32_HANDLER( atarigen_scanline_int_ack32_w );
|
||||
|
||||
INTERRUPT_GEN( atarigen_sound_int_gen );
|
||||
DECLARE_WRITE16_HANDLER( atarigen_sound_int_ack_w );
|
||||
DECLARE_WRITE32_HANDLER( atarigen_sound_int_ack32_w );
|
||||
@ -231,8 +256,6 @@ DECLARE_WRITE32_HANDLER( atarigen_video_int_ack32_w );
|
||||
EEPROM HANDLING
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
void atarigen_eeprom_reset(atarigen_state *state);
|
||||
|
||||
DECLARE_WRITE16_HANDLER( atarigen_eeprom_enable_w );
|
||||
DECLARE_WRITE16_HANDLER( atarigen_eeprom_w );
|
||||
DECLARE_READ16_HANDLER( atarigen_eeprom_r );
|
||||
@ -243,52 +266,6 @@ DECLARE_WRITE32_HANDLER( atarigen_eeprom32_w );
|
||||
DECLARE_READ32_HANDLER( atarigen_eeprom_upper32_r );
|
||||
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
SLAPSTIC HANDLING
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
void atarigen_slapstic_init(device_t *device, offs_t base, offs_t mirror, int chipnum);
|
||||
void atarigen_slapstic_reset(atarigen_state *state);
|
||||
|
||||
DECLARE_WRITE16_HANDLER( atarigen_slapstic_w );
|
||||
DECLARE_READ16_HANDLER( atarigen_slapstic_r );
|
||||
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
SOUND I/O
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
void atarigen_sound_io_reset(device_t *device);
|
||||
|
||||
INTERRUPT_GEN( atarigen_6502_irq_gen );
|
||||
DECLARE_READ8_HANDLER( atarigen_6502_irq_ack_r );
|
||||
DECLARE_WRITE8_HANDLER( atarigen_6502_irq_ack_w );
|
||||
|
||||
DECLARE_WRITE16_HANDLER( atarigen_sound_w );
|
||||
DECLARE_READ16_HANDLER( atarigen_sound_r );
|
||||
DECLARE_WRITE16_HANDLER( atarigen_sound_upper_w );
|
||||
DECLARE_READ16_HANDLER( atarigen_sound_upper_r );
|
||||
|
||||
DECLARE_WRITE32_HANDLER( atarigen_sound_upper32_w );
|
||||
DECLARE_READ32_HANDLER( atarigen_sound_upper32_r );
|
||||
|
||||
void atarigen_sound_reset(running_machine &machine);
|
||||
DECLARE_WRITE16_HANDLER( atarigen_sound_reset_w );
|
||||
DECLARE_WRITE8_HANDLER( atarigen_6502_sound_w );
|
||||
DECLARE_READ8_HANDLER( atarigen_6502_sound_r );
|
||||
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
SOUND HELPERS
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
void atarigen_set_ym2151_vol(running_machine &machine, int volume);
|
||||
void atarigen_set_ym2413_vol(running_machine &machine, int volume);
|
||||
void atarigen_set_pokey_vol(running_machine &machine, int volume);
|
||||
void atarigen_set_tms5220_vol(running_machine &machine, int volume);
|
||||
void atarigen_set_oki6295_vol(running_machine &machine, int volume);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
VIDEO CONTROLLER
|
||||
---------------------------------------------------------------*/
|
||||
@ -329,9 +306,7 @@ DECLARE_WRITE16_HANDLER( atarigen_playfield2_latched_msb_w );
|
||||
VIDEO HELPERS
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
void atarigen_scanline_timer_reset(screen_device &screen, atarigen_scanline_func update_graphics, int frequency);
|
||||
int atarigen_get_hblank(screen_device &screen);
|
||||
void atarigen_halt_until_hblank_0(screen_device &screen);
|
||||
DECLARE_WRITE16_HANDLER( atarigen_666_paletteram_w );
|
||||
DECLARE_WRITE16_HANDLER( atarigen_expanded_666_paletteram_w );
|
||||
DECLARE_WRITE32_HANDLER( atarigen_666_paletteram32_w );
|
||||
|
@ -36,10 +36,6 @@
|
||||
*************************************/
|
||||
|
||||
|
||||
static void hd68k_update_interrupts(running_machine &machine);
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
#pragma mark * DRIVER/MULTISYNC BOARD
|
||||
#endif
|
||||
@ -53,8 +49,7 @@ static void hd68k_update_interrupts(running_machine &machine);
|
||||
|
||||
MACHINE_START_MEMBER(harddriv_state,harddriv)
|
||||
{
|
||||
|
||||
atarigen_init(machine());
|
||||
atarigen_state::machine_start();
|
||||
|
||||
/* predetermine memory regions */
|
||||
m_sim_memory = (UINT16 *)memregion("user1")->base();
|
||||
@ -65,11 +60,9 @@ MACHINE_START_MEMBER(harddriv_state,harddriv)
|
||||
|
||||
MACHINE_RESET_MEMBER(harddriv_state,harddriv)
|
||||
{
|
||||
|
||||
/* generic reset */
|
||||
atarigen_eeprom_reset(this);
|
||||
atarigen_state::machine_reset();
|
||||
slapstic_reset();
|
||||
atarigen_interrupt_reset(this, hd68k_update_interrupts);
|
||||
|
||||
/* halt several of the DSPs to start */
|
||||
if (m_adsp != NULL) m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
@ -78,7 +71,7 @@ MACHINE_RESET_MEMBER(harddriv_state,harddriv)
|
||||
|
||||
/* if we found a 6502, reset the JSA board */
|
||||
if (m_jsacpu != NULL)
|
||||
atarijsa_reset();
|
||||
atarijsa_reset(machine());
|
||||
|
||||
m_last_gsp_shiftreg = 0;
|
||||
|
||||
@ -101,22 +94,21 @@ MACHINE_RESET_MEMBER(harddriv_state,harddriv)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void hd68k_update_interrupts(running_machine &machine)
|
||||
void harddriv_state::update_interrupts()
|
||||
{
|
||||
harddriv_state *state = machine.driver_data<harddriv_state>();
|
||||
state->m_maincpu->set_input_line(1, state->m_msp_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_maincpu->set_input_line(2, state->m_adsp_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_maincpu->set_input_line(3, state->m_gsp_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_maincpu->set_input_line(4, state->m_sound_int_state ? ASSERT_LINE : CLEAR_LINE); /* /LINKIRQ on STUN Runner */
|
||||
state->m_maincpu->set_input_line(5, state->m_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
state->m_maincpu->set_input_line(6, state->m_duart_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(1, m_msp_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(2, m_adsp_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(3, m_gsp_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(4, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE); /* /LINKIRQ on STUN Runner */
|
||||
m_maincpu->set_input_line(5, m_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_maincpu->set_input_line(6, m_duart_irq_state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
INTERRUPT_GEN_MEMBER(harddriv_state::hd68k_irq_gen)
|
||||
{
|
||||
m_irq_state = 1;
|
||||
atarigen_update_interrupts(machine());
|
||||
update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +116,7 @@ WRITE16_HANDLER( hd68k_irq_ack_w )
|
||||
{
|
||||
harddriv_state *state = space.machine().driver_data<harddriv_state>();
|
||||
state->m_irq_state = 0;
|
||||
atarigen_update_interrupts(space.machine());
|
||||
state->update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -132,7 +124,7 @@ void hdgsp_irq_gen(device_t *device, int irqstate)
|
||||
{
|
||||
harddriv_state *state = device->machine().driver_data<harddriv_state>();
|
||||
state->m_gsp_irq_state = irqstate;
|
||||
atarigen_update_interrupts(device->machine());
|
||||
state->update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -140,7 +132,7 @@ void hdmsp_irq_gen(device_t *device, int irqstate)
|
||||
{
|
||||
harddriv_state *state = device->machine().driver_data<harddriv_state>();
|
||||
state->m_msp_irq_state = irqstate;
|
||||
atarigen_update_interrupts(device->machine());
|
||||
state->update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -317,7 +309,7 @@ READ16_HANDLER( hd68k_sound_reset_r )
|
||||
{
|
||||
harddriv_state *state = space.machine().driver_data<harddriv_state>();
|
||||
if (state->m_jsacpu != NULL)
|
||||
atarijsa_reset();
|
||||
atarijsa_reset(space.machine());
|
||||
return ~0;
|
||||
}
|
||||
|
||||
@ -477,7 +469,7 @@ void harddriv_duart_irq_handler(device_t *device, int state, UINT8 vector)
|
||||
{
|
||||
harddriv_state *hd_state = device->machine().driver_data<harddriv_state>();
|
||||
hd_state->m_duart_irq_state = state;
|
||||
atarigen_update_interrupts(device->machine());
|
||||
hd_state->update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -756,7 +748,7 @@ WRITE16_HANDLER( hd68k_adsp_irq_clear_w )
|
||||
harddriv_state *state = space.machine().driver_data<harddriv_state>();
|
||||
logerror("%06X:68k clears ADSP interrupt\n", space.device().safe_pcbase());
|
||||
state->m_adsp_irq_state = 0;
|
||||
atarigen_update_interrupts(space.machine());
|
||||
state->update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
@ -830,7 +822,7 @@ WRITE16_HANDLER( hdadsp_special_w )
|
||||
case 6: /* /GINT */
|
||||
logerror("%04X:ADSP signals interrupt\n", space.device().safe_pcbase());
|
||||
state->m_adsp_irq_state = 1;
|
||||
atarigen_update_interrupts(space.machine());
|
||||
state->update_interrupts();
|
||||
break;
|
||||
|
||||
case 7: /* /MP */
|
||||
@ -1087,7 +1079,7 @@ WRITE16_HANDLER( hdds3_special_w )
|
||||
case 1:
|
||||
logerror("%04X:ADSP sets interrupt = %d\n", space.device().safe_pcbase(), (data >> 1) & 1);
|
||||
state->m_adsp_irq_state = (data >> 1) & 1;
|
||||
hd68k_update_interrupts(space.machine());
|
||||
state->update_interrupts();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@ -1180,7 +1172,7 @@ void hddsk_update_pif(dsp32c_device &device, UINT32 pins)
|
||||
{
|
||||
atarigen_state *atarigen = device.machine().driver_data<atarigen_state>();
|
||||
atarigen->m_sound_int_state = ((pins & DSP32_OUTPUT_PIF) != 0);
|
||||
hd68k_update_interrupts(device.machine());
|
||||
atarigen->update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
|
@ -87,16 +87,15 @@ WRITE16_HANDLER( atarig1_mo_control_w )
|
||||
}
|
||||
|
||||
|
||||
void atarig1_scanline_update(screen_device &screen, int scanline)
|
||||
void atarig1_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
atarig1_state *state = screen.machine().driver_data<atarig1_state>();
|
||||
UINT16 *base = &state->m_alpha[(scanline / 8) * 64 + 48];
|
||||
UINT16 *base = &m_alpha[(scanline / 8) * 64 + 48];
|
||||
int i;
|
||||
|
||||
//if (scanline == 0) logerror("-------\n");
|
||||
|
||||
/* keep in range */
|
||||
if (base >= &state->m_alpha[0x800])
|
||||
if (base >= &m_alpha[0x800])
|
||||
return;
|
||||
screen.update_partial(MAX(scanline - 1, 0));
|
||||
|
||||
@ -109,12 +108,12 @@ void atarig1_scanline_update(screen_device &screen, int scanline)
|
||||
word = *base++;
|
||||
if (word & 0x8000)
|
||||
{
|
||||
int newscroll = ((word >> 6) + state->m_pfscroll_xoffset) & 0x1ff;
|
||||
if (newscroll != state->m_playfield_xscroll)
|
||||
int newscroll = ((word >> 6) + m_pfscroll_xoffset) & 0x1ff;
|
||||
if (newscroll != m_playfield_xscroll)
|
||||
{
|
||||
screen.update_partial(MAX(scanline + i - 1, 0));
|
||||
state->m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
state->m_playfield_xscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
m_playfield_xscroll = newscroll;
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,17 +123,17 @@ void atarig1_scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
int newscroll = ((word >> 6) - (scanline + i)) & 0x1ff;
|
||||
int newbank = word & 7;
|
||||
if (newscroll != state->m_playfield_yscroll)
|
||||
if (newscroll != m_playfield_yscroll)
|
||||
{
|
||||
screen.update_partial(MAX(scanline + i - 1, 0));
|
||||
state->m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
state->m_playfield_yscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
m_playfield_yscroll = newscroll;
|
||||
}
|
||||
if (newbank != state->m_playfield_tile_bank)
|
||||
if (newbank != m_playfield_tile_bank)
|
||||
{
|
||||
screen.update_partial(MAX(scanline + i - 1, 0));
|
||||
state->m_playfield_tilemap->mark_all_dirty();
|
||||
state->m_playfield_tile_bank = newbank;
|
||||
m_playfield_tilemap->mark_all_dirty();
|
||||
m_playfield_tile_bank = newbank;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,16 +108,15 @@ WRITE16_HANDLER( atarig42_mo_control_w )
|
||||
}
|
||||
|
||||
|
||||
void atarig42_scanline_update(screen_device &screen, int scanline)
|
||||
void atarig42_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
atarig42_state *state = screen.machine().driver_data<atarig42_state>();
|
||||
UINT16 *base = &state->m_alpha[(scanline / 8) * 64 + 48];
|
||||
UINT16 *base = &m_alpha[(scanline / 8) * 64 + 48];
|
||||
int i;
|
||||
|
||||
if (scanline == 0) logerror("-------\n");
|
||||
|
||||
/* keep in range */
|
||||
if (base >= &state->m_alpha[0x800])
|
||||
if (base >= &m_alpha[0x800])
|
||||
return;
|
||||
|
||||
/* update the playfield scrolls */
|
||||
@ -130,19 +129,19 @@ void atarig42_scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
int newscroll = (word >> 5) & 0x3ff;
|
||||
int newbank = word & 0x1f;
|
||||
if (newscroll != state->m_playfield_xscroll)
|
||||
if (newscroll != m_playfield_xscroll)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
state->m_playfield_xscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
m_playfield_xscroll = newscroll;
|
||||
}
|
||||
if (newbank != state->m_playfield_color_bank)
|
||||
if (newbank != m_playfield_color_bank)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->mark_all_dirty();
|
||||
state->m_playfield_color_bank = newbank;
|
||||
m_playfield_tilemap->mark_all_dirty();
|
||||
m_playfield_color_bank = newbank;
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,19 +150,19 @@ void atarig42_scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
int newscroll = ((word >> 6) - (scanline + i)) & 0x1ff;
|
||||
int newbank = word & 7;
|
||||
if (newscroll != state->m_playfield_yscroll)
|
||||
if (newscroll != m_playfield_yscroll)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
state->m_playfield_yscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
m_playfield_yscroll = newscroll;
|
||||
}
|
||||
if (newbank != state->m_playfield_tile_bank)
|
||||
if (newbank != m_playfield_tile_bank)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->mark_all_dirty();
|
||||
state->m_playfield_tile_bank = newbank;
|
||||
m_playfield_tilemap->mark_all_dirty();
|
||||
m_playfield_tile_bank = newbank;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -162,14 +162,13 @@ UINT16 atarigt_state::atarigt_colorram_r(offs_t address)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void atarigt_scanline_update(screen_device &screen, int scanline)
|
||||
void atarigt_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
atarigt_state *state = screen.machine().driver_data<atarigt_state>();
|
||||
UINT32 *base = &state->m_alpha32[(scanline / 8) * 32 + 24];
|
||||
UINT32 *base = &m_alpha32[(scanline / 8) * 32 + 24];
|
||||
int i;
|
||||
|
||||
/* keep in range */
|
||||
if (base >= &state->m_alpha32[0x400])
|
||||
if (base >= &m_alpha32[0x400])
|
||||
return;
|
||||
|
||||
/* update the playfield scrolls */
|
||||
@ -181,19 +180,19 @@ void atarigt_scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
int newscroll = (word >> 21) & 0x3ff;
|
||||
int newbank = (word >> 16) & 0x1f;
|
||||
if (newscroll != state->m_playfield_xscroll)
|
||||
if (newscroll != m_playfield_xscroll)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
state->m_playfield_xscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
m_playfield_xscroll = newscroll;
|
||||
}
|
||||
if (newbank != state->m_playfield_color_bank)
|
||||
if (newbank != m_playfield_color_bank)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->set_palette_offset((newbank & 0x1f) << 8);
|
||||
state->m_playfield_color_bank = newbank;
|
||||
m_playfield_tilemap->set_palette_offset((newbank & 0x1f) << 8);
|
||||
m_playfield_color_bank = newbank;
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,19 +200,19 @@ void atarigt_scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
int newscroll = ((word >> 6) - (scanline + i)) & 0x1ff;
|
||||
int newbank = word & 15;
|
||||
if (newscroll != state->m_playfield_yscroll)
|
||||
if (newscroll != m_playfield_yscroll)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
state->m_playfield_yscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
m_playfield_yscroll = newscroll;
|
||||
}
|
||||
if (newbank != state->m_playfield_tile_bank)
|
||||
if (newbank != m_playfield_tile_bank)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->mark_all_dirty();
|
||||
state->m_playfield_tile_bank = newbank;
|
||||
m_playfield_tilemap->mark_all_dirty();
|
||||
m_playfield_tile_bank = newbank;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,16 +108,15 @@ WRITE16_HANDLER( atarigx2_mo_control_w )
|
||||
}
|
||||
|
||||
|
||||
void atarigx2_scanline_update(screen_device &screen, int scanline)
|
||||
void atarigx2_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
atarigx2_state *state = screen.machine().driver_data<atarigx2_state>();
|
||||
UINT32 *base = &state->m_alpha32[(scanline / 8) * 32 + 24];
|
||||
UINT32 *base = &m_alpha32[(scanline / 8) * 32 + 24];
|
||||
int i;
|
||||
|
||||
if (scanline == 0) logerror("-------\n");
|
||||
|
||||
/* keep in range */
|
||||
if (base >= &state->m_alpha32[0x400])
|
||||
if (base >= &m_alpha32[0x400])
|
||||
return;
|
||||
|
||||
/* update the playfield scrolls */
|
||||
@ -129,19 +128,19 @@ void atarigx2_scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
int newscroll = (word >> 21) & 0x3ff;
|
||||
int newbank = (word >> 16) & 0x1f;
|
||||
if (newscroll != state->m_playfield_xscroll)
|
||||
if (newscroll != m_playfield_xscroll)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
state->m_playfield_xscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrollx(0, newscroll);
|
||||
m_playfield_xscroll = newscroll;
|
||||
}
|
||||
if (newbank != state->m_playfield_color_bank)
|
||||
if (newbank != m_playfield_color_bank)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->mark_all_dirty();
|
||||
state->m_playfield_color_bank = newbank;
|
||||
m_playfield_tilemap->mark_all_dirty();
|
||||
m_playfield_color_bank = newbank;
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,19 +148,19 @@ void atarigx2_scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
int newscroll = ((word >> 6) - (scanline + i)) & 0x1ff;
|
||||
int newbank = word & 15;
|
||||
if (newscroll != state->m_playfield_yscroll)
|
||||
if (newscroll != m_playfield_yscroll)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
state->m_playfield_yscroll = newscroll;
|
||||
m_playfield_tilemap->set_scrolly(0, newscroll);
|
||||
m_playfield_yscroll = newscroll;
|
||||
}
|
||||
if (newbank != state->m_playfield_tile_bank)
|
||||
if (newbank != m_playfield_tile_bank)
|
||||
{
|
||||
if (scanline + i > 0)
|
||||
screen.update_partial(scanline + i - 1);
|
||||
state->m_playfield_tilemap->mark_all_dirty();
|
||||
state->m_playfield_tile_bank = newbank;
|
||||
m_playfield_tilemap->mark_all_dirty();
|
||||
m_playfield_tile_bank = newbank;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ WRITE16_HANDLER( atarisy1_bankselect_w )
|
||||
if (diff & 0x0080)
|
||||
{
|
||||
space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, (newselect & 0x0080) ? CLEAR_LINE : ASSERT_LINE);
|
||||
if (!(newselect & 0x0080)) atarigen_sound_reset(space.machine());
|
||||
if (!(newselect & 0x0080)) state->sound_cpu_reset();
|
||||
}
|
||||
|
||||
/* if MO or playfield banks change, force a partial update */
|
||||
@ -386,7 +386,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3off_callback)
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
/* clear the state */
|
||||
atarigen_scanline_int_ack_w(space, 0, 0, 0xffff);
|
||||
scanline_int_ack_w(space, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -395,7 +395,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3_callback)
|
||||
int scanline = param;
|
||||
|
||||
/* update the state */
|
||||
atarigen_scanline_int_gen(machine().device("maincpu"));
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
|
||||
/* set a timer to turn it off */
|
||||
m_int3off_timer->adjust(machine().primary_screen->scan_period());
|
||||
|
@ -117,14 +117,12 @@ VIDEO_START_MEMBER(batman_state,batman)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void batman_scanline_update(screen_device &screen, int scanline)
|
||||
void batman_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
batman_state *state = screen.machine().driver_data<batman_state>();
|
||||
|
||||
/* update the scanline parameters */
|
||||
if (scanline <= screen.visible_area().max_y && state->m_atarivc_state.rowscroll_enable)
|
||||
if (scanline <= screen.visible_area().max_y && m_atarivc_state.rowscroll_enable)
|
||||
{
|
||||
UINT16 *base = &state->m_alpha[scanline / 8 * 64 + 48];
|
||||
UINT16 *base = &m_alpha[scanline / 8 * 64 + 48];
|
||||
int scan, i;
|
||||
|
||||
for (scan = 0; scan < 8; scan++, scanline++)
|
||||
@ -136,46 +134,46 @@ void batman_scanline_update(screen_device &screen, int scanline)
|
||||
case 9:
|
||||
if (scanline > 0)
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_atarivc_state.mo_xscroll = (data >> 7) & 0x1ff;
|
||||
atarimo_set_xscroll(0, state->m_atarivc_state.mo_xscroll);
|
||||
m_atarivc_state.mo_xscroll = (data >> 7) & 0x1ff;
|
||||
atarimo_set_xscroll(0, m_atarivc_state.mo_xscroll);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
if (scanline > 0)
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_atarivc_state.pf1_xscroll_raw = (data >> 7) & 0x1ff;
|
||||
atarivc_update_pf_xscrolls(state);
|
||||
state->m_playfield_tilemap->set_scrollx(0, state->m_atarivc_state.pf0_xscroll);
|
||||
state->m_playfield2_tilemap->set_scrollx(0, state->m_atarivc_state.pf1_xscroll);
|
||||
m_atarivc_state.pf1_xscroll_raw = (data >> 7) & 0x1ff;
|
||||
atarivc_update_pf_xscrolls(this);
|
||||
m_playfield_tilemap->set_scrollx(0, m_atarivc_state.pf0_xscroll);
|
||||
m_playfield2_tilemap->set_scrollx(0, m_atarivc_state.pf1_xscroll);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if (scanline > 0)
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_atarivc_state.pf0_xscroll_raw = (data >> 7) & 0x1ff;
|
||||
atarivc_update_pf_xscrolls(state);
|
||||
state->m_playfield_tilemap->set_scrollx(0, state->m_atarivc_state.pf0_xscroll);
|
||||
m_atarivc_state.pf0_xscroll_raw = (data >> 7) & 0x1ff;
|
||||
atarivc_update_pf_xscrolls(this);
|
||||
m_playfield_tilemap->set_scrollx(0, m_atarivc_state.pf0_xscroll);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
if (scanline > 0)
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_atarivc_state.mo_yscroll = (data >> 7) & 0x1ff;
|
||||
atarimo_set_yscroll(0, state->m_atarivc_state.mo_yscroll);
|
||||
m_atarivc_state.mo_yscroll = (data >> 7) & 0x1ff;
|
||||
atarimo_set_yscroll(0, m_atarivc_state.mo_yscroll);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
if (scanline > 0)
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_atarivc_state.pf1_yscroll = (data >> 7) & 0x1ff;
|
||||
state->m_playfield2_tilemap->set_scrolly(0, state->m_atarivc_state.pf1_yscroll);
|
||||
m_atarivc_state.pf1_yscroll = (data >> 7) & 0x1ff;
|
||||
m_playfield2_tilemap->set_scrolly(0, m_atarivc_state.pf1_yscroll);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (scanline > 0)
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_atarivc_state.pf0_yscroll = (data >> 7) & 0x1ff;
|
||||
state->m_playfield_tilemap->set_scrolly(0, state->m_atarivc_state.pf0_yscroll);
|
||||
m_atarivc_state.pf0_yscroll = (data >> 7) & 0x1ff;
|
||||
m_playfield_tilemap->set_scrolly(0, m_atarivc_state.pf0_yscroll);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -89,29 +89,27 @@ VIDEO_START_MEMBER(blstroid_state,blstroid)
|
||||
|
||||
TIMER_CALLBACK_MEMBER(blstroid_state::irq_off)
|
||||
{
|
||||
address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
|
||||
/* clear the interrupt */
|
||||
atarigen_scanline_int_ack_w(space, 0, 0, 0xffff);
|
||||
address_space &space = subdevice("maincpu")->memory().space(AS_PROGRAM);
|
||||
scanline_int_ack_w(space, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
TIMER_CALLBACK_MEMBER(blstroid_state::irq_on)
|
||||
{
|
||||
/* generate the interrupt */
|
||||
atarigen_scanline_int_gen(machine().device("maincpu"));
|
||||
atarigen_update_interrupts(machine());
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
update_interrupts();
|
||||
}
|
||||
|
||||
|
||||
void blstroid_scanline_update(screen_device &screen, int scanline)
|
||||
void blstroid_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
blstroid_state *state = screen.machine().driver_data<blstroid_state>();
|
||||
int offset = (scanline / 8) * 64 + 40;
|
||||
|
||||
/* check for interrupts */
|
||||
if (offset < 0x1000)
|
||||
if (state->m_playfield[offset] & 0x8000)
|
||||
if (m_playfield[offset] & 0x8000)
|
||||
{
|
||||
int width, vpos;
|
||||
attotime period_on;
|
||||
@ -129,8 +127,8 @@ void blstroid_scanline_update(screen_device &screen, int scanline)
|
||||
period_on = screen.time_until_pos(vpos + 7, width * 0.9);
|
||||
period_off = screen.time_until_pos(vpos + 8, width * 0.9);
|
||||
|
||||
screen.machine().scheduler().timer_set(period_on, timer_expired_delegate(FUNC(blstroid_state::irq_on),state));
|
||||
screen.machine().scheduler().timer_set(period_off, timer_expired_delegate(FUNC(blstroid_state::irq_off),state));
|
||||
screen.machine().scheduler().timer_set(period_on, timer_expired_delegate(FUNC(blstroid_state::irq_on), this));
|
||||
screen.machine().scheduler().timer_set(period_off, timer_expired_delegate(FUNC(blstroid_state::irq_off), this));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,17 +256,16 @@ READ16_HANDLER( cyberbal_paletteram_1_r )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void cyberbal_scanline_update(screen_device &screen, int scanline)
|
||||
void cyberbal_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
cyberbal_state *state = screen.machine().driver_data<cyberbal_state>();
|
||||
int i;
|
||||
screen_device *update_screen;
|
||||
|
||||
/* loop over screens */
|
||||
screen_device_iterator iter(screen.machine().root_device());
|
||||
screen_device_iterator iter(*this);
|
||||
for (i = 0, update_screen = iter.first(); update_screen != NULL; i++, update_screen = iter.next())
|
||||
{
|
||||
UINT16 *vram = i ? state->m_alpha2 : state->m_alpha;
|
||||
UINT16 *vram = i ? m_alpha2 : m_alpha;
|
||||
UINT16 *base = &vram[((scanline - 8) / 8) * 64 + 47];
|
||||
|
||||
/* keep in range */
|
||||
@ -278,44 +277,44 @@ void cyberbal_scanline_update(screen_device &screen, int scanline)
|
||||
/* update the current parameters */
|
||||
if (!(base[3] & 1))
|
||||
{
|
||||
if (((base[3] >> 1) & 7) != state->m_playfield_palette_bank[i])
|
||||
if (((base[3] >> 1) & 7) != m_playfield_palette_bank[i])
|
||||
{
|
||||
if (scanline > 0)
|
||||
update_screen->update_partial(scanline - 1);
|
||||
state->m_playfield_palette_bank[i] = (base[3] >> 1) & 7;
|
||||
(i ? state->m_playfield2_tilemap : state->m_playfield_tilemap)->set_palette_offset(state->m_playfield_palette_bank[i] << 8);
|
||||
m_playfield_palette_bank[i] = (base[3] >> 1) & 7;
|
||||
(i ? m_playfield2_tilemap : m_playfield_tilemap)->set_palette_offset(m_playfield_palette_bank[i] << 8);
|
||||
}
|
||||
}
|
||||
if (!(base[4] & 1))
|
||||
{
|
||||
int newscroll = 2 * (((base[4] >> 7) + 4) & 0x1ff);
|
||||
if (newscroll != state->m_playfield_xscroll[i])
|
||||
if (newscroll != m_playfield_xscroll[i])
|
||||
{
|
||||
if (scanline > 0)
|
||||
update_screen->update_partial(scanline - 1);
|
||||
(i ? state->m_playfield2_tilemap : state->m_playfield_tilemap)->set_scrollx(0, newscroll);
|
||||
state->m_playfield_xscroll[i] = newscroll;
|
||||
(i ? m_playfield2_tilemap : m_playfield_tilemap)->set_scrollx(0, newscroll);
|
||||
m_playfield_xscroll[i] = newscroll;
|
||||
}
|
||||
}
|
||||
if (!(base[5] & 1))
|
||||
{
|
||||
/* a new vscroll latches the offset into a counter; we must adjust for this */
|
||||
int newscroll = ((base[5] >> 7) - (scanline)) & 0x1ff;
|
||||
if (newscroll != state->m_playfield_yscroll[i])
|
||||
if (newscroll != m_playfield_yscroll[i])
|
||||
{
|
||||
if (scanline > 0)
|
||||
update_screen->update_partial(scanline - 1);
|
||||
(i ? state->m_playfield2_tilemap : state->m_playfield_tilemap)->set_scrolly(0, newscroll);
|
||||
state->m_playfield_yscroll[i] = newscroll;
|
||||
(i ? m_playfield2_tilemap : m_playfield_tilemap)->set_scrolly(0, newscroll);
|
||||
m_playfield_yscroll[i] = newscroll;
|
||||
}
|
||||
}
|
||||
if (!(base[7] & 1))
|
||||
{
|
||||
if (state->m_current_slip[i] != base[7])
|
||||
if (m_current_slip[i] != base[7])
|
||||
{
|
||||
if (scanline > 0)
|
||||
update_screen->update_partial(scanline - 1);
|
||||
state->m_current_slip[i] = base[7];
|
||||
m_current_slip[i] = base[7];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -205,17 +205,15 @@ VIDEO_START_MEMBER(eprom_state,guts)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void eprom_scanline_update(screen_device &screen, int scanline)
|
||||
void eprom_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
eprom_state *state = screen.machine().driver_data<eprom_state>();
|
||||
|
||||
/* update the playfield */
|
||||
if (scanline == 0)
|
||||
{
|
||||
int xscroll = (state->m_alpha[0x780] >> 7) & 0x1ff;
|
||||
int yscroll = (state->m_alpha[0x781] >> 7) & 0x1ff;
|
||||
state->m_playfield_tilemap->set_scrollx(0, xscroll);
|
||||
state->m_playfield_tilemap->set_scrolly(0, yscroll);
|
||||
int xscroll = (m_alpha[0x780] >> 7) & 0x1ff;
|
||||
int yscroll = (m_alpha[0x781] >> 7) & 0x1ff;
|
||||
m_playfield_tilemap->set_scrollx(0, xscroll);
|
||||
m_playfield_tilemap->set_scrolly(0, yscroll);
|
||||
atarimo_set_xscroll(0, xscroll);
|
||||
atarimo_set_yscroll(0, yscroll);
|
||||
}
|
||||
|
@ -136,16 +136,15 @@ WRITE16_HANDLER( vindictr_paletteram_w )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void vindictr_scanline_update(screen_device &screen, int scanline)
|
||||
void vindictr_state::scanline_update(screen_device &screen, int scanline)
|
||||
{
|
||||
vindictr_state *state = screen.machine().driver_data<vindictr_state>();
|
||||
UINT16 *base = &state->m_alpha[((scanline - 8) / 8) * 64 + 42];
|
||||
UINT16 *base = &m_alpha[((scanline - 8) / 8) * 64 + 42];
|
||||
int x;
|
||||
|
||||
/* keep in range */
|
||||
if (base < state->m_alpha)
|
||||
if (base < m_alpha)
|
||||
base += 0x7c0;
|
||||
else if (base >= &state->m_alpha[0x7c0])
|
||||
else if (base >= &m_alpha[0x7c0])
|
||||
return;
|
||||
|
||||
/* update the current parameters */
|
||||
@ -156,20 +155,20 @@ void vindictr_scanline_update(screen_device &screen, int scanline)
|
||||
switch ((data >> 9) & 7)
|
||||
{
|
||||
case 2: /* /PFB */
|
||||
if (state->m_playfield_tile_bank != (data & 7))
|
||||
if (m_playfield_tile_bank != (data & 7))
|
||||
{
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_playfield_tile_bank = data & 7;
|
||||
state->m_playfield_tilemap->mark_all_dirty();
|
||||
m_playfield_tile_bank = data & 7;
|
||||
m_playfield_tilemap->mark_all_dirty();
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* /PFHSLD */
|
||||
if (state->m_playfield_xscroll != (data & 0x1ff))
|
||||
if (m_playfield_xscroll != (data & 0x1ff))
|
||||
{
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_playfield_tilemap->set_scrollx(0, data);
|
||||
state->m_playfield_xscroll = data & 0x1ff;
|
||||
m_playfield_tilemap->set_scrollx(0, data);
|
||||
m_playfield_xscroll = data & 0x1ff;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -185,7 +184,7 @@ void vindictr_scanline_update(screen_device &screen, int scanline)
|
||||
break;
|
||||
|
||||
case 6: /* /VIRQ */
|
||||
atarigen_scanline_int_gen(screen.machine().device("maincpu"));
|
||||
scanline_int_gen(*subdevice("maincpu"));
|
||||
break;
|
||||
|
||||
case 7: /* /PFVS */
|
||||
@ -196,10 +195,10 @@ void vindictr_scanline_update(screen_device &screen, int scanline)
|
||||
if (offset > visible_area.max_y)
|
||||
offset -= visible_area.max_y + 1;
|
||||
|
||||
if (state->m_playfield_yscroll != ((data - offset) & 0x1ff))
|
||||
if (m_playfield_yscroll != ((data - offset) & 0x1ff))
|
||||
{
|
||||
screen.update_partial(scanline - 1);
|
||||
state->m_playfield_tilemap->set_scrolly(0, data - offset);
|
||||
m_playfield_tilemap->set_scrolly(0, data - offset);
|
||||
atarimo_set_yscroll(0, (data - offset) & 0x1ff);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user