summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/atarisy1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/atarisy1.h')
-rw-r--r--src/mame/includes/atarisy1.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mame/includes/atarisy1.h b/src/mame/includes/atarisy1.h
index 2e49fc4ac58..adeabc0e323 100644
--- a/src/mame/includes/atarisy1.h
+++ b/src/mame/includes/atarisy1.h
@@ -7,7 +7,9 @@
*************************************************************************/
#include "machine/74259.h"
+#include "machine/adc0808.h"
#include "machine/atarigen.h"
+#include "machine/input_merger.h"
#include "machine/timer.h"
#include "sound/tms5220.h"
#include "sound/ym2151.h"
@@ -22,7 +24,8 @@ public:
m_soundcomm(*this, "soundcomm"),
m_bankselect(*this, "bankselect"),
m_mob(*this, "mob"),
- m_joystick_timer(*this, "joystick_timer"),
+ m_adc(*this, "adc"),
+ m_ajsint(*this, "ajsint"),
m_playfield_tilemap(*this, "playfield"),
m_alpha_tilemap(*this, "alpha"),
m_yscroll_reset_timer(*this, "yreset_timer"),
@@ -40,10 +43,9 @@ public:
uint8_t m_joystick_type;
uint8_t m_trackball_type;
- required_device<timer_device> m_joystick_timer;
+ optional_device<adc0808_device> m_adc;
+ optional_device<input_merger_device> m_ajsint;
uint8_t m_joystick_int;
- uint8_t m_joystick_int_enable;
- uint8_t m_joystick_value;
/* playfield parameters */
required_device<tilemap_device> m_playfield_tilemap;
@@ -69,8 +71,9 @@ public:
uint8_t m_cur[2][2];
virtual void update_interrupts() override;
- DECLARE_READ16_MEMBER(joystick_r);
- DECLARE_WRITE16_MEMBER(joystick_w);
+ template<int Input> DECLARE_READ8_MEMBER(digital_joystick_r);
+ DECLARE_READ8_MEMBER(adc_r);
+ DECLARE_WRITE8_MEMBER(adc_w);
DECLARE_READ16_MEMBER(trakball_r);
DECLARE_READ8_MEMBER(switch_6502_r);
DECLARE_WRITE_LINE_MEMBER(led_1_w);
@@ -92,7 +95,7 @@ public:
DECLARE_MACHINE_RESET(atarisy1);
DECLARE_VIDEO_START(atarisy1);
uint32_t screen_update_atarisy1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- TIMER_DEVICE_CALLBACK_MEMBER(delayed_joystick_int);
+ DECLARE_WRITE_LINE_MEMBER(joystick_int);
TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_reset_yscroll_callback);
TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_int3off_callback);
TIMER_DEVICE_CALLBACK_MEMBER(atarisy1_int3_callback);