src/mess/machine/interpod.c
| r0 | r11267 | |
| 1 | /* |
| 2 | |
| 3 | Oxford Computer Systems Interpod |
| 4 | |
| 5 | PCB Layout |
| 6 | ---------- |
| 7 | |
| 8 | INTERPOD 1000 ISS.3 |
| 9 | |
| 10 | |---------------------------------------| |
| 11 | | | |
| 12 | | ACIA ROM CPU | |
| 13 | | | |
| 14 | |CN1 75188 LS73 LS04 RIOT | |
| 15 | | 75189 | |
| 16 | | 7417 VIA | |
| 17 | |CN2 | |
| 18 | | 3446 3446 3446 | |
| 19 | | CN3 CN4 LD1 | |
| 20 | |---------------------------| CN5 |-| |
| 21 | |---------| |
| 22 | |
| 23 | Notes: |
| 24 | All IC's shown. |
| 25 | |
| 26 | ROM - 2716 "1.4" |
| 27 | CPU - Rockwell R6502P |
| 28 | RIOT - Rockwell R6532AP |
| 29 | VIA - Rockwell R6522P |
| 30 | ACIA - Thomson-CSF EF6850P |
| 31 | 3446 - Motorola MC3446AP |
| 32 | CN1 - DB25 serial connector |
| 33 | CN2 - power connector |
| 34 | CN3 - DIN5 IEC connector |
| 35 | CN4 - DIN5 IEC connector |
| 36 | CN5 - 2x12 PCB edge IEEE-488 connector |
| 37 | LD1 - LED |
| 38 | |
| 39 | */ |
| 40 | |
| 41 | /* |
| 42 | |
| 43 | TODO: |
| 44 | |
| 45 | - everything |
| 46 | |
| 47 | 0 OPEN 2,4,31 : INPUT #2, A$ : CLOSE #2 |
| 48 | 1 PRINT A$ |
| 49 | |
| 50 | http://mikenaberezny.com/hardware/projects/interpod-ieee-488-interface/ |
| 51 | |
| 52 | */ |
| 53 | |
| 54 | #include "interpod.h" |
| 55 | |
| 56 | |
| 57 | |
| 58 | //************************************************************************** |
| 59 | // MACROS / CONSTANTS |
| 60 | //************************************************************************** |
| 61 | |
| 62 | #define R6502_TAG "u1" |
| 63 | #define R6532_TAG "u3" |
| 64 | #define R6522_TAG "u4" |
| 65 | #define MC6850_TAG "u5" |
| 66 | |
| 67 | |
| 68 | //************************************************************************** |
| 69 | // DEVICE DEFINITIONS |
| 70 | //************************************************************************** |
| 71 | |
| 72 | const device_type INTERPOD = interpod_device_config::static_alloc_device_config; |
| 73 | |
| 74 | |
| 75 | |
| 76 | //************************************************************************** |
| 77 | // DEVICE CONFIGURATION |
| 78 | //************************************************************************** |
| 79 | |
| 80 | //------------------------------------------------- |
| 81 | // interpod_device_config - constructor |
| 82 | //------------------------------------------------- |
| 83 | |
| 84 | interpod_device_config::interpod_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 85 | : device_config(mconfig, static_alloc_device_config, "Interpod", tag, owner, clock), |
| 86 | device_config_cbm_iec_interface(mconfig, *this) |
| 87 | { |
| 88 | } |
| 89 | |
| 90 | |
| 91 | //------------------------------------------------- |
| 92 | // static_alloc_device_config - allocate a new |
| 93 | // configuration object |
| 94 | //------------------------------------------------- |
| 95 | |
| 96 | device_config *interpod_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 97 | { |
| 98 | return global_alloc(interpod_device_config(mconfig, tag, owner, clock)); |
| 99 | } |
| 100 | |
| 101 | |
| 102 | //------------------------------------------------- |
| 103 | // alloc_device - allocate a new device object |
| 104 | //------------------------------------------------- |
| 105 | |
| 106 | device_t *interpod_device_config::alloc_device(running_machine &machine) const |
| 107 | { |
| 108 | return auto_alloc(machine, interpod_device(machine, *this)); |
| 109 | } |
| 110 | |
| 111 | |
| 112 | //------------------------------------------------- |
| 113 | // device_config_complete - perform any |
| 114 | // operations now that the configuration is |
| 115 | // complete |
| 116 | //------------------------------------------------- |
| 117 | |
| 118 | void interpod_device_config::device_config_complete() |
| 119 | { |
| 120 | m_shortname = "interpod"; |
| 121 | } |
| 122 | |
| 123 | |
| 124 | //------------------------------------------------- |
| 125 | // IEEE488_INTERFACE( interpod_ieee488_intf ) |
| 126 | //------------------------------------------------- |
| 127 | |
| 128 | IEEE488_INTERFACE( interpod_ieee488_intf ) |
| 129 | { |
| 130 | DEVCB_NULL, |
| 131 | DEVCB_NULL, |
| 132 | DEVCB_NULL, |
| 133 | DEVCB_NULL, |
| 134 | DEVCB_NULL, |
| 135 | DEVCB_NULL, |
| 136 | DEVCB_NULL, |
| 137 | DEVCB_NULL |
| 138 | }; |
| 139 | |
| 140 | |
| 141 | //------------------------------------------------- |
| 142 | // ROM( interpod ) |
| 143 | //------------------------------------------------- |
| 144 | |
| 145 | ROM_START( interpod ) |
| 146 | ROM_REGION( 0x800, R6502_TAG, 0 ) |
| 147 | ROM_LOAD( "1.4.u2", 0x000, 0x800, CRC(c5b71982) SHA1(614d677b7c6273f6b84fa61affaf91cfdaeed6a6) ) |
| 148 | ROM_LOAD( "1.6.u2", 0x000, 0x800, CRC(67bb0436) SHA1(7659c45b73f577233f7657c4da9141dcfe8b6d97) ) |
| 149 | ROM_END |
| 150 | |
| 151 | |
| 152 | //------------------------------------------------- |
| 153 | // rom_region - device-specific ROM region |
| 154 | //------------------------------------------------- |
| 155 | |
| 156 | const rom_entry *interpod_device_config::device_rom_region() const |
| 157 | { |
| 158 | return ROM_NAME( interpod ); |
| 159 | } |
| 160 | |
| 161 | |
| 162 | //------------------------------------------------- |
| 163 | // ADDRESS_MAP( interpod_mem ) |
| 164 | //------------------------------------------------- |
| 165 | |
| 166 | static ADDRESS_MAP_START( interpod_mem, AS_PROGRAM, 8, interpod_device ) |
| 167 | AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x3b80) AM_RAM // 6532 |
| 168 | AM_RANGE(0x0400, 0x041f) AM_MIRROR(0x3be0) AM_DEVREADWRITE_LEGACY(R6532_TAG, riot6532_r, riot6532_w) |
| 169 | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x9ffe) AM_DEVREADWRITE_LEGACY(MC6850_TAG, acia6850_stat_r, acia6850_ctrl_w) |
| 170 | AM_RANGE(0x2001, 0x2001) AM_MIRROR(0x9ffe) AM_DEVREADWRITE_LEGACY(MC6850_TAG, acia6850_data_r, acia6850_data_w) |
| 171 | AM_RANGE(0x4000, 0x47ff) AM_MIRROR(0xb800) AM_ROM AM_REGION("interpod:u1", 0) |
| 172 | AM_RANGE(0x8000, 0x800f) AM_MIRROR(0x5ff0) AM_DEVREADWRITE(R6522_TAG, via6522_device, read, write) |
| 173 | ADDRESS_MAP_END |
| 174 | |
| 175 | |
| 176 | //------------------------------------------------- |
| 177 | // via6522_interface via_intf |
| 178 | //------------------------------------------------- |
| 179 | |
| 180 | static const via6522_interface via_intf = |
| 181 | { |
| 182 | DEVCB_NULL, |
| 183 | DEVCB_NULL, |
| 184 | DEVCB_NULL, |
| 185 | DEVCB_NULL, |
| 186 | DEVCB_NULL, |
| 187 | DEVCB_NULL, |
| 188 | |
| 189 | DEVCB_NULL, |
| 190 | DEVCB_NULL, |
| 191 | DEVCB_NULL, |
| 192 | DEVCB_NULL, |
| 193 | DEVCB_NULL, |
| 194 | DEVCB_NULL, |
| 195 | |
| 196 | DEVCB_NULL |
| 197 | }; |
| 198 | |
| 199 | |
| 200 | //------------------------------------------------- |
| 201 | // riot6532_interface riot_intf |
| 202 | //------------------------------------------------- |
| 203 | |
| 204 | static const riot6532_interface riot_intf = |
| 205 | { |
| 206 | DEVCB_NULL, |
| 207 | DEVCB_NULL, |
| 208 | DEVCB_NULL, |
| 209 | DEVCB_NULL, |
| 210 | DEVCB_NULL |
| 211 | }; |
| 212 | |
| 213 | |
| 214 | //------------------------------------------------- |
| 215 | // ACIA6850_INTERFACE( acia_intf ) |
| 216 | //------------------------------------------------- |
| 217 | |
| 218 | static ACIA6850_INTERFACE( acia_intf ) |
| 219 | { |
| 220 | 0, |
| 221 | 0, |
| 222 | DEVCB_NULL, |
| 223 | DEVCB_NULL, |
| 224 | DEVCB_NULL, |
| 225 | DEVCB_NULL, |
| 226 | DEVCB_NULL, |
| 227 | DEVCB_NULL |
| 228 | }; |
| 229 | |
| 230 | |
| 231 | //------------------------------------------------- |
| 232 | // MACHINE_DRIVER( interpod ) |
| 233 | //------------------------------------------------- |
| 234 | |
| 235 | static MACHINE_CONFIG_FRAGMENT( interpod ) |
| 236 | MCFG_CPU_ADD(R6502_TAG, M6502, 1000000) |
| 237 | MCFG_CPU_PROGRAM_MAP(interpod_mem) |
| 238 | |
| 239 | MCFG_VIA6522_ADD(R6522_TAG, 1000000, via_intf) |
| 240 | MCFG_RIOT6532_ADD(R6532_TAG, 1000000, riot_intf) |
| 241 | MCFG_ACIA6850_ADD(MC6850_TAG, acia_intf) |
| 242 | MACHINE_CONFIG_END |
| 243 | |
| 244 | |
| 245 | //------------------------------------------------- |
| 246 | // machine_config_additions - device-specific |
| 247 | // machine configurations |
| 248 | //------------------------------------------------- |
| 249 | |
| 250 | machine_config_constructor interpod_device_config::device_mconfig_additions() const |
| 251 | { |
| 252 | return MACHINE_CONFIG_NAME( interpod ); |
| 253 | } |
| 254 | |
| 255 | |
| 256 | |
| 257 | //************************************************************************** |
| 258 | // LIVE DEVICE |
| 259 | //************************************************************************** |
| 260 | |
| 261 | //------------------------------------------------- |
| 262 | // interpod_device - constructor |
| 263 | //------------------------------------------------- |
| 264 | |
| 265 | interpod_device::interpod_device(running_machine &_machine, const interpod_device_config &_config) |
| 266 | : device_t(_machine, _config), |
| 267 | device_cbm_iec_interface(_machine, _config, *this), |
| 268 | m_maincpu(*this, R6502_TAG), |
| 269 | m_via(*this, R6522_TAG), |
| 270 | m_riot(*this, R6532_TAG), |
| 271 | m_acia(*this, MC6850_TAG), |
| 272 | m_iec(*this->owner(), CBM_IEC_TAG), |
| 273 | m_ieee(*this->owner(), IEEE488_TAG), |
| 274 | m_config(_config) |
| 275 | { |
| 276 | } |
| 277 | |
| 278 | |
| 279 | //------------------------------------------------- |
| 280 | // device_start - device-specific startup |
| 281 | //------------------------------------------------- |
| 282 | |
| 283 | void interpod_device::device_start() |
| 284 | { |
| 285 | } |
| 286 | |
| 287 | |
| 288 | //------------------------------------------------- |
| 289 | // device_reset - device-specific reset |
| 290 | //------------------------------------------------- |
| 291 | |
| 292 | void interpod_device::device_reset() |
| 293 | { |
| 294 | } |
src/mess/machine/interpod.h
| r0 | r11267 | |
| 1 | #pragma once |
| 2 | |
| 3 | #ifndef __INTERPOD__ |
| 4 | #define __INTERPOD__ |
| 5 | |
| 6 | #define ADDRESS_MAP_MODERN |
| 7 | |
| 8 | #include "emu.h" |
| 9 | #include "cpu/m6502/m6502.h" |
| 10 | #include "machine/6522via.h" |
| 11 | #include "machine/6532riot.h" |
| 12 | #include "machine/6850acia.h" |
| 13 | #include "machine/cbmiec.h" |
| 14 | #include "machine/ieee488.h" |
| 15 | |
| 16 | |
| 17 | |
| 18 | //************************************************************************** |
| 19 | // MACROS / CONSTANTS |
| 20 | //************************************************************************** |
| 21 | |
| 22 | #define INTERPOD_TAG "interpod" |
| 23 | |
| 24 | |
| 25 | |
| 26 | //************************************************************************** |
| 27 | // INTERFACE CONFIGURATION MACROS |
| 28 | //************************************************************************** |
| 29 | |
| 30 | #define MCFG_INTERPOD_ADD(_daisy) \ |
| 31 | MCFG_DEVICE_ADD(INTERPOD_TAG, INTERPOD, 0) \ |
| 32 | MCFG_IEEE488_CONFIG_ADD(_daisy, interpod_ieee488_intf) |
| 33 | |
| 34 | |
| 35 | |
| 36 | //************************************************************************** |
| 37 | // TYPE DEFINITIONS |
| 38 | //************************************************************************** |
| 39 | |
| 40 | // ======================> interpod_device_config |
| 41 | |
| 42 | class interpod_device_config : public device_config, |
| 43 | public device_config_cbm_iec_interface |
| 44 | { |
| 45 | friend class interpod_device; |
| 46 | |
| 47 | // construction/destruction |
| 48 | interpod_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 49 | |
| 50 | public: |
| 51 | // allocators |
| 52 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 53 | virtual device_t *alloc_device(running_machine &machine) const; |
| 54 | |
| 55 | // optional information overrides |
| 56 | virtual const rom_entry *device_rom_region() const; |
| 57 | virtual machine_config_constructor device_mconfig_additions() const; |
| 58 | |
| 59 | protected: |
| 60 | // device_config overrides |
| 61 | virtual void device_config_complete(); |
| 62 | }; |
| 63 | |
| 64 | |
| 65 | // ======================> interpod_device |
| 66 | |
| 67 | class interpod_device : public device_t, |
| 68 | public device_cbm_iec_interface |
| 69 | { |
| 70 | friend class interpod_device_config; |
| 71 | |
| 72 | // construction/destruction |
| 73 | interpod_device(running_machine &_machine, const interpod_device_config &_config); |
| 74 | |
| 75 | protected: |
| 76 | // device-level overrides |
| 77 | virtual void device_start(); |
| 78 | virtual void device_reset(); |
| 79 | |
| 80 | required_device<cpu_device> m_maincpu; |
| 81 | required_device<via6522_device> m_via; |
| 82 | required_device<riot6532_device> m_riot; |
| 83 | required_device<acia6850_device> m_acia; |
| 84 | required_device<cbm_iec_device> m_iec; |
| 85 | required_device<ieee488_device> m_ieee; |
| 86 | |
| 87 | const interpod_device_config &m_config; |
| 88 | }; |
| 89 | |
| 90 | |
| 91 | // device type definition |
| 92 | extern const device_type INTERPOD; |
| 93 | |
| 94 | |
| 95 | // IEEE-488 interface |
| 96 | extern const ieee488_stub_interface interpod_ieee488_intf; |
| 97 | |
| 98 | |
| 99 | |
| 100 | #endif |