trunk/src/mess/machine/c1541.c
| r24558 | r24559 | |
| 155 | 155 | #define CENTRONICS_TAG "centronics" |
| 156 | 156 | |
| 157 | 157 | |
| 158 | | enum |
| 159 | | { |
| 160 | | LED_POWER = 0, |
| 161 | | LED_ACT |
| 162 | | }; |
| 163 | 158 | |
| 164 | | |
| 165 | | |
| 166 | 159 | //************************************************************************** |
| 167 | 160 | // DEVICE DEFINITIONS |
| 168 | 161 | //************************************************************************** |
| r24558 | r24559 | |
| 178 | 171 | const device_type C1541_PROFESSIONAL_DOS_V1 = &device_creator<c1541_professional_dos_v1_device>; |
| 179 | 172 | const device_type C1541_PROLOGIC_DOS_CLASSIC = &device_creator<c1541_prologic_dos_classic_device>; |
| 180 | 173 | |
| 174 | |
| 181 | 175 | //------------------------------------------------- |
| 182 | 176 | // ROM( c1540 ) |
| 183 | 177 | //------------------------------------------------- |
| r24558 | r24559 | |
| 190 | 184 | |
| 191 | 185 | |
| 192 | 186 | //------------------------------------------------- |
| 187 | // rom_region - device-specific ROM region |
| 188 | //------------------------------------------------- |
| 189 | |
| 190 | const rom_entry *c1540_device::device_rom_region() const |
| 191 | { |
| 192 | return ROM_NAME( c1540 ); |
| 193 | } |
| 194 | |
| 195 | |
| 196 | //------------------------------------------------- |
| 193 | 197 | // ROM( c1541 ) |
| 194 | 198 | //------------------------------------------------- |
| 195 | 199 | |
| r24558 | r24559 | |
| 224 | 228 | |
| 225 | 229 | |
| 226 | 230 | //------------------------------------------------- |
| 231 | // rom_region - device-specific ROM region |
| 232 | //------------------------------------------------- |
| 233 | |
| 234 | const rom_entry *c1541_device::device_rom_region() const |
| 235 | { |
| 236 | return ROM_NAME( c1541 ); |
| 237 | } |
| 238 | |
| 239 | |
| 240 | //------------------------------------------------- |
| 227 | 241 | // ROM( c1541c ) |
| 228 | 242 | //------------------------------------------------- |
| 229 | 243 | |
| r24558 | r24559 | |
| 238 | 252 | |
| 239 | 253 | |
| 240 | 254 | //------------------------------------------------- |
| 255 | // rom_region - device-specific ROM region |
| 256 | //------------------------------------------------- |
| 257 | |
| 258 | const rom_entry *c1541c_device::device_rom_region() const |
| 259 | { |
| 260 | return ROM_NAME( c1541c ); |
| 261 | } |
| 262 | |
| 263 | |
| 264 | //------------------------------------------------- |
| 241 | 265 | // ROM( c1541ii ) |
| 242 | 266 | //------------------------------------------------- |
| 243 | 267 | |
| r24558 | r24559 | |
| 254 | 278 | |
| 255 | 279 | |
| 256 | 280 | //------------------------------------------------- |
| 281 | // rom_region - device-specific ROM region |
| 282 | //------------------------------------------------- |
| 283 | |
| 284 | const rom_entry *c1541ii_device::device_rom_region() const |
| 285 | { |
| 286 | return ROM_NAME( c1541ii ); |
| 287 | } |
| 288 | |
| 289 | |
| 290 | //------------------------------------------------- |
| 257 | 291 | // ROM( sx1541 ) |
| 258 | 292 | //------------------------------------------------- |
| 259 | 293 | |
| r24558 | r24559 | |
| 272 | 306 | |
| 273 | 307 | |
| 274 | 308 | //------------------------------------------------- |
| 309 | // rom_region - device-specific ROM region |
| 310 | //------------------------------------------------- |
| 311 | |
| 312 | const rom_entry *sx1541_device::device_rom_region() const |
| 313 | { |
| 314 | return ROM_NAME( sx1541 ); |
| 315 | } |
| 316 | |
| 317 | |
| 318 | //------------------------------------------------- |
| 275 | 319 | // ROM( fsd2 ) |
| 276 | 320 | //------------------------------------------------- |
| 277 | 321 | |
| r24558 | r24559 | |
| 288 | 332 | |
| 289 | 333 | |
| 290 | 334 | //------------------------------------------------- |
| 335 | // rom_region - device-specific ROM region |
| 336 | //------------------------------------------------- |
| 337 | |
| 338 | const rom_entry *fsd2_device::device_rom_region() const |
| 339 | { |
| 340 | return ROM_NAME( fsd2 ); |
| 341 | } |
| 342 | |
| 343 | |
| 344 | //------------------------------------------------- |
| 291 | 345 | // ROM( csd1 ) |
| 292 | 346 | //------------------------------------------------- |
| 293 | 347 | |
| r24558 | r24559 | |
| 299 | 353 | |
| 300 | 354 | |
| 301 | 355 | //------------------------------------------------- |
| 356 | // rom_region - device-specific ROM region |
| 357 | //------------------------------------------------- |
| 358 | |
| 359 | const rom_entry *csd1_device::device_rom_region() const |
| 360 | { |
| 361 | return ROM_NAME( csd1 ); |
| 362 | } |
| 363 | |
| 364 | |
| 365 | //------------------------------------------------- |
| 302 | 366 | // ROM( c1541dd ) |
| 303 | 367 | //------------------------------------------------- |
| 304 | 368 | |
| r24558 | r24559 | |
| 309 | 373 | |
| 310 | 374 | |
| 311 | 375 | //------------------------------------------------- |
| 376 | // rom_region - device-specific ROM region |
| 377 | //------------------------------------------------- |
| 378 | |
| 379 | const rom_entry *c1541_dolphin_dos_device::device_rom_region() const |
| 380 | { |
| 381 | return ROM_NAME( c1541dd ); |
| 382 | } |
| 383 | |
| 384 | |
| 385 | //------------------------------------------------- |
| 312 | 386 | // ROM( c1541pd ) |
| 313 | 387 | //------------------------------------------------- |
| 314 | 388 | |
| r24558 | r24559 | |
| 320 | 394 | |
| 321 | 395 | |
| 322 | 396 | //------------------------------------------------- |
| 397 | // rom_region - device-specific ROM region |
| 398 | //------------------------------------------------- |
| 399 | |
| 400 | const rom_entry *c1541_professional_dos_v1_device::device_rom_region() const |
| 401 | { |
| 402 | return ROM_NAME( c1541pd ); |
| 403 | } |
| 404 | |
| 405 | |
| 406 | //------------------------------------------------- |
| 323 | 407 | // ROM( c1541pdc ) |
| 324 | 408 | //------------------------------------------------- |
| 325 | 409 | |
| r24558 | r24559 | |
| 338 | 422 | // rom_region - device-specific ROM region |
| 339 | 423 | //------------------------------------------------- |
| 340 | 424 | |
| 341 | | const rom_entry *base_c1541_device::device_rom_region() const |
| 425 | const rom_entry *c1541_prologic_dos_classic_device::device_rom_region() const |
| 342 | 426 | { |
| 343 | | switch (m_variant) |
| 344 | | { |
| 345 | | case TYPE_1540: |
| 346 | | return ROM_NAME( c1540 ); |
| 347 | | |
| 348 | | default: |
| 349 | | case TYPE_1541: |
| 350 | | return ROM_NAME( c1541 ); |
| 351 | | |
| 352 | | case TYPE_1541C: |
| 353 | | return ROM_NAME( c1541c ); |
| 354 | | |
| 355 | | case TYPE_1541II: |
| 356 | | return ROM_NAME( c1541ii ); |
| 357 | | |
| 358 | | case TYPE_SX1541: |
| 359 | | return ROM_NAME( sx1541 ); |
| 360 | | |
| 361 | | case TYPE_FSD2: // aka Excelerator PLUS / Oceanic OC-118N |
| 362 | | return ROM_NAME( fsd2 ); |
| 363 | | |
| 364 | | case TYPE_CSD1: |
| 365 | | return ROM_NAME( csd1 ); |
| 366 | | |
| 367 | | case TYPE_1541_DOLPHIN_DOS: |
| 368 | | return ROM_NAME( c1541dd ); |
| 369 | | |
| 370 | | case TYPE_1541_PROFESSIONAL_DOS_V1: |
| 371 | | return ROM_NAME( c1541pd ); |
| 372 | | |
| 373 | | case TYPE_1541_PROLOGIC_DOS_CLASSIC: |
| 374 | | return ROM_NAME( c1541pdc ); |
| 375 | | } |
| 427 | return ROM_NAME( c1541pdc ); |
| 376 | 428 | } |
| 377 | 429 | |
| 378 | 430 | |
| 379 | | |
| 380 | 431 | //------------------------------------------------- |
| 381 | 432 | // read - |
| 382 | 433 | //------------------------------------------------- |
| r24558 | r24559 | |
| 839 | 890 | |
| 840 | 891 | |
| 841 | 892 | //------------------------------------------------- |
| 893 | // machine_config_additions - device-specific |
| 894 | // machine configurations |
| 895 | //------------------------------------------------- |
| 896 | |
| 897 | machine_config_constructor base_c1541_device::device_mconfig_additions() const |
| 898 | { |
| 899 | return MACHINE_CONFIG_NAME( c1541 ); |
| 900 | } |
| 901 | |
| 902 | |
| 903 | //------------------------------------------------- |
| 842 | 904 | // MACHINE_DRIVER( c1541c ) |
| 843 | 905 | //------------------------------------------------- |
| 844 | 906 | |
| r24558 | r24559 | |
| 851 | 913 | |
| 852 | 914 | |
| 853 | 915 | //------------------------------------------------- |
| 916 | // machine_config_additions - device-specific |
| 917 | // machine configurations |
| 918 | //------------------------------------------------- |
| 919 | |
| 920 | machine_config_constructor c1541c_device::device_mconfig_additions() const |
| 921 | { |
| 922 | return MACHINE_CONFIG_NAME( c1541c ); |
| 923 | } |
| 924 | |
| 925 | |
| 926 | //------------------------------------------------- |
| 854 | 927 | // MACHINE_DRIVER( c1541dd ) |
| 855 | 928 | //------------------------------------------------- |
| 856 | 929 | |
| r24558 | r24559 | |
| 863 | 936 | |
| 864 | 937 | |
| 865 | 938 | //------------------------------------------------- |
| 939 | // machine_config_additions - device-specific |
| 940 | // machine configurations |
| 941 | //------------------------------------------------- |
| 942 | |
| 943 | machine_config_constructor c1541_dolphin_dos_device::device_mconfig_additions() const |
| 944 | { |
| 945 | return MACHINE_CONFIG_NAME( c1541dd ); |
| 946 | } |
| 947 | |
| 948 | |
| 949 | //------------------------------------------------- |
| 866 | 950 | // MACHINE_DRIVER( c1541pd ) |
| 867 | 951 | //------------------------------------------------- |
| 868 | 952 | |
| r24558 | r24559 | |
| 875 | 959 | |
| 876 | 960 | |
| 877 | 961 | //------------------------------------------------- |
| 962 | // machine_config_additions - device-specific |
| 963 | // machine configurations |
| 964 | //------------------------------------------------- |
| 965 | |
| 966 | machine_config_constructor c1541_professional_dos_v1_device::device_mconfig_additions() const |
| 967 | { |
| 968 | return MACHINE_CONFIG_NAME( c1541pd ); |
| 969 | } |
| 970 | |
| 971 | |
| 972 | //------------------------------------------------- |
| 878 | 973 | // MACHINE_DRIVER( c1541pdc ) |
| 879 | 974 | //------------------------------------------------- |
| 880 | 975 | |
| r24558 | r24559 | |
| 894 | 989 | // machine configurations |
| 895 | 990 | //------------------------------------------------- |
| 896 | 991 | |
| 897 | | machine_config_constructor base_c1541_device::device_mconfig_additions() const |
| 992 | machine_config_constructor c1541_prologic_dos_classic_device::device_mconfig_additions() const |
| 898 | 993 | { |
| 899 | | switch (m_variant) |
| 900 | | { |
| 901 | | default: |
| 902 | | return MACHINE_CONFIG_NAME( c1541 ); |
| 903 | | |
| 904 | | case TYPE_1541C: |
| 905 | | return MACHINE_CONFIG_NAME( c1541c ); |
| 906 | | |
| 907 | | case TYPE_1541_DOLPHIN_DOS: |
| 908 | | return MACHINE_CONFIG_NAME( c1541dd ); |
| 909 | | |
| 910 | | case TYPE_1541_PROFESSIONAL_DOS_V1: |
| 911 | | return MACHINE_CONFIG_NAME( c1541pd ); |
| 912 | | |
| 913 | | case TYPE_1541_PROLOGIC_DOS_CLASSIC: |
| 914 | | return MACHINE_CONFIG_NAME( c1541pdc ); |
| 915 | | } |
| 994 | return MACHINE_CONFIG_NAME( c1541pdc ); |
| 916 | 995 | } |
| 917 | 996 | |
| 918 | 997 | |
| r24558 | r24559 | |
| 966 | 1045 | // base_c1541_device - constructor |
| 967 | 1046 | //------------------------------------------------- |
| 968 | 1047 | |
| 969 | | base_c1541_device:: base_c1541_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source) |
| 1048 | base_c1541_device:: base_c1541_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) |
| 970 | 1049 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
| 971 | 1050 | device_cbm_iec_interface(mconfig, *this), |
| 972 | 1051 | device_c64_floppy_parallel_interface(mconfig, *this), |
| r24558 | r24559 | |
| 978 | 1057 | m_address(*this, "ADDRESS"), |
| 979 | 1058 | m_data_out(1), |
| 980 | 1059 | m_via0_irq(CLEAR_LINE), |
| 981 | | m_via1_irq(CLEAR_LINE), |
| 982 | | m_variant(variant) |
| 1060 | m_via1_irq(CLEAR_LINE) |
| 983 | 1061 | { |
| 984 | 1062 | } |
| 985 | 1063 | |
| r24558 | r24559 | |
| 989 | 1067 | //------------------------------------------------- |
| 990 | 1068 | |
| 991 | 1069 | c1540_device::c1540_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 992 | | : base_c1541_device(mconfig, C1540, "C1540", tag, owner, clock, TYPE_1540, "c1540", __FILE__) { } |
| 1070 | : base_c1541_device(mconfig, C1540, "C1540", tag, owner, clock, "c1540", __FILE__) { } |
| 993 | 1071 | |
| 994 | 1072 | |
| 995 | 1073 | //------------------------------------------------- |
| r24558 | r24559 | |
| 997 | 1075 | //------------------------------------------------- |
| 998 | 1076 | |
| 999 | 1077 | c1541_device::c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1000 | | : base_c1541_device(mconfig, C1541, "C1541", tag, owner, clock, TYPE_1541, "c1541", __FILE__) { } |
| 1078 | : base_c1541_device(mconfig, C1541, "C1541", tag, owner, clock, "c1541", __FILE__) { } |
| 1001 | 1079 | |
| 1002 | 1080 | |
| 1003 | 1081 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1005 | 1083 | //------------------------------------------------- |
| 1006 | 1084 | |
| 1007 | 1085 | c1541c_device::c1541c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1008 | | : base_c1541_device(mconfig, C1541C, "C1541C", tag, owner, clock, TYPE_1541C, "c1541c", __FILE__) { } |
| 1086 | : base_c1541_device(mconfig, C1541C, "C1541C", tag, owner, clock, "c1541c", __FILE__) { } |
| 1009 | 1087 | |
| 1010 | 1088 | |
| 1011 | 1089 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1013 | 1091 | //------------------------------------------------- |
| 1014 | 1092 | |
| 1015 | 1093 | c1541ii_device::c1541ii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1016 | | : base_c1541_device(mconfig, C1541II, "C1541-II", tag, owner, clock, TYPE_1541II, "c1541ii", __FILE__) { } |
| 1094 | : base_c1541_device(mconfig, C1541II, "C1541-II", tag, owner, clock, "c1541ii", __FILE__) { } |
| 1017 | 1095 | |
| 1018 | 1096 | |
| 1019 | 1097 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1021 | 1099 | //------------------------------------------------- |
| 1022 | 1100 | |
| 1023 | 1101 | sx1541_device::sx1541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1024 | | : base_c1541_device(mconfig, SX1541, "SX1541", tag, owner, clock, TYPE_SX1541, "sx1541", __FILE__) { } |
| 1102 | : base_c1541_device(mconfig, SX1541, "SX1541", tag, owner, clock, "sx1541", __FILE__) { } |
| 1025 | 1103 | |
| 1026 | 1104 | |
| 1027 | 1105 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1029 | 1107 | //------------------------------------------------- |
| 1030 | 1108 | |
| 1031 | 1109 | fsd2_device::fsd2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1032 | | : base_c1541_device(mconfig, FSD2, "FSD-2", tag, owner, clock, TYPE_FSD2, "fsd2", __FILE__) { } |
| 1110 | : base_c1541_device(mconfig, FSD2, "FSD-2", tag, owner, clock, "fsd2", __FILE__) { } |
| 1033 | 1111 | |
| 1034 | 1112 | |
| 1035 | 1113 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1037 | 1115 | //------------------------------------------------- |
| 1038 | 1116 | |
| 1039 | 1117 | csd1_device::csd1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1040 | | : base_c1541_device(mconfig, CSD1, "CSD-1", tag, owner, clock, TYPE_CSD1, "csd1", __FILE__) { } |
| 1118 | : base_c1541_device(mconfig, CSD1, "CSD-1", tag, owner, clock, "csd1", __FILE__) { } |
| 1041 | 1119 | |
| 1042 | 1120 | |
| 1043 | 1121 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1045 | 1123 | //------------------------------------------------- |
| 1046 | 1124 | |
| 1047 | 1125 | c1541_dolphin_dos_device::c1541_dolphin_dos_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1048 | | : base_c1541_device(mconfig, C1541_DOLPHIN_DOS, "C1541 Dolphin-DOS 2.0", tag, owner, clock, TYPE_1541_DOLPHIN_DOS, "c1541dd", __FILE__) { } |
| 1126 | : base_c1541_device(mconfig, C1541_DOLPHIN_DOS, "C1541 Dolphin-DOS 2.0", tag, owner, clock, "c1541dd", __FILE__) { } |
| 1049 | 1127 | |
| 1050 | 1128 | |
| 1051 | 1129 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1053 | 1131 | //------------------------------------------------- |
| 1054 | 1132 | |
| 1055 | 1133 | c1541_professional_dos_v1_device::c1541_professional_dos_v1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1056 | | : base_c1541_device(mconfig, C1541_PROFESSIONAL_DOS_V1, "C1541 Professional-DOS v1", tag, owner, clock, TYPE_1541_PROFESSIONAL_DOS_V1, "c1541pd", __FILE__) { } |
| 1134 | : base_c1541_device(mconfig, C1541_PROFESSIONAL_DOS_V1, "C1541 Professional-DOS v1", tag, owner, clock, "c1541pd", __FILE__) { } |
| 1057 | 1135 | |
| 1058 | 1136 | |
| 1059 | 1137 | //------------------------------------------------- |
| r24558 | r24559 | |
| 1061 | 1139 | //------------------------------------------------- |
| 1062 | 1140 | |
| 1063 | 1141 | c1541_prologic_dos_classic_device::c1541_prologic_dos_classic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1064 | | : base_c1541_device(mconfig, C1541_PROLOGIC_DOS_CLASSIC, "C1541 ProLogic-DOS Classic", tag, owner, clock, TYPE_1541_PROLOGIC_DOS_CLASSIC, "c1541pdc", __FILE__), |
| 1142 | : base_c1541_device(mconfig, C1541_PROLOGIC_DOS_CLASSIC, "C1541 ProLogic-DOS Classic", tag, owner, clock, "c1541pdc", __FILE__), |
| 1065 | 1143 | m_pia(*this, MC6821_TAG), |
| 1066 | 1144 | m_centronics(*this, CENTRONICS_TAG), |
| 1067 | 1145 | m_mmu_rom(*this, "mmu") |
trunk/src/mess/machine/c1541.h
| r24558 | r24559 | |
| 47 | 47 | { |
| 48 | 48 | public: |
| 49 | 49 | // construction/destruction |
| 50 | | base_c1541_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source); |
| 50 | base_c1541_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); |
| 51 | 51 | |
| 52 | | enum |
| 53 | | { |
| 54 | | TYPE_1540 = 0, |
| 55 | | TYPE_1541, |
| 56 | | TYPE_1541C, |
| 57 | | TYPE_1541II, |
| 58 | | TYPE_SX1541, |
| 59 | | TYPE_FSD2, |
| 60 | | TYPE_CSD1, |
| 61 | | |
| 62 | | // extended hardware |
| 63 | | TYPE_1541_DOLPHIN_DOS, |
| 64 | | TYPE_1541_PROFESSIONAL_DOS_V1, |
| 65 | | TYPE_1541_PROLOGIC_DOS_CLASSIC |
| 66 | | }; |
| 67 | | |
| 68 | 52 | DECLARE_WRITE_LINE_MEMBER( via0_irq_w ); |
| 69 | 53 | DECLARE_READ8_MEMBER( via0_pa_r ); |
| 70 | 54 | DECLARE_WRITE8_MEMBER( via0_pa_w ); |
| r24558 | r24559 | |
| 79 | 63 | DECLARE_WRITE_LINE_MEMBER( byte_w ); |
| 80 | 64 | |
| 81 | 65 | // optional information overrides |
| 82 | | virtual const rom_entry *device_rom_region() const; |
| 83 | 66 | virtual machine_config_constructor device_mconfig_additions() const; |
| 84 | 67 | virtual ioport_constructor device_input_ports() const; |
| 85 | 68 | |
| r24558 | r24559 | |
| 96 | 79 | virtual void parallel_data_w(UINT8 data); |
| 97 | 80 | virtual void parallel_strobe_w(int state); |
| 98 | 81 | |
| 82 | enum |
| 83 | { |
| 84 | LED_POWER = 0, |
| 85 | LED_ACT |
| 86 | }; |
| 87 | |
| 99 | 88 | inline void set_iec_data(); |
| 100 | 89 | |
| 101 | 90 | required_device<m6502_device> m_maincpu; |
| r24558 | r24559 | |
| 111 | 100 | // interrupts |
| 112 | 101 | int m_via0_irq; // VIA #0 interrupt request |
| 113 | 102 | int m_via1_irq; // VIA #1 interrupt request |
| 114 | | |
| 115 | | int m_variant; |
| 116 | 103 | }; |
| 117 | 104 | |
| 118 | 105 | |
| r24558 | r24559 | |
| 123 | 110 | public: |
| 124 | 111 | // construction/destruction |
| 125 | 112 | c1540_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 113 | |
| 114 | // optional information overrides |
| 115 | virtual const rom_entry *device_rom_region() const; |
| 126 | 116 | }; |
| 127 | 117 | |
| 128 | 118 | |
| r24558 | r24559 | |
| 133 | 123 | public: |
| 134 | 124 | // construction/destruction |
| 135 | 125 | c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 126 | |
| 127 | // optional information overrides |
| 128 | virtual const rom_entry *device_rom_region() const; |
| 136 | 129 | }; |
| 137 | 130 | |
| 138 | 131 | |
| r24558 | r24559 | |
| 144 | 137 | // construction/destruction |
| 145 | 138 | c1541c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 146 | 139 | |
| 140 | // optional information overrides |
| 141 | virtual const rom_entry *device_rom_region() const; |
| 142 | virtual machine_config_constructor device_mconfig_additions() const; |
| 143 | |
| 147 | 144 | // not really public |
| 148 | 145 | DECLARE_READ8_MEMBER( via0_pa_r ); |
| 149 | 146 | }; |
| r24558 | r24559 | |
| 156 | 153 | public: |
| 157 | 154 | // construction/destruction |
| 158 | 155 | c1541ii_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 156 | |
| 157 | // optional information overrides |
| 158 | virtual const rom_entry *device_rom_region() const; |
| 159 | 159 | }; |
| 160 | 160 | |
| 161 | 161 | |
| r24558 | r24559 | |
| 166 | 166 | public: |
| 167 | 167 | // construction/destruction |
| 168 | 168 | sx1541_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 169 | |
| 170 | // optional information overrides |
| 171 | virtual const rom_entry *device_rom_region() const; |
| 169 | 172 | }; |
| 170 | 173 | |
| 171 | 174 | |
| r24558 | r24559 | |
| 177 | 180 | // construction/destruction |
| 178 | 181 | fsd2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 179 | 182 | |
| 183 | // optional information overrides |
| 184 | virtual const rom_entry *device_rom_region() const; |
| 185 | |
| 180 | 186 | // device-level overrides |
| 181 | 187 | virtual void device_start(); |
| 182 | 188 | }; |
| r24558 | r24559 | |
| 189 | 195 | public: |
| 190 | 196 | // construction/destruction |
| 191 | 197 | csd1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 198 | |
| 199 | // optional information overrides |
| 200 | virtual const rom_entry *device_rom_region() const; |
| 192 | 201 | }; |
| 193 | 202 | |
| 194 | 203 | |
| r24558 | r24559 | |
| 199 | 208 | public: |
| 200 | 209 | // construction/destruction |
| 201 | 210 | c1541_dolphin_dos_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 211 | |
| 212 | // optional information overrides |
| 213 | virtual const rom_entry *device_rom_region() const; |
| 214 | virtual machine_config_constructor device_mconfig_additions() const; |
| 202 | 215 | }; |
| 203 | 216 | |
| 204 | 217 | |
| r24558 | r24559 | |
| 209 | 222 | public: |
| 210 | 223 | // construction/destruction |
| 211 | 224 | c1541_professional_dos_v1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 225 | |
| 226 | // optional information overrides |
| 227 | virtual const rom_entry *device_rom_region() const; |
| 228 | virtual machine_config_constructor device_mconfig_additions() const; |
| 212 | 229 | }; |
| 213 | 230 | |
| 214 | 231 | |
| r24558 | r24559 | |
| 220 | 237 | // construction/destruction |
| 221 | 238 | c1541_prologic_dos_classic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 222 | 239 | |
| 240 | // optional information overrides |
| 241 | virtual const rom_entry *device_rom_region() const; |
| 242 | virtual machine_config_constructor device_mconfig_additions() const; |
| 243 | |
| 223 | 244 | // not really public |
| 224 | 245 | DECLARE_READ8_MEMBER( read ); |
| 225 | 246 | DECLARE_WRITE8_MEMBER( write ); |
trunk/src/mess/machine/cbmiec.c
| r24558 | r24559 | |
| 190 | 190 | 5) Tei minimum must be 80us for external device to be a listener. |
| 191 | 191 | */ |
| 192 | 192 | |
| 193 | | /* |
| 194 | | |
| 195 | | TODO: |
| 196 | | |
| 197 | | - refactor into an actual daisy chain instead of this convenient hack |
| 198 | | |
| 199 | | */ |
| 200 | | |
| 201 | 193 | #include "cbmiec.h" |
| 202 | 194 | |
| 203 | 195 | |
| r24558 | r24559 | |
| 275 | 267 | |
| 276 | 268 | |
| 277 | 269 | //************************************************************************** |
| 278 | | // INLINE HELPERS |
| 279 | | //************************************************************************** |
| 280 | | |
| 281 | | //------------------------------------------------- |
| 282 | | // set_signal - |
| 283 | | //------------------------------------------------- |
| 284 | | |
| 285 | | inline void cbm_iec_device::set_signal(device_t *device, int signal, int state) |
| 286 | | { |
| 287 | | bool changed = false; |
| 288 | | |
| 289 | | if (device == this) |
| 290 | | { |
| 291 | | if (m_line[signal] != state) |
| 292 | | { |
| 293 | | if (LOG) logerror("CBM IEC: '%s' %s %u\n", tag(), SIGNAL_NAME[signal], state); |
| 294 | | m_line[signal] = state; |
| 295 | | changed = true; |
| 296 | | } |
| 297 | | } |
| 298 | | else |
| 299 | | { |
| 300 | | daisy_entry *entry = m_device_list.first(); |
| 301 | | |
| 302 | | while (entry) |
| 303 | | { |
| 304 | | if (!strcmp(entry->m_device->tag(), device->tag())) |
| 305 | | { |
| 306 | | if (entry->m_line[signal] != state) |
| 307 | | { |
| 308 | | if (LOG) logerror("CBM IEC: '%s' %s %u\n", device->tag(), SIGNAL_NAME[signal], state); |
| 309 | | entry->m_line[signal] = state; |
| 310 | | changed = true; |
| 311 | | } |
| 312 | | } |
| 313 | | |
| 314 | | entry = entry->next(); |
| 315 | | } |
| 316 | | } |
| 317 | | |
| 318 | | if (changed) |
| 319 | | { |
| 320 | | switch (signal) |
| 321 | | { |
| 322 | | case SRQ: m_write_srq(state); break; |
| 323 | | case ATN: m_write_atn(state); break; |
| 324 | | case CLK: m_write_clk(state); break; |
| 325 | | case DATA: m_write_data(state); break; |
| 326 | | case RESET: m_write_reset(state);break; |
| 327 | | } |
| 328 | | |
| 329 | | daisy_entry *entry = m_device_list.first(); |
| 330 | | |
| 331 | | while (entry) |
| 332 | | { |
| 333 | | switch (signal) |
| 334 | | { |
| 335 | | case SRQ: |
| 336 | | entry->m_interface->cbm_iec_srq(state); |
| 337 | | break; |
| 338 | | |
| 339 | | case ATN: |
| 340 | | entry->m_interface->cbm_iec_atn(state); |
| 341 | | break; |
| 342 | | |
| 343 | | case CLK: |
| 344 | | entry->m_interface->cbm_iec_clk(state); |
| 345 | | break; |
| 346 | | |
| 347 | | case DATA: |
| 348 | | entry->m_interface->cbm_iec_data(state); |
| 349 | | break; |
| 350 | | |
| 351 | | case RESET: |
| 352 | | entry->m_interface->cbm_iec_reset(state); |
| 353 | | break; |
| 354 | | } |
| 355 | | |
| 356 | | entry = entry->next(); |
| 357 | | } |
| 358 | | |
| 359 | | if (LOG) logerror("CBM IEC: SRQ %u ATN %u CLK %u DATA %u RESET %u\n", |
| 360 | | get_signal(SRQ), get_signal(ATN), get_signal(CLK), get_signal(DATA), get_signal(RESET)); |
| 361 | | } |
| 362 | | } |
| 363 | | |
| 364 | | |
| 365 | | //------------------------------------------------- |
| 366 | | // get_signal - |
| 367 | | //------------------------------------------------- |
| 368 | | |
| 369 | | inline int cbm_iec_device::get_signal(int signal) |
| 370 | | { |
| 371 | | int state = m_line[signal]; |
| 372 | | |
| 373 | | if (state) |
| 374 | | { |
| 375 | | daisy_entry *entry = m_device_list.first(); |
| 376 | | |
| 377 | | while (entry) |
| 378 | | { |
| 379 | | if (!entry->m_line[signal]) |
| 380 | | { |
| 381 | | state = 0; |
| 382 | | break; |
| 383 | | } |
| 384 | | |
| 385 | | entry = entry->next(); |
| 386 | | } |
| 387 | | } |
| 388 | | |
| 389 | | return state; |
| 390 | | } |
| 391 | | |
| 392 | | |
| 393 | | |
| 394 | | //************************************************************************** |
| 395 | 270 | // LIVE DEVICE |
| 396 | 271 | //************************************************************************** |
| 397 | 272 | |
| r24558 | r24559 | |
| 483 | 358 | |
| 484 | 359 | |
| 485 | 360 | //------------------------------------------------- |
| 486 | | // srq_r - |
| 361 | // set_signal - |
| 487 | 362 | //------------------------------------------------- |
| 488 | 363 | |
| 489 | | READ_LINE_MEMBER( cbm_iec_device::srq_r ) |
| 364 | void cbm_iec_device::set_signal(device_t *device, int signal, int state) |
| 490 | 365 | { |
| 491 | | return get_signal(SRQ); |
| 492 | | } |
| 366 | bool changed = false; |
| 493 | 367 | |
| 368 | if (device == this) |
| 369 | { |
| 370 | if (m_line[signal] != state) |
| 371 | { |
| 372 | if (LOG) logerror("CBM IEC: '%s' %s %u\n", tag(), SIGNAL_NAME[signal], state); |
| 373 | m_line[signal] = state; |
| 374 | changed = true; |
| 375 | } |
| 376 | } |
| 377 | else |
| 378 | { |
| 379 | daisy_entry *entry = m_device_list.first(); |
| 494 | 380 | |
| 495 | | //------------------------------------------------- |
| 496 | | // atn_r - |
| 497 | | //------------------------------------------------- |
| 381 | while (entry) |
| 382 | { |
| 383 | if (!strcmp(entry->m_device->tag(), device->tag())) |
| 384 | { |
| 385 | if (entry->m_line[signal] != state) |
| 386 | { |
| 387 | if (LOG) logerror("CBM IEC: '%s' %s %u\n", device->tag(), SIGNAL_NAME[signal], state); |
| 388 | entry->m_line[signal] = state; |
| 389 | changed = true; |
| 390 | } |
| 391 | } |
| 498 | 392 | |
| 499 | | READ_LINE_MEMBER( cbm_iec_device::atn_r ) |
| 500 | | { |
| 501 | | return get_signal(ATN); |
| 502 | | } |
| 393 | entry = entry->next(); |
| 394 | } |
| 395 | } |
| 503 | 396 | |
| 397 | if (changed) |
| 398 | { |
| 399 | switch (signal) |
| 400 | { |
| 401 | case SRQ: m_write_srq(state); break; |
| 402 | case ATN: m_write_atn(state); break; |
| 403 | case CLK: m_write_clk(state); break; |
| 404 | case DATA: m_write_data(state); break; |
| 405 | case RESET: m_write_reset(state);break; |
| 406 | } |
| 504 | 407 | |
| 505 | | //------------------------------------------------- |
| 506 | | // clk_r - |
| 507 | | //------------------------------------------------- |
| 408 | daisy_entry *entry = m_device_list.first(); |
| 508 | 409 | |
| 509 | | READ_LINE_MEMBER( cbm_iec_device::clk_r ) |
| 510 | | { |
| 511 | | return get_signal(CLK); |
| 512 | | } |
| 410 | while (entry) |
| 411 | { |
| 412 | switch (signal) |
| 413 | { |
| 414 | case SRQ: |
| 415 | entry->m_interface->cbm_iec_srq(state); |
| 416 | break; |
| 513 | 417 | |
| 418 | case ATN: |
| 419 | entry->m_interface->cbm_iec_atn(state); |
| 420 | break; |
| 514 | 421 | |
| 515 | | //------------------------------------------------- |
| 516 | | // data_r - |
| 517 | | //------------------------------------------------- |
| 422 | case CLK: |
| 423 | entry->m_interface->cbm_iec_clk(state); |
| 424 | break; |
| 518 | 425 | |
| 519 | | READ_LINE_MEMBER( cbm_iec_device::data_r ) |
| 520 | | { |
| 521 | | return get_signal(DATA); |
| 522 | | } |
| 426 | case DATA: |
| 427 | entry->m_interface->cbm_iec_data(state); |
| 428 | break; |
| 523 | 429 | |
| 430 | case RESET: |
| 431 | entry->m_interface->cbm_iec_reset(state); |
| 432 | break; |
| 433 | } |
| 524 | 434 | |
| 525 | | //------------------------------------------------- |
| 526 | | // reset_r - |
| 527 | | //------------------------------------------------- |
| 435 | entry = entry->next(); |
| 436 | } |
| 528 | 437 | |
| 529 | | READ_LINE_MEMBER( cbm_iec_device::reset_r ) |
| 530 | | { |
| 531 | | return get_signal(RESET); |
| 438 | if (LOG) logerror("CBM IEC: SRQ %u ATN %u CLK %u DATA %u RESET %u\n", |
| 439 | get_signal(SRQ), get_signal(ATN), get_signal(CLK), get_signal(DATA), get_signal(RESET)); |
| 440 | } |
| 532 | 441 | } |
| 533 | 442 | |
| 534 | 443 | |
| 535 | 444 | //------------------------------------------------- |
| 536 | | // srq_w - |
| 445 | // get_signal - |
| 537 | 446 | //------------------------------------------------- |
| 538 | 447 | |
| 539 | | WRITE_LINE_MEMBER( cbm_iec_device::srq_w ) |
| 448 | int cbm_iec_device::get_signal(int signal) |
| 540 | 449 | { |
| 541 | | set_signal(this, SRQ, state); |
| 542 | | } |
| 450 | int state = m_line[signal]; |
| 543 | 451 | |
| 452 | if (state) |
| 453 | { |
| 454 | daisy_entry *entry = m_device_list.first(); |
| 544 | 455 | |
| 545 | | //------------------------------------------------- |
| 546 | | // atn_w - |
| 547 | | //------------------------------------------------- |
| 456 | while (entry) |
| 457 | { |
| 458 | if (!entry->m_line[signal]) |
| 459 | { |
| 460 | state = 0; |
| 461 | break; |
| 462 | } |
| 548 | 463 | |
| 549 | | WRITE_LINE_MEMBER( cbm_iec_device::atn_w ) |
| 550 | | { |
| 551 | | set_signal(this, ATN, state); |
| 552 | | } |
| 464 | entry = entry->next(); |
| 465 | } |
| 466 | } |
| 553 | 467 | |
| 554 | | |
| 555 | | //------------------------------------------------- |
| 556 | | // clk_w - |
| 557 | | //------------------------------------------------- |
| 558 | | |
| 559 | | WRITE_LINE_MEMBER( cbm_iec_device::clk_w ) |
| 560 | | { |
| 561 | | set_signal(this, CLK, state); |
| 468 | return state; |
| 562 | 469 | } |
| 563 | | |
| 564 | | |
| 565 | | //------------------------------------------------- |
| 566 | | // data_w - |
| 567 | | //------------------------------------------------- |
| 568 | | |
| 569 | | WRITE_LINE_MEMBER( cbm_iec_device::data_w ) |
| 570 | | { |
| 571 | | set_signal(this, DATA, state); |
| 572 | | } |
| 573 | | |
| 574 | | |
| 575 | | //------------------------------------------------- |
| 576 | | // reset_w - |
| 577 | | //------------------------------------------------- |
| 578 | | |
| 579 | | WRITE_LINE_MEMBER( cbm_iec_device::reset_w ) |
| 580 | | { |
| 581 | | set_signal(this, RESET, state); |
| 582 | | } |
| 583 | | |
| 584 | | |
| 585 | | //------------------------------------------------- |
| 586 | | // srq_w - |
| 587 | | //------------------------------------------------- |
| 588 | | |
| 589 | | void cbm_iec_device::srq_w(device_t *device, int state) |
| 590 | | { |
| 591 | | set_signal(device, SRQ, state); |
| 592 | | } |
| 593 | | |
| 594 | | |
| 595 | | //------------------------------------------------- |
| 596 | | // atn_w - |
| 597 | | //------------------------------------------------- |
| 598 | | |
| 599 | | void cbm_iec_device::atn_w(device_t *device, int state) |
| 600 | | { |
| 601 | | set_signal(device, ATN, state); |
| 602 | | } |
| 603 | | |
| 604 | | |
| 605 | | //------------------------------------------------- |
| 606 | | // clk_w - |
| 607 | | //------------------------------------------------- |
| 608 | | |
| 609 | | void cbm_iec_device::clk_w(device_t *device, int state) |
| 610 | | { |
| 611 | | set_signal(device, CLK, state); |
| 612 | | } |
| 613 | | |
| 614 | | |
| 615 | | //------------------------------------------------- |
| 616 | | // data_w - |
| 617 | | //------------------------------------------------- |
| 618 | | |
| 619 | | void cbm_iec_device::data_w(device_t *device, int state) |
| 620 | | { |
| 621 | | set_signal(device, DATA, state); |
| 622 | | } |
| 623 | | |
| 624 | | |
| 625 | | //------------------------------------------------- |
| 626 | | // reset_w - |
| 627 | | //------------------------------------------------- |
| 628 | | |
| 629 | | void cbm_iec_device::reset_w(device_t *device, int state) |
| 630 | | { |
| 631 | | set_signal(device, RESET, state); |
| 632 | | } |
trunk/src/mess/machine/c1571.c
| r24558 | r24559 | |
| 12 | 12 | TODO: |
| 13 | 13 | |
| 14 | 14 | - modernize floppy |
| 15 | | - add wpt callback to floppy.c |
| 16 | | - refactor d64/g64 |
| 17 | 15 | - refactor 64H156 |
| 18 | 16 | - 1571CR |
| 19 | 17 | - MOS5710 |
| r24558 | r24559 | |
| 43 | 41 | #define ISA_BUS_TAG "isabus" |
| 44 | 42 | |
| 45 | 43 | |
| 46 | | enum |
| 47 | | { |
| 48 | | LED_POWER = 0, |
| 49 | | LED_ACT |
| 50 | | }; |
| 51 | 44 | |
| 52 | | |
| 53 | | |
| 54 | 45 | //************************************************************************** |
| 55 | 46 | // DEVICE DEFINITIONS |
| 56 | 47 | //************************************************************************** |
| r24558 | r24559 | |
| 72 | 63 | |
| 73 | 64 | |
| 74 | 65 | //------------------------------------------------- |
| 66 | // rom_region - device-specific ROM region |
| 67 | //------------------------------------------------- |
| 68 | |
| 69 | const rom_entry *c1570_device::device_rom_region() const |
| 70 | { |
| 71 | return ROM_NAME( c1570 ); |
| 72 | } |
| 73 | |
| 74 | |
| 75 | //------------------------------------------------- |
| 75 | 76 | // ROM( c1571 ) |
| 76 | 77 | //------------------------------------------------- |
| 77 | 78 | |
| r24558 | r24559 | |
| 88 | 89 | |
| 89 | 90 | |
| 90 | 91 | //------------------------------------------------- |
| 92 | // rom_region - device-specific ROM region |
| 93 | //------------------------------------------------- |
| 94 | |
| 95 | const rom_entry *c1571_device::device_rom_region() const |
| 96 | { |
| 97 | return ROM_NAME( c1571 ); |
| 98 | } |
| 99 | |
| 100 | |
| 101 | //------------------------------------------------- |
| 91 | 102 | // ROM( c1571cr ) |
| 92 | 103 | //------------------------------------------------- |
| 93 | 104 | |
| r24558 | r24559 | |
| 102 | 113 | |
| 103 | 114 | |
| 104 | 115 | //------------------------------------------------- |
| 116 | // rom_region - device-specific ROM region |
| 117 | //------------------------------------------------- |
| 118 | |
| 119 | const rom_entry *c1571cr_device::device_rom_region() const |
| 120 | { |
| 121 | return ROM_NAME( c1571cr ); |
| 122 | } |
| 123 | |
| 124 | |
| 125 | //------------------------------------------------- |
| 105 | 126 | // ROM( minichief ) |
| 106 | 127 | //------------------------------------------------- |
| 107 | 128 | |
| r24558 | r24559 | |
| 118 | 139 | // rom_region - device-specific ROM region |
| 119 | 140 | //------------------------------------------------- |
| 120 | 141 | |
| 121 | | const rom_entry *c1571_device::device_rom_region() const |
| 142 | const rom_entry *mini_chief_device::device_rom_region() const |
| 122 | 143 | { |
| 123 | | switch (m_variant) |
| 124 | | { |
| 125 | | case TYPE_1570: |
| 126 | | return ROM_NAME( c1570 ); |
| 127 | | |
| 128 | | default: |
| 129 | | case TYPE_1571: |
| 130 | | return ROM_NAME( c1571 ); |
| 131 | | |
| 132 | | case TYPE_1571CR: |
| 133 | | return ROM_NAME( c1571cr ); |
| 134 | | |
| 135 | | case TYPE_MINI_CHIEF: |
| 136 | | return ROM_NAME( minichief ); |
| 137 | | } |
| 144 | return ROM_NAME( minichief ); |
| 138 | 145 | } |
| 139 | 146 | |
| 140 | 147 | |
| r24558 | r24559 | |
| 755 | 762 | |
| 756 | 763 | |
| 757 | 764 | //------------------------------------------------- |
| 765 | // machine_config_additions - device-specific |
| 766 | // machine configurations |
| 767 | //------------------------------------------------- |
| 768 | |
| 769 | machine_config_constructor c1570_device::device_mconfig_additions() const |
| 770 | { |
| 771 | return MACHINE_CONFIG_NAME( c1570 ); |
| 772 | } |
| 773 | |
| 774 | |
| 775 | //------------------------------------------------- |
| 758 | 776 | // MACHINE_DRIVER( c1571 ) |
| 759 | 777 | //------------------------------------------------- |
| 760 | 778 | |
| r24558 | r24559 | |
| 779 | 797 | |
| 780 | 798 | |
| 781 | 799 | //------------------------------------------------- |
| 800 | // machine_config_additions - device-specific |
| 801 | // machine configurations |
| 802 | //------------------------------------------------- |
| 803 | |
| 804 | machine_config_constructor c1571_device::device_mconfig_additions() const |
| 805 | { |
| 806 | return MACHINE_CONFIG_NAME( c1571 ); |
| 807 | } |
| 808 | |
| 809 | |
| 810 | //------------------------------------------------- |
| 782 | 811 | // MACHINE_DRIVER( c1571cr ) |
| 783 | 812 | //------------------------------------------------- |
| 784 | 813 | |
| r24558 | r24559 | |
| 803 | 832 | |
| 804 | 833 | |
| 805 | 834 | //------------------------------------------------- |
| 835 | // machine_config_additions - device-specific |
| 836 | // machine configurations |
| 837 | //------------------------------------------------- |
| 838 | |
| 839 | machine_config_constructor c1571cr_device::device_mconfig_additions() const |
| 840 | { |
| 841 | return MACHINE_CONFIG_NAME( c1571cr ); |
| 842 | } |
| 843 | |
| 844 | |
| 845 | //------------------------------------------------- |
| 806 | 846 | // MACHINE_DRIVER( mini_chief ) |
| 807 | 847 | //------------------------------------------------- |
| 808 | 848 | |
| r24558 | r24559 | |
| 834 | 874 | // machine configurations |
| 835 | 875 | //------------------------------------------------- |
| 836 | 876 | |
| 837 | | machine_config_constructor c1571_device::device_mconfig_additions() const |
| 877 | machine_config_constructor mini_chief_device::device_mconfig_additions() const |
| 838 | 878 | { |
| 839 | | switch (m_variant) |
| 840 | | { |
| 841 | | case TYPE_1570: |
| 842 | | return MACHINE_CONFIG_NAME( c1570 ); |
| 843 | | |
| 844 | | default: |
| 845 | | case TYPE_1571: |
| 846 | | return MACHINE_CONFIG_NAME( c1571 ); |
| 847 | | |
| 848 | | case TYPE_1571CR: |
| 849 | | return MACHINE_CONFIG_NAME( c1571cr ); |
| 850 | | |
| 851 | | case TYPE_MINI_CHIEF: |
| 852 | | return MACHINE_CONFIG_NAME( mini_chief ); |
| 853 | | } |
| 879 | return MACHINE_CONFIG_NAME( mini_chief ); |
| 854 | 880 | } |
| 855 | 881 | |
| 856 | 882 | |
| r24558 | r24559 | |
| 887 | 913 | // c1571_device - constructor |
| 888 | 914 | //------------------------------------------------- |
| 889 | 915 | |
| 890 | | c1571_device::c1571_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT32 variant, const char *shortname, const char *source) |
| 916 | c1571_device::c1571_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) |
| 891 | 917 | : device_t(mconfig, type, name, tag, owner, clock, shortname, source), |
| 892 | 918 | device_cbm_iec_interface(mconfig, *this), |
| 893 | 919 | device_c64_floppy_parallel_interface(mconfig, *this), |
| r24558 | r24559 | |
| 906 | 932 | m_cnt_out(1), |
| 907 | 933 | m_via0_irq(CLEAR_LINE), |
| 908 | 934 | m_via1_irq(CLEAR_LINE), |
| 909 | | m_cia_irq(CLEAR_LINE), |
| 910 | | m_variant(variant) |
| 935 | m_cia_irq(CLEAR_LINE) |
| 911 | 936 | { |
| 912 | 937 | } |
| 913 | 938 | |
| r24558 | r24559 | |
| 930 | 955 | m_cnt_out(1), |
| 931 | 956 | m_via0_irq(CLEAR_LINE), |
| 932 | 957 | m_via1_irq(CLEAR_LINE), |
| 933 | | m_cia_irq(CLEAR_LINE), |
| 934 | | m_variant(TYPE_1571) |
| 958 | m_cia_irq(CLEAR_LINE) |
| 935 | 959 | //m_floppy(*this, WD1770_TAG":0:525dd") |
| 936 | 960 | { |
| 937 | 961 | } |
| r24558 | r24559 | |
| 942 | 966 | //------------------------------------------------- |
| 943 | 967 | |
| 944 | 968 | c1570_device::c1570_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 945 | | : c1571_device(mconfig, C1570, "C1570", tag, owner, clock, TYPE_1570, "c1570", __FILE__) |
| 969 | : c1571_device(mconfig, C1570, "C1570", tag, owner, clock, "c1570", __FILE__) |
| 946 | 970 | //m_floppy(*this, WD1770_TAG":0:525ssdd") |
| 947 | 971 | { |
| 948 | 972 | } |
| r24558 | r24559 | |
| 953 | 977 | //------------------------------------------------- |
| 954 | 978 | |
| 955 | 979 | c1571cr_device::c1571cr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 956 | | : c1571_device(mconfig, C1571CR, "C1571CR", tag, owner, clock, TYPE_1571CR, "c1571cr", __FILE__) |
| 980 | : c1571_device(mconfig, C1571CR, "C1571CR", tag, owner, clock, "c1571cr", __FILE__) |
| 957 | 981 | //m_floppy(*this, WD1770_TAG":0:525dd") |
| 958 | 982 | { |
| 959 | 983 | } |
| r24558 | r24559 | |
| 964 | 988 | //------------------------------------------------- |
| 965 | 989 | |
| 966 | 990 | mini_chief_device::mini_chief_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 967 | | : c1571_device(mconfig, MINI_CHIEF, "ICT Mini Chief", tag, owner, clock, TYPE_MINI_CHIEF, "minichif", __FILE__) |
| 991 | : c1571_device(mconfig, MINI_CHIEF, "ICT Mini Chief", tag, owner, clock, "minichif", __FILE__) |
| 968 | 992 | //m_floppy(*this, WD1770_TAG":0:525dd") |
| 969 | 993 | { |
| 970 | 994 | } |