summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/pgm2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/pgm2.h')
-rw-r--r--src/mame/includes/pgm2.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mame/includes/pgm2.h b/src/mame/includes/pgm2.h
index e9322484c11..1bccdc5688a 100644
--- a/src/mame/includes/pgm2.h
+++ b/src/mame/includes/pgm2.h
@@ -18,6 +18,14 @@
#include "machine/atmel_arm_aic.h"
#include "machine/pgm2_memcard.h"
+struct kov3_module_key
+{
+ uint8_t key[8];
+ uint8_t sum[8];
+ uint32_t addr_xor; // 22bit
+ uint16_t data_xor;
+};
+
class pgm2_state : public driver_device
{
public:
@@ -62,7 +70,8 @@ public:
DECLARE_WRITE32_MEMBER(pio_sodr_w);
DECLARE_WRITE32_MEMBER(pio_codr_w);
DECLARE_READ32_MEMBER(pio_pdsr_r);
- DECLARE_WRITE32_MEMBER(module_scramble_w);
+ DECLARE_WRITE16_MEMBER(module_rom_w);
+ DECLARE_READ16_MEMBER(module_rom_r);
DECLARE_READ_LINE_MEMBER(module_data_r);
DECLARE_WRITE_LINE_MEMBER(module_data_w);
DECLARE_WRITE_LINE_MEMBER(module_clk_w);
@@ -141,8 +150,8 @@ private:
std::vector<uint8_t> m_encrypted_copy;
uint32_t pio_out_data;
- uint32_t module_addr_xor, module_data_xor;
- const uint8_t *module_key;
+ const kov3_module_key *module_key;
+ bool module_sum_read;
uint32_t module_in_latch;
uint32_t module_out_latch;
int module_prev_state;