summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/k007452.h
blob: 2ffe202061cd12177a503f9f1186e62f9124c2e2 (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
// license:BSD-3-Clause
// copyright-holders:Sean Gonsalves
/***************************************************************************

    Konami 007452 multiplier/divider

***************************************************************************/

#ifndef MAME_MACHINE_K007452_H
#define MAME_MACHINE_K007452_H

#pragma once


//**************************************************************************
//  TYPE DEFINITIONS
//**************************************************************************

class k007452_device : public device_t
{
public:
	// construction/destruction
	k007452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);

	// public interface
	u8 read(offs_t offset);
	void write(offs_t offset, u8 data);

protected:
	// device-level overrides
	virtual void device_start() override;
	virtual void device_reset() override;

private:
	// internal state
	u8 m_math_regs[6];
	u16 m_multiply_result;
	u16 m_divide_quotient;
	u16 m_divide_remainder;
};


// device type declaration
DECLARE_DEVICE_TYPE(KONAMI_007452_MATH, k007452_device)

#endif // MAME_MACHINE_K007452_H