1
/*************************************************************************
4
Advanced CRT Controller.
6
**************************************************************************/
17
/***************************************************************************
18
DEVICE CONFIGURATION MACROS
19
***************************************************************************/
21
#define MCFG_H63484_ADD(_tag, _clock, _config, _map) \
22
MCFG_DEVICE_ADD(_tag, H63484, _clock) \
23
MCFG_DEVICE_CONFIG(_config) \
24
MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
26
#define H63484_INTERFACE(name) \
27
const h63484_interface (name) =
29
typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data);
30
#define H63484_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data)
32
// ======================> h63484_interface
34
struct h63484_interface
36
const char *m_screen_tag; /* screen we are acting on */
37
h63484_display_pixels_func m_display_cb;
40
// ======================> upd7220_device
42
class h63484_device : public device_t,
43
public device_memory_interface,
44
public h63484_interface
47
// construction/destruction
48
h63484_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
50
DECLARE_WRITE16_MEMBER( address_w );
51
DECLARE_WRITE16_MEMBER( data_w );
53
DECLARE_READ16_MEMBER( status_r );
54
DECLARE_READ16_MEMBER( data_r );
56
DECLARE_READ8_MEMBER( vram_r );
57
DECLARE_WRITE8_MEMBER( vram_w );
59
void update_screen(bitmap_t *bitmap, const rectangle *cliprect);
60
virtual const rom_entry *device_rom_region() const;
61
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
64
// device-level overrides
65
virtual void device_start();
66
virtual void device_reset();
67
//virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
68
virtual void device_config_complete();
70
inline UINT8 readbyte(offs_t address);
71
inline void writebyte(offs_t address, UINT8 data);
74
inline void fifo_w_clear();
75
inline void queue_w(UINT8 data);
76
inline void dequeue_w(UINT8 *data);
77
inline void fifo_r_clear();
78
inline void queue_r(UINT8 data);
79
inline void dequeue_r(UINT8 *data);
80
inline void recompute_parameters();
81
inline void command_end_seq();
83
void command_wpr_exec();
84
void command_clr_exec();
85
void command_cpy_exec();
86
void command_rct_exec();
88
void exec_abort_sequence();
89
UINT16 video_registers_r(int offset);
90
void video_registers_w(int offset);
91
int translate_command(UINT16 data);
92
void draw_graphics_line(bitmap_t *bitmap, const rectangle *cliprect, int y, int layer_n);
95
screen_device *m_screen;
102
UINT8 m_fifo[16]; /* FIFO W data queue */
103
int m_fifo_ptr; /* FIFO W pointer */
105
UINT8 m_fifo_r[16]; /* FIFO R data queue */
106
int m_fifo_r_ptr; /* FIFO R pointer */
110
UINT16 m_pr[0x10]; /* parameter byte register */
111
int m_param_ptr; /* parameter pointer */
137
UINT16 m_hc, m_hds, m_hdw, m_hws, m_hww;
140
UINT16 m_vc, m_vws, m_vww, m_vds;
143
const address_space_config m_space_config;
146
// device type definition
147
extern const device_type H63484;
149
#endif /* __H63484_H__ */