summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-11-30 23:27:14 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-11-30 23:27:14 -0500
commitd026809d9c71f76078b349ce8f635cfe8b9b5e42 (patch)
tree9a89f839a9c49056178c9a53d6ba1a91cf8cb2ef
parent7679eb7f44e12efab49074e6e2cc64d2ba26831d (diff)
atarigen.cpp: Continue pulling stuff out of this grab-bag (nw)
-rw-r--r--src/mame/drivers/arcadecl.cpp3
-rw-r--r--src/mame/drivers/atarig1.cpp3
-rw-r--r--src/mame/drivers/atarig42.cpp3
-rw-r--r--src/mame/drivers/atarigt.cpp14
-rw-r--r--src/mame/drivers/atarigx2.cpp3
-rw-r--r--src/mame/drivers/atarisy2.cpp4
-rw-r--r--src/mame/drivers/badlands.cpp2
-rw-r--r--src/mame/drivers/badlandsbl.cpp1
-rw-r--r--src/mame/drivers/blstroid.cpp3
-rw-r--r--src/mame/drivers/cyberbal.cpp1
-rw-r--r--src/mame/drivers/cybstorm.cpp1
-rw-r--r--src/mame/drivers/gauntlet.cpp3
-rw-r--r--src/mame/drivers/klax.cpp9
-rw-r--r--src/mame/drivers/offtwall.cpp1
-rw-r--r--src/mame/drivers/rampart.cpp5
-rw-r--r--src/mame/drivers/shuuz.cpp3
-rw-r--r--src/mame/drivers/skullxbo.cpp5
-rw-r--r--src/mame/drivers/thunderj.cpp1
-rw-r--r--src/mame/drivers/xybots.cpp3
-rw-r--r--src/mame/includes/atarigt.h4
-rw-r--r--src/mame/includes/atarisy1.h3
-rw-r--r--src/mame/includes/atarisy2.h1
-rw-r--r--src/mame/includes/cyberbal.h3
-rw-r--r--src/mame/includes/eprom.h7
-rw-r--r--src/mame/includes/toobin.h5
-rw-r--r--src/mame/includes/vindictr.h8
-rw-r--r--src/mame/machine/atarigen.cpp16
-rw-r--r--src/mame/machine/atarigen.h4
-rw-r--r--src/mame/video/atarisy1.cpp2
-rw-r--r--src/mame/video/blstroid.cpp2
-rw-r--r--src/mame/video/cyberbal.cpp5
-rw-r--r--src/mame/video/eprom.cpp2
-rw-r--r--src/mame/video/toobin.cpp8
-rw-r--r--src/mame/video/vindictr.cpp6
34 files changed, 88 insertions, 56 deletions
diff --git a/src/mame/drivers/arcadecl.cpp b/src/mame/drivers/arcadecl.cpp
index 9602ded6763..7d58f6ffe2a 100644
--- a/src/mame/drivers/arcadecl.cpp
+++ b/src/mame/drivers/arcadecl.cpp
@@ -75,6 +75,7 @@
#include "machine/watchdog.h"
#include "sound/okim6295.h"
#include "video/atarimo.h"
+#include "emupal.h"
#include "speaker.h"
@@ -97,7 +98,7 @@ void sparkz_state::scanline_update(screen_device &screen, int scanline)
{
/* generate 32V signals */
if ((scanline & 32) == 0)
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
}
diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp
index 1954f8f11b0..6934ab3593a 100644
--- a/src/mame/drivers/atarig1.cpp
+++ b/src/mame/drivers/atarig1.cpp
@@ -24,6 +24,7 @@
#include "includes/atarig1.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
@@ -191,7 +192,7 @@ void atarig1_state::main_map(address_map &map)
map(0xfd0000, 0xfd0000).r(m_jsa, FUNC(atari_jsa_ii_device::main_response_r));
map(0xfd8000, 0xfdffff).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask16(0x00ff);
/* AM_RANGE(0xfe0000, 0xfe7fff) AM_READ(from_r)*/
- map(0xfe8000, 0xfe89ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0xfe8000, 0xfe89ff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0xff0000, 0xffffff).ram();
map(0xff0000, 0xff0fff).ram().share("rle");
map(0xff2000, 0xff2001).w(FUNC(atarig1_state::mo_command_w)).share("mo_command");
diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp
index 42b285144b3..c1eee3b258b 100644
--- a/src/mame/drivers/atarig42.cpp
+++ b/src/mame/drivers/atarig42.cpp
@@ -23,6 +23,7 @@
#include "includes/atarig42.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
@@ -334,7 +335,7 @@ void atarig42_state::main_map(address_map &map)
map(0xf60000, 0xf60001).r(m_asic65, FUNC(asic65_device::read));
map(0xf80000, 0xf80003).w(m_asic65, FUNC(asic65_device::data_w));
map(0xfa0000, 0xfa0fff).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask16(0x00ff);
- map(0xfc0000, 0xfc0fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0xfc0000, 0xfc0fff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0xff0000, 0xffffff).ram();
map(0xff0000, 0xff0fff).ram().share("rle");
map(0xff2000, 0xff5fff).w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield");
diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp
index 3fed7dafbdc..1a4e99d4c5a 100644
--- a/src/mame/drivers/atarigt.cpp
+++ b/src/mame/drivers/atarigt.cpp
@@ -65,7 +65,7 @@
/*************************************
*
- * Initialization
+ * Interrupt handling
*
*************************************/
@@ -76,6 +76,18 @@ void atarigt_state::update_interrupts()
}
+INTERRUPT_GEN_MEMBER(atarigt_state::scanline_int_gen)
+{
+ scanline_int_write_line(1);
+}
+
+
+/*************************************
+ *
+ * Initialization
+ *
+ *************************************/
+
MACHINE_RESET_MEMBER(atarigt_state,atarigt)
{
atarigen_state::machine_reset();
diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp
index 5045ab47363..a6ba2754488 100644
--- a/src/mame/drivers/atarigx2.cpp
+++ b/src/mame/drivers/atarigx2.cpp
@@ -29,6 +29,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/eeprompar.h"
+#include "emupal.h"
#include "speaker.h"
@@ -1192,7 +1193,7 @@ void atarigx2_state::main_map(address_map &map)
map(0xc80000, 0xc80fff).ram();
map(0xd00000, 0xd0000f).r(FUNC(atarigx2_state::a2d_data_r)).umask32(0xff00ff00);
map(0xd20000, 0xd20fff).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask32(0xff00ff00);
- map(0xd40000, 0xd40fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette");
+ map(0xd40000, 0xd40fff).ram().w("palette", FUNC(palette_device::write32)).share("palette");
map(0xd70000, 0xd7ffff).ram();
map(0xd72000, 0xd75fff).w(m_playfield_tilemap, FUNC(tilemap_device::write32)).share("playfield");
map(0xd76000, 0xd76fff).w(m_alpha_tilemap, FUNC(tilemap_device::write32)).share("alpha");
diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp
index 51286c3ae25..8da5fd20a4e 100644
--- a/src/mame/drivers/atarisy2.cpp
+++ b/src/mame/drivers/atarisy2.cpp
@@ -183,7 +183,7 @@ void atarisy2_state::scanline_update(screen_device &screen, int scanline)
/* generate the 32V interrupt (IRQ 2) */
if ((scanline % 64) == 0)
if (m_interrupt_enable & 4)
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
}
}
@@ -736,7 +736,7 @@ void atarisy2_state::main_map(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0x0fff).ram();
- map(0x1000, 0x11ff).mirror(0x0200).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x1000, 0x11ff).mirror(0x0200).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0x1400, 0x1400).mirror(0x007e).r("adc", FUNC(adc0808_device::data_r));
map(0x1400, 0x1403).mirror(0x007c).w(FUNC(atarisy2_state::bankselect_w));
map(0x1480, 0x148f).mirror(0x0070).w("adc", FUNC(adc0808_device::address_offset_start_w)).umask16(0x00ff);
diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp
index 4a04e73c714..ac9a608f746 100644
--- a/src/mame/drivers/badlands.cpp
+++ b/src/mame/drivers/badlands.cpp
@@ -165,7 +165,7 @@ Measurements -
#include "emu.h"
#include "includes/badlands.h"
-
+#include "emupal.h"
/*************************************
diff --git a/src/mame/drivers/badlandsbl.cpp b/src/mame/drivers/badlandsbl.cpp
index 6531adb9a17..4a48e3cb031 100644
--- a/src/mame/drivers/badlandsbl.cpp
+++ b/src/mame/drivers/badlandsbl.cpp
@@ -41,6 +41,7 @@
#include "emu.h"
#include "includes/badlands.h"
+#include "emupal.h"
uint32_t badlandsbl_state::screen_update_badlandsbl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
diff --git a/src/mame/drivers/blstroid.cpp b/src/mame/drivers/blstroid.cpp
index cf8c6cc6633..649bb2f95c5 100644
--- a/src/mame/drivers/blstroid.cpp
+++ b/src/mame/drivers/blstroid.cpp
@@ -25,6 +25,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
@@ -81,7 +82,7 @@ void blstroid_state::main_map(address_map &map)
map(0x801804, 0x801805).mirror(0x0383f8).portr("DIAL1");
map(0x801c00, 0x801c01).mirror(0x0383fc).portr("IN0");
map(0x801c02, 0x801c03).mirror(0x0383fc).portr("IN1");
- map(0x802000, 0x8023ff).mirror(0x038c00).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x802000, 0x8023ff).mirror(0x038c00).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0x803000, 0x8033ff).mirror(0x038c00).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask16(0x00ff);
map(0x804000, 0x804fff).mirror(0x038000).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield");
map(0x805000, 0x805fff).mirror(0x038000).ram().share("mob");
diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp
index 17da5f86f78..25aeb9aa6a5 100644
--- a/src/mame/drivers/cyberbal.cpp
+++ b/src/mame/drivers/cyberbal.cpp
@@ -27,7 +27,6 @@
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
#include "sound/volt_reg.h"
-#include "diexec.h"
#include "speaker.h"
#include "rendlay.h"
diff --git a/src/mame/drivers/cybstorm.cpp b/src/mame/drivers/cybstorm.cpp
index f1deca086a0..eddde4c4a7d 100644
--- a/src/mame/drivers/cybstorm.cpp
+++ b/src/mame/drivers/cybstorm.cpp
@@ -20,6 +20,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp
index 76c70197809..07499f60bbf 100644
--- a/src/mame/drivers/gauntlet.cpp
+++ b/src/mame/drivers/gauntlet.cpp
@@ -129,6 +129,7 @@
#include "sound/tms5220.h"
#include "sound/ym2151.h"
#include "sound/pokey.h"
+#include "emupal.h"
#include "speaker.h"
@@ -300,7 +301,7 @@ void gauntlet_state::main_map(address_map &map)
map(0x905000, 0x905f7f).mirror(0x2c8000).ram().w(m_alpha_tilemap, FUNC(tilemap_device::write16)).share("alpha");
map(0x905f6e, 0x905f6f).mirror(0x2c8000).ram().w(FUNC(gauntlet_state::gauntlet_yscroll_w)).share("yscroll");
map(0x905f80, 0x905fff).mirror(0x2c8000).ram().share("mob:slip");
- map(0x910000, 0x9107ff).mirror(0x2cf800).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x910000, 0x9107ff).mirror(0x2cf800).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0x930000, 0x930001).mirror(0x2cfffe).w(FUNC(gauntlet_state::gauntlet_xscroll_w)).share("xscroll");
}
diff --git a/src/mame/drivers/klax.cpp b/src/mame/drivers/klax.cpp
index 3c59d49bb98..8f47baaa1af 100644
--- a/src/mame/drivers/klax.cpp
+++ b/src/mame/drivers/klax.cpp
@@ -28,6 +28,7 @@
#include "machine/watchdog.h"
#include "sound/okim6295.h"
#include "sound/msm5205.h"
+#include "emupal.h"
#include "speaker.h"
@@ -46,8 +47,8 @@ void klax_state::update_interrupts()
void klax_state::scanline_update(screen_device &screen, int scanline)
{
/* generate 32V signals */
- if ((scanline & 32) == 0 && !(m_p1->read() & 0x800))
- scanline_int_gen(*m_maincpu);
+ if ((scanline & 32) == 0 && !m_screen->vblank() && !(m_p1->read() & 0x800))
+ scanline_int_write_line(1);
}
@@ -89,7 +90,7 @@ void klax_state::klax_map(address_map &map)
map(0x270001, 0x270001).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x2e0000, 0x2e0001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x360000, 0x360001).w(FUNC(klax_state::interrupt_ack_w));
- map(0x3e0000, 0x3e07ff).rw(m_palette, FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0xff00).share("palette");
+ map(0x3e0000, 0x3e07ff).rw("palette", FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0xff00).share("palette");
map(0x3f0000, 0x3f0f7f).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield");
map(0x3f0f80, 0x3f0fff).ram().share("mob:slip");
map(0x3f1000, 0x3f1fff).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16_ext)).share("playfield_ext");
@@ -107,7 +108,7 @@ void klax_state::klax2bl_map(address_map &map)
map(0x260006, 0x260007).w(FUNC(klax_state::interrupt_ack_w));
// AM_RANGE(0x270000, 0x270001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // no OKI here
map(0x2e0000, 0x2e0001).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
- map(0x3e0000, 0x3e07ff).rw(m_palette, FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0xff00).share("palette");
+ map(0x3e0000, 0x3e07ff).rw("palette", FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0xff00).share("palette");
map(0x3f0000, 0x3f0f7f).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield");
map(0x3f0f80, 0x3f0fff).ram().share("mob:slip");
map(0x3f1000, 0x3f1fff).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16_ext)).share("playfield_ext");
diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp
index 66f0f30e074..726bfb624f7 100644
--- a/src/mame/drivers/offtwall.cpp
+++ b/src/mame/drivers/offtwall.cpp
@@ -25,6 +25,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp
index f18334c56c9..4bc1865f330 100644
--- a/src/mame/drivers/rampart.cpp
+++ b/src/mame/drivers/rampart.cpp
@@ -32,6 +32,7 @@
#include "machine/watchdog.h"
#include "sound/okim6295.h"
#include "sound/ym2413.h"
+#include "emupal.h"
#include "speaker.h"
@@ -54,7 +55,7 @@ void rampart_state::scanline_update(screen_device &screen, int scanline)
{
/* generate 32V signals */
if ((scanline & 32) == 0)
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
}
@@ -134,7 +135,7 @@ void rampart_state::main_map(address_map &map)
map(0x140000, 0x147fff).mirror(0x438000).rom(); /* slapstic goes here */
map(0x200000, 0x21ffff).ram().share("bitmap");
map(0x220000, 0x3bffff).nopw(); /* the code blasts right through this when initializing */
- map(0x3c0000, 0x3c07ff).mirror(0x019800).rw(m_palette, FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0xff00).share("palette");
+ map(0x3c0000, 0x3c07ff).mirror(0x019800).rw("palette", FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0xff00).share("palette");
map(0x3e0000, 0x3e07ff).mirror(0x010000).ram().share("mob");
map(0x3e0800, 0x3e3f3f).mirror(0x010000).ram();
map(0x3e3f40, 0x3e3f7f).mirror(0x010000).ram().share("mob:slip");
diff --git a/src/mame/drivers/shuuz.cpp b/src/mame/drivers/shuuz.cpp
index f54ee95b2c8..358ff950a99 100644
--- a/src/mame/drivers/shuuz.cpp
+++ b/src/mame/drivers/shuuz.cpp
@@ -26,6 +26,7 @@
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
#include "sound/okim6295.h"
+#include "emupal.h"
#include "speaker.h"
@@ -121,7 +122,7 @@ void shuuz_state::main_map(address_map &map)
map(0x105002, 0x105003).portr("BUTTONS");
map(0x106001, 0x106001).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x107000, 0x107007).noprw();
- map(0x3e0000, 0x3e07ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x3e0000, 0x3e07ff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0x3effc0, 0x3effff).rw(m_vad, FUNC(atari_vad_device::control_read), FUNC(atari_vad_device::control_write));
map(0x3f4000, 0x3f5eff).ram().w(m_vad, FUNC(atari_vad_device::playfield_latched_msb_w)).share("vad:playfield");
map(0x3f5f00, 0x3f5f7f).ram().share("vad:eof");
diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp
index 881b0d30157..5e4cf797de9 100644
--- a/src/mame/drivers/skullxbo.cpp
+++ b/src/mame/drivers/skullxbo.cpp
@@ -25,6 +25,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
@@ -44,7 +45,7 @@ void skullxbo_state::update_interrupts()
TIMER_DEVICE_CALLBACK_MEMBER(skullxbo_state::scanline_timer)
{
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
}
@@ -115,7 +116,7 @@ void skullxbo_state::main_map(address_map &map)
map(0xff1e80, 0xff1eff).w(FUNC(skullxbo_state::skullxbo_xscroll_w));
map(0xff1f00, 0xff1f7f).w(FUNC(skullxbo_state::scanline_int_ack_w));
map(0xff1f80, 0xff1fff).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
- map(0xff2000, 0xff2fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0xff2000, 0xff2fff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0xff4000, 0xff47ff).w(FUNC(skullxbo_state::skullxbo_yscroll_w)).share("yscroll");
map(0xff4800, 0xff4fff).w(FUNC(skullxbo_state::skullxbo_mobwr_w));
map(0xff5001, 0xff5001).r(m_jsa, FUNC(atari_jsa_ii_device::main_response_r));
diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp
index fcb435d9f19..055d4f10021 100644
--- a/src/mame/drivers/thunderj.cpp
+++ b/src/mame/drivers/thunderj.cpp
@@ -41,6 +41,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
diff --git a/src/mame/drivers/xybots.cpp b/src/mame/drivers/xybots.cpp
index 40d9889547a..ce1b395890c 100644
--- a/src/mame/drivers/xybots.cpp
+++ b/src/mame/drivers/xybots.cpp
@@ -25,6 +25,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/eeprompar.h"
#include "machine/watchdog.h"
+#include "emupal.h"
#include "speaker.h"
@@ -74,7 +75,7 @@ void xybots_state::main_map(address_map &map)
map(0x801000, 0x802dff).mirror(0x7f8000).ram();
map(0x802e00, 0x802fff).mirror(0x7f8000).ram().share("mob");
map(0x803000, 0x803fff).mirror(0x7f8000).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield");
- map(0x804000, 0x8047ff).mirror(0x7f8800).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x804000, 0x8047ff).mirror(0x7f8800).ram().w("palette", FUNC(palette_device::write16)).share("palette");
map(0x805000, 0x805fff).mirror(0x7f8000).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask16(0x00ff);
map(0x806000, 0x8060ff).mirror(0x7f8000).r(m_jsa, FUNC(atari_jsa_i_device::main_response_r)).umask16(0x00ff);
map(0x806100, 0x8061ff).mirror(0x7f8000).portr("FFE100");
diff --git a/src/mame/includes/atarigt.h b/src/mame/includes/atarigt.h
index 5c5e78a3adc..06d67b9812d 100644
--- a/src/mame/includes/atarigt.h
+++ b/src/mame/includes/atarigt.h
@@ -10,6 +10,7 @@
#include "machine/adc0808.h"
#include "machine/atarigen.h"
#include "video/atarirle.h"
+#include "emupal.h"
#define CRAM_ENTRIES 0x4000
#define TRAM_ENTRIES 0x4000
@@ -22,6 +23,7 @@ class atarigt_state : public atarigen_state
public:
atarigt_state(const machine_config &mconfig, device_type type, const char *tag) :
atarigen_state(mconfig, type, tag),
+ m_palette(*this, "palette"),
m_colorram(*this, "colorram", 32),
m_adc(*this, "adc"),
m_playfield_tilemap(*this, "playfield"),
@@ -35,6 +37,7 @@ public:
{ }
bool m_is_primrage;
+ required_device<palette_device> m_palette;
required_shared_ptr<uint16_t> m_colorram;
optional_device<adc0808_device> m_adc;
@@ -70,6 +73,7 @@ public:
std::unique_ptr<uint8_t[]> m_protdata;
virtual void update_interrupts() override;
+ INTERRUPT_GEN_MEMBER(scanline_int_gen);
virtual void scanline_update(screen_device &screen, int scanline) override;
DECLARE_READ32_MEMBER(special_port2_r);
DECLARE_READ32_MEMBER(special_port3_r);
diff --git a/src/mame/includes/atarisy1.h b/src/mame/includes/atarisy1.h
index 786e3750f41..1efd96e076d 100644
--- a/src/mame/includes/atarisy1.h
+++ b/src/mame/includes/atarisy1.h
@@ -18,6 +18,7 @@
#include "sound/tms5220.h"
#include "sound/ym2151.h"
#include "video/atarimo.h"
+#include "emupal.h"
class atarisy1_state : public atarigen_state
{
@@ -28,6 +29,7 @@ public:
, m_soundcomm(*this, "soundcomm")
, m_bankselect(*this, "bankselect")
, m_mob(*this, "mob")
+ , m_palette(*this, "palette")
, m_adc(*this, "adc")
, m_ajsint(*this, "ajsint")
, m_playfield_tilemap(*this, "playfield")
@@ -44,6 +46,7 @@ public:
required_shared_ptr<uint16_t> m_bankselect;
required_device<atari_motion_objects_device> m_mob;
+ required_device<palette_device> m_palette;
uint8_t m_joystick_type;
uint8_t m_trackball_type;
diff --git a/src/mame/includes/atarisy2.h b/src/mame/includes/atarisy2.h
index a672ba0dacb..0d91b258c0b 100644
--- a/src/mame/includes/atarisy2.h
+++ b/src/mame/includes/atarisy2.h
@@ -15,6 +15,7 @@
#include "sound/ym2151.h"
#include "sound/pokey.h"
#include "sound/tms5220.h"
+#include "emupal.h"
#include "slapstic.h"
class atarisy2_state : public atarigen_state
diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h
index 103772c5a14..d330b4cdb14 100644
--- a/src/mame/includes/cyberbal.h
+++ b/src/mame/includes/cyberbal.h
@@ -17,6 +17,7 @@
#include "cpu/m6502/m6502.h"
#include "sound/dac.h"
#include "sound/ym2151.h"
+#include "emupal.h"
#include "screen.h"
class cyberbal_base_state : public atarigen_state
@@ -94,6 +95,7 @@ public:
m_playfield2(*this, "playfield2"),
m_alpha2(*this, "alpha2"),
m_mob2(*this, "mob2"),
+ m_rpalette(*this, "rpalette"),
m_lscreen(*this, "lscreen"),
m_rscreen(*this, "rscreen")
{ }
@@ -147,6 +149,7 @@ private:
required_device<tilemap_device> m_playfield2;
required_device<tilemap_device> m_alpha2;
required_device<atari_motion_objects_device> m_mob2;
+ required_device<palette_device> m_rpalette;
required_device<screen_device> m_lscreen;
required_device<screen_device> m_rscreen;
diff --git a/src/mame/includes/eprom.h b/src/mame/includes/eprom.h
index 3f1e0f5e91a..f7e15763e01 100644
--- a/src/mame/includes/eprom.h
+++ b/src/mame/includes/eprom.h
@@ -14,6 +14,7 @@
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
#include "video/atarimo.h"
+#include "emupal.h"
class eprom_state : public atarigen_state
{
@@ -25,7 +26,9 @@ public:
m_mob(*this, "mob"),
m_jsa(*this, "jsa"),
m_adc(*this, "adc"),
- m_extra(*this, "extra")
+ m_extra(*this, "extra"),
+ m_palette(*this, "palette"),
+ m_paletteram(*this, "paletteram")
{ }
void guts(machine_config &config);
@@ -64,6 +67,8 @@ private:
uint16_t m_sync_data;
optional_device<adc0808_device> m_adc;
optional_device<cpu_device> m_extra;
+ required_device<palette_device> m_palette;
+ optional_shared_ptr<uint16_t> m_paletteram;
static const atari_motion_objects_config s_mob_config;
static const atari_motion_objects_config s_guts_mob_config;
};
diff --git a/src/mame/includes/toobin.h b/src/mame/includes/toobin.h
index aeae14d43c5..c461c6f4c7f 100644
--- a/src/mame/includes/toobin.h
+++ b/src/mame/includes/toobin.h
@@ -13,6 +13,7 @@
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
#include "video/atarimo.h"
+#include "emupal.h"
class toobin_state : public atarigen_state
{
@@ -23,6 +24,8 @@ public:
m_playfield_tilemap(*this, "playfield"),
m_alpha_tilemap(*this, "alpha"),
m_mob(*this, "mob"),
+ m_palette(*this, "palette"),
+ m_paletteram(*this, "paletteram"),
m_interrupt_scan(*this, "interrupt_scan"),
m_sound_int_state(0)
{ }
@@ -54,7 +57,9 @@ private:
required_device<tilemap_device> m_playfield_tilemap;
required_device<tilemap_device> m_alpha_tilemap;
required_device<atari_motion_objects_device> m_mob;
+ required_device<palette_device> m_palette;
+ required_shared_ptr<uint16_t> m_paletteram;
required_shared_ptr<uint16_t> m_interrupt_scan;
double m_brightness;
diff --git a/src/mame/includes/vindictr.h b/src/mame/includes/vindictr.h
index 8106c23e741..1e18879ed2a 100644
--- a/src/mame/includes/vindictr.h
+++ b/src/mame/includes/vindictr.h
@@ -13,6 +13,7 @@
#include "machine/atarigen.h"
#include "audio/atarijsa.h"
#include "video/atarimo.h"
+#include "emupal.h"
class vindictr_state : public atarigen_state
{
@@ -22,7 +23,9 @@ public:
m_playfield_tilemap(*this, "playfield"),
m_alpha_tilemap(*this, "alpha"),
m_mob(*this, "mob"),
- m_jsa(*this, "jsa")
+ m_jsa(*this, "jsa"),
+ m_palette(*this, "palette"),
+ m_paletteram(*this, "paletteram")
{ }
void vindictr(machine_config &config);
@@ -47,6 +50,9 @@ private:
required_device<tilemap_device> m_alpha_tilemap;
required_device<atari_motion_objects_device> m_mob;
required_device<atari_jsa_i_device> m_jsa;
+ required_device<palette_device> m_palette;
+ required_shared_ptr<uint16_t> m_paletteram;
+
uint8_t m_playfield_tile_bank;
uint16_t m_playfield_xscroll;
uint16_t m_playfield_yscroll;
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index d050b486cfc..a39ea07db6e 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -342,8 +342,6 @@ atarigen_state::atarigen_state(const machine_config &mconfig, device_type type,
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette"),
- m_generic_paletteram_16(*this, "paletteram"),
m_slapstic_device(*this, ":slapstic")
{
}
@@ -396,7 +394,7 @@ void atarigen_state::device_timer(emu_timer &timer, device_timer_id id, int para
{
case TID_SCANLINE_INTERRUPT:
{
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
screen_device *screen = reinterpret_cast<screen_device *>(ptr);
timer.adjust(screen->frame_period());
break;
@@ -447,18 +445,6 @@ WRITE_LINE_MEMBER(atarigen_state::scanline_int_write_line)
//-------------------------------------------------
-// scanline_int_gen: Standard interrupt routine
-// which sets the scanline interrupt state.
-//-------------------------------------------------
-
-INTERRUPT_GEN_MEMBER(atarigen_state::scanline_int_gen)
-{
- m_scanline_int_state = 1;
- update_interrupts();
-}
-
-
-//-------------------------------------------------
// scanline_int_ack_w: Resets the state of the
// scanline interrupt.
//-------------------------------------------------
diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h
index e60c624d323..ba1f2bda30a 100644
--- a/src/mame/machine/atarigen.h
+++ b/src/mame/machine/atarigen.h
@@ -13,7 +13,6 @@
#include "includes/slapstic.h"
#include "cpu/m6502/m6502.h"
-#include "emupal.h"
#include "screen.h"
@@ -148,7 +147,6 @@ protected:
// interrupt handling
void scanline_int_set(screen_device &screen, int scanline);
DECLARE_WRITE_LINE_MEMBER(scanline_int_write_line);
- INTERRUPT_GEN_MEMBER(scanline_int_gen);
DECLARE_WRITE16_MEMBER(scanline_int_ack_w);
DECLARE_WRITE_LINE_MEMBER(video_int_write_line);
@@ -204,8 +202,6 @@ protected:
optional_device<gfxdecode_device> m_gfxdecode;
optional_device<screen_device> m_screen;
- optional_device<palette_device> m_palette;
- optional_shared_ptr<uint16_t> m_generic_paletteram_16;
optional_device<atari_slapstic_device> m_slapstic_device;
private:
diff --git a/src/mame/video/atarisy1.cpp b/src/mame/video/atarisy1.cpp
index d5f550200b5..13e28d18065 100644
--- a/src/mame/video/atarisy1.cpp
+++ b/src/mame/video/atarisy1.cpp
@@ -365,7 +365,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_state::atarisy1_int3_callback)
int scanline = param;
/* update the state */
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
/* set a timer to turn it off */
m_int3off_timer->adjust(m_screen->scan_period());
diff --git a/src/mame/video/blstroid.cpp b/src/mame/video/blstroid.cpp
index 19c8307f2b8..31c9f4302c0 100644
--- a/src/mame/video/blstroid.cpp
+++ b/src/mame/video/blstroid.cpp
@@ -95,7 +95,7 @@ void blstroid_state::device_timer(emu_timer &timer, device_timer_id id, int para
break;
case TIMER_IRQ_ON:
/* generate the interrupt */
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
update_interrupts();
break;
default:
diff --git a/src/mame/video/cyberbal.cpp b/src/mame/video/cyberbal.cpp
index 742d133dac0..04150cfc178 100644
--- a/src/mame/video/cyberbal.cpp
+++ b/src/mame/video/cyberbal.cpp
@@ -114,9 +114,8 @@ void cyberbal_base_state::video_start()
void cyberbal_state::video_start()
{
- palette_device *rpalette = subdevice<palette_device>("rpalette");
- m_playfield2->set_palette(*rpalette);
- m_alpha2->set_palette(*rpalette);
+ m_playfield2->set_palette(*m_rpalette);
+ m_alpha2->set_palette(*m_rpalette);
cyberbal_base_state::video_start();
diff --git a/src/mame/video/eprom.cpp b/src/mame/video/eprom.cpp
index 93becde10bc..3975aef10e2 100644
--- a/src/mame/video/eprom.cpp
+++ b/src/mame/video/eprom.cpp
@@ -23,7 +23,7 @@ void eprom_state::update_palette()
for (color = 0; color < 0x800; ++color)
{
int i, r, g, b;
- uint16_t const data = m_generic_paletteram_16[color];
+ uint16_t const data = m_paletteram[color];
/* FIXME this is only a very crude approximation of the palette output.
* The circuit involves a dozen transistors and probably has an output
diff --git a/src/mame/video/toobin.cpp b/src/mame/video/toobin.cpp
index 643b6d7f26d..3f779073c6c 100644
--- a/src/mame/video/toobin.cpp
+++ b/src/mame/video/toobin.cpp
@@ -96,10 +96,8 @@ void toobin_state::video_start()
WRITE16_MEMBER( toobin_state::paletteram_w )
{
- int newword;
-
- COMBINE_DATA(&m_generic_paletteram_16[offset]);
- newword = m_generic_paletteram_16[offset];
+ COMBINE_DATA(&m_paletteram[offset]);
+ uint16_t newword = m_paletteram[offset];
{
int red = (((newword >> 10) & 31) * 224) >> 5;
@@ -128,7 +126,7 @@ WRITE16_MEMBER( toobin_state::intensity_w )
m_brightness = (double)(~data & 0x1f) / 31.0;
for (i = 0; i < 0x400; i++)
- if (!(m_generic_paletteram_16[i] & 0x8000))
+ if (!BIT(m_paletteram[i], 15))
m_palette->set_pen_contrast(i, m_brightness);
}
}
diff --git a/src/mame/video/vindictr.cpp b/src/mame/video/vindictr.cpp
index 0b243780a87..e4063a1fee1 100644
--- a/src/mame/video/vindictr.cpp
+++ b/src/mame/video/vindictr.cpp
@@ -100,8 +100,8 @@ WRITE16_MEMBER( vindictr_state::vindictr_paletteram_w )
int c;
/* first blend the data */
- COMBINE_DATA(&m_generic_paletteram_16[offset]);
- data = m_generic_paletteram_16[offset];
+ COMBINE_DATA(&m_paletteram[offset]);
+ data = m_paletteram[offset];
/* now generate colors at all 16 intensities */
for (c = 0; c < 8; c++)
@@ -171,7 +171,7 @@ void vindictr_state::scanline_update(screen_device &screen, int scanline)
break;
case 6: /* /VIRQ */
- scanline_int_gen(*m_maincpu);
+ scanline_int_write_line(1);
break;
case 7: /* /PFVS */