summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/cat702.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/cat702.h')
-rw-r--r--src/mame/machine/cat702.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/mame/machine/cat702.h b/src/mame/machine/cat702.h
index 57610327289..818ecd2d584 100644
--- a/src/mame/machine/cat702.h
+++ b/src/mame/machine/cat702.h
@@ -1,36 +1,47 @@
-/* CAT702 ZN security chip */
+/* CAT702 security chip */
#pragma once
#ifndef __CAT702_H__
#define __CAT702_H__
-#include "cpu/psx/siodev.h"
+#include "emu.h"
extern const device_type CAT702;
-class cat702_device : public psxsiodev_device
+#define MCFG_CAT702_DATAOUT_HANDLER(_devcb) \
+ devcb = &cat702_device::set_dataout_handler(*device, DEVCB_##_devcb);
+
+class cat702_device : public device_t
{
public:
cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void init(const UINT8 *transform);
- void select(int select);
+ // static configuration helpers
+ template<class _Object> static devcb_base &set_dataout_handler(device_t &device, _Object object) { return downcast<cat702_device &>(device).m_dataout_handler.set_callback(object); }
+
+ void init(const UINT8 *transform); // TODO: region
+
+ DECLARE_WRITE_LINE_MEMBER(write_select);
+ DECLARE_WRITE_LINE_MEMBER(write_datain);
+ DECLARE_WRITE_LINE_MEMBER(write_clock);
protected:
virtual void device_start();
private:
- virtual void data_in( int data, int mask );
-
UINT8 compute_sbox_coef(int sel, int bit);
void apply_bit_sbox(int sel);
void apply_sbox(const UINT8 *sbox);
const UINT8 *m_transform;
int m_select;
+ int m_clock;
+ int m_datain;
UINT8 m_state;
UINT8 m_bit;
+
+ devcb_write_line m_dataout_handler;
};
#endif