1 // license:BSD-3-Clause
2 // copyright-holders:Peter Bortas
3 /*
4 ABC CAD Mouse/Hi-res video card
5 
6 The ABC CAD was an innovative electronics CAD accessory invented by
7 Marek Gorczyca, Betronex Elektronik AB 1983 to overcome the limitations
8 in the ABC80 microcomputer graphics which was very popular in Sweden at the time.
9 
10 The mouse feature is in the form of a small box with a handle sticking out at the front.
11 The handle can be manipulated in one direction by turning it around its internal pivot
12 point left and right. The other dimension in handled by pulling and pushing the handle.
13 One button is available on the top of the handle.
14 
15 The mouse is connected via the ABC bus, but also passes through the
16 ABC80<->Monitor power/AV cable
17 
18 The mouse was sold with the PCB CAD program "CAD-ABC"
19 
20 PCB Layout
21 ----------
22 
23 
24 |-|   CN1    |------------------------------|
25 |       4164      CN2   CN3  CN4       PROM5|
26 |       4164    Z80                    PROM6|
27 |       4164                           PROM7|
28 |       4164  PROM3 PROM4                   |
29 |       4164                                |
30 |       4164                    EPROM0      |
31 |       4164                    EPROM1      |
32 |       4416                     4801       |
33 | PROM2        CR1                          |
34 |-------------------------------------------|
35 
36 Notes:
37     Relevant IC's shown.
38 
39     4801    - Mostek MK4801AN-2  1KiB SRAM 150ns
40     4164    - TI TMS4164-15NL    8KiB DRAM
41     4416    - TI TMS4416-15NL    16k x 4bit DRAM (= 8KiB)
42     EPROM0  - Intel 2764-25      8KiB EPROM "D"
43     EPROM1  - Intel 2764-25      8KiB EPROM "E"
44     PROM2   - TI TBP18S030       256b  PROM "TBP18S030"
45     PROM3   - Harris HM7602      256b  PROM "M3-7603-5 1"
46     PROM4   - Signetics N82S129N 1024b PROM "N82S129N 1"
47     PROM5   - Harris HM7602      256b  PROM "M3-7603-5 2"
48     PROM6   - Signetics N82S129N 1024b PROM "N82S129N 2"
49     PROM7   - Signetics N82S129N 1024b PROM "N82S129N 3"
50     Z80     - Z80 CPU "Z 80/1C"
51     CN1     - ABCBUS connector
52     CN2     - ABC80 power/AV connector passthrough?
53     CN3     - ABC80 power/AV connector passthrough?
54     CN4     - ABC80 power/AV connector passthrough?
55     CR1     - Crystal "8.000 OSI"
56 */
57 
58 #include "emu.h"
59 #include "cadmouse.h"
60 
61 #define Z80_TAG "cardcpu"
62 
63 //**************************************************************************
64 //  DEVICE DEFINITIONS
65 //**************************************************************************
66 
67 DEFINE_DEVICE_TYPE(ABC_CADMOUSE, abc_cadmouse_device, "cadabc", "CAD ABC Mouse/Hi-res Unit")
68 
69 //-------------------------------------------------
70 //  ROM( abc_cadmouse )
71 //-------------------------------------------------
72 
ROM_START(abc_cadmouse)73 ROM_START( abc_cadmouse )
74 	ROM_REGION( 0x4000, Z80_TAG, 0 )
75 	// FIXME: The mapping of the EPROMs or if the map locally or on
76 	// the bus in unknown. 0x0 and 0x2k are just placeholders.
77 	ROM_LOAD( "eprom0.bin", 0x2000, 0x2000, CRC(c19d655d) SHA1(332ad862b77cff3ec55f0f78ac31b2b8cf93b7b3) )
78 	ROM_LOAD( "eprom1.bin", 0x0000, 0x2000, CRC(e71c9141) SHA1(07a6fae4e3fff3d7a4f67ad0791e4e297c1763aa) )
79 
80 	ROM_REGION( 0x20, "cadmouse_prom2", 0 )
81 	ROM_LOAD( "prom2.bin", 0x0000, 0x0020, CRC(c6c3bc9b) SHA1(5944cce355657b7bdc693f47a72f6b01decdc02a) ) // 32x8
82 	ROM_REGION( 0x20, "cadmouse_prom3", 0 )
83 	ROM_LOAD( "prom3.bin", 0x0000, 0x0020, CRC(862fc73a) SHA1(8a5391cd2ab61e5c3e22bb8805ace48566f5f57d) ) // 32x8
84 	ROM_REGION( 0x100, "cadmouse_prom4", 0 )
85 	ROM_LOAD( "prom4.bin", 0x0000, 0x0100, CRC(df58aaa9) SHA1(a2ab3b19a85ba3da6d78d1b0d44e2c33b44de5bc) ) // 256x4
86 	ROM_REGION( 0x20, "cadmouse_prom5", 0 )
87 	ROM_LOAD( "prom5.bin", 0x0000, 0x0020, CRC(5efd8b94) SHA1(cbfd6ebee815b02667ae886bb0820efa29311d37) ) // 32x8
88 	ROM_REGION( 0x100, "cadmouse_prom6", 0 )
89 	ROM_LOAD( "prom6.bin", 0x0000, 0x0100, CRC(ee3d8b75) SHA1(1afb22e3cff6e36f49228f63d0c7830bc48cf3cf) ) // 256x4
90 	ROM_REGION( 0x100, "cadmouse_prom7", 0 )
91 	ROM_LOAD( "prom7.bin", 0x0000, 0x0100, CRC(395110bd) SHA1(54720d155b4990d9879b95c0d13592bb7534da09) ) // 256x4
92 ROM_END
93 
94 
95 //-------------------------------------------------
96 //  rom_region - device-specific ROM region
97 //-------------------------------------------------
98 
99 const tiny_rom_entry *abc_cadmouse_device::device_rom_region() const
100 {
101 	return ROM_NAME( abc_cadmouse );
102 }
103 
104 //-------------------------------------------------
105 //  ADDRESS_MAP( abc_cadmouse_mem )
106 //-------------------------------------------------
107 
abc_cadmouse_mem(address_map & map)108 void abc_cadmouse_device::abc_cadmouse_mem(address_map &map)
109 {
110 	map.unmap_value_high();
111 	map.global_mask(0x3fff);
112 	map(0x0000, 0x3fff).rom().region(Z80_TAG, 0);
113 }
114 
115 
116 //-------------------------------------------------
117 //  ADDRESS_MAP( abc_cadmouse_io )
118 //-------------------------------------------------
119 
abc_cadmouse_io(address_map & map)120 void abc_cadmouse_device::abc_cadmouse_io(address_map &map)
121 {
122 }
123 
124 //-------------------------------------------------
125 //  device_add_mconfig - add device configuration
126 //-------------------------------------------------
127 
device_add_mconfig(machine_config & config)128 void abc_cadmouse_device::device_add_mconfig(machine_config &config)
129 {
130 	Z80(config, m_maincpu, XTAL(8'000'000)/2);
131 	m_maincpu->set_addrmap(AS_PROGRAM, &abc_cadmouse_device::abc_cadmouse_mem);
132 	m_maincpu->set_addrmap(AS_IO, &abc_cadmouse_device::abc_cadmouse_io);
133 }
134 
135 //**************************************************************************
136 //  LIVE DEVICE
137 //**************************************************************************
138 
139 //-------------------------------------------------
140 //  abc_cadmouse_device - constructor
141 //-------------------------------------------------
142 
abc_cadmouse_device(const machine_config & mconfig,const char * tag,device_t * owner,uint32_t clock)143 abc_cadmouse_device::abc_cadmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
144 	: device_t(mconfig, ABC_CADMOUSE, tag, owner, clock),
145 		device_abcbus_card_interface(mconfig, *this),
146 		m_maincpu(*this, Z80_TAG)
147 {
148 }
149 
150 
151 //-------------------------------------------------
152 //  device_start - device-specific startup
153 //-------------------------------------------------
154 
device_start()155 void abc_cadmouse_device::device_start()
156 {
157 }
158 
159 
160 //-------------------------------------------------
161 //  device_reset - device-specific reset
162 //-------------------------------------------------
163 
device_reset()164 void abc_cadmouse_device::device_reset()
165 {
166 }
167 
168 
169 
170 //**************************************************************************
171 //  ABC BUS INTERFACE
172 //**************************************************************************
173 
174 //-------------------------------------------------
175 //  abcbus_cs -
176 //-------------------------------------------------
177 
abcbus_cs(uint8_t data)178 void abc_cadmouse_device::abcbus_cs(uint8_t data)
179 {
180 }
181