summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/jedi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/jedi.cpp')
-rw-r--r--src/mame/drivers/jedi.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/mame/drivers/jedi.cpp b/src/mame/drivers/jedi.cpp
index 18acb2347f7..1591d0809cb 100644
--- a/src/mame/drivers/jedi.cpp
+++ b/src/mame/drivers/jedi.cpp
@@ -114,6 +114,7 @@
#include "emu.h"
#include "cpu/m6502/m6502.h"
+#include "machine/74259.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
#include "includes/jedi.h"
@@ -226,9 +227,15 @@ WRITE8_MEMBER(jedi_state::a2d_select_w)
}
-WRITE8_MEMBER(jedi_state::jedi_coin_counter_w)
+WRITE_LINE_MEMBER(jedi_state::coin_counter_left_w)
{
- machine().bookkeeping().coin_counter_w(offset, data);
+ machine().bookkeeping().coin_counter_w(0, state);
+}
+
+
+WRITE_LINE_MEMBER(jedi_state::coin_counter_right_w)
+{
+ machine().bookkeeping().coin_counter_w(1, state);
}
@@ -273,12 +280,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, jedi_state )
AM_RANGE(0x1d00, 0x1d00) AM_MIRROR(0x007f) AM_NOP /* write: NVRAM store */
AM_RANGE(0x1d80, 0x1d80) AM_MIRROR(0x007f) AM_READNOP AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
AM_RANGE(0x1e00, 0x1e00) AM_MIRROR(0x007f) AM_READNOP AM_WRITE(main_irq_ack_w)
- AM_RANGE(0x1e80, 0x1e81) AM_MIRROR(0x0078) AM_READNOP AM_WRITE(jedi_coin_counter_w)
- AM_RANGE(0x1e82, 0x1e83) AM_MIRROR(0x0078) AM_NOP /* write: LED control - not used */
- AM_RANGE(0x1e84, 0x1e84) AM_MIRROR(0x0078) AM_READNOP AM_WRITEONLY AM_SHARE("foreground_bank")
- AM_RANGE(0x1e85, 0x1e85) AM_MIRROR(0x0078) AM_NOP
- AM_RANGE(0x1e86, 0x1e86) AM_MIRROR(0x0078) AM_READNOP AM_WRITE(jedi_audio_reset_w)
- AM_RANGE(0x1e87, 0x1e87) AM_MIRROR(0x0078) AM_READNOP AM_WRITEONLY AM_SHARE("video_off")
+ AM_RANGE(0x1e80, 0x1e87) AM_MIRROR(0x0078) AM_READNOP AM_DEVWRITE("outlatch", ls259_device, write_d7)
AM_RANGE(0x1f00, 0x1f00) AM_MIRROR(0x007f) AM_READNOP AM_WRITE(jedi_audio_latch_w)
AM_RANGE(0x1f80, 0x1f80) AM_MIRROR(0x007f) AM_READNOP AM_WRITE(rom_banksel_w)
AM_RANGE(0x2000, 0x27ff) AM_RAM AM_SHARE("backgroundram")
@@ -343,6 +345,15 @@ static MACHINE_CONFIG_START( jedi )
MCFG_NVRAM_ADD_0FILL("nvram")
+ MCFG_DEVICE_ADD("outlatch", LS259, 0) // 14J
+ MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(jedi_state, coin_counter_left_w))
+ MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(jedi_state, coin_counter_right_w))
+ MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(NOOP) // LED control - not used
+ MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(NOOP) // LED control - not used
+ MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(jedi_state, foreground_bank_w))
+ MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(jedi_state, audio_reset_w))
+ MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(jedi_state, video_off_w))
+
MCFG_WATCHDOG_ADD("watchdog")
/* video hardware */