summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-04-08 14:49:47 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-04-08 14:49:54 -0400
commit31ff9e8cea38027c00f807b91974c30a5fe57286 (patch)
tree48bc53d5fddbdb6a43bd62d689f284b4824b3e0e
parent9981d3bfb52b0b2c39073656b06a2caecdfe7361 (diff)
aztarac: Acknowledge main interrupt; UBR access is 8-bit (nw)
-rw-r--r--src/mame/drivers/aztarac.cpp7
-rw-r--r--src/mame/includes/aztarac.h4
-rw-r--r--src/mame/video/aztarac.cpp10
3 files changed, 15 insertions, 6 deletions
diff --git a/src/mame/drivers/aztarac.cpp b/src/mame/drivers/aztarac.cpp
index 7298469af14..43c8dc6fb72 100644
--- a/src/mame/drivers/aztarac.cpp
+++ b/src/mame/drivers/aztarac.cpp
@@ -18,7 +18,6 @@
#include "emu.h"
#include "includes/aztarac.h"
-#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
@@ -89,7 +88,8 @@ void aztarac_state::main_map(address_map &map)
map(0x02700c, 0x02700d).portr("DIAL");
map(0x02700e, 0x02700f).r("watchdog", FUNC(watchdog_timer_device::reset16_r));
map(0xff8000, 0xffafff).ram().share("vectorram");
- map(0xffb000, 0xffb001).w(FUNC(aztarac_state::ubr_w));
+ map(0xffb000, 0xffb001).nopr();
+ map(0xffb001, 0xffb001).w(FUNC(aztarac_state::ubr_w));
map(0xffe000, 0xffffff).ram();
}
@@ -155,7 +155,6 @@ void aztarac_state::aztarac(machine_config &config)
/* basic machine hardware */
m68000_device &maincpu(M68000(config, m_maincpu, 16_MHz_XTAL / 2));
maincpu.set_addrmap(AS_PROGRAM, &aztarac_state::main_map);
- maincpu.set_vblank_int("screen", FUNC(aztarac_state::irq4_line_hold));
maincpu.set_cpu_space(AS_PROGRAM);
Z80(config, m_audiocpu, 16_MHz_XTAL / 8);
@@ -173,7 +172,7 @@ void aztarac_state::aztarac(machine_config &config)
m_screen->set_size(400, 300);
m_screen->set_visarea(0, 1024-1, 0, 768-1);
m_screen->set_screen_update("vector", FUNC(vector_device::screen_update));
-
+ m_screen->screen_vblank().set(FUNC(aztarac_state::video_interrupt));
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/includes/aztarac.h b/src/mame/includes/aztarac.h
index 61110cbf21b..116944048e0 100644
--- a/src/mame/includes/aztarac.h
+++ b/src/mame/includes/aztarac.h
@@ -6,6 +6,7 @@
*************************************************************************/
+#include "cpu/m68000/m68000.h"
#include "machine/gen_latch.h"
#include "machine/x2212.h"
#include "video/vector.h"
@@ -39,7 +40,7 @@ public:
void nvram_store_w(uint16_t data);
DECLARE_READ16_MEMBER(joystick_r);
- DECLARE_WRITE16_MEMBER(ubr_w);
+ void ubr_w(uint8_t data);
DECLARE_READ16_MEMBER(sound_r);
DECLARE_WRITE16_MEMBER(sound_w);
DECLARE_READ8_MEMBER(snd_command_r);
@@ -50,6 +51,7 @@ public:
virtual void machine_reset() override;
virtual void video_start() override;
+ DECLARE_WRITE_LINE_MEMBER(video_interrupt);
INTERRUPT_GEN_MEMBER(snd_timed_irq);
inline void read_vectorram(uint16_t *vectorram, int addr, int *x, int *y, int *c);
diff --git a/src/mame/video/aztarac.cpp b/src/mame/video/aztarac.cpp
index f6c1558d71a..ed2176115b3 100644
--- a/src/mame/video/aztarac.cpp
+++ b/src/mame/video/aztarac.cpp
@@ -14,6 +14,12 @@ m_vector->add_point (m_xcenter + ((x) << 16), m_ycenter - ((y) << 16), color, in
+WRITE_LINE_MEMBER(aztarac_state::video_interrupt)
+{
+ if (state)
+ m_maincpu->set_input_line(M68K_IRQ_4, ASSERT_LINE);
+}
+
inline void aztarac_state::read_vectorram(uint16_t *vectorram, int addr, int *x, int *y, int *c)
{
*c = vectorram[addr] & 0xffff;
@@ -23,11 +29,13 @@ inline void aztarac_state::read_vectorram(uint16_t *vectorram, int addr, int *x,
if (*y & 0x200) *y |= 0xfffffc00;
}
-WRITE16_MEMBER(aztarac_state::ubr_w)
+void aztarac_state::ubr_w(uint8_t data)
{
int x, y, c, intensity, xoffset, yoffset, color;
int defaddr, objaddr=0, ndefs;
+ m_maincpu->set_input_line(M68K_IRQ_4, CLEAR_LINE);
+
if (data) /* data is the global intensity (always 0xff in Aztarac). */
{
m_vector->clear_list();