summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/dec_lk201.h
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-06-23 14:16:47 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-06-23 14:16:47 -0500
commit74efa92cda3d41bb2c6cbcc64248f0e13f0b1813 (patch)
treef0de1b008681823c7af6b536f9fa6570e2694226 /src/mame/machine/dec_lk201.h
parent92a1a8544bedf03ecc6e61dad117b8623b7ab8ba (diff)
dec_lk201: keyclick [Bavarese]
tll: all irqs (nw)
Diffstat (limited to 'src/mame/machine/dec_lk201.h')
-rw-r--r--src/mame/machine/dec_lk201.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/mame/machine/dec_lk201.h b/src/mame/machine/dec_lk201.h
index 0871f1c3c4e..1df36577b7b 100644
--- a/src/mame/machine/dec_lk201.h
+++ b/src/mame/machine/dec_lk201.h
@@ -17,14 +17,19 @@
#define LK_CMD_DIS_KEYCLK 0x99 /* disable the keyclick */
#define LK_CMD_ENB_KEYCLK 0x1b /* enable the keyclick - 1st param: volume */
-//#define LK_CMD_DIS_CTLCLK 0xb9 /* disable the Ctrl keyclick */
-//#define LK_CMD_ENB_CTLCLK 0xbb /* enable the Ctrl keyclick */
+#define LK_CMD_DIS_CTLCLK 0xb9 /* disable the Ctrl keyclick */
+#define LK_CMD_ENB_CTLCLK 0xbb /* enable the Ctrl keyclick */
#define LK_CMD_SOUND_CLK 0x9f /* emit a keyclick - 1st param: volume */
#define LK_CMD_DIS_BELL 0xa1 /* disable the bell */
#define LK_CMD_ENB_BELL 0x23 /* enable the bell - 1st param: volume */
#define LK_CMD_BELL 0xa7 /* emit a bell - 1st param: volume */
-#define LK_CMD_POWER_UP 0xfd /* init power-up sequence */
+// TCR - Timer Compare Register
+#define TCR_OCIE 0x40 // Bit 6 (output compare IRQ enable)
+#define TCR_OLVL 0x01 // Bit 1 (output level)
+
+// TSR - Timer Status Register
+#define TSR_OCFL 0x40 // TSR (68HC05 output compare flag)
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
@@ -45,16 +50,16 @@ public:
// construction/destruction
lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- DECLARE_READ8_MEMBER( ddr_r );
- DECLARE_WRITE8_MEMBER( ddr_w );
- DECLARE_READ8_MEMBER( ports_r );
- DECLARE_WRITE8_MEMBER( ports_w );
- DECLARE_READ8_MEMBER( sci_r );
- DECLARE_WRITE8_MEMBER( sci_w );
- DECLARE_READ8_MEMBER( spi_r );
- DECLARE_WRITE8_MEMBER( spi_w );
- DECLARE_READ8_MEMBER( timer_r );
- DECLARE_WRITE8_MEMBER( timer_w );
+ DECLARE_READ8_MEMBER(ddr_r);
+ DECLARE_WRITE8_MEMBER(ddr_w);
+ DECLARE_READ8_MEMBER(ports_r);
+ DECLARE_WRITE8_MEMBER(ports_w);
+ DECLARE_READ8_MEMBER(sci_r);
+ DECLARE_WRITE8_MEMBER(sci_w);
+ DECLARE_READ8_MEMBER(spi_r);
+ DECLARE_WRITE8_MEMBER(spi_w);
+ DECLARE_READ8_MEMBER(timer_r);
+ DECLARE_WRITE8_MEMBER(timer_w);
template<class _Object> static devcb_base &set_tx_handler(device_t &device, _Object wr) { return downcast<lk201_device &>(device).m_tx_handler.set_callback(wr); }
@@ -95,6 +100,7 @@ private:
} m_timer;
emu_timer *m_count;
+ emu_timer *m_beeper;
UINT8 sci_ctl2;
UINT8 sci_status;
@@ -128,6 +134,8 @@ private:
void send_port(address_space &space, UINT8 offset, UINT8 data);
void update_interrupts();
+ int m_kbd_state;
+
devcb_write_line m_tx_handler;
};