summaryrefslogblamecommitdiffstatshomepage
path: root/src/mame/machine/wpc_lamp.h
blob: c1e7de09620dbe12a94f5804ae4b10eb26c8ecde (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                            
                                                                                                         







                                                      

                          


                                 


                                                                                                       






                                  
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert

// Williams Pinball Controller lamp control

#ifndef WPC_LAMP_H
#define WPC_LAMP_H

#define MCFG_WPC_LAMP_ADD( _tag ) \
	MCFG_DEVICE_ADD( _tag, WPC_LAMP, 0 )

class wpc_lamp_device : public device_t
{
public:
	wpc_lamp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
	virtual ~wpc_lamp_device();

	DECLARE_WRITE8_MEMBER(row_w);
	DECLARE_WRITE8_MEMBER(col_w);

	void set_names(const char *const *lamp_names);

protected:
	uint8_t state[64];
	uint8_t col, row;
	emu_timer *timer;
	const char *const *names;

	virtual void device_start() override;
	virtual void device_reset() override;
	virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;

	void update();
};

extern const device_type WPC_LAMP;

#endif