1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// license:LGPL-2.1+
// copyright-holders:Olivier Galibert, Angelo Salese, David Haywood, Tomasz Slanina
#ifndef MAME_MACHINE_SEICOP_H
#define MAME_MACHINE_SEICOP_H
#pragma once
class seibu_cop_bootleg_device : public device_t, public device_memory_interface
{
public:
seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ16_MEMBER( read );
DECLARE_WRITE16_MEMBER( write );
DECLARE_READ16_MEMBER( reg_lo_addr_r );
DECLARE_READ16_MEMBER( reg_hi_addr_r );
DECLARE_READ16_MEMBER( status_r );
DECLARE_READ16_MEMBER( dist_r );
DECLARE_READ16_MEMBER( angle_r );
DECLARE_WRITE16_MEMBER( reg_lo_addr_w );
DECLARE_WRITE16_MEMBER( reg_hi_addr_w );
DECLARE_WRITE16_MEMBER( cmd_trigger_w );
DECLARE_READ16_MEMBER( d104_move_r );
DECLARE_WRITE16_MEMBER( d104_move_w );
DECLARE_READ16_MEMBER( prng_max_r );
DECLARE_WRITE16_MEMBER( prng_max_w );
DECLARE_READ16_MEMBER( prng_r );
DECLARE_READ16_MEMBER( scale_r );
DECLARE_WRITE16_MEMBER( scale_w );
void seibucopbl_map(address_map &map);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual space_config_vector memory_space_config() const override;
private:
cpu_device *m_host_cpu; /**< reference to the host cpu */
address_space *m_host_space; /**< reference to the host cpu space */
const address_space_config m_space_config;
inline uint16_t read_word(offs_t address);
inline void write_word(offs_t address, uint16_t data);
uint32_t m_reg[8];
uint16_t m_angle,m_dist,m_status;
int m_dx,m_dy;
uint32_t m_d104_move_offset;
uint16_t m_prng_max;
uint16_t m_scale;
//required_device<raiden2cop_device> m_raiden2cop;
};
DECLARE_DEVICE_TYPE(SEIBU_COP_BOOTLEG, seibu_cop_bootleg_device)
#define MCFG_DEVICE_SEIBUCOP_BOOTLEG_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, SEIBU_COP_BOOTLEG, 0)
#endif // MAME_MACHINE_SEICOP_H
|