1 // license:BSD-3-Clause
2 // copyright-holders:Curt Coder
3 #ifndef MAME_INCLUDES_OB68K1A_H
4 #define MAME_INCLUDES_OB68K1A_H
5 
6 #pragma once
7 
8 #include "bus/rs232/rs232.h"
9 #include "cpu/m68000/m68000.h"
10 #include "machine/6821pia.h"
11 #include "machine/6840ptm.h"
12 #include "machine/6850acia.h"
13 #include "machine/com8116.h"
14 #include "machine/ram.h"
15 
16 #define MC68000L10_TAG  "u50"
17 #define MC6821_0_TAG    "u32"
18 #define MC6821_1_TAG    "u33"
19 #define MC6840_TAG      "u35"
20 #define MC6850_0_TAG    "u34"
21 #define MC6850_1_TAG    "u26"
22 #define COM8116_TAG     "u56"
23 #define RS232_A_TAG     "rs232a"
24 #define RS232_B_TAG     "rs232b"
25 
26 class ob68k1a_state : public driver_device
27 {
28 public:
ob68k1a_state(const machine_config & mconfig,device_type type,const char * tag)29 	ob68k1a_state(const machine_config &mconfig, device_type type, const char *tag)
30 		: driver_device(mconfig, type, tag)
31 		, m_maincpu(*this, MC68000L10_TAG)
32 		, m_dbrg(*this, COM8116_TAG)
33 		, m_acia0(*this, MC6850_0_TAG)
34 		, m_acia1(*this, MC6850_1_TAG)
35 		, m_pia0(*this, MC6821_0_TAG)
36 		, m_pia1(*this, MC6821_1_TAG)
37 		, m_rs232a(*this, RS232_A_TAG)
38 		, m_rs232b(*this, RS232_B_TAG)
39 		, m_ram(*this, RAM_TAG)
40 	{ }
41 
42 	void ob68k1a(machine_config &config);
43 
44 private:
45 	required_device<cpu_device> m_maincpu;
46 	required_device<com8116_device> m_dbrg;
47 	required_device<acia6850_device> m_acia0;
48 	required_device<acia6850_device> m_acia1;
49 	required_device<pia6821_device> m_pia0;
50 	required_device<pia6821_device> m_pia1;
51 	required_device<rs232_port_device> m_rs232a;
52 	required_device<rs232_port_device> m_rs232b;
53 	required_device<ram_device> m_ram;
54 
55 	virtual void machine_start() override;
56 	virtual void machine_reset() override;
57 
58 	uint8_t pia_r(offs_t offset);
59 	void pia_w(offs_t offset, uint8_t data);
60 	void ob68k1a_mem(address_map &map);
61 };
62 
63 #endif
64