diff options
Diffstat (limited to 'src/mame/machine/cat702.h')
-rw-r--r-- | src/mame/machine/cat702.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mame/machine/cat702.h b/src/mame/machine/cat702.h new file mode 100644 index 00000000000..57610327289 --- /dev/null +++ b/src/mame/machine/cat702.h @@ -0,0 +1,36 @@ +/* CAT702 ZN security chip */ + +#pragma once + +#ifndef __CAT702_H__ +#define __CAT702_H__ + +#include "cpu/psx/siodev.h" + +extern const device_type CAT702; + +class cat702_device : public psxsiodev_device +{ +public: + cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + void init(const UINT8 *transform); + void select(int select); + +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; + UINT8 m_state; + UINT8 m_bit; +}; + +#endif |