summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/atarisy1.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-03-03 20:25:46 -0500
committer Vas Crabb <cuavas@users.noreply.github.com>2017-07-25 11:21:43 +1000
commitdab683e78f0bed3f786a9206d905027c1ffba9a6 (patch)
tree8db4a08166df6755f530c137ad1497e77a53cd01 /src/mame/drivers/atarisy1.cpp
parent9488a7703ae0e9bef19043bc3b1d5de2c65d2246 (diff)
New 74LS259/9334/CD4099 devices
These humble 16-pin logic devices were commonly used in 8-bit arcade games to control coin counters/lockouts, IRQ flipflops, graphics banking, slave CPU reset lines, discrete audio triggers, screen flipping, serial EEPROMs and much else. Over 100 drivers and a few bus devices have been updated to use the new implementation, and a great deal of research has gone into documenting the physical location of these devices on actual PCBs in the source. Write handlers have been provided for both orthodox and somewhat less conventional memory mappings. Incidental to this update, coin counters and/or lockouts have been added to Atari System 1 games, Basketball, Gauntlet, Gyruss, Hana Yayoi, Hole Land, Jr. Pac-Man, Mahjong Sisters, Pooyan, Roc'n Rope, Squash, Thunder Hoop, Time Limit, Time Pilot '84 and many others. This also cleans up coin counter behavior in Sauro and Rally Bike. (nw) The purpose of committing this change, which has been several months in the making, early in the 0.189GIT cycle will be to allow time for fixing potential regressions; I've fixed a number of drivers that lost sound from this for various reasons (hnayayoi.cpp having missing or garbage ADPCM was particularly painful, since the three games in that driver all work slightly differently), but I can't test all affected drivers exhaustively. @Tafoid, don't bother running automated screen capture comparison tests on this, as many drivers are now expected to have the screen flipped for the first few seconds after reset.
Diffstat (limited to 'src/mame/drivers/atarisy1.cpp')
-rw-r--r--src/mame/drivers/atarisy1.cpp41
1 files changed, 36 insertions, 5 deletions
diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp
index 2776b61bd0a..675c0cdd6c7 100644
--- a/src/mame/drivers/atarisy1.cpp
+++ b/src/mame/drivers/atarisy1.cpp
@@ -197,7 +197,6 @@ RoadBlasters (aka Future Vette):005*
#include "machine/atarigen.h"
#include "machine/6522via.h"
#include "machine/watchdog.h"
-#include "sound/ym2151.h"
#include "sound/pokey.h"
#include "video/atarimo.h"
#include "speaker.h"
@@ -240,6 +239,13 @@ MACHINE_RESET_MEMBER(atarisy1_state,atarisy1)
}
+WRITE_LINE_MEMBER(atarisy1_state::music_reset_w)
+{
+ // reset the YM2151 and YM3012
+ if (!state)
+ m_ymsnd->reset();
+}
+
/*************************************
*
@@ -411,13 +417,31 @@ READ8_MEMBER(atarisy1_state::via_pb_r)
/*************************************
*
- * Sound LED handlers
+ * LED and coin counter handlers
*
*************************************/
-WRITE8_MEMBER(atarisy1_state::led_w)
+WRITE_LINE_MEMBER(atarisy1_state::led_1_w)
+{
+ machine().output().set_led_value(0, !state);
+}
+
+
+WRITE_LINE_MEMBER(atarisy1_state::led_2_w)
+{
+ machine().output().set_led_value(1, !state);
+}
+
+
+WRITE_LINE_MEMBER(atarisy1_state::coin_counter_right_w)
+{
+ machine().bookkeeping().coin_counter_w(0, state);
+}
+
+
+WRITE_LINE_MEMBER(atarisy1_state::coin_counter_left_w)
{
- output().set_led_value(offset, ~data & 1);
+ machine().bookkeeping().coin_counter_w(1, state);
}
@@ -468,7 +492,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, atarisy1_state )
AM_RANGE(0x1800, 0x1801) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write)
AM_RANGE(0x1810, 0x1810) AM_DEVREADWRITE("soundcomm", atari_sound_comm_device, sound_command_r, sound_response_w)
AM_RANGE(0x1820, 0x1820) AM_READ(switch_6502_r)
- AM_RANGE(0x1824, 0x1825) AM_WRITE(led_w)
+ AM_RANGE(0x1820, 0x1827) AM_DEVWRITE("outlatch", ls259_device, write_d0)
AM_RANGE(0x1870, 0x187f) AM_DEVREADWRITE("pokey", pokey_device, read, write)
AM_RANGE(0x4000, 0xffff) AM_ROM
ADDRESS_MAP_END
@@ -723,6 +747,13 @@ static MACHINE_CONFIG_START( atarisy1 )
MCFG_ATARI_EEPROM_2804_ADD("eeprom")
+ MCFG_DEVICE_ADD("outlatch", LS259, 0) // 15H (TTL) or 14F (LSI)
+ MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(atarisy1_state, music_reset_w))
+ MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(atarisy1_state, led_1_w))
+ MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(WRITELINE(atarisy1_state, led_2_w))
+ MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(atarisy1_state, coin_counter_right_w))
+ MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(atarisy1_state, coin_counter_left_w))
+
MCFG_WATCHDOG_ADD("watchdog")
MCFG_TIMER_DRIVER_ADD("joystick_timer", atarisy1_state, delayed_joystick_int)