mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
aztarac: Acknowledge main interrupt; UBR access is 8-bit (nw)
This commit is contained in:
parent
9981d3bfb5
commit
31ff9e8cea
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user