1 // license:BSD-3-Clause
2 // copyright-holders:Patrick Mackinlay
3
4 /*
5 * An implementation of the ARBGA (SRX Arbiter Gate Array) device found in
6 * Intergraph InterPro family systems. There is no public documentation on this
7 * device, so the implementation is being built to follow the logic of the
8 * boot ROM and its diagnostic tests.
9 *
10 * Please be aware that code in here is not only broken, it's likely wrong in
11 * many cases.
12 *
13 * TODO
14 * - too long to list
15 */
16
17 #include "emu.h"
18 #include "interpro_arbga.h"
19
20 #define VERBOSE 0
21 #include "logmacro.h"
22
23 #if 0
24 // this might be for an earlier revision of the device
25 void interpro_arbga_device::map(address_map &map)
26 {
27 map(0x00, 0x03).rw(FUNC(interpro_arbga_device::sdepid_r), FUNC(interpro_arbga_device::sdepid_w));
28 map(0x04, 0x07).rw(FUNC(interpro_arbga_device::snapid_r), FUNC(interpro_arbga_device::snapid_w));
29 map(0x08, 0x0b).rw(FUNC(interpro_arbga_device::prilo_r), FUNC(interpro_arbga_device::prilo_w));
30 map(0x0c, 0x0f).rw(FUNC(interpro_arbga_device::prihi_r), FUNC(interpro_arbga_device::prihi_w));
31 map(0x10, 0x13).rw(FUNC(interpro_arbga_device::errdomlo_r), FUNC(interpro_arbga_device::errdomlo_w));
32 map(0x14, 0x17).rw(FUNC(interpro_arbga_device::errdomhi_r), FUNC(interpro_arbga_device::errdomhi_w));
33 map(0x18, 0x1b).rw(FUNC(interpro_arbga_device::tmctrl_r), FUNC(interpro_arbga_device::tmctrl_w));
34
35 map(0x24, 0x27).rw(FUNC(interpro_arbga_device::tmsrnem_r), FUNC(interpro_arbga_device::tmsrnem_w));
36 map(0x28, 0x2b).rw(FUNC(interpro_arbga_device::tmsrhog_r), FUNC(interpro_arbga_device::tmsrhog_w));
37 map(0x2c, 0x2f).rw(FUNC(interpro_arbga_device::tmscale_r), FUNC(interpro_arbga_device::tmscale_w));
38 }
39 #endif
40
41 // derived from the FDM "dump_arb" command
map(address_map & map)42 void interpro_arbga_device::map(address_map &map)
43 {
44 map(0x00, 0x03).rw(FUNC(interpro_arbga_device::sdepid_r), FUNC(interpro_arbga_device::sdepid_w));
45 map(0x04, 0x07).rw(FUNC(interpro_arbga_device::arbsnap_r), FUNC(interpro_arbga_device::arbsnap_w));
46 map(0x08, 0x0b).rw(FUNC(interpro_arbga_device::fixprils_r), FUNC(interpro_arbga_device::fixprils_w));
47 map(0x0c, 0x0f).rw(FUNC(interpro_arbga_device::fixprims_r), FUNC(interpro_arbga_device::fixprims_w));
48 map(0x10, 0x13).rw(FUNC(interpro_arbga_device::sysdomls_r), FUNC(interpro_arbga_device::sysdomls_w));
49 map(0x14, 0x17).rw(FUNC(interpro_arbga_device::sysdomms_r), FUNC(interpro_arbga_device::sysdomms_w));
50 map(0x18, 0x1b).rw(FUNC(interpro_arbga_device::tctrl_r), FUNC(interpro_arbga_device::tctrl_w));
51 map(0x1d, 0x1d).rw(FUNC(interpro_arbga_device::inem_r), FUNC(interpro_arbga_device::inem_w)); // boot code writes 0x10
52 map(0x21, 0x21).rw(FUNC(interpro_arbga_device::enem_r), FUNC(interpro_arbga_device::enem_w)); // boot code writes 0x07
53 map(0x24, 0x27).rw(FUNC(interpro_arbga_device::hog_r), FUNC(interpro_arbga_device::hog_w));
54 map(0x28, 0x2b).rw(FUNC(interpro_arbga_device::lock_r), FUNC(interpro_arbga_device::lock_w));
55 map(0x2c, 0x2f).rw(FUNC(interpro_arbga_device::lockprs_r), FUNC(interpro_arbga_device::lockprs_w));
56 map(0x30, 0x33).rw(FUNC(interpro_arbga_device::hiblockls_r), FUNC(interpro_arbga_device::hiblockls_w));
57 map(0x34, 0x37).rw(FUNC(interpro_arbga_device::hiblockms_r), FUNC(interpro_arbga_device::hiblockms_w));
58
59 map(0x3c, 0x3f).rw(FUNC(interpro_arbga_device::arbrev_r), FUNC(interpro_arbga_device::arbrev_w));
60 }
61
62 DEFINE_DEVICE_TYPE(INTERPRO_ARBGA, interpro_arbga_device, "arbga", "SRX Arbiter Gate Array")
63
interpro_arbga_device(const machine_config & mconfig,const char * tag,device_t * owner,uint32_t clock)64 interpro_arbga_device::interpro_arbga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
65 : device_t(mconfig, INTERPRO_ARBGA, tag, owner, clock)
66 {
67 }
68
device_start()69 void interpro_arbga_device::device_start()
70 {
71 save_item(NAME(m_sdepid));
72 save_item(NAME(m_arbsnap));
73 save_item(NAME(m_fixprils));
74 save_item(NAME(m_fixprims));
75 save_item(NAME(m_sysdomls));
76 save_item(NAME(m_sysdomms));
77 save_item(NAME(m_tctrl));
78 save_item(NAME(m_inem));
79 save_item(NAME(m_enem));
80 save_item(NAME(m_hog));
81 save_item(NAME(m_lock));
82 save_item(NAME(m_lockprs));
83 save_item(NAME(m_hiblockls));
84 save_item(NAME(m_hiblockms));
85 save_item(NAME(m_arbrev));
86 }
87
device_reset()88 void interpro_arbga_device::device_reset()
89 {
90 }
91