src/mess/machine/c8280.c
| r11286 | r11287 | |
| 7 | 7 | |
| 8 | 8 | **********************************************************************/ |
| 9 | 9 | |
| 10 | | #include "emu.h" |
| 11 | 10 | #include "c8280.h" |
| 12 | | #include "cpu/m6502/m6502.h" |
| 13 | | #include "imagedev/flopdrv.h" |
| 14 | | #include "machine/6532riot.h" |
| 15 | | #include "machine/ieee488.h" |
| 16 | 11 | |
| 17 | | /*************************************************************************** |
| 18 | | PARAMETERS |
| 19 | | ***************************************************************************/ |
| 20 | 12 | |
| 21 | | #define LOG 0 |
| 22 | 13 | |
| 14 | //************************************************************************** |
| 15 | // MACROS / CONSTANTS |
| 16 | //************************************************************************** |
| 17 | |
| 23 | 18 | #define M6502_DOS_TAG "5c" |
| 24 | 19 | #define M6502_FDC_TAG "9e" |
| 25 | 20 | #define M6532_0_TAG "9f" |
| 26 | 21 | #define M6532_1_TAG "9g" |
| 27 | 22 | |
| 28 | | /*************************************************************************** |
| 29 | | TYPE DEFINITIONS |
| 30 | | ***************************************************************************/ |
| 31 | 23 | |
| 32 | | typedef struct _c8280_t c8280_t; |
| 33 | | struct _c8280_t |
| 24 | |
| 25 | //************************************************************************** |
| 26 | // DEVICE DEFINITIONS |
| 27 | //************************************************************************** |
| 28 | |
| 29 | const device_type C8280 = c8280_device_config::static_alloc_device_config; |
| 30 | |
| 31 | |
| 32 | |
| 33 | //************************************************************************** |
| 34 | // DEVICE CONFIGURATION |
| 35 | //************************************************************************** |
| 36 | |
| 37 | //------------------------------------------------- |
| 38 | // c8280_device_config - constructor |
| 39 | //------------------------------------------------- |
| 40 | |
| 41 | c8280_device_config::c8280_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 42 | : device_config(mconfig, static_alloc_device_config, "C8280", tag, owner, clock), |
| 43 | device_config_ieee488_interface(mconfig, *this) |
| 34 | 44 | { |
| 35 | | /* abstractions */ |
| 36 | | int address; /* bus address - 8 */ |
| 45 | } |
| 37 | 46 | |
| 38 | | /* devices */ |
| 39 | | device_t *cpu_dos; |
| 40 | | device_t *cpu_fdc; |
| 41 | | device_t *riot0; |
| 42 | | device_t *riot1; |
| 43 | | device_t *bus; |
| 44 | | device_t *image[2]; |
| 45 | | }; |
| 46 | 47 | |
| 47 | | /*************************************************************************** |
| 48 | | INLINE FUNCTIONS |
| 49 | | ***************************************************************************/ |
| 48 | //------------------------------------------------- |
| 49 | // static_alloc_device_config - allocate a new |
| 50 | // configuration object |
| 51 | //------------------------------------------------- |
| 50 | 52 | |
| 51 | | INLINE c8280_t *get_safe_token(device_t *device) |
| 53 | device_config *c8280_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock) |
| 52 | 54 | { |
| 53 | | assert(device != NULL); |
| 54 | | assert(device->type() == C8280); |
| 55 | | return (c8280_t *)downcast<legacy_device_base *>(device)->token(); |
| 55 | return global_alloc(c8280_device_config(mconfig, tag, owner, clock)); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | | INLINE c8280_config *get_safe_config(device_t *device) |
| 58 | |
| 59 | //------------------------------------------------- |
| 60 | // alloc_device - allocate a new device object |
| 61 | //------------------------------------------------- |
| 62 | |
| 63 | device_t *c8280_device_config::alloc_device(running_machine &machine) const |
| 59 | 64 | { |
| 60 | | assert(device != NULL); |
| 61 | | assert(device->type() == C8280); |
| 62 | | return (c8280_config *)downcast<const legacy_device_config_base &>(device->baseconfig()).inline_config(); |
| 65 | return auto_alloc(machine, c8280_device(machine, *this)); |
| 63 | 66 | } |
| 64 | 67 | |
| 65 | | /*************************************************************************** |
| 66 | | IMPLEMENTATION |
| 67 | | ***************************************************************************/ |
| 68 | 68 | |
| 69 | | /*------------------------------------------------- |
| 70 | | c8280_ieee488_atn_w - IEEE-488 bus attention |
| 71 | | -------------------------------------------------*/ |
| 69 | //------------------------------------------------- |
| 70 | // device_config_complete - perform any |
| 71 | // operations now that the configuration is |
| 72 | // complete |
| 73 | //------------------------------------------------- |
| 72 | 74 | |
| 73 | | WRITE_LINE_DEVICE_HANDLER( c8280_ieee488_atn_w ) |
| 75 | void c8280_device_config::device_config_complete() |
| 74 | 76 | { |
| 77 | m_shortname = "c8280"; |
| 75 | 78 | } |
| 76 | 79 | |
| 77 | | /*------------------------------------------------- |
| 78 | | c8280_ieee488_ifc_w - IEEE-488 bus reset |
| 79 | | -------------------------------------------------*/ |
| 80 | 80 | |
| 81 | | WRITE_LINE_DEVICE_HANDLER( c8280_ieee488_ifc_w ) |
| 81 | //------------------------------------------------- |
| 82 | // static_set_config - configuration helper |
| 83 | //------------------------------------------------- |
| 84 | |
| 85 | void c8280_device_config::static_set_config(device_config *device, int address, int variant) |
| 82 | 86 | { |
| 83 | | if (!state) |
| 84 | | { |
| 85 | | device->reset(); |
| 86 | | } |
| 87 | c8280_device_config *c8280 = downcast<c8280_device_config *>(device); |
| 88 | |
| 89 | assert((address > 7) && (address < 12)); |
| 90 | |
| 91 | c8280->m_address = address - 8; |
| 87 | 92 | } |
| 88 | 93 | |
| 89 | | /*------------------------------------------------- |
| 90 | | ADDRESS_MAP( c8280_dos_map ) |
| 91 | | -------------------------------------------------*/ |
| 92 | 94 | |
| 93 | | static ADDRESS_MAP_START( c8280_dos_map, AS_PROGRAM, 8 ) |
| 94 | | AM_RANGE(0xc000, 0xffff) AM_ROM AM_REGION("c8280", 0x0000) |
| 95 | //------------------------------------------------- |
| 96 | // ROM( c8280 ) |
| 97 | //------------------------------------------------- |
| 98 | |
| 99 | ROM_START( c8280 ) |
| 100 | ROM_REGION( 0x4000, M6502_DOS_TAG, 0 ) |
| 101 | ROM_LOAD( "300542-001.10c", 0x0000, 0x2000, CRC(3c6eee1e) SHA1(0726f6ab4de4fc9c18707fe87780ffd9f5ed72ab) ) |
| 102 | ROM_LOAD( "300543-001.10d", 0x2000, 0x2000, CRC(f58e665e) SHA1(9e58b47c686c91efc6ef1a27f72dbb5e26c485ec) ) |
| 103 | |
| 104 | ROM_REGION( 0x800, M6502_FDC_TAG, 0 ) |
| 105 | ROM_LOAD( "300541-001.3c", 0x000, 0x800, CRC(cb07b2db) SHA1(a1f9c5a7bd3798f5a97dc0b465c3bf5e3513e148) ) |
| 106 | ROM_END |
| 107 | |
| 108 | |
| 109 | //------------------------------------------------- |
| 110 | // rom_region - device-specific ROM region |
| 111 | //------------------------------------------------- |
| 112 | |
| 113 | const rom_entry *c8280_device_config::device_rom_region() const |
| 114 | { |
| 115 | return ROM_NAME( c8280 ); |
| 116 | } |
| 117 | |
| 118 | |
| 119 | //------------------------------------------------- |
| 120 | // ADDRESS_MAP( c8280_main_mem ) |
| 121 | //------------------------------------------------- |
| 122 | |
| 123 | static ADDRESS_MAP_START( c8280_main_mem, AS_PROGRAM, 8, c8280_device ) |
| 124 | AM_RANGE(0xc000, 0xffff) // AM_ROM |
| 95 | 125 | ADDRESS_MAP_END |
| 96 | 126 | |
| 97 | | /*------------------------------------------------- |
| 98 | | ADDRESS_MAP( c8280_fdc_map ) |
| 99 | | -------------------------------------------------*/ |
| 100 | 127 | |
| 101 | | static ADDRESS_MAP_START( c8280_fdc_map, AS_PROGRAM, 8 ) |
| 128 | //------------------------------------------------- |
| 129 | // ADDRESS_MAP( c8280_fdc_mem ) |
| 130 | //------------------------------------------------- |
| 131 | |
| 132 | static ADDRESS_MAP_START( c8280_fdc_mem, AS_PROGRAM, 8, c8280_device ) |
| 133 | ADDRESS_MAP_GLOBAL_MASK(0x1fff) |
| 134 | AM_RANGE(0x1c00, 0x1fff) // AM_ROM 6530 |
| 102 | 135 | ADDRESS_MAP_END |
| 103 | 136 | |
| 104 | | /*------------------------------------------------- |
| 105 | | riot6532_interface riot0_intf |
| 106 | | -------------------------------------------------*/ |
| 107 | 137 | |
| 138 | //------------------------------------------------- |
| 139 | // riot6532_interface riot0_intf |
| 140 | //------------------------------------------------- |
| 141 | |
| 108 | 142 | static const riot6532_interface riot0_intf = |
| 109 | 143 | { |
| 110 | 144 | DEVCB_NULL, |
| r11286 | r11287 | |
| 114 | 148 | DEVCB_NULL |
| 115 | 149 | }; |
| 116 | 150 | |
| 117 | | /*------------------------------------------------- |
| 118 | | riot6532_interface riot1_intf |
| 119 | | -------------------------------------------------*/ |
| 120 | 151 | |
| 152 | //------------------------------------------------- |
| 153 | // riot6532_interface riot1_intf |
| 154 | //------------------------------------------------- |
| 155 | |
| 121 | 156 | static const riot6532_interface riot1_intf = |
| 122 | 157 | { |
| 123 | 158 | DEVCB_NULL, |
| r11286 | r11287 | |
| 127 | 162 | DEVCB_NULL |
| 128 | 163 | }; |
| 129 | 164 | |
| 130 | | /*------------------------------------------------- |
| 131 | | FLOPPY_OPTIONS( c8280 ) |
| 132 | | -------------------------------------------------*/ |
| 133 | 165 | |
| 166 | //------------------------------------------------- |
| 167 | // FLOPPY_OPTIONS( c8280 ) |
| 168 | //------------------------------------------------- |
| 169 | |
| 134 | 170 | static FLOPPY_OPTIONS_START( c8280 ) |
| 135 | 171 | FLOPPY_OPTIONS_END |
| 136 | 172 | |
| 137 | | /*------------------------------------------------- |
| 138 | | floppy_config c8280_floppy_config |
| 139 | | -------------------------------------------------*/ |
| 140 | 173 | |
| 174 | //------------------------------------------------- |
| 175 | // floppy_config c8280_floppy_config |
| 176 | //------------------------------------------------- |
| 177 | |
| 141 | 178 | static const floppy_config c8280_floppy_config = |
| 142 | 179 | { |
| 143 | 180 | DEVCB_NULL, |
| r11286 | r11287 | |
| 145 | 182 | DEVCB_NULL, |
| 146 | 183 | DEVCB_NULL, |
| 147 | 184 | DEVCB_NULL, |
| 148 | | FLOPPY_STANDARD_5_25_DSHD, |
| 185 | FLOPPY_STANDARD_8_DSDD, |
| 149 | 186 | FLOPPY_OPTIONS_NAME(c8280), |
| 150 | | NULL |
| 187 | "floppy_8" |
| 151 | 188 | }; |
| 152 | 189 | |
| 153 | | /*------------------------------------------------- |
| 154 | | MACHINE_DRIVER( c8280 ) |
| 155 | | -------------------------------------------------*/ |
| 156 | 190 | |
| 191 | //------------------------------------------------- |
| 192 | // MACHINE_CONFIG_FRAGMENT( c8280 ) |
| 193 | //------------------------------------------------- |
| 194 | |
| 157 | 195 | static MACHINE_CONFIG_FRAGMENT( c8280 ) |
| 158 | 196 | MCFG_CPU_ADD(M6502_DOS_TAG, M6502, 1000000) |
| 159 | | MCFG_CPU_PROGRAM_MAP(c8280_dos_map) |
| 197 | MCFG_CPU_PROGRAM_MAP(c8280_main_mem) |
| 160 | 198 | |
| 161 | 199 | MCFG_RIOT6532_ADD(M6532_0_TAG, 1000000, riot0_intf) |
| 162 | 200 | MCFG_RIOT6532_ADD(M6532_1_TAG, 1000000, riot1_intf) |
| 163 | 201 | |
| 164 | 202 | MCFG_CPU_ADD(M6502_FDC_TAG, M6502, 1000000) |
| 165 | | MCFG_CPU_PROGRAM_MAP(c8280_fdc_map) |
| 203 | MCFG_CPU_PROGRAM_MAP(c8280_fdc_mem) |
| 166 | 204 | |
| 167 | 205 | MCFG_FLOPPY_2_DRIVES_ADD(c8280_floppy_config) |
| 168 | 206 | MACHINE_CONFIG_END |
| 169 | 207 | |
| 170 | | /*------------------------------------------------- |
| 171 | | ROM( c8280 ) |
| 172 | | -------------------------------------------------*/ |
| 173 | 208 | |
| 174 | | ROM_START( c8280 ) |
| 175 | | ROM_REGION( 0x4800, "c8280", ROMREGION_LOADBYNAME ) |
| 176 | | ROM_LOAD( "300542-001.10c", 0x0000, 0x2000, CRC(3c6eee1e) SHA1(0726f6ab4de4fc9c18707fe87780ffd9f5ed72ab) ) |
| 177 | | ROM_LOAD( "300543-001.10d", 0x2000, 0x2000, CRC(f58e665e) SHA1(9e58b47c686c91efc6ef1a27f72dbb5e26c485ec) ) |
| 178 | | ROM_LOAD( "300541-001.3c", 0x4000, 0x0800, CRC(cb07b2db) SHA1(a1f9c5a7bd3798f5a97dc0b465c3bf5e3513e148) ) |
| 179 | | ROM_END |
| 209 | //------------------------------------------------- |
| 210 | // machine_config_additions - device-specific |
| 211 | // machine configurations |
| 212 | //------------------------------------------------- |
| 180 | 213 | |
| 181 | | /*------------------------------------------------- |
| 182 | | DEVICE_START( c8280 ) |
| 183 | | -------------------------------------------------*/ |
| 214 | machine_config_constructor c8280_device_config::device_mconfig_additions() const |
| 215 | { |
| 216 | return MACHINE_CONFIG_NAME( c8280 ); |
| 217 | } |
| 184 | 218 | |
| 185 | | static DEVICE_START( c8280 ) |
| 219 | |
| 220 | |
| 221 | //************************************************************************** |
| 222 | // LIVE DEVICE |
| 223 | //************************************************************************** |
| 224 | |
| 225 | //------------------------------------------------- |
| 226 | // c8280_device - constructor |
| 227 | //------------------------------------------------- |
| 228 | |
| 229 | c8280_device::c8280_device(running_machine &_machine, const c8280_device_config &_config) |
| 230 | : device_t(_machine, _config), |
| 231 | device_ieee488_interface(_machine, _config, *this), |
| 232 | m_maincpu(*this, M6502_DOS_TAG), |
| 233 | m_fdccpu(*this, M6502_FDC_TAG), |
| 234 | m_riot0(*this, M6532_0_TAG), |
| 235 | m_riot1(*this, M6532_1_TAG), |
| 236 | m_image0(*this, FLOPPY_0), |
| 237 | m_image1(*this, FLOPPY_1), |
| 238 | m_bus(*this->owner(), IEEE488_TAG), |
| 239 | m_config(_config) |
| 186 | 240 | { |
| 187 | | c8280_t *c8280 = get_safe_token(device); |
| 188 | | const c8280_config *config = get_safe_config(device); |
| 241 | } |
| 189 | 242 | |
| 190 | | /* set serial address */ |
| 191 | | assert((config->address > 7) && (config->address < 16)); |
| 192 | | c8280->address = config->address - 8; |
| 193 | 243 | |
| 194 | | /* find our CPU */ |
| 195 | | c8280->cpu_dos = device->subdevice(M6502_DOS_TAG); |
| 196 | | c8280->cpu_fdc = device->subdevice(M6502_FDC_TAG); |
| 244 | //------------------------------------------------- |
| 245 | // device_start - device-specific startup |
| 246 | //------------------------------------------------- |
| 247 | |
| 248 | void c8280_device::device_start() |
| 249 | { |
| 250 | address_space *main = m_maincpu->memory().space(AS_PROGRAM); |
| 251 | address_space *fdc = m_fdccpu->memory().space(AS_PROGRAM); |
| 252 | |
| 253 | main->install_rom(0x5000, 0x7fff, subregion(M6502_DOS_TAG)->base()); |
| 254 | fdc->install_rom(0x1c00, 0x1fff, subregion(M6502_FDC_TAG)->base()); |
| 197 | 255 | } |
| 198 | 256 | |
| 199 | | /*------------------------------------------------- |
| 200 | | DEVICE_RESET( c8280 ) |
| 201 | | -------------------------------------------------*/ |
| 202 | 257 | |
| 203 | | static DEVICE_RESET( c8280 ) |
| 258 | //------------------------------------------------- |
| 259 | // device_reset - device-specific reset |
| 260 | //------------------------------------------------- |
| 261 | |
| 262 | void c8280_device::device_reset() |
| 204 | 263 | { |
| 205 | | c8280_t *c8280 = get_safe_token(device); |
| 264 | } |
| 206 | 265 | |
| 207 | | c8280->cpu_dos->reset(); |
| 208 | | c8280->cpu_fdc->reset(); |
| 266 | |
| 267 | //------------------------------------------------- |
| 268 | // device_timer - handler timer events |
| 269 | //------------------------------------------------- |
| 270 | |
| 271 | void c8280_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 272 | { |
| 209 | 273 | } |
| 210 | 274 | |
| 211 | | /*------------------------------------------------- |
| 212 | | DEVICE_GET_INFO( c8280 ) |
| 213 | | -------------------------------------------------*/ |
| 214 | 275 | |
| 215 | | DEVICE_GET_INFO( c8280 ) |
| 276 | //------------------------------------------------- |
| 277 | // ieee488_atn - |
| 278 | //------------------------------------------------- |
| 279 | |
| 280 | void c8280_device::ieee488_atn(int state) |
| 216 | 281 | { |
| 217 | | switch (state) |
| 218 | | { |
| 219 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 220 | | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(c8280_t); break; |
| 221 | | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = sizeof(c8280_config); break; |
| 282 | } |
| 222 | 283 | |
| 223 | | /* --- the following bits of info are returned as pointers --- */ |
| 224 | | case DEVINFO_PTR_ROM_REGION: info->romregion = ROM_NAME(c8280); break; |
| 225 | | case DEVINFO_PTR_MACHINE_CONFIG: info->machine_config = MACHINE_CONFIG_NAME(c8280); break; |
| 226 | 284 | |
| 227 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 228 | | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(c8280); break; |
| 229 | | case DEVINFO_FCT_STOP: /* Nothing */ break; |
| 230 | | case DEVINFO_FCT_RESET: info->reset = DEVICE_RESET_NAME(c8280); break; |
| 285 | //------------------------------------------------- |
| 286 | // ieee488_ifc - |
| 287 | //------------------------------------------------- |
| 231 | 288 | |
| 232 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 233 | | case DEVINFO_STR_NAME: strcpy(info->s, "Commodore 8280"); break; |
| 234 | | case DEVINFO_STR_FAMILY: strcpy(info->s, "Commodore PET"); break; |
| 235 | | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 236 | | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 237 | | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright the MESS Team"); break; |
| 289 | void c8280_device::ieee488_ifc(int state) |
| 290 | { |
| 291 | if (!state) |
| 292 | { |
| 293 | device_reset(); |
| 238 | 294 | } |
| 239 | 295 | } |
| 240 | | |
| 241 | | DEFINE_LEGACY_DEVICE(C8280, c8280); |
src/mess/machine/c8280.h
| r11286 | r11287 | |
| 7 | 7 | |
| 8 | 8 | **********************************************************************/ |
| 9 | 9 | |
| 10 | #pragma once |
| 11 | |
| 10 | 12 | #ifndef __C8280__ |
| 11 | 13 | #define __C8280__ |
| 12 | 14 | |
| 15 | #define ADDRESS_MAP_MODERN |
| 16 | |
| 13 | 17 | #include "emu.h" |
| 18 | #include "cpu/m6502/m6502.h" |
| 19 | #include "imagedev/flopdrv.h" |
| 20 | #include "machine/6532riot.h" |
| 21 | #include "machine/ieee488.h" |
| 14 | 22 | |
| 15 | | /*************************************************************************** |
| 16 | | MACROS / CONSTANTS |
| 17 | | ***************************************************************************/ |
| 18 | 23 | |
| 19 | | DECLARE_LEGACY_DEVICE(C8280, c8280); |
| 20 | 24 | |
| 21 | | #define MCFG_C8280_ADD(_tag, _bus_tag, _address) \ |
| 22 | | MCFG_DEVICE_ADD(_tag, C8280, 0) \ |
| 23 | | MCFG_DEVICE_CONFIG_DATAPTR(c8280_config, bus_tag, _bus_tag) \ |
| 24 | | MCFG_DEVICE_CONFIG_DATA32(c8280_config, address, _address) |
| 25 | //************************************************************************** |
| 26 | // MACROS / CONSTANTS |
| 27 | //************************************************************************** |
| 25 | 28 | |
| 26 | | #define C8280_IEEE488(_tag) \ |
| 27 | | _tag, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_LINE(_tag, c8280_ieee488_ifc_w), DEVCB_NULL, DEVCB_DEVICE_LINE(_tag, c8280_ieee488_atn_w), DEVCB_NULL |
| 29 | #define C8280_TAG "c8280" |
| 28 | 30 | |
| 29 | | /*************************************************************************** |
| 30 | | TYPE DEFINITIONS |
| 31 | | ***************************************************************************/ |
| 32 | 31 | |
| 33 | | typedef struct _c8280_config c8280_config; |
| 34 | | struct _c8280_config |
| 32 | |
| 33 | //************************************************************************** |
| 34 | // INTERFACE CONFIGURATION MACROS |
| 35 | //************************************************************************** |
| 36 | |
| 37 | #define MCFG_C8280_ADD(_tag, _address) \ |
| 38 | MCFG_DEVICE_ADD(_tag, C8280, 0) \ |
| 39 | c8280_device_config::static_set_config(device, _address); |
| 40 | |
| 41 | |
| 42 | |
| 43 | //************************************************************************** |
| 44 | // TYPE DEFINITIONS |
| 45 | //************************************************************************** |
| 46 | |
| 47 | // ======================> c8280_device_config |
| 48 | |
| 49 | class c8280_device_config : public device_config, |
| 50 | public device_config_ieee488_interface |
| 35 | 51 | { |
| 36 | | const char *bus_tag; /* bus device */ |
| 37 | | int address; /* bus address */ |
| 52 | friend class c8280_device; |
| 53 | |
| 54 | // construction/destruction |
| 55 | c8280_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 56 | |
| 57 | public: |
| 58 | // allocators |
| 59 | static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock); |
| 60 | virtual device_t *alloc_device(running_machine &machine) const; |
| 61 | |
| 62 | // inline configuration helpers |
| 63 | static void static_set_config(device_config *device, int address, int variant); |
| 64 | |
| 65 | // optional information overrides |
| 66 | virtual const rom_entry *device_rom_region() const; |
| 67 | virtual machine_config_constructor device_mconfig_additions() const; |
| 68 | |
| 69 | protected: |
| 70 | // device_config overrides |
| 71 | virtual void device_config_complete(); |
| 72 | |
| 73 | int m_address; |
| 38 | 74 | }; |
| 39 | 75 | |
| 40 | | /*************************************************************************** |
| 41 | | PROTOTYPES |
| 42 | | ***************************************************************************/ |
| 43 | | /* IEEE-488 interface */ |
| 44 | | WRITE_LINE_DEVICE_HANDLER( c8280_ieee488_atn_w ); |
| 45 | | WRITE_LINE_DEVICE_HANDLER( c8280_ieee488_ifc_w ); |
| 46 | 76 | |
| 77 | // ======================> c8280_device |
| 78 | |
| 79 | class c8280_device : public device_t, |
| 80 | public device_ieee488_interface |
| 81 | { |
| 82 | friend class c8280_device_config; |
| 83 | |
| 84 | // construction/destruction |
| 85 | c8280_device(running_machine &_machine, const c8280_device_config &_config); |
| 86 | |
| 87 | protected: |
| 88 | // device-level overrides |
| 89 | virtual void device_start(); |
| 90 | virtual void device_reset(); |
| 91 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 92 | |
| 93 | // device_ieee488_interface overrides |
| 94 | void ieee488_atn(int state); |
| 95 | void ieee488_ifc(int state); |
| 96 | |
| 97 | required_device<cpu_device> m_maincpu; |
| 98 | required_device<cpu_device> m_fdccpu; |
| 99 | required_device<riot6532_device> m_riot0; |
| 100 | required_device<riot6532_device> m_riot1; |
| 101 | required_device<device_t> m_image0; |
| 102 | optional_device<device_t> m_image1; |
| 103 | required_device<ieee488_device> m_bus; |
| 104 | |
| 105 | const c8280_device_config &m_config; |
| 106 | }; |
| 107 | |
| 108 | |
| 109 | // device type definition |
| 110 | extern const device_type C8280; |
| 111 | |
| 112 | |
| 113 | |
| 47 | 114 | #endif |