mirror of
https://github.com/holub/mame
synced 2025-07-02 16:49:22 +03:00
atarigen.cpp : Updates
Simplify handlers, Reduce unnecessary lines, Fix debugger issues, Fix notes, Use shorter type values, Fix spacings badlands.cpp, gauntlet.cpp : Fix irq acknowlodge behavior
This commit is contained in:
parent
dcf6e1c61b
commit
c9921f5bdc
@ -271,7 +271,7 @@ void atari_jsa_base_device::device_reset()
|
|||||||
|
|
||||||
WRITE8_MEMBER( atari_jsa_base_device::main_command_w )
|
WRITE8_MEMBER( atari_jsa_base_device::main_command_w )
|
||||||
{
|
{
|
||||||
m_soundcomm->main_command_w(space, offset, data);
|
m_soundcomm->main_command_w(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ WRITE8_MEMBER( atari_jsa_base_device::main_command_w )
|
|||||||
|
|
||||||
READ8_MEMBER( atari_jsa_base_device::main_response_r )
|
READ8_MEMBER( atari_jsa_base_device::main_response_r )
|
||||||
{
|
{
|
||||||
return m_soundcomm->main_response_r(space, offset);
|
return m_soundcomm->main_response_r();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ READ8_MEMBER( atari_jsa_base_device::main_response_r )
|
|||||||
|
|
||||||
WRITE16_MEMBER( atari_jsa_base_device::sound_reset_w )
|
WRITE16_MEMBER( atari_jsa_base_device::sound_reset_w )
|
||||||
{
|
{
|
||||||
m_soundcomm->sound_reset_w(space, offset, data);
|
m_soundcomm->sound_reset_w();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -663,7 +663,7 @@ READ16_MEMBER(atarisy2_state::sound_r)
|
|||||||
update_interrupts();
|
update_interrupts();
|
||||||
|
|
||||||
/* handle it normally otherwise */
|
/* handle it normally otherwise */
|
||||||
return m_soundcomm->main_response_r(space,offset) | 0xff00;
|
return m_soundcomm->main_response_r() | 0xff00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -674,7 +674,7 @@ WRITE8_MEMBER(atarisy2_state::sound_6502_w)
|
|||||||
update_interrupts();
|
update_interrupts();
|
||||||
|
|
||||||
/* handle it normally otherwise */
|
/* handle it normally otherwise */
|
||||||
m_soundcomm->sound_response_w(space, offset, data);
|
m_soundcomm->sound_response_w(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -685,7 +685,7 @@ READ8_MEMBER(atarisy2_state::sound_6502_r)
|
|||||||
update_interrupts();
|
update_interrupts();
|
||||||
|
|
||||||
/* handle it normally otherwise */
|
/* handle it normally otherwise */
|
||||||
return m_soundcomm->sound_command_r(space, offset);
|
return m_soundcomm->sound_command_r();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ READ8_MEMBER(badlands_state::audio_io_r)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x002: /* /RDP */
|
case 0x002: /* /RDP */
|
||||||
result = m_soundcomm->sound_command_r(space, offset);
|
result = m_soundcomm->sound_command_r();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x004: /* /RDIO */
|
case 0x004: /* /RDIO */
|
||||||
@ -295,7 +295,7 @@ READ8_MEMBER(badlands_state::audio_io_r)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x006: /* /IRQACK */
|
case 0x006: /* /IRQACK */
|
||||||
m_soundcomm->sound_irq_ack_r(space, 0);
|
m_soundcomm->sound_irq_ack_r();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x200: /* /VOICE */
|
case 0x200: /* /VOICE */
|
||||||
@ -321,7 +321,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x006: /* /IRQACK */
|
case 0x006: /* /IRQACK */
|
||||||
m_soundcomm->sound_irq_ack_r(space, 0);
|
m_soundcomm->sound_irq_ack_w();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x200: /* n/c */
|
case 0x200: /* n/c */
|
||||||
@ -329,7 +329,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x202: /* /WRP */
|
case 0x202: /* /WRP */
|
||||||
m_soundcomm->sound_response_w(space, offset, data);
|
m_soundcomm->sound_response_w(data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x204: /* WRIO */
|
case 0x204: /* WRIO */
|
||||||
|
@ -148,13 +148,11 @@ void gauntlet_state::update_interrupts()
|
|||||||
|
|
||||||
void gauntlet_state::scanline_update(screen_device &screen, int scanline)
|
void gauntlet_state::scanline_update(screen_device &screen, int scanline)
|
||||||
{
|
{
|
||||||
address_space &space = m_audiocpu->space(AS_PROGRAM);
|
|
||||||
|
|
||||||
/* sound IRQ is on 32V */
|
/* sound IRQ is on 32V */
|
||||||
if (scanline & 32)
|
if (scanline & 32)
|
||||||
m_soundcomm->sound_irq_gen(*m_audiocpu);
|
m_soundcomm->sound_irq_gen(*m_audiocpu);
|
||||||
else
|
else
|
||||||
m_soundcomm->sound_irq_ack_r(space, 0);
|
m_soundcomm->sound_irq_ack_w();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ void klax_state::scanline_update(screen_device &screen, int scanline)
|
|||||||
|
|
||||||
WRITE16_MEMBER(klax_state::interrupt_ack_w)
|
WRITE16_MEMBER(klax_state::interrupt_ack_w)
|
||||||
{
|
{
|
||||||
scanline_int_ack_w(space, offset, data, mem_mask);
|
scanline_int_ack_w();
|
||||||
video_int_ack_w(space, offset, data, mem_mask);
|
video_int_ack_w();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// copyright-holders:Aaron Giles
|
// copyright-holders:Aaron Giles
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
atarigen.c
|
atarigen.cpp
|
||||||
|
|
||||||
General functions for Atari games.
|
General functions for Atari games.
|
||||||
|
|
||||||
@ -54,16 +54,16 @@ DEFINE_DEVICE_TYPE(ATARI_SOUND_COMM, atari_sound_comm_device, "atarscom", "Atari
|
|||||||
// atari_sound_comm_device - constructor
|
// atari_sound_comm_device - constructor
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||||
: device_t(mconfig, ATARI_SOUND_COMM, tag, owner, clock),
|
: device_t(mconfig, ATARI_SOUND_COMM, tag, owner, clock)
|
||||||
m_main_int_cb(*this),
|
, m_main_int_cb(*this)
|
||||||
m_sound_cpu(*this, finder_base::DUMMY_TAG),
|
, m_sound_cpu(*this, finder_base::DUMMY_TAG)
|
||||||
m_main_to_sound_ready(false),
|
, m_main_to_sound_ready(false)
|
||||||
m_sound_to_main_ready(false),
|
, m_sound_to_main_ready(false)
|
||||||
m_main_to_sound_data(0),
|
, m_main_to_sound_data(0)
|
||||||
m_sound_to_main_data(0),
|
, m_sound_to_main_data(0)
|
||||||
m_timed_int(0),
|
, m_timed_int(0)
|
||||||
m_ym2151_int(0)
|
, m_ym2151_int(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,14 +149,17 @@ void atari_sound_comm_device::sound_irq()
|
|||||||
// can be used.
|
// can be used.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
READ8_MEMBER(atari_sound_comm_device::sound_irq_ack_r)
|
u8 atari_sound_comm_device::sound_irq_ack_r()
|
||||||
{
|
{
|
||||||
|
if (!machine().side_effects_disabled())
|
||||||
|
{
|
||||||
m_timed_int = 0;
|
m_timed_int = 0;
|
||||||
update_sound_irq();
|
update_sound_irq();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(atari_sound_comm_device::sound_irq_ack_w)
|
void atari_sound_comm_device::sound_irq_ack_w(u8 data)
|
||||||
{
|
{
|
||||||
m_timed_int = 0;
|
m_timed_int = 0;
|
||||||
update_sound_irq();
|
update_sound_irq();
|
||||||
@ -180,7 +183,7 @@ WRITE_LINE_MEMBER(atari_sound_comm_device::ym2151_irq_gen)
|
|||||||
// sound CPU in response.
|
// sound CPU in response.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
WRITE16_MEMBER(atari_sound_comm_device::sound_reset_w)
|
void atari_sound_comm_device::sound_reset_w(u16 data)
|
||||||
{
|
{
|
||||||
synchronize(TID_SOUND_RESET);
|
synchronize(TID_SOUND_RESET);
|
||||||
}
|
}
|
||||||
@ -193,7 +196,7 @@ WRITE16_MEMBER(atari_sound_comm_device::sound_reset_w)
|
|||||||
// the upper 8 bits.
|
// the upper 8 bits.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
WRITE8_MEMBER(atari_sound_comm_device::main_command_w)
|
void atari_sound_comm_device::main_command_w(u8 data)
|
||||||
{
|
{
|
||||||
synchronize(TID_SOUND_WRITE, data);
|
synchronize(TID_SOUND_WRITE, data);
|
||||||
}
|
}
|
||||||
@ -206,10 +209,13 @@ WRITE8_MEMBER(atari_sound_comm_device::main_command_w)
|
|||||||
// byte in the upper 8 bits.
|
// byte in the upper 8 bits.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
READ8_MEMBER(atari_sound_comm_device::main_response_r)
|
u8 atari_sound_comm_device::main_response_r()
|
||||||
{
|
{
|
||||||
|
if (!machine().side_effects_disabled())
|
||||||
|
{
|
||||||
m_sound_to_main_ready = false;
|
m_sound_to_main_ready = false;
|
||||||
m_main_int_cb(CLEAR_LINE);
|
m_main_int_cb(CLEAR_LINE);
|
||||||
|
}
|
||||||
return m_sound_to_main_data;
|
return m_sound_to_main_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +225,7 @@ READ8_MEMBER(atari_sound_comm_device::main_response_r)
|
|||||||
// sound CPU to the main CPU.
|
// sound CPU to the main CPU.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
WRITE8_MEMBER(atari_sound_comm_device::sound_response_w)
|
void atari_sound_comm_device::sound_response_w(u8 data)
|
||||||
{
|
{
|
||||||
synchronize(TID_6502_WRITE, data);
|
synchronize(TID_6502_WRITE, data);
|
||||||
}
|
}
|
||||||
@ -231,10 +237,13 @@ WRITE8_MEMBER(atari_sound_comm_device::sound_response_w)
|
|||||||
// CPU.
|
// CPU.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
READ8_MEMBER(atari_sound_comm_device::sound_command_r)
|
u8 atari_sound_comm_device::sound_command_r()
|
||||||
{
|
{
|
||||||
|
if (!machine().side_effects_disabled())
|
||||||
|
{
|
||||||
m_main_to_sound_ready = false;
|
m_main_to_sound_ready = false;
|
||||||
m_sound_cpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
m_sound_cpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
|
||||||
|
}
|
||||||
return m_main_to_sound_data;
|
return m_main_to_sound_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,7 +298,7 @@ void atari_sound_comm_device::delayed_sound_write(int data)
|
|||||||
{
|
{
|
||||||
// warn if we missed something
|
// warn if we missed something
|
||||||
if (m_main_to_sound_ready)
|
if (m_main_to_sound_ready)
|
||||||
logerror("Missed command from 68010\n");
|
logerror("Missed command from 680x0\n");
|
||||||
|
|
||||||
// set up the states and signal an NMI to the sound CPU
|
// set up the states and signal an NMI to the sound CPU
|
||||||
m_main_to_sound_data = data;
|
m_main_to_sound_data = data;
|
||||||
@ -326,23 +335,23 @@ void atari_sound_comm_device::delayed_6502_write(int data)
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
atarigen_state::atarigen_state(const machine_config &mconfig, device_type type, const char *tag)
|
atarigen_state::atarigen_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag)
|
||||||
m_scanline_int_state(0),
|
, m_scanline_int_state(0)
|
||||||
m_video_int_state(0),
|
, m_video_int_state(0)
|
||||||
m_xscroll(*this, "xscroll"),
|
, m_xscroll(*this, "xscroll")
|
||||||
m_yscroll(*this, "yscroll"),
|
, m_yscroll(*this, "yscroll")
|
||||||
m_slapstic_num(0),
|
, m_slapstic_num(0)
|
||||||
m_slapstic(nullptr),
|
, m_slapstic(nullptr)
|
||||||
m_slapstic_bank(0),
|
, m_slapstic_bank(0)
|
||||||
m_slapstic_last_pc(0),
|
, m_slapstic_last_pc(0)
|
||||||
m_slapstic_last_address(0),
|
, m_slapstic_last_address(0)
|
||||||
m_slapstic_base(0),
|
, m_slapstic_base(0)
|
||||||
m_slapstic_mirror(0),
|
, m_slapstic_mirror(0)
|
||||||
m_scanlines_per_callback(0),
|
, m_scanlines_per_callback(0)
|
||||||
m_maincpu(*this, "maincpu"),
|
, m_maincpu(*this, "maincpu")
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
, m_gfxdecode(*this, "gfxdecode")
|
||||||
m_screen(*this, "screen"),
|
, m_screen(*this, "screen")
|
||||||
m_slapstic_device(*this, ":slapstic")
|
, m_slapstic_device(*this, ":slapstic")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,7 +458,7 @@ WRITE_LINE_MEMBER(atarigen_state::scanline_int_write_line)
|
|||||||
// scanline interrupt.
|
// scanline interrupt.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
WRITE16_MEMBER(atarigen_state::scanline_int_ack_w)
|
void atarigen_state::scanline_int_ack_w(u16 data)
|
||||||
{
|
{
|
||||||
m_scanline_int_state = 0;
|
m_scanline_int_state = 0;
|
||||||
update_interrupts();
|
update_interrupts();
|
||||||
@ -476,7 +485,7 @@ WRITE_LINE_MEMBER(atarigen_state::video_int_write_line)
|
|||||||
// interrupt.
|
// interrupt.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
WRITE16_MEMBER(atarigen_state::video_int_ack_w)
|
void atarigen_state::video_int_ack_w(u16 data)
|
||||||
{
|
{
|
||||||
m_video_int_state = 0;
|
m_video_int_state = 0;
|
||||||
update_interrupts();
|
update_interrupts();
|
||||||
@ -522,7 +531,7 @@ void atarigen_state::device_post_load()
|
|||||||
// slapstic and sets the chip number.
|
// slapstic and sets the chip number.
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, uint8_t *mem)
|
void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, u8 *mem)
|
||||||
{
|
{
|
||||||
if (!m_slapstic_device.found())
|
if (!m_slapstic_device.found())
|
||||||
fatalerror("Slapstic device is missing\n");
|
fatalerror("Slapstic device is missing\n");
|
||||||
@ -534,7 +543,7 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t
|
|||||||
// install the memory handlers
|
// install the memory handlers
|
||||||
address_space &program = device.space(AS_PROGRAM);
|
address_space &program = device.space(AS_PROGRAM);
|
||||||
program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, 0, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this));
|
program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, 0, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this));
|
||||||
m_slapstic = (uint16_t *)mem;
|
m_slapstic = (u16 *)mem;
|
||||||
|
|
||||||
// allocate memory for a copy of bank 0
|
// allocate memory for a copy of bank 0
|
||||||
m_slapstic_bank0.resize(0x2000);
|
m_slapstic_bank0.resize(0x2000);
|
||||||
@ -577,8 +586,11 @@ READ16_MEMBER(atarigen_state::slapstic_r)
|
|||||||
// fetch the result from the current bank first
|
// fetch the result from the current bank first
|
||||||
int result = m_slapstic[offset & 0xfff];
|
int result = m_slapstic[offset & 0xfff];
|
||||||
|
|
||||||
|
if (!machine().side_effects_disabled())
|
||||||
|
{
|
||||||
// then determine the new one
|
// then determine the new one
|
||||||
slapstic_update_bank(m_slapstic_device->slapstic_tweak(space, offset));
|
slapstic_update_bank(m_slapstic_device->slapstic_tweak(space, offset));
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -663,26 +675,24 @@ void atarigen_state::blend_gfx(int gfx0, int gfx1, int mask0, int mask1)
|
|||||||
{
|
{
|
||||||
gfx_element *gx0 = m_gfxdecode->gfx(gfx0);
|
gfx_element *gx0 = m_gfxdecode->gfx(gfx0);
|
||||||
gfx_element *gx1 = m_gfxdecode->gfx(gfx1);
|
gfx_element *gx1 = m_gfxdecode->gfx(gfx1);
|
||||||
uint8_t *srcdata, *dest;
|
|
||||||
int c, x, y;
|
|
||||||
|
|
||||||
// allocate memory for the assembled data
|
// allocate memory for the assembled data
|
||||||
srcdata = auto_alloc_array(machine(), uint8_t, gx0->elements() * gx0->width() * gx0->height());
|
u8 *srcdata = auto_alloc_array(machine(), u8, gx0->elements() * gx0->width() * gx0->height());
|
||||||
|
|
||||||
// loop over elements
|
// loop over elements
|
||||||
dest = srcdata;
|
u8 *dest = srcdata;
|
||||||
for (c = 0; c < gx0->elements(); c++)
|
for (int c = 0; c < gx0->elements(); c++)
|
||||||
{
|
{
|
||||||
const uint8_t *c0base = gx0->get_data(c);
|
const u8 *c0base = gx0->get_data(c);
|
||||||
const uint8_t *c1base = gx1->get_data(c);
|
const u8 *c1base = gx1->get_data(c);
|
||||||
|
|
||||||
// loop over height
|
// loop over height
|
||||||
for (y = 0; y < gx0->height(); y++)
|
for (int y = 0; y < gx0->height(); y++)
|
||||||
{
|
{
|
||||||
const uint8_t *c0 = c0base;
|
const u8 *c0 = c0base;
|
||||||
const uint8_t *c1 = c1base;
|
const u8 *c1 = c1base;
|
||||||
|
|
||||||
for (x = 0; x < gx0->width(); x++)
|
for (int x = 0; x < gx0->width(); x++)
|
||||||
*dest++ = (*c0++ & mask0) | (*c1++ & mask1);
|
*dest++ = (*c0++ & mask0) | (*c1++ & mask1);
|
||||||
c0base += gx0->rowbytes();
|
c0base += gx0->rowbytes();
|
||||||
c1base += gx1->rowbytes();
|
c1base += gx1->rowbytes();
|
||||||
|
@ -49,12 +49,12 @@ public:
|
|||||||
// construction/destruction
|
// construction/destruction
|
||||||
template <typename T>
|
template <typename T>
|
||||||
atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cputag)
|
atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cputag)
|
||||||
: atari_sound_comm_device(mconfig, tag, owner, (uint32_t)0)
|
: atari_sound_comm_device(mconfig, tag, owner, (u32)0)
|
||||||
{
|
{
|
||||||
m_sound_cpu.set_tag(std::forward<T>(cputag));
|
m_sound_cpu.set_tag(std::forward<T>(cputag));
|
||||||
}
|
}
|
||||||
|
|
||||||
atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||||
|
|
||||||
// configuration helpers
|
// configuration helpers
|
||||||
auto int_callback() { return m_main_int_cb.bind(); }
|
auto int_callback() { return m_main_int_cb.bind(); }
|
||||||
@ -64,16 +64,16 @@ public:
|
|||||||
DECLARE_READ_LINE_MEMBER(sound_to_main_ready) { return m_sound_to_main_ready ? ASSERT_LINE : CLEAR_LINE; }
|
DECLARE_READ_LINE_MEMBER(sound_to_main_ready) { return m_sound_to_main_ready ? ASSERT_LINE : CLEAR_LINE; }
|
||||||
|
|
||||||
// main cpu accessors (forward internally to the atari_sound_comm_device)
|
// main cpu accessors (forward internally to the atari_sound_comm_device)
|
||||||
DECLARE_WRITE8_MEMBER(main_command_w);
|
void main_command_w(u8 data);
|
||||||
DECLARE_READ8_MEMBER(main_response_r);
|
u8 main_response_r();
|
||||||
DECLARE_WRITE16_MEMBER(sound_reset_w);
|
void sound_reset_w(u16 data = 0);
|
||||||
|
|
||||||
// sound cpu accessors
|
// sound cpu accessors
|
||||||
void sound_cpu_reset() { synchronize(TID_SOUND_RESET, 1); }
|
void sound_cpu_reset() { synchronize(TID_SOUND_RESET, 1); }
|
||||||
DECLARE_WRITE8_MEMBER(sound_response_w);
|
void sound_response_w(u8 data);
|
||||||
DECLARE_READ8_MEMBER(sound_command_r);
|
u8 sound_command_r();
|
||||||
DECLARE_WRITE8_MEMBER(sound_irq_ack_w);
|
void sound_irq_ack_w(u8 data = 0);
|
||||||
DECLARE_READ8_MEMBER(sound_irq_ack_r);
|
u8 sound_irq_ack_r();
|
||||||
INTERRUPT_GEN_MEMBER(sound_irq_gen);
|
INTERRUPT_GEN_MEMBER(sound_irq_gen);
|
||||||
void sound_irq();
|
void sound_irq();
|
||||||
|
|
||||||
@ -108,10 +108,10 @@ private:
|
|||||||
required_device<m6502_device> m_sound_cpu;
|
required_device<m6502_device> m_sound_cpu;
|
||||||
bool m_main_to_sound_ready;
|
bool m_main_to_sound_ready;
|
||||||
bool m_sound_to_main_ready;
|
bool m_sound_to_main_ready;
|
||||||
uint8_t m_main_to_sound_data;
|
u8 m_main_to_sound_data;
|
||||||
uint8_t m_sound_to_main_data;
|
u8 m_sound_to_main_data;
|
||||||
uint8_t m_timed_int;
|
u8 m_timed_int;
|
||||||
uint8_t m_ym2151_int;
|
u8 m_ym2151_int;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -147,13 +147,13 @@ protected:
|
|||||||
// interrupt handling
|
// interrupt handling
|
||||||
void scanline_int_set(screen_device &screen, int scanline);
|
void scanline_int_set(screen_device &screen, int scanline);
|
||||||
DECLARE_WRITE_LINE_MEMBER(scanline_int_write_line);
|
DECLARE_WRITE_LINE_MEMBER(scanline_int_write_line);
|
||||||
DECLARE_WRITE16_MEMBER(scanline_int_ack_w);
|
void scanline_int_ack_w(u16 data = 0);
|
||||||
|
|
||||||
DECLARE_WRITE_LINE_MEMBER(video_int_write_line);
|
DECLARE_WRITE_LINE_MEMBER(video_int_write_line);
|
||||||
DECLARE_WRITE16_MEMBER(video_int_ack_w);
|
void video_int_ack_w(u16 data = 0);
|
||||||
|
|
||||||
// slapstic helpers
|
// slapstic helpers
|
||||||
void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, uint8_t *mem);
|
void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, u8 *mem);
|
||||||
void slapstic_update_bank(int bank);
|
void slapstic_update_bank(int bank);
|
||||||
DECLARE_WRITE16_MEMBER(slapstic_w);
|
DECLARE_WRITE16_MEMBER(slapstic_w);
|
||||||
DECLARE_READ16_MEMBER(slapstic_r);
|
DECLARE_READ16_MEMBER(slapstic_r);
|
||||||
@ -178,23 +178,23 @@ protected:
|
|||||||
TID_ATARIGEN_LAST
|
TID_ATARIGEN_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t m_scanline_int_state;
|
u8 m_scanline_int_state;
|
||||||
uint8_t m_video_int_state;
|
u8 m_video_int_state;
|
||||||
|
|
||||||
optional_shared_ptr<uint16_t> m_xscroll;
|
optional_shared_ptr<u16> m_xscroll;
|
||||||
optional_shared_ptr<uint16_t> m_yscroll;
|
optional_shared_ptr<u16> m_yscroll;
|
||||||
|
|
||||||
/* internal state */
|
/* internal state */
|
||||||
uint8_t m_slapstic_num;
|
u8 m_slapstic_num;
|
||||||
uint16_t * m_slapstic;
|
u16 * m_slapstic;
|
||||||
uint8_t m_slapstic_bank;
|
u8 m_slapstic_bank;
|
||||||
std::vector<uint8_t> m_slapstic_bank0;
|
std::vector<u8> m_slapstic_bank0;
|
||||||
offs_t m_slapstic_last_pc;
|
offs_t m_slapstic_last_pc;
|
||||||
offs_t m_slapstic_last_address;
|
offs_t m_slapstic_last_address;
|
||||||
offs_t m_slapstic_base;
|
offs_t m_slapstic_base;
|
||||||
offs_t m_slapstic_mirror;
|
offs_t m_slapstic_mirror;
|
||||||
|
|
||||||
uint32_t m_scanlines_per_callback;
|
u32 m_scanlines_per_callback;
|
||||||
|
|
||||||
|
|
||||||
atarigen_screen_timer m_screen_timer[2];
|
atarigen_screen_timer m_screen_timer[2];
|
||||||
@ -218,29 +218,29 @@ private:
|
|||||||
|
|
||||||
Driver Pr? Up? VC? PF? P2? MO? AL? BM? PH?
|
Driver Pr? Up? VC? PF? P2? MO? AL? BM? PH?
|
||||||
---------- --- --- --- --- --- --- --- --- ---
|
---------- --- --- --- --- --- --- --- --- ---
|
||||||
arcadecl.c * * *
|
arcadecl.cpp * * *
|
||||||
atarig1.c * * rle *
|
atarig1.cpp * * rle *
|
||||||
atarig42.c * * rle *
|
atarig42.cpp * * rle *
|
||||||
atarigt.c * rle *
|
atarigt.cpp * rle *
|
||||||
atarigx2.c * rle *
|
atarigx2.cpp * rle *
|
||||||
atarisy1.c * * * * * 270->260
|
atarisy1.cpp * * * * * 270->260
|
||||||
atarisy2.c * * * * * 150->120
|
atarisy2.cpp * * * * * 150->120
|
||||||
badlands.c * * * 250->260
|
badlands.cpp * * * 250->260
|
||||||
batman.c * * * * * * * * 200->160 ?
|
batman.cpp * * * * * * * * 200->160 ?
|
||||||
blstroid.c * * * 240->230
|
blstroid.cpp * * * 240->230
|
||||||
cyberbal.c * * * * 125->105 ?
|
cyberbal.cpp * * * * 125->105 ?
|
||||||
eprom.c * * * * 170->170
|
eprom.cpp * * * * 170->170
|
||||||
gauntlet.c * * * * * * 220->250
|
gauntlet.cpp * * * * * * 220->250
|
||||||
klax.c * * * * 480->440 ?
|
klax.cpp * * * * 480->440 ?
|
||||||
offtwall.c * * * * 260->260
|
offtwall.cpp * * * * 260->260
|
||||||
rampart.c * * * 280->280
|
rampart.cpp * * * 280->280
|
||||||
relief.c * * * * * * 240->240
|
relief.cpp * * * * * * 240->240
|
||||||
shuuz.c * * * * 410->290 fix!
|
shuuz.cpp * * * * 410->290 fix!
|
||||||
skullxbo.c * * * * 150->145
|
skullxbo.cpp * * * * 150->145
|
||||||
thunderj.c * * * * * * * 180->180
|
thunderj.cpp * * * * * * * 180->180
|
||||||
toobin.c * * * * 140->115 fix!
|
toobin.cpp * * * * 140->115 fix!
|
||||||
vindictr.c * * * * * * 200->210
|
vindictr.cpp * * * * * * 200->210
|
||||||
xybots.c * * * * * 235->238
|
xybots.cpp * * * * * 235->238
|
||||||
---------- --- --- --- --- --- --- --- --- ---
|
---------- --- --- --- --- --- --- --- --- ---
|
||||||
|
|
||||||
Pr? - do we have verifiable proof on priorities?
|
Pr? - do we have verifiable proof on priorities?
|
||||||
|
@ -353,10 +353,8 @@ WRITE16_MEMBER( atarisy1_state::atarisy1_spriteram_w )
|
|||||||
|
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3off_callback)
|
TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3off_callback)
|
||||||
{
|
{
|
||||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
|
||||||
|
|
||||||
/* clear the state */
|
/* clear the state */
|
||||||
scanline_int_ack_w(space, 0, 0);
|
scanline_int_ack_w();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,13 +85,11 @@ VIDEO_START_MEMBER(blstroid_state,blstroid)
|
|||||||
|
|
||||||
void blstroid_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
void blstroid_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||||
{
|
{
|
||||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
|
||||||
|
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case TIMER_IRQ_OFF:
|
case TIMER_IRQ_OFF:
|
||||||
/* clear the interrupt */
|
/* clear the interrupt */
|
||||||
scanline_int_ack_w(space, 0, 0);
|
scanline_int_ack_w();
|
||||||
break;
|
break;
|
||||||
case TIMER_IRQ_ON:
|
case TIMER_IRQ_ON:
|
||||||
/* generate the interrupt */
|
/* generate the interrupt */
|
||||||
|
Loading…
Reference in New Issue
Block a user