6
#define MCFG_NAOMI_GDROM_BOARD_ADD(_tag, _image_tag, _pic_tag, _eeprom_tag, _maincpu_tag, _irq_cb) \
7
MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_GDROM_BOARD, _eeprom_tag, _maincpu_tag, _irq_cb) \
8
naomi_gdrom_board::static_set_tags(*device, _image_tag, _pic_tag);
10
class naomi_gdrom_board : public naomi_board
13
naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
15
static void static_set_tags(device_t &device, const char *_image_tag, const char *_pic_tag);
18
virtual void device_start();
19
virtual void device_reset();
21
virtual void board_setup_address(UINT32 address, bool is_dma);
22
virtual void board_get_buffer(UINT8 *&base, UINT32 &limit);
23
virtual void board_advance(UINT32 size);
26
enum { FILENAME_LENGTH=24 };
28
const char *image_tag, *pic_tag;
30
UINT32 dimm_cur_address;
32
// Note: voluntarily not saved into the state
34
UINT32 dimm_data_size;
36
static const UINT32 DES_LEFTSWAP[];
37
static const UINT32 DES_RIGHTSWAP[];
38
static const UINT32 DES_SBOX1[];
39
static const UINT32 DES_SBOX2[];
40
static const UINT32 DES_SBOX3[];
41
static const UINT32 DES_SBOX4[];
42
static const UINT32 DES_SBOX5[];
43
static const UINT32 DES_SBOX6[];
44
static const UINT32 DES_SBOX7[];
45
static const UINT32 DES_SBOX8[];
46
static const UINT32 DES_MASK_TABLE[];
47
static const UINT8 DES_ROTATE_TABLE[16];
49
void find_file(const char *name, const UINT8 *dir_sector, UINT32 &file_start, UINT32 &file_size);
51
inline void permutate(UINT32 &a, UINT32 &b, UINT32 m, int shift);
52
void des_generate_subkeys(const UINT64 key, UINT32 *subkeys);
53
UINT64 des_encrypt_decrypt(bool decrypt, UINT64 src, const UINT32 *des_subkeys);
54
UINT64 rev64(UINT64 src);
55
UINT64 read_to_qword(const UINT8 *region);
56
void write_from_qword(UINT8 *region, UINT64 qword);
59
extern const device_type NAOMI_GDROM_BOARD;