blob: 6fbb256da1b68a3f165a403156f117dbde2d6582 (
plain) (
blame)
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
|
// license:BSD-3-Clause
// copyright-holders:Sven Schnelle
#ifndef MAME_DEVICES_HP_HIL_HLEMOUSE_H
#define MAME_DEVICES_HP_HIL_HLEMOUSE_H
#pragma once
#include "hp_hil.h"
#include "hlebase.h"
#include "machine/keyboard.h"
namespace bus::hp_hil {
class hle_hp_46060b_device
: public hle_device_base
{
public:
hle_hp_46060b_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock);
virtual void device_reset() override;
virtual ioport_constructor device_input_ports() const override;
virtual int hil_poll() override;
virtual void hil_idd() override;
enum state_mask
{
MOUSE_YPOS = 0x000000ff,
MOUSE_XPOS = 0x0000ff00,
MOUSE_LBUTTON = 0x00010000,
MOUSE_MBUTTON = 0x00020000,
MOUSE_RBUTTON = 0x00040000,
MOUSE_BUTTONS = 0x00070000
};
DECLARE_INPUT_CHANGED_MEMBER(mouse_button);
DECLARE_INPUT_CHANGED_MEMBER(mouse_x);
DECLARE_INPUT_CHANGED_MEMBER(mouse_y);
int8_t mouse_x_delta;
int8_t mouse_y_delta;
uint32_t mouse_buttons;
util::fifo<uint8_t, 16> m_fifo;
};
} // namespace bus::hp_hil
DECLARE_DEVICE_TYPE_NS(HP_46060B_MOUSE, bus::hp_hil, hle_hp_46060b_device);
#endif // MAME_DEVICES_HP_HIL_HLEMOUSE_H
|