src/mess/machine/at29040a.c
| r0 | r9486 | |
| 1 | /* |
| 2 | Atmel at29c040a flash EEPROM |
| 3 | |
| 4 | 512k*8 FEEPROM, organized in pages of 256 bytes. |
| 5 | |
| 6 | References: |
| 7 | Datasheets were found on Atmel's site (www.atmel.com) |
| 8 | |
| 9 | Raphael Nabet 2003 |
| 10 | |
| 11 | Rewritten as device |
| 12 | Michael Zapf, September 2010 |
| 13 | */ |
| 14 | |
| 15 | #include "emu.h" |
| 16 | #include "at29040a.h" |
| 17 | |
| 18 | #define FEEPROM_SIZE 0x80000 |
| 19 | #define SECTOR_SIZE 0x00100 |
| 20 | #define BOOT_BLOCK_SIZE 0x04000 |
| 21 | |
| 22 | #define ADDRESS_MASK 0x7ffff |
| 23 | #define SECTOR_ADDRESS_MASK 0x7ff00 |
| 24 | #define BYTE_ADDRESS_MASK 0x000ff |
| 25 | |
| 26 | /* |
| 27 | at29c40a state |
| 28 | |
| 29 | Command states (s_cmd_0 is the initial state): |
| 30 | s_cmd_0: default state |
| 31 | s_cmd_1: state after writing aa to 5555 |
| 32 | s_cmd_2: state after writing 55 to 2aaa |
| 33 | |
| 34 | Programming states (s_programming_0 is the initial state): |
| 35 | s_programming_0: default state |
| 36 | s_programming_1: a program and enable/disable lock command has been |
| 37 | executed, but programming has not actually started. |
| 38 | s_programming_2: the programming buffer is being written to |
| 39 | s_programming_3: the programming buffer is being burnt to flash ROM |
| 40 | */ |
| 41 | enum s_cmd_t |
| 42 | { |
| 43 | s_cmd_0 = 0x0, |
| 44 | s_cmd_1 = 0x1, |
| 45 | s_cmd_2 = 0x2 |
| 46 | }; |
| 47 | |
| 48 | enum s_pgm_t |
| 49 | { |
| 50 | s_pgm_0 = 0x0, |
| 51 | s_pgm_1 = 0x1, |
| 52 | s_pgm_2 = 0x2, |
| 53 | s_pgm_3 = 0x3 |
| 54 | }; |
| 55 | |
| 56 | |
| 57 | typedef struct _at29c040a_state |
| 58 | { |
| 59 | UINT8 *memptr; |
| 60 | |
| 61 | int s_lower_bbl; /* set when lower boot block lockout is enabled */ |
| 62 | int s_higher_bbl; /* set when upper boot block lockout is enabled */ |
| 63 | int s_sdp; /* set when in software data protect mode */ |
| 64 | |
| 65 | int s_id_mode; /* set when in chip id mode */ |
| 66 | s_cmd_t s_cmd; /* command state */ |
| 67 | int s_enabling_bbl; /* set when a boot block lockout command is expecting its parameter */ |
| 68 | int s_cmd_0x80_flag; /* set if 0x80 command has just been executed (some command require this prefix) */ |
| 69 | s_pgm_t s_pgm; /* programming state */ |
| 70 | int s_enabling_sdb; /* set when a sdp enable command is in progress */ |
| 71 | int s_disabling_sdb; /* set when a sdp disable command is in progress */ |
| 72 | int s_dirty; /* set when the memory contents should be set */ |
| 73 | UINT8 toggle_bit; |
| 74 | UINT8 programming_buffer[SECTOR_SIZE]; |
| 75 | int programming_last_offset; |
| 76 | emu_timer *programming_timer; |
| 77 | } at29c040a_state; |
| 78 | |
| 79 | INLINE at29c040a_state *get_safe_token(running_device *device) |
| 80 | { |
| 81 | assert(device != NULL); |
| 82 | return (at29c040a_state *)downcast<legacy_device_base *>(device)->token(); |
| 83 | } |
| 84 | |
| 85 | INLINE const at29c040a_config *get_config(running_device *device) |
| 86 | { |
| 87 | assert(device != NULL); |
| 88 | assert(device->type() == AT29C040A); |
| 89 | return (const at29c040a_config *) downcast<const legacy_device_config_base &>(device->baseconfig()).inline_config(); |
| 90 | } |
| 91 | |
| 92 | /* |
| 93 | programming timer callback |
| 94 | */ |
| 95 | static TIMER_CALLBACK(at29c040a_programming_timer_callback) |
| 96 | { |
| 97 | running_device *device = (running_device *)ptr; |
| 98 | at29c040a_state *feeprom = get_safe_token(device); |
| 99 | |
| 100 | switch (feeprom->s_pgm) |
| 101 | { |
| 102 | case s_pgm_1: |
| 103 | /* programming cycle timeout */ |
| 104 | feeprom->s_pgm = s_pgm_0; |
| 105 | break; |
| 106 | |
| 107 | case s_pgm_2: |
| 108 | /* programming cycle start */ |
| 109 | feeprom->s_pgm = s_pgm_3; |
| 110 | /* max delay 10ms, typical delay 5 to 7 ms */ |
| 111 | timer_adjust_oneshot(feeprom->programming_timer, ATTOTIME_IN_MSEC(5), 0); |
| 112 | break; |
| 113 | |
| 114 | case s_pgm_3: |
| 115 | /* programming cycle end */ |
| 116 | memcpy(feeprom->memptr + (feeprom->programming_last_offset & ~0xff), feeprom->programming_buffer, SECTOR_SIZE); |
| 117 | |
| 118 | if (feeprom->s_enabling_sdb) |
| 119 | feeprom->s_sdp = TRUE; |
| 120 | |
| 121 | if (feeprom->s_disabling_sdb) |
| 122 | feeprom->s_sdp = FALSE; |
| 123 | |
| 124 | feeprom->s_pgm = s_pgm_0; |
| 125 | feeprom->s_enabling_sdb = FALSE; |
| 126 | feeprom->s_disabling_sdb = FALSE; |
| 127 | |
| 128 | feeprom->s_dirty = TRUE; |
| 129 | break; |
| 130 | |
| 131 | default: |
| 132 | logerror("internal error in %s %d\n", __FILE__, __LINE__); |
| 133 | break; |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | int at29c040a_is_dirty(running_device *device) |
| 138 | { |
| 139 | at29c040a_state *feeprom = get_safe_token(device); |
| 140 | return feeprom->s_dirty; |
| 141 | } |
| 142 | |
| 143 | static void sync_flags(running_device *device) |
| 144 | { |
| 145 | at29c040a_state *feeprom = get_safe_token(device); |
| 146 | if (feeprom->s_lower_bbl) feeprom->memptr[1] |= 0x04; |
| 147 | else feeprom->memptr[1] &= ~0x04; |
| 148 | |
| 149 | if (feeprom->s_higher_bbl) feeprom->memptr[1] |= 0x02; |
| 150 | else feeprom->memptr[1] &= ~0x02; |
| 151 | |
| 152 | if (feeprom->s_sdp) feeprom->memptr[1] |= 0x01; |
| 153 | else feeprom->memptr[1] &= ~0x01; |
| 154 | } |
| 155 | |
| 156 | /* |
| 157 | read a byte from FEEPROM |
| 158 | */ |
| 159 | READ8_DEVICE_HANDLER( at29c040a_r ) |
| 160 | { |
| 161 | at29c040a_state *feeprom = get_safe_token(device); |
| 162 | int reply; |
| 163 | |
| 164 | offset &= ADDRESS_MASK; |
| 165 | |
| 166 | /* reading in the midst of any command sequence cancels it (right???) */ |
| 167 | feeprom->s_cmd = s_cmd_0; |
| 168 | feeprom->s_cmd_0x80_flag = FALSE; |
| 169 | feeprom->s_higher_bbl = TRUE; |
| 170 | sync_flags(device); |
| 171 | |
| 172 | /* reading before the start of a programming cycle cancels it (right???) */ |
| 173 | if (feeprom->s_pgm == s_pgm_1) |
| 174 | { |
| 175 | // attempty to access a locked out boot block: cancel programming |
| 176 | // command if necessary |
| 177 | feeprom->s_pgm = s_pgm_0; |
| 178 | feeprom->s_enabling_sdb = FALSE; |
| 179 | feeprom->s_disabling_sdb = FALSE; |
| 180 | timer_adjust_oneshot(feeprom->programming_timer, attotime_never, 0); |
| 181 | } |
| 182 | |
| 183 | |
| 184 | if (feeprom->s_id_mode) |
| 185 | { |
| 186 | switch (offset) |
| 187 | { |
| 188 | case 0: |
| 189 | reply = 0x1f; |
| 190 | break; |
| 191 | |
| 192 | case 1: |
| 193 | reply = 0xa4; |
| 194 | break; |
| 195 | |
| 196 | case 2: |
| 197 | reply = feeprom->s_lower_bbl ? 0xff : 0xfe; |
| 198 | break; |
| 199 | |
| 200 | case 0x7fff2: |
| 201 | reply = feeprom->s_higher_bbl ? 0xff : 0xfe; |
| 202 | break; |
| 203 | |
| 204 | default: |
| 205 | reply = 0; |
| 206 | break; |
| 207 | } |
| 208 | } |
| 209 | else if ((feeprom->s_pgm == s_pgm_2) || (feeprom->s_pgm == s_pgm_3)) |
| 210 | { |
| 211 | if (feeprom->s_pgm == s_pgm_2) |
| 212 | { /* data polling starts the programming cycle (right???) */ |
| 213 | feeprom->s_pgm = s_pgm_3; |
| 214 | /* max delay 10ms, typical delay 5 to 7 ms */ |
| 215 | timer_adjust_oneshot(feeprom->programming_timer, ATTOTIME_IN_MSEC(5), 0); |
| 216 | } |
| 217 | |
| 218 | reply = feeprom->toggle_bit; |
| 219 | feeprom->toggle_bit ^= 0x02; |
| 220 | if ((offset == feeprom->programming_last_offset) && (! (feeprom->programming_buffer[feeprom->programming_last_offset & 0xff] & 0x01))) |
| 221 | reply |= 0x01; |
| 222 | } |
| 223 | else |
| 224 | reply = feeprom->memptr[offset]; |
| 225 | |
| 226 | return reply; |
| 227 | } |
| 228 | |
| 229 | /* |
| 230 | Write a byte to FEEPROM |
| 231 | */ |
| 232 | WRITE8_DEVICE_HANDLER( at29c040a_w ) |
| 233 | { |
| 234 | at29c040a_state *feeprom = get_safe_token(device); |
| 235 | |
| 236 | offset &= ADDRESS_MASK; |
| 237 | |
| 238 | /* The special CFI commands assume a smaller address space according */ |
| 239 | /* to the specification ("address format A14-A0") */ |
| 240 | offs_t cfi_offset = offset & 0x7fff; |
| 241 | |
| 242 | if (feeprom->s_enabling_bbl) |
| 243 | { |
| 244 | feeprom->s_enabling_bbl = FALSE; |
| 245 | |
| 246 | if ((offset == 0x00000) && (data == 0x00)) |
| 247 | { |
| 248 | feeprom->s_lower_bbl = TRUE; |
| 249 | feeprom->s_dirty = TRUE; |
| 250 | sync_flags(device); |
| 251 | return; |
| 252 | } |
| 253 | else if ((offset == 0x7ffff) && (data == 0xff)) |
| 254 | { |
| 255 | feeprom->s_higher_bbl = TRUE; |
| 256 | feeprom->s_dirty = TRUE; |
| 257 | sync_flags(device); |
| 258 | return; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | switch (feeprom->s_cmd) |
| 263 | { |
| 264 | case s_cmd_0: |
| 265 | if ((cfi_offset == 0x5555) && (data == 0xaa)) |
| 266 | feeprom->s_cmd = s_cmd_1; |
| 267 | else |
| 268 | { |
| 269 | feeprom->s_cmd = s_cmd_0; |
| 270 | feeprom->s_cmd_0x80_flag = FALSE; |
| 271 | } |
| 272 | break; |
| 273 | |
| 274 | case s_cmd_1: |
| 275 | if ((cfi_offset == 0x2aaa) && (data == 0x55)) |
| 276 | feeprom->s_cmd = s_cmd_2; |
| 277 | else |
| 278 | { |
| 279 | feeprom->s_cmd = s_cmd_0; |
| 280 | feeprom->s_cmd_0x80_flag = FALSE; |
| 281 | } |
| 282 | break; |
| 283 | |
| 284 | case s_cmd_2: |
| 285 | if (cfi_offset == 0x5555) |
| 286 | { |
| 287 | /* exit programming mode */ |
| 288 | feeprom->s_pgm = s_pgm_0; |
| 289 | feeprom->s_enabling_sdb = FALSE; |
| 290 | feeprom->s_disabling_sdb = FALSE; |
| 291 | timer_adjust_oneshot(feeprom->programming_timer, attotime_never, 0); |
| 292 | |
| 293 | /* process command */ |
| 294 | switch (data) |
| 295 | { |
| 296 | case 0x10: |
| 297 | /* Software chip erase */ |
| 298 | if (feeprom->s_cmd_0x80_flag) |
| 299 | { |
| 300 | if (feeprom->s_lower_bbl || feeprom->s_higher_bbl) |
| 301 | logerror("If the boot block lockout feature has been enabled, the 6-byte software chip erase algorithm will not function.\n"); |
| 302 | else |
| 303 | { |
| 304 | memset(feeprom->memptr, 0xff, 524288); |
| 305 | feeprom->s_dirty = TRUE; |
| 306 | } |
| 307 | } |
| 308 | break; |
| 309 | |
| 310 | case 0x20: |
| 311 | /* Software data protection disable */ |
| 312 | if (feeprom->s_cmd_0x80_flag) |
| 313 | { |
| 314 | feeprom->s_pgm = s_pgm_1; |
| 315 | feeprom->s_disabling_sdb = TRUE; |
| 316 | /* set command timeout (right???) */ |
| 317 | //timer_adjust_periodic(feeprom->programming_timer, ATTOTIME_IN_USEC(150), id, 0.); |
| 318 | } |
| 319 | break; |
| 320 | |
| 321 | case 0x40: |
| 322 | /* Boot block lockout enable */ |
| 323 | if (feeprom->s_cmd_0x80_flag) |
| 324 | feeprom->s_enabling_bbl = TRUE; |
| 325 | break; |
| 326 | |
| 327 | case 0x90: |
| 328 | /* Software product identification entry */ |
| 329 | feeprom->s_id_mode = TRUE; |
| 330 | break; |
| 331 | |
| 332 | case 0xa0: |
| 333 | /* Software data protection enable */ |
| 334 | feeprom->s_pgm = s_pgm_1; |
| 335 | feeprom->s_enabling_sdb = TRUE; |
| 336 | /* set command timeout (right???) */ |
| 337 | //timer_adjust_periodic(feeprom->programming_timer, ATTOTIME_IN_USEC(150), id, 0.); |
| 338 | break; |
| 339 | |
| 340 | case 0xf0: |
| 341 | /* Software product identification exit */ |
| 342 | feeprom->s_id_mode = FALSE; |
| 343 | break; |
| 344 | } |
| 345 | feeprom->s_cmd = s_cmd_0; |
| 346 | feeprom->s_cmd_0x80_flag = FALSE; |
| 347 | if (data == 0x80) |
| 348 | feeprom->s_cmd_0x80_flag = TRUE; |
| 349 | |
| 350 | /* return, because we don't want to write the EEPROM with the command byte */ |
| 351 | return; |
| 352 | } |
| 353 | else |
| 354 | { |
| 355 | feeprom->s_cmd = s_cmd_0; |
| 356 | feeprom->s_cmd_0x80_flag = FALSE; |
| 357 | } |
| 358 | } |
| 359 | if ((feeprom->s_pgm == s_pgm_2) |
| 360 | && ((offset & ~0xff) != (feeprom->programming_last_offset & ~0xff))) |
| 361 | { |
| 362 | /* cancel current programming cycle */ |
| 363 | feeprom->s_pgm = s_pgm_0; |
| 364 | feeprom->s_enabling_sdb = FALSE; |
| 365 | feeprom->s_disabling_sdb = FALSE; |
| 366 | timer_adjust_oneshot(feeprom->programming_timer, attotime_never, 0); |
| 367 | } |
| 368 | |
| 369 | if (((feeprom->s_pgm == s_pgm_0) && !feeprom->s_sdp) |
| 370 | || (feeprom->s_pgm == s_pgm_1)) |
| 371 | { |
| 372 | if (((offset < BOOT_BLOCK_SIZE) && feeprom->s_lower_bbl) |
| 373 | || ((offset >= FEEPROM_SIZE-BOOT_BLOCK_SIZE) && feeprom->s_higher_bbl)) |
| 374 | { |
| 375 | // attempty to access a locked out boot block: cancel programming |
| 376 | // command if necessary |
| 377 | feeprom->s_pgm = s_pgm_0; |
| 378 | feeprom->s_enabling_sdb = FALSE; |
| 379 | feeprom->s_disabling_sdb = FALSE; |
| 380 | } |
| 381 | else |
| 382 | { /* enter programming mode */ |
| 383 | memset(feeprom->programming_buffer, 0xff, SECTOR_SIZE); |
| 384 | feeprom->s_pgm = s_pgm_2; |
| 385 | } |
| 386 | } |
| 387 | if (feeprom->s_pgm == s_pgm_2) |
| 388 | { |
| 389 | /* write data to programming buffer */ |
| 390 | feeprom->programming_buffer[offset & 0xff] = data; |
| 391 | feeprom->programming_last_offset = offset; |
| 392 | timer_adjust_oneshot(feeprom->programming_timer, ATTOTIME_IN_USEC(150), 0); |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | static DEVICE_START( at29c040a ) |
| 397 | { |
| 398 | at29c040a_state *feeprom = get_safe_token(device); |
| 399 | feeprom->programming_timer = timer_alloc(device->machine, at29c040a_programming_timer_callback, (void *)device); |
| 400 | } |
| 401 | |
| 402 | static DEVICE_STOP( at29c040a ) |
| 403 | { |
| 404 | |
| 405 | } |
| 406 | |
| 407 | static DEVICE_RESET( at29c040a ) |
| 408 | { |
| 409 | at29c040a_state *feeprom = get_safe_token(device); |
| 410 | const at29c040a_config* atconf = (const at29c040a_config*)get_config(device); |
| 411 | feeprom->memptr = (*atconf->get_memory)(device->owner()) + atconf->offset; |
| 412 | |
| 413 | if (feeprom->memptr[0] != 0) |
| 414 | { |
| 415 | logerror("AT29040A: Version mismatch; expected 0 but found %x for %s\n", feeprom->memptr[0], device->tag()); |
| 416 | return; |
| 417 | } |
| 418 | |
| 419 | feeprom->s_lower_bbl = (feeprom->memptr[1] >> 2) & 1; |
| 420 | feeprom->s_higher_bbl = (feeprom->memptr[1] >> 1) & 1; |
| 421 | feeprom->s_sdp = feeprom->memptr[1] & 1; |
| 422 | feeprom->s_dirty = FALSE; |
| 423 | |
| 424 | feeprom->memptr += 2; |
| 425 | } |
| 426 | |
| 427 | static const char DEVTEMPLATE_SOURCE[] = __FILE__; |
| 428 | |
| 429 | #define DEVTEMPLATE_ID(p,s) p##at29c040a##s |
| 430 | #define DEVTEMPLATE_FEATURES DT_HAS_START | DT_HAS_STOP | DT_HAS_RESET | DT_HAS_INLINE_CONFIG |
| 431 | #define DEVTEMPLATE_NAME "ATMEL 29c040a" |
| 432 | #define DEVTEMPLATE_FAMILY "Flash Memory" |
| 433 | #include "devtempl.h" |
| 434 | |
| 435 | DEFINE_LEGACY_DEVICE( AT29C040A, at29c040a ); |
src/mess/machine/smc92x4.c
| r9485 | r9486 | |
| 319 | 319 | { |
| 320 | 320 | //assert(! (w->status & ST_DONE)) |
| 321 | 321 | smc92x4_state *w = get_safe_token(device); |
| 322 | | //printf("smc92x4 command %02x done, flags=%02x\n", w->command, flags); |
| 322 | //logerror("smc92x4 command %02x done, flags=%02x\n", w->command, flags); |
| 323 | 323 | |
| 324 | 324 | w->register_r[INT_STATUS] |= ST_DONE; |
| 325 | 325 | w->register_r[INT_STATUS] &= ~ST_TERMCOD; /* clear the previously set flags */ |
| r9485 | r9486 | |
| 337 | 337 | { |
| 338 | 338 | //assert(! (w->status & ST_DONE)) |
| 339 | 339 | smc92x4_state *w = get_safe_token(device); |
| 340 | | //printf("smc92x4 command %02x done\n", w->command); |
| 340 | //logerror("smc92x4 command %02x done\n", w->command); |
| 341 | 341 | |
| 342 | 342 | w->register_r[INT_STATUS] |= ST_DONE; |
| 343 | 343 | |
| r9485 | r9486 | |
| 394 | 394 | |
| 395 | 395 | prev = w->register_r[DRIVE_STATUS]; |
| 396 | 396 | w->register_r[DRIVE_STATUS] = devcb_call_read_line(&w->in_auxbus_func); |
| 397 | | |
| 397 | |
| 398 | 398 | /* Raise interrupt if ready changes. TODO: Check this more closely. */ |
| 399 | | // printf("disk status = %02x\n", reply); |
| 399 | // logerror("disk status = %02x\n", reply); |
| 400 | 400 | if (((w->register_r[DRIVE_STATUS] & DS_READY) != (prev & DS_READY)) |
| 401 | 401 | & (w->register_r[INT_STATUS] & ST_RDYCHNG)) |
| 402 | 402 | { |
| r9485 | r9486 | |
| 590 | 590 | |
| 591 | 591 | if (w->selected_drive_type & TYPE_FLOPPY) |
| 592 | 592 | { |
| 593 | | current_floppy = (*w->intf->current_floppy)(); |
| 593 | current_floppy = (*w->intf->current_floppy)(device); |
| 594 | 594 | if (current_floppy==NULL) |
| 595 | 595 | { |
| 596 | 596 | logerror("smc92x4 error: seek callback: no floppy\n"); |
| r9485 | r9486 | |
| 598 | 598 | } |
| 599 | 599 | else |
| 600 | 600 | { |
| 601 | | // printf("smc92x4 step %s direction %d\n", current_floppy->tag(), w->step_direction); |
| 601 | logerror("smc92x4 step %s direction %d\n", current_floppy->tag(), w->step_direction); |
| 602 | 602 | floppy_drive_seek(current_floppy, w->step_direction); |
| 603 | 603 | } |
| 604 | 604 | } |
| 605 | 605 | else |
| 606 | 606 | { |
| 607 | | // printf("smc92x4 step harddisk direction %d\n", w->step_direction); |
| 608 | | (*w->intf->mfmhd_seek)(w->step_direction); |
| 607 | // logerror("smc92x4 step harddisk direction %d\n", w->step_direction); |
| 608 | (*w->intf->mfmhd_seek)(device, w->step_direction); |
| 609 | 609 | } |
| 610 | 610 | sync_status_in(device); |
| 611 | 611 | |
| r9485 | r9486 | |
| 691 | 691 | if (w->selected_drive_type & TYPE_FLOPPY) |
| 692 | 692 | { |
| 693 | 693 | chrn_id idflop; |
| 694 | | running_device *disk_img = (*w->intf->current_floppy)(); |
| 694 | running_device *disk_img = (*w->intf->current_floppy)(device); |
| 695 | 695 | if (flopimg_get_image(disk_img) == NULL) |
| 696 | 696 | { |
| 697 | 697 | logerror("smc92x4 warn: No disk in drive\n"); |
| r9485 | r9486 | |
| 722 | 722 | } |
| 723 | 723 | else |
| 724 | 724 | { |
| 725 | | (*w->intf->mfmhd_get_next_id)(w->register_w[DESIRED_HEAD]&0x0f, id); |
| 725 | (*w->intf->mfmhd_get_next_id)(device, w->register_w[DESIRED_HEAD]&0x0f, id); |
| 726 | 726 | sync_status_in(device); |
| 727 | 727 | if (!(w->register_r[DRIVE_STATUS]& DS_READY)) |
| 728 | 728 | { |
| r9485 | r9486 | |
| 767 | 767 | *direction = -1; |
| 768 | 768 | } |
| 769 | 769 | |
| 770 | | //printf("smc92x4 seek required: %d steps\n", *steps); |
| 770 | //logerror("smc92x4 seek required: %d steps\n", *steps); |
| 771 | 771 | |
| 772 | 772 | w->register_r[INT_STATUS] &= ~ST_TC_RDIDERR; |
| 773 | 773 | return; |
| r9485 | r9486 | |
| 796 | 796 | if (w->selected_drive_type & TYPE_FLOPPY) |
| 797 | 797 | { |
| 798 | 798 | chrn_id idflop; |
| 799 | | running_device *disk_img = (*w->intf->current_floppy)(); |
| 799 | running_device *disk_img = (*w->intf->current_floppy)(device); |
| 800 | 800 | found = floppy_drive_get_next_id(disk_img, w->register_w[DESIRED_HEAD]&0x0f, &idflop); |
| 801 | 801 | copyid(idflop, id); |
| 802 | 802 | if (/* pass==1 && */!found) |
| r9485 | r9486 | |
| 808 | 808 | } |
| 809 | 809 | else |
| 810 | 810 | { |
| 811 | | (*w->intf->mfmhd_get_next_id)(w->register_w[DESIRED_HEAD]&0x0f, id); |
| 811 | (*w->intf->mfmhd_get_next_id)(device, w->register_w[DESIRED_HEAD]&0x0f, id); |
| 812 | 812 | sync_status_in(device); |
| 813 | 813 | if (!(w->register_r[DRIVE_STATUS]& DS_READY)) |
| 814 | 814 | { |
| r9485 | r9486 | |
| 830 | 830 | { |
| 831 | 831 | des_cylinder = ((w->register_w[DESIRED_HEAD] & 0x70)<<4) | w->register_w[DESIRED_CYLINDER]; |
| 832 | 832 | } |
| 833 | | // printf("smc92x4 check id: current = (%d,%d,%d), required = (%d,%d,%d)\n", id->C, id->H, id->R, des_cylinder, w->register_w[DESIRED_HEAD] & 0x0f, w->register_w[DESIRED_SECTOR]); |
| 833 | // logerror("smc92x4 check id: current = (%d,%d,%d), required = (%d,%d,%d)\n", id->C, id->H, id->R, des_cylinder, w->register_w[DESIRED_HEAD] & 0x0f, w->register_w[DESIRED_SECTOR]); |
| 834 | 834 | if ((des_cylinder == id->C) |
| 835 | 835 | && ((w->register_w[DESIRED_HEAD] & 0x0f) == id->H)) |
| 836 | 836 | { |
| r9485 | r9486 | |
| 864 | 864 | sync_latches_out(device); |
| 865 | 865 | sync_status_in(device); |
| 866 | 866 | |
| 867 | | current_floppy = (*w->intf->current_floppy)(); |
| 867 | current_floppy = (*w->intf->current_floppy)(device); |
| 868 | 868 | |
| 869 | 869 | // Set command termination code. The error code is set first, and |
| 870 | 870 | // on success, it is cleared. |
| r9485 | r9486 | |
| 901 | 901 | else |
| 902 | 902 | { |
| 903 | 903 | /* buf is allocated within the function, and sector_len is also set */ |
| 904 | | (*w->intf->mfmhd_read_sector)(id.C, id.H, id.R, &buf, §or_len); |
| 904 | (*w->intf->mfmhd_read_sector)(device, id.C, id.H, id.R, &buf, §or_len); |
| 905 | 905 | } |
| 906 | 906 | sync_status_in(device); |
| 907 | 907 | |
| r9485 | r9486 | |
| 913 | 913 | smc92x4_set_dip(device, TRUE); |
| 914 | 914 | for (i=0; i < sector_len; i++) |
| 915 | 915 | { |
| 916 | | (*w->intf->dma_write_callback)(buf[i]); |
| 916 | (*w->intf->dma_write_callback)(device, buf[i]); |
| 917 | 917 | } |
| 918 | 918 | smc92x4_set_dip(device, FALSE); |
| 919 | 919 | } |
| r9485 | r9486 | |
| 960 | 960 | sync_latches_out(device); |
| 961 | 961 | sync_status_in(device); |
| 962 | 962 | |
| 963 | | current_floppy = (*w->intf->current_floppy)(); |
| 963 | current_floppy = (*w->intf->current_floppy)(device); |
| 964 | 964 | |
| 965 | 965 | // Set command termination code. The error code is set first, and |
| 966 | 966 | // on success, it is cleared. |
| r9485 | r9486 | |
| 985 | 985 | smc92x4_set_dip(device, TRUE); |
| 986 | 986 | for (i=0; i<sector_len; i++) |
| 987 | 987 | { |
| 988 | | buf[i] = (*w->intf->dma_read_callback)(); |
| 988 | buf[i] = (*w->intf->dma_read_callback)(device); |
| 989 | 989 | } |
| 990 | 990 | smc92x4_set_dip(device, FALSE); |
| 991 | 991 | |
| r9485 | r9486 | |
| 1000 | 1000 | } |
| 1001 | 1001 | else |
| 1002 | 1002 | { |
| 1003 | | (*w->intf->mfmhd_write_sector)(id.C, id.H, id.R, buf, sector_len); |
| 1003 | (*w->intf->mfmhd_write_sector)(device, id.C, id.H, id.R, buf, sector_len); |
| 1004 | 1004 | } |
| 1005 | 1005 | free(buf); |
| 1006 | 1006 | sync_status_in(device); |
| r9485 | r9486 | |
| 1101 | 1101 | /* Needed for the two ways of re-entry: during the seek process, and during sector read */ |
| 1102 | 1102 | if (!w->after_seek) |
| 1103 | 1103 | { |
| 1104 | | // printf("smc92x4 continue with sector read\n"); |
| 1104 | // logerror("smc92x4 continue with sector read\n"); |
| 1105 | 1105 | w->seek_count--; |
| 1106 | 1106 | if (w->seek_count > 0) |
| 1107 | 1107 | { |
| r9485 | r9486 | |
| 1154 | 1154 | else |
| 1155 | 1155 | { |
| 1156 | 1156 | set_command_done(device, ST_TC_SUCCESS); |
| 1157 | | //printf("smc92x4 read sector command done\n"); |
| 1157 | //logerror("smc92x4 read sector command done\n"); |
| 1158 | 1158 | } |
| 1159 | 1159 | } |
| 1160 | 1160 | |
| r9485 | r9486 | |
| 1221 | 1221 | else |
| 1222 | 1222 | { |
| 1223 | 1223 | set_command_done(device, ST_TC_SUCCESS); |
| 1224 | | // printf("smc92x4 write sector command done\n"); |
| 1224 | // logerror("smc92x4 write sector command done\n"); |
| 1225 | 1225 | } |
| 1226 | 1226 | } |
| 1227 | 1227 | |
| r9485 | r9486 | |
| 1286 | 1286 | w->buffered = buffered; |
| 1287 | 1287 | |
| 1288 | 1288 | smc92x4_timed_seek_request(device); |
| 1289 | | //printf("smc92x4 waiting for drive step\n"); |
| 1289 | //logerror("smc92x4 waiting for drive step\n"); |
| 1290 | 1290 | } |
| 1291 | 1291 | |
| 1292 | 1292 | static void step_continue(running_device *device) |
| 1293 | 1293 | { |
| 1294 | 1294 | smc92x4_state *w = get_safe_token(device); |
| 1295 | | //printf("smc92x4 step continue\n"); |
| 1295 | //logerror("smc92x4 step continue\n"); |
| 1296 | 1296 | w->to_be_continued = FALSE; |
| 1297 | 1297 | set_command_done(device, ST_TC_SUCCESS); |
| 1298 | 1298 | } |
| r9485 | r9486 | |
| 1498 | 1498 | |
| 1499 | 1499 | sync_status_in(device); |
| 1500 | 1500 | |
| 1501 | | current_floppy = (*w->intf->current_floppy)(); |
| 1501 | current_floppy = (*w->intf->current_floppy)(device); |
| 1502 | 1502 | floppy = flopimg_get_image(current_floppy); |
| 1503 | 1503 | |
| 1504 | 1504 | if (floppy != NULL) |
| r9485 | r9486 | |
| 1590 | 1590 | buffer[index++] = 0xfe; |
| 1591 | 1591 | |
| 1592 | 1592 | smc92x4_set_dip(device, TRUE); |
| 1593 | | if (!fm) curr_ident = (*w->intf->dma_read_callback)(); |
| 1594 | | curr_cyl = (*w->intf->dma_read_callback)(); |
| 1595 | | curr_head = (*w->intf->dma_read_callback)(); |
| 1596 | | curr_sect = (*w->intf->dma_read_callback)(); |
| 1597 | | curr_size = (*w->intf->dma_read_callback)(); |
| 1593 | if (!fm) curr_ident = (*w->intf->dma_read_callback)(device); |
| 1594 | curr_cyl = (*w->intf->dma_read_callback)(device); |
| 1595 | curr_head = (*w->intf->dma_read_callback)(device); |
| 1596 | curr_sect = (*w->intf->dma_read_callback)(device); |
| 1597 | curr_size = (*w->intf->dma_read_callback)(device); |
| 1598 | 1598 | smc92x4_set_dip(device, FALSE); |
| 1599 | 1599 | |
| 1600 | 1600 | buffer[index++] = curr_cyl; |
| r9485 | r9486 | |
| 1602 | 1602 | buffer[index++] = curr_sect; |
| 1603 | 1603 | buffer[index++] = curr_size; |
| 1604 | 1604 | |
| 1605 | | // if (j==0) printf("current_floppy=%s, format track %d, head %d\n", current_floppy->tag(), curr_cyl, curr_head); |
| 1605 | // if (j==0) logerror("current_floppy=%s, format track %d, head %d\n", current_floppy->tag(), curr_cyl, curr_head); |
| 1606 | 1606 | |
| 1607 | 1607 | /* Calculate CRC16 (5 bytes for ID) */ |
| 1608 | 1608 | crc = ccitt_crc16(0xffff, &buffer[index-5], 5); |
| r9485 | r9486 | |
| 1696 | 1696 | buffer[index++] = 0xa1; |
| 1697 | 1697 | |
| 1698 | 1698 | smc92x4_set_dip(device, TRUE); |
| 1699 | | curr_ident = (*w->intf->dma_read_callback)(); |
| 1700 | | curr_cyl = (*w->intf->dma_read_callback)(); |
| 1701 | | curr_head = (*w->intf->dma_read_callback)(); |
| 1702 | | curr_sect = (*w->intf->dma_read_callback)(); |
| 1703 | | curr_size = (*w->intf->dma_read_callback)(); |
| 1699 | curr_ident = (*w->intf->dma_read_callback)(device); |
| 1700 | curr_cyl = (*w->intf->dma_read_callback)(device); |
| 1701 | curr_head = (*w->intf->dma_read_callback)(device); |
| 1702 | curr_sect = (*w->intf->dma_read_callback)(device); |
| 1703 | curr_size = (*w->intf->dma_read_callback)(device); |
| 1704 | 1704 | smc92x4_set_dip(device, FALSE); |
| 1705 | 1705 | |
| 1706 | 1706 | buffer[index++] = curr_ident; |
| r9485 | r9486 | |
| 1738 | 1738 | /* GAP 4 */ |
| 1739 | 1739 | for (i=0; i < gap4; i++) buffer[index++] = gap_byte; |
| 1740 | 1740 | |
| 1741 | | (*w->intf->mfmhd_write_track)(w->register_w[DESIRED_HEAD]&0x0f, buffer, data_count); |
| 1741 | (*w->intf->mfmhd_write_track)(device, w->register_w[DESIRED_HEAD]&0x0f, buffer, data_count); |
| 1742 | 1742 | free(buffer); |
| 1743 | 1743 | sync_status_in(device); |
| 1744 | 1744 | } |
| r9485 | r9486 | |
| 1764 | 1764 | static void read_floppy_track(running_device *device, int transfer_only_ids) |
| 1765 | 1765 | { |
| 1766 | 1766 | smc92x4_state *w = get_safe_token(device); |
| 1767 | | running_device *current_floppy = (*w->intf->current_floppy)(); |
| 1767 | running_device *current_floppy = (*w->intf->current_floppy)(device); |
| 1768 | 1768 | |
| 1769 | 1769 | floppy_image *floppy; |
| 1770 | 1770 | /* Determine the track size. We cannot allow different sizes in this design. */ |
| r9485 | r9486 | |
| 1805 | 1805 | smc92x4_set_dip(device, TRUE); |
| 1806 | 1806 | for (i=0; i < data_count; i++) |
| 1807 | 1807 | { |
| 1808 | | (*w->intf->dma_write_callback)(buffer[i]); |
| 1808 | (*w->intf->dma_write_callback)(device, buffer[i]); |
| 1809 | 1809 | } |
| 1810 | 1810 | smc92x4_set_dip(device, FALSE); |
| 1811 | 1811 | |
| r9485 | r9486 | |
| 1824 | 1824 | sync_latches_out(device); |
| 1825 | 1825 | |
| 1826 | 1826 | /* buffer and data_count are allocated and set by the function. */ |
| 1827 | | (*w->intf->mfmhd_read_track)(w->register_w[DESIRED_HEAD]&0x0f, &buffer, &data_count); |
| 1827 | (*w->intf->mfmhd_read_track)(device, w->register_w[DESIRED_HEAD]&0x0f, &buffer, &data_count); |
| 1828 | 1828 | sync_status_in(device); |
| 1829 | 1829 | |
| 1830 | 1830 | if (!(w->register_r[DRIVE_STATUS] & DS_READY)) |
| r9485 | r9486 | |
| 1845 | 1845 | smc92x4_set_dip(device, TRUE); |
| 1846 | 1846 | for (i=0; i < data_count; i++) |
| 1847 | 1847 | { |
| 1848 | | (*w->intf->dma_write_callback)(buffer[i]); |
| 1848 | (*w->intf->dma_write_callback)(device, buffer[i]); |
| 1849 | 1849 | } |
| 1850 | 1850 | smc92x4_set_dip(device, FALSE); |
| 1851 | 1851 | |
| r9485 | r9486 | |
| 2077 | 2077 | { |
| 2078 | 2078 | /* data register */ |
| 2079 | 2079 | reply = w->register_r[w->register_pointer]; |
| 2080 | | // printf("smc92x4 register_r[%d] -> %02x\n", w->register_pointer, reply); |
| 2081 | | |
| 2080 | // logerror("smc92x4 register_r[%d] -> %02x\n", w->register_pointer, reply); |
| 2082 | 2081 | /* Autoincrement until DATA is reached. */ |
| 2083 | 2082 | if (w->register_pointer < DATA) |
| 2084 | 2083 | w->register_pointer++; |
| r9485 | r9486 | |
| 2089 | 2088 | reply = w->register_r[INT_STATUS]; |
| 2090 | 2089 | // Spec (p.3) : The interrupt pin is reset to its inactive state |
| 2091 | 2090 | // when the UDC interrupt status register is read. |
| 2092 | | // printf("smc92x4 interrupt status read = %02x\n", reply); |
| 2091 | // logerror("smc92x4 interrupt status read = %02x\n", reply); |
| 2093 | 2092 | smc92x4_clear_interrupt(device); |
| 2094 | 2093 | /* Clear the bits due to int status register read. */ |
| 2095 | 2094 | w->register_r[INT_STATUS] &= ~(ST_INTPEND | ST_RDYCHNG); |
| r9485 | r9486 | |
| 2109 | 2108 | if ((offset & 1) == 0) |
| 2110 | 2109 | { |
| 2111 | 2110 | /* data register */ |
| 2112 | | // printf("smc92x4 register_w[%d] <- %X\n", w->register_pointer, data); |
| 2111 | // logerror("smc92x4 register_w[%d] <- %X\n", w->register_pointer, data); |
| 2113 | 2112 | w->register_w[w->register_pointer] = data; |
| 2114 | 2113 | |
| 2115 | 2114 | // The DMA registers and the sector register for read and |
src/mess/drivers/ti99_8.c
| r9485 | r9486 | |
| 157 | 157 | - Extended Basic II gets stuck with OLD MINIMEM. MiniMemory may be incompatible |
| 158 | 158 | due to the different memory layout. SAVE/OLD only works if the machine is |
| 159 | 159 | neither reset nor restarted. |
| 160 | | */ |
| 161 | 160 | |
| 162 | | #include "emu.h" |
| 161 | ROM file contents: |
| 162 | 0000-1fff ROM0 0x0000 (logical address) |
| 163 | 2000-3fff ROM1 0xffa000 - 0xffbfff |
| 164 | 4000-5fff DSR1 0xff4000 (TTS) |
| 165 | 6000-7fff ROM1a 0xffc000 - 0xffdfff |
| 166 | 8000-9fff DSR2 0xff4000 (missing; Hexbus?) |
| 167 | */ |
| 163 | 168 | |
| 164 | | #include "machine/ti99_4x.h" |
| 165 | | #include "machine/tms9901.h" |
| 166 | | #include "audio/spchroms.h" |
| 167 | | #include "devices/ti99_peb.h" |
| 168 | | #include "machine/994x_ser.h" |
| 169 | | #include "machine/99_dsk.h" |
| 170 | | #include "machine/99_ide.h" |
| 169 | #include "emu.h" |
| 171 | 170 | #include "cpu/tms9900/tms9900.h" |
| 172 | | #include "devices/flopdrv.h" |
| 173 | | #include "devices/cassette.h" |
| 174 | | #include "devices/cartslot.h" |
| 175 | | #include "machine/smartmed.h" |
| 176 | 171 | #include "sound/sn76496.h" |
| 177 | | #include "sound/tms5220.h" |
| 172 | //#include "video/tms9928a.h" |
| 178 | 173 | #include "sound/wave.h" |
| 179 | | #include "devices/harddriv.h" |
| 180 | | #include "machine/idectrl.h" |
| 181 | | #include "machine/smc92x4.h" |
| 182 | | #include "machine/mm58274c.h" |
| 183 | | #include "devices/ti99cart.h" |
| 184 | | #include "machine/rtc65271.h" |
| 185 | | #include "formats/ti99_dsk.h" |
| 186 | | #include "devices/ti99_hd.h" |
| 174 | #include "machine/tms9901.h" |
| 175 | #include "devices/cassette.h" |
| 187 | 176 | |
| 177 | #include "machine/ti99/tiboard.h" |
| 178 | |
| 179 | #include "machine/ti99/videowrp.h" |
| 180 | #include "machine/ti99/speech8.h" |
| 181 | |
| 182 | #include "machine/ti99/peribox.h" |
| 183 | #include "machine/ti99/crubus.h" |
| 184 | #include "machine/ti99/mapper8.h" |
| 185 | #include "machine/ti99/grom.h" |
| 186 | #include "machine/ti99/gromport.h" |
| 187 | #include "machine/ti99/mecmouse.h" |
| 188 | |
| 188 | 189 | /* |
| 189 | 190 | Memory map - see description above |
| 190 | 191 | */ |
| 191 | 192 | |
| 192 | 193 | static ADDRESS_MAP_START(ti99_8_memmap, ADDRESS_SPACE_PROGRAM, 8) |
| 193 | | /* There is a mapper device involved, so we need to handle the range mapping in a bit more complicated way. */ |
| 194 | | AM_RANGE(0x0000, 0xffff) AM_READWRITE(ti99_8_r, ti99_8_w) |
| 194 | AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("mapper", ti99_mapper8_r, ti99_mapper8_w ) |
| 195 | 195 | ADDRESS_MAP_END |
| 196 | 196 | |
| 197 | 197 | |
| r9485 | r9486 | |
| 200 | 200 | */ |
| 201 | 201 | |
| 202 | 202 | static ADDRESS_MAP_START(ti99_8_cru_map, ADDRESS_SPACE_IO, 8) |
| 203 | | // AM_RANGE(0x0000, 0x00ff) AM_DEVREAD("tms9901", tms9901_cru_r) |
| 204 | 203 | AM_RANGE(0x0000, 0x007f) AM_DEVREAD("tms9901", tms9901_cru_r) |
| 205 | | AM_RANGE(0x0080, 0x00ff) AM_DEVREAD("ti99_multicart", ti99_multicart_cru_r) /* SuperSpace cartridge */ |
| 206 | | AM_RANGE(0x0100, 0x02ff) AM_DEVREAD("per_exp_box", ti99_8_peb_cru_r) |
| 204 | AM_RANGE(0x0000, 0x02ff) AM_DEVREAD("crubus", ti99_crubus_r ) |
| 207 | 205 | |
| 208 | | // AM_RANGE(0x0000, 0x07ff) AM_DEVWRITE("tms9901", tms9901_cru_w) |
| 209 | 206 | AM_RANGE(0x0000, 0x03ff) AM_DEVWRITE("tms9901", tms9901_cru_w) |
| 210 | | AM_RANGE(0x0400, 0x07ff) AM_DEVWRITE("ti99_multicart", ti99_multicart_cru_w) /* SuperSpace cartridge */ |
| 211 | | AM_RANGE(0x0800, 0x17ff) AM_DEVWRITE("per_exp_box", ti99_8_peb_cru_w) |
| 212 | | |
| 207 | AM_RANGE(0x0000, 0x17ff) AM_DEVWRITE("crubus", ti99_crubus_w ) |
| 213 | 208 | ADDRESS_MAP_END |
| 214 | 209 | |
| 215 | | |
| 216 | 210 | /* ti99/8 : 54-key keyboard */ |
| 217 | 211 | static INPUT_PORTS_START(ti99_8) |
| 218 | | PORT_START( "SPEECH" ) |
| 219 | | PORT_CONFNAME( 0x01, 0x01, "Speech synthesizer" ) |
| 220 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 221 | | PORT_CONFSETTING( 0x01, DEF_STR( On ) ) |
| 222 | | |
| 223 | 212 | PORT_START( "DISKCTRL" ) |
| 224 | 213 | PORT_CONFNAME( 0x07, 0x00, "Disk controller" ) |
| 225 | 214 | PORT_CONFSETTING( 0x00, DEF_STR( None ) ) |
| 226 | 215 | PORT_CONFSETTING( 0x01, "TI SD Floppy Controller" ) |
| 227 | 216 | PORT_CONFSETTING( 0x02, "SNUG BwG Controller" ) |
| 228 | 217 | PORT_CONFSETTING( 0x03, "Myarc HFDC" ) |
| 229 | | // PORT_CONFSETTING( 0x04, "Corcomp" ) |
| 230 | 218 | |
| 231 | 219 | PORT_START( "HDCTRL" ) |
| 232 | 220 | PORT_CONFNAME( 0x03, 0x00, "HD controller" ) |
| 233 | 221 | PORT_CONFSETTING( 0x00, DEF_STR( None ) ) |
| 234 | | // PORT_CONFSETTING( 0x01, "Nouspikel IDE Controller" ) |
| 222 | PORT_CONFSETTING( 0x01, "Nouspikel IDE Controller" ) |
| 235 | 223 | // PORT_CONFSETTING( 0x02, "WHTech SCSI Controller" ) |
| 236 | 224 | PORT_CONFNAME( 0x08, 0x00, "USB-SM card" ) |
| 237 | 225 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| r9485 | r9486 | |
| 242 | 230 | PORT_CONFSETTING( 0x00, DEF_STR( None ) ) |
| 243 | 231 | PORT_CONFSETTING( 0x01, "TI RS-232 card" ) |
| 244 | 232 | |
| 245 | | /* Flash setting is used to flash an empty HSGPL DSR ROM */ |
| 246 | | PORT_START( "EXTCARD" ) |
| 247 | | PORT_CONFNAME( 0x03, 0x00, "HSGPL extension" ) PORT_CHANGED( hsgpl_changed, NULL) |
| 248 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 249 | | PORT_CONFSETTING( 0x01, "Flash" ) |
| 250 | | PORT_CONFSETTING( 0x02, DEF_STR( On ) ) |
| 251 | | PORT_CONFNAME( 0x04, 0x00, "P-Code card" ) |
| 252 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 253 | | PORT_CONFSETTING( 0x04, DEF_STR( On ) ) |
| 254 | | |
| 255 | 233 | PORT_START( "HCI" ) |
| 256 | 234 | PORT_CONFNAME( 0x01, 0x00, "Mouse support" ) |
| 257 | 235 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| r9485 | r9486 | |
| 264 | 242 | PORT_DIPSETTING( 0x02, "Slot 2" ) |
| 265 | 243 | PORT_DIPSETTING( 0x03, "Slot 3" ) |
| 266 | 244 | PORT_DIPSETTING( 0x04, "Slot 4" ) |
| 267 | | PORT_DIPSETTING( 0x0f, "GRAM Kracker" ) |
| 268 | 245 | |
| 269 | | /* GRAM Kracker Support */ |
| 270 | | PORT_START( "GKSWITCH1" ) |
| 271 | | PORT_DIPNAME( 0x01, 0x01, "GK switch 1" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)1) |
| 272 | | PORT_DIPSETTING( 0x00, "GK Off" ) |
| 273 | | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) |
| 274 | | |
| 275 | | PORT_START( "GKSWITCH2" ) |
| 276 | | PORT_DIPNAME( 0x01, 0x01, "GK switch 2" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)2) |
| 277 | | PORT_DIPSETTING( 0x00, "GRAM 0" ) |
| 278 | | PORT_DIPSETTING( 0x01, "Op Sys" ) |
| 279 | | |
| 280 | | PORT_START( "GKSWITCH3" ) |
| 281 | | PORT_DIPNAME( 0x01, 0x01, "GK switch 3" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)3) |
| 282 | | PORT_DIPSETTING( 0x00, "GRAM 1-2" ) |
| 283 | | PORT_DIPSETTING( 0x01, "TI BASIC" ) |
| 284 | | |
| 285 | | PORT_START( "GKSWITCH4" ) |
| 286 | | PORT_DIPNAME( 0x03, 0x01, "GK switch 4" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)4) |
| 287 | | PORT_DIPSETTING( 0x00, "Bank 1" ) |
| 288 | | PORT_DIPSETTING( 0x01, "W/P" ) |
| 289 | | PORT_DIPSETTING( 0x02, "Bank 2" ) |
| 290 | | |
| 291 | | PORT_START( "GKSWITCH5" ) |
| 292 | | PORT_DIPNAME( 0x01, 0x00, "GK switch 5" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)5) |
| 293 | | PORT_DIPSETTING( 0x00, "Loader On" ) |
| 294 | | PORT_DIPSETTING( 0x01, "Loader Off" ) |
| 295 | | |
| 296 | 246 | PORT_START( "HFDCDIP" ) |
| 297 | 247 | PORT_DIPNAME( 0xff, 0x55, "HFDC drive config" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 298 | 248 | PORT_DIPSETTING( 0x00, "40 track, 16 ms") |
| r9485 | r9486 | |
| 490 | 440 | GFXDECODE_END |
| 491 | 441 | |
| 492 | 442 | |
| 493 | | /* |
| 494 | | TMS5220 speech synthesizer |
| 495 | | */ |
| 496 | | static const tms5220_interface ti99_8_tms5220interface = |
| 497 | | { |
| 498 | | DEVCB_NULL, /* no IRQ callback */ |
| 499 | | DEVCB_NULL, /* no Ready callback */ |
| 500 | | spchroms_read, /* speech ROM read handler */ |
| 501 | | spchroms_load_address, /* speech ROM load address handler */ |
| 502 | | spchroms_read_and_branch /* speech ROM read and branch handler */ |
| 503 | | }; |
| 504 | | |
| 505 | | |
| 506 | | |
| 507 | 443 | static const TMS9928a_interface tms9118_interface = |
| 508 | 444 | { |
| 509 | 445 | TMS99x8A, |
| r9485 | r9486 | |
| 512 | 448 | tms9901_set_int2 |
| 513 | 449 | }; |
| 514 | 450 | |
| 515 | | static MACHINE_START(ti99_8_60hz) |
| 516 | | { |
| 517 | | ti99_common_init(machine, &tms9118_interface); |
| 518 | | } |
| 519 | | |
| 520 | 451 | static const TMS9928a_interface tms9129_interface = |
| 521 | 452 | { |
| 522 | 453 | TMS9929A, |
| r9485 | r9486 | |
| 525 | 456 | tms9901_set_int2 |
| 526 | 457 | }; |
| 527 | 458 | |
| 528 | | static MACHINE_START(ti99_8_50hz) |
| 529 | | { |
| 530 | | ti99_common_init(machine, &tms9129_interface); |
| 531 | | } |
| 532 | | |
| 533 | 459 | static const struct tms9995reset_param ti99_8_processor_config = |
| 534 | 460 | { |
| 535 | 461 | 1, /* enable automatic wait state generation */ |
| r9485 | r9486 | |
| 540 | 466 | 1 /* MP9537 mask */ |
| 541 | 467 | }; |
| 542 | 468 | |
| 543 | | static const mm58274c_interface floppy_mm58274c_interface = |
| 469 | /* |
| 470 | Format: |
| 471 | Name, mode, stop, mask, select, write, read8z function, write8 function |
| 472 | |
| 473 | Multiple devices may have the same select pattern; as in the real hardware, |
| 474 | care must be taken that only one device actually responds. In the case of |
| 475 | GROMs, each chip has an internal address counter and an ID, and the chip |
| 476 | only responds when the ID and the most significant 3 bits match. |
| 477 | */ |
| 478 | static const mapper8_dev_config mapper_devices[] = |
| 544 | 479 | { |
| 545 | | 1, /* mode 24*/ |
| 546 | | 0 /* first day of week */ |
| 480 | // TI-99/8 mode |
| 481 | { SRAMNAME, 0, 1, 0xf800, 0xf000, 0x0000, NULL, NULL }, |
| 482 | { "soundgen", 0, 1, 0xfff0, 0xf800, 0x0000, NULL, sn76496_w }, |
| 483 | { "video", 0, 1, 0xfffd, 0xf810, 0x0000, ti8_tms991x_rz, ti8_tms991x_w }, |
| 484 | { "speech", 0, 1, 0xfff0, 0xf820, 0x0000, ti998spch_rz, ti998spch_w }, |
| 485 | { "grom_0", 0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz, ti99grom_w }, |
| 486 | { "grom_1", 0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz, ti99grom_w }, |
| 487 | { "grom_2", 0, 0, 0xfff1, 0xf830, 0x0000, ti99grom_rz, ti99grom_w }, |
| 488 | { "gromport", 0, 0, 0xfff1, 0xf830, 0x0400, gromportg_rz, gromportg_w, }, |
| 489 | // { "grom_tts_0", 2, 0, 0xfff1, 0xf840, 0x0000, 0, 0, ti99grom_rz, ti99grom_w }, // up to 6 GROMs; no good dumps known |
| 490 | // { "grom_pcode1_0", 2, 0, 0xfff1, 0xf850, 0x0000, 0, 0, ti99grom_rz, ti99grom_w }, // up to 6 GROMs; no good dumps known |
| 491 | // { "grom_pcode2_0", 2, 0, 0xfff1, 0xf860, 0x0000, 0, 0, ti99grom_rz, ti99grom_w }, // up to 6 GROMs; no good dumps known |
| 492 | { "mapper", 0, 1, 0xfff0, 0xf870, 0x0000, NULL, ti99_mapreg_w }, |
| 493 | |
| 494 | // TI-99/4A mode |
| 495 | // GROM: 1001 1000 0000 xxa0 |
| 496 | { ROM0NAME, 1, 1, 0xe000, 0x0000, 0x0000, NULL, NULL }, |
| 497 | { "grom_0", 1, 0, 0xfff1, 0x9800, 0x0400, ti99grom_rz, ti99grom_w }, |
| 498 | { "grom_1", 1, 0, 0xfff1, 0x9800, 0x0400, ti99grom_rz, ti99grom_w }, |
| 499 | { "grom_2", 1, 0, 0xfff1, 0x9800, 0x0400, ti99grom_rz, ti99grom_w }, |
| 500 | { "gromport", 1, 0, 0xfff1, 0x9800, 0x0400, gromportg_rz, gromportg_w, }, |
| 501 | |
| 502 | { "mapper", 1, 1, 0xfff0, 0x8810, 0x0000, NULL, ti99_mapreg_w }, |
| 503 | { "soundgen", 1, 1, 0xfff0, 0x8400, 0x0000, NULL, sn76496_w }, |
| 504 | { "video", 1, 1, 0xfffd, 0x8800, 0x0400, ti8_tms991x_rz, ti8_tms991x_w }, |
| 505 | { "speech", 1, 1, 0xfff0, 0x9000, 0x0400, ti998spch_rz, ti998spch_w }, |
| 506 | { SRAMNAME, 1, 1, 0xf800, 0x8000, 0x0000, NULL, NULL }, // write at the end; soundgen must be found earlier |
| 507 | |
| 508 | // Physical (need to pack this into here as well) |
| 509 | { DRAMNAME, 3, 1, 0xff0000, 0x000000, 0x000000, NULL, NULL }, |
| 510 | { "mapper", 3, 1, 0xffe000, 0xff4000, 0x000000, ti998dsr_rz, NULL }, // DSR |
| 511 | { "gromport", 3, 1, 0xffe000, 0xff6000, 0x000000, gromportr_rz, gromportr_w }, |
| 512 | { "gromport", 3, 1, 0xffe000, 0xff8000, 0x000000, gromportr_rz, gromportr_w }, |
| 513 | { ROM1NAME, 3, 1, 0xffe000, 0xffa000, 0x000000, NULL, NULL }, |
| 514 | { ROM1ANAME, 3, 1, 0xffe000, 0xffc000, 0x000000, NULL, NULL }, |
| 515 | { INTSNAME, 3, 1, 0xfffff0, 0xffe000, 0x000000, NULL, NULL }, |
| 516 | |
| 517 | { NULL, 0, 0, 0, 0, 0, NULL, NULL } |
| 547 | 518 | }; |
| 548 | 519 | |
| 549 | | static const floppy_config ti99_8_floppy_config = |
| 520 | static const cruconf_device cru_devices[] = |
| 550 | 521 | { |
| 551 | | DEVCB_NULL, |
| 552 | | DEVCB_NULL, |
| 553 | | DEVCB_NULL, |
| 554 | | DEVCB_NULL, |
| 555 | | DEVCB_NULL, |
| 556 | | FLOPPY_STANDARD_5_25_DSHD, |
| 557 | | FLOPPY_OPTIONS_NAME(ti99), |
| 558 | | NULL |
| 522 | { "mapper", 0xfff0, 0x2700, NULL, mapper8c_w }, |
| 523 | { "gromport", 0xf800, 0x0800, gromportc_rz, gromportc_w }, // Check: Is this really limited? |
| 524 | { "peribox", 0x0000, 0x0000, ti99_peb_cru_rz, ti99_peb_cru_w }, // Peribox needs all addresses |
| 525 | { NULL, 0, 0, NULL, NULL } |
| 559 | 526 | }; |
| 560 | 527 | |
| 528 | MACHINE_RESET( ti99_8 ) |
| 529 | { |
| 530 | } |
| 531 | |
| 561 | 532 | static MACHINE_CONFIG_START( ti99_8_60hz, driver_device ) |
| 562 | 533 | /* basic machine hardware */ |
| 563 | 534 | /* TMS9995-MP9537 CPU @ 10.7 MHz */ |
| r9485 | r9486 | |
| 567 | 538 | MDRV_CPU_IO_MAP(ti99_8_cru_map) |
| 568 | 539 | MDRV_CPU_VBLANK_INT("screen", ti99_vblank_interrupt) |
| 569 | 540 | |
| 570 | | MDRV_MACHINE_START( ti99_8_60hz ) |
| 571 | 541 | MDRV_MACHINE_RESET( ti99_8 ) |
| 572 | 542 | |
| 573 | | /* For HSGPL */ |
| 574 | | MDRV_NVRAM_HANDLER( ti99 ) |
| 575 | | |
| 576 | 543 | /* video hardware */ |
| 577 | | MDRV_FRAGMENT_ADD(tms9928a) |
| 578 | | MDRV_SCREEN_MODIFY("screen") |
| 579 | | MDRV_SCREEN_REFRESH_RATE(60) |
| 580 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 544 | MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9118_interface) |
| 545 | |
| 581 | 546 | MDRV_GFXDECODE(ti99_8) |
| 582 | 547 | |
| 583 | 548 | /* sound hardware */ |
| 584 | 549 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 585 | 550 | MDRV_SOUND_WAVE_ADD("wave", "cassette") |
| 586 | 551 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 587 | | MDRV_SOUND_ADD("sn76496", SN76496, 3579545) /* 3.579545 MHz */ |
| 552 | MDRV_SOUND_ADD("soundgen", SN76496, 3579545) /* 3.579545 MHz */ |
| 588 | 553 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 589 | | MDRV_SOUND_ADD("tms5220", TMS5220, 680000L) |
| 590 | | MDRV_SOUND_CONFIG(ti99_8_tms5220interface) |
| 591 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 592 | 554 | |
| 593 | | /* devices */ |
| 594 | | MDRV_PBOX_ADD( "per_exp_box", FALSE, tms9901_set_int1, NULL ) |
| 555 | MDRV_TISPEECH_ADD("speech") |
| 595 | 556 | |
| 596 | | // MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt |
| 597 | | // MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) |
| 557 | MDRV_TI998_BOARD_ADD( "ti_board" ) |
| 558 | MDRV_MAPPER8_ADD( "mapper", mapper_devices ) |
| 598 | 559 | |
| 599 | | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 600 | | |
| 601 | | /* rtc */ |
| 602 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 603 | | |
| 604 | 560 | /* tms9901 */ |
| 605 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_8) |
| 561 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_8) |
| 606 | 562 | |
| 607 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 608 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 563 | MDRV_CRUBUS_ADD( "crubus", cru_devices) |
| 609 | 564 | |
| 610 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_8_floppy_config) |
| 611 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 565 | MDRV_GROM_ADD( "grom_0", 0, region_grom, 0x0000, 0x1800, console_ready ) |
| 566 | MDRV_GROM_ADD( "grom_1", 1, region_grom, 0x2000, 0x1800, console_ready ) |
| 567 | MDRV_GROM_ADD( "grom_2", 2, region_grom, 0x4000, 0x1800, console_ready ) |
| 612 | 568 | |
| 613 | | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 614 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 615 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 569 | MDRV_PBOX8_ADD( "peribox", console_extint, console_notconnected, console_ready ) |
| 570 | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 571 | |
| 572 | MDRV_TI99_GROMPORT_ADD( "gromport", console_ready ) |
| 573 | MDRV_MECMOUSE_ADD( "mecmouse" ) |
| 616 | 574 | MACHINE_CONFIG_END |
| 617 | 575 | |
| 618 | 576 | |
| r9485 | r9486 | |
| 625 | 583 | MDRV_CPU_IO_MAP(ti99_8_cru_map) |
| 626 | 584 | MDRV_CPU_VBLANK_INT("screen", ti99_vblank_interrupt) |
| 627 | 585 | |
| 628 | | MDRV_MACHINE_START( ti99_8_50hz ) |
| 629 | 586 | MDRV_MACHINE_RESET( ti99_8 ) |
| 630 | 587 | |
| 631 | 588 | /* video hardware */ |
| 632 | | MDRV_FRAGMENT_ADD(tms9928a) |
| 633 | | MDRV_SCREEN_MODIFY("screen") |
| 634 | | MDRV_SCREEN_REFRESH_RATE(50) |
| 635 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 589 | MDRV_TI_TMS991x_ADD("video", tms9928a, 50, "screen", 2500, &tms9129_interface) |
| 590 | |
| 636 | 591 | MDRV_GFXDECODE(ti99_8) |
| 637 | 592 | |
| 638 | 593 | /* sound hardware */ |
| 639 | 594 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 640 | | MDRV_SOUND_ADD("sn76496", SN76496, 3579545) /* 3.579545 MHz */ |
| 641 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 642 | | MDRV_SOUND_ADD("tms5220", TMS5220, 680000L) |
| 643 | | MDRV_SOUND_CONFIG(ti99_8_tms5220interface) |
| 644 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 645 | 595 | MDRV_SOUND_WAVE_ADD("wave", "cassette") |
| 646 | 596 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 597 | MDRV_SOUND_ADD("soundgen", SN76496, 3579545) /* 3.579545 MHz */ |
| 598 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 647 | 599 | |
| 648 | | /* devices */ |
| 649 | | MDRV_PBOX_ADD( "per_exp_box", FALSE, tms9901_set_int1, NULL ) |
| 650 | | // MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt ) |
| 651 | | // MDRV_IDE_HARDDISK_ADD( "ide_harddisk" ) |
| 652 | | // MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) |
| 600 | MDRV_TISPEECH_ADD("speech") |
| 601 | |
| 602 | MDRV_MAPPER8_ADD( "mapper", mapper_devices ) |
| 653 | 603 | |
| 654 | | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 604 | /* tms9901 */ |
| 605 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_8) |
| 655 | 606 | |
| 656 | | /* rtc */ |
| 657 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 607 | MDRV_CRUBUS_ADD( "crubus", cru_devices) |
| 658 | 608 | |
| 659 | | /* tms9901 */ |
| 660 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_8) |
| 609 | MDRV_GROM_ADD( "grom_0", 0, region_grom, 0x0000, 0x1800, console_ready ) |
| 610 | MDRV_GROM_ADD( "grom_1", 1, region_grom, 0x2000, 0x1800, console_ready ) |
| 611 | MDRV_GROM_ADD( "grom_2", 2, region_grom, 0x4000, 0x1800, console_ready ) |
| 661 | 612 | |
| 662 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 663 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 664 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_8_floppy_config) |
| 665 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 613 | MDRV_PBOX8_ADD( "peribox", console_extint, console_notconnected, console_ready ) |
| 614 | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 666 | 615 | |
| 667 | | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 668 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 669 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 616 | MDRV_TI99_GROMPORT_ADD( "gromport", console_ready ) |
| 617 | MDRV_MECMOUSE_ADD( "mecmouse" ) |
| 670 | 618 | MACHINE_CONFIG_END |
| 671 | 619 | |
| 672 | 620 | /* |
| r9485 | r9486 | |
| 674 | 622 | */ |
| 675 | 623 | ROM_START(ti99_8) |
| 676 | 624 | /*CPU memory space*/ |
| 677 | | ROM_REGION(region_cpu1_len_8,"maincpu",0) |
| 625 | ROM_REGION(0x8000,"maincpu",0) |
| 678 | 626 | ROM_LOAD("998rom.bin", 0x0000, 0x8000, CRC(b7a06ffd) SHA1(17dc8529fa808172fc47089982efb0bf0548c80c)) /* system ROMs */ |
| 679 | 627 | |
| 680 | 628 | /*GROM memory space*/ |
| 681 | 629 | ROM_REGION(0x10000, region_grom, 0) |
| 682 | 630 | ROM_LOAD("998grom.bin", 0x0000, 0x6000, CRC(c63806bc) SHA1(cbfa8b04b4aefbbd9a713c54267ad4dd179c13a3)) /* system GROMs */ |
| 683 | 631 | |
| 684 | | /*DSR ROM space*/ |
| 685 | | ROM_REGION(region_dsr_len, region_dsr, 0) |
| 686 | | ROM_LOAD_OPTIONAL("disk.bin", offset_fdc_dsr, 0x2000, CRC(8f7df93f) SHA1(ed91d48c1eaa8ca37d5055bcf67127ea51c4cad5)) /* TI disk DSR ROM */ |
| 687 | | #if HAS_99CCFDC |
| 688 | | ROM_LOAD_OPTIONAL("ccfdc.bin", offset_ccfdc_dsr, 0x4000, BAD_DUMP CRC(f69cc69d)) /* CorComp disk DSR ROM */ |
| 689 | | #endif |
| 690 | | ROM_LOAD_OPTIONAL("bwg.bin", offset_bwg_dsr, 0x8000, CRC(06f1ec89) SHA1(6ad77033ed268f986d9a5439e65f7d391c4b7651)) /* BwG disk DSR ROM */ |
| 691 | | ROM_LOAD_OPTIONAL("hfdc.bin", offset_hfdc_dsr, 0x4000, CRC(66fbe0ed) SHA1(11df2ecef51de6f543e4eaf8b2529d3e65d0bd59)) /* HFDC disk DSR ROM */ |
| 692 | | ROM_LOAD_OPTIONAL("rs232.bin", offset_rs232_dsr, 0x1000, CRC(eab382fb) SHA1(ee609a18a21f1a3ddab334e8798d5f2a0fcefa91)) /* TI rs232 DSR ROM */ |
| 693 | | |
| 694 | | /* HSGPL memory space */ |
| 695 | | ROM_REGION(region_hsgpl_len, region_hsgpl, ROMREGION_ERASEFF) |
| 696 | | |
| 697 | | /*TMS5220 ROM space*/ |
| 698 | | ROM_REGION(0x8000, region_speech_rom, 0) |
| 699 | | ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, BAD_DUMP CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */ |
| 700 | | |
| 701 | 632 | ROM_END |
| 702 | 633 | |
| 703 | 634 | #define rom_ti99_8e rom_ti99_8 |
| 704 | 635 | |
| 705 | 636 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 706 | | COMP( 1983, ti99_8, 0, 0, ti99_8_60hz,ti99_8, ti99_8, "Texas Instruments", "TI-99/8 Computer (US)" , 0) |
| 707 | | COMP( 1983, ti99_8e, ti99_8, 0, ti99_8_50hz,ti99_8, ti99_8, "Texas Instruments", "TI-99/8 Computer (Europe)" , 0 ) |
| 637 | COMP( 1983, ti99_8, 0, 0, ti99_8_60hz,ti99_8, 0, "Texas Instruments", "TI-99/8 Computer (US)" , 0) |
| 638 | COMP( 1983, ti99_8e, ti99_8, 0, ti99_8_50hz,ti99_8, 0, "Texas Instruments", "TI-99/8 Computer (Europe)" , 0 ) |
src/mess/drivers/ti99_4p.c
| r9485 | r9486 | |
| 53 | 53 | #include "sound/tms5220.h" |
| 54 | 54 | #include "video/v9938.h" |
| 55 | 55 | |
| 56 | | #include "machine/ti99_4x.h" |
| 57 | 56 | #include "machine/tms9901.h" |
| 58 | 57 | #include "machine/tms9902.h" |
| 59 | 58 | #include "audio/spchroms.h" |
| 60 | | #include "devices/ti99_peb.h" |
| 61 | | #include "machine/994x_ser.h" |
| 62 | | #include "machine/99_dsk.h" |
| 63 | | #include "machine/99_ide.h" |
| 64 | | #include "devices/flopdrv.h" |
| 59 | #include "machine/ti99/peribox.h" |
| 60 | |
| 65 | 61 | #include "devices/cassette.h" |
| 66 | | #include "machine/smartmed.h" |
| 67 | | #include "devices/harddriv.h" |
| 68 | | #include "devices/ti99_hd.h" |
| 69 | | #include "machine/idectrl.h" |
| 70 | | #include "machine/smc92x4.h" |
| 71 | | #include "machine/mm58274c.h" |
| 72 | | #include "machine/rtc65271.h" |
| 73 | | #include "formats/ti99_dsk.h" |
| 62 | #include "machine/ti99/videowrp.h" |
| 63 | #include "machine/ti99/sgcpu.h" |
| 64 | #include "machine/ti99/peribox.h" |
| 74 | 65 | |
| 75 | | |
| 76 | 66 | static ADDRESS_MAP_START(memmap, ADDRESS_SPACE_PROGRAM, 16) |
| 77 | | AM_RANGE(0x0000, 0x1fff) AM_ROMBANK("bank1") // system ROM |
| 78 | | AM_RANGE(0x2000, 0x2fff) AM_RAMBANK("bank3") // lower 8kb of RAM extension: AMS bank 2 |
| 79 | | AM_RANGE(0x3000, 0x3fff) AM_RAMBANK("bank4") // lower 8kb of RAM extension: AMS bank 3 |
| 80 | | AM_RANGE(0x4000, 0x5fff) AM_DEVREADWRITE("per_exp_box", ti99_4p_peb_r, ti99_4p_peb_w) // DSR ROM space |
| 81 | | AM_RANGE(0x6000, 0x7fff) AM_READWRITE(ti99_4p_cart_r,ti99_4p_cart_w) // cartridge space (internal or hsgpl) |
| 82 | | AM_RANGE(0x8000, 0x83ff) AM_RAMBANK("bank2") // RAM PAD |
| 83 | | AM_RANGE(0x8400, 0x87ff) AM_READWRITE(ti99_nop_8_r, ti99_wsnd_w) // soundchip write |
| 84 | | AM_RANGE(0x8800, 0x8bff) AM_READWRITE(ti99_rv38_r, ti99_nop_8_w) // vdp read |
| 85 | | AM_RANGE(0x8C00, 0x8fff) AM_READWRITE(ti99_nop_8_r, ti99_wv38_w) // vdp write |
| 86 | | AM_RANGE(0x9000, 0x93ff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) // speech read - installed dynamically |
| 87 | | AM_RANGE(0x9400, 0x97ff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) // speech write - installed dynamically*/ |
| 88 | | AM_RANGE(0x9800, 0x98ff) AM_READWRITE(ti99_4p_grom_r, ti99_nop_8_w) // GPL read |
| 89 | | AM_RANGE(0x9900, 0x9bff) AM_RAMBANK("bank11") // extra RAM for debugger |
| 90 | | AM_RANGE(0x9c00, 0x9fff) AM_READWRITE(ti99_nop_8_r, ti99_4p_grom_w) // GPL write |
| 91 | | AM_RANGE(0xa000, 0xafff) AM_RAMBANK("bank5") // upper 24kb of RAM extension: AMS bank 10 |
| 92 | | AM_RANGE(0xb000, 0xbfff) AM_RAMBANK("bank6") // upper 24kb of RAM extension: AMS bank 11 |
| 93 | | AM_RANGE(0xc000, 0xcfff) AM_RAMBANK("bank7") // upper 24kb of RAM extension: AMS bank 12 |
| 94 | | AM_RANGE(0xd000, 0xdfff) AM_RAMBANK("bank8") // upper 24kb of RAM extension: AMS bank 13 |
| 95 | | AM_RANGE(0xe000, 0xefff) AM_RAMBANK("bank9") // upper 24kb of RAM extension: AMS bank 14 |
| 96 | | AM_RANGE(0xf000, 0xffff) AM_RAMBANK("bank10") // upper 24kb of RAM extension: AMS bank 15 |
| 67 | AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("sgcpu_board", sgcpu_r, sgcpu_w ) |
| 97 | 68 | ADDRESS_MAP_END |
| 98 | 69 | |
| 99 | 70 | static ADDRESS_MAP_START(cru_map, ADDRESS_SPACE_IO, 8) |
| 100 | | AM_RANGE(0x0000, 0x003f) AM_DEVREAD("tms9901", tms9901_cru_r) |
| 101 | | AM_RANGE(0x0040, 0x01ff) AM_DEVREAD("per_exp_box", ti99_4p_peb_cru_r) |
| 71 | AM_RANGE(0x0000, 0x007f) AM_DEVREAD("tms9901", tms9901_cru_r) |
| 72 | AM_RANGE(0x0080, 0x01ff) AM_DEVREAD("sgcpu_board", sgcpu_cru_r ) |
| 102 | 73 | |
| 103 | | AM_RANGE(0x0000, 0x01ff) AM_DEVWRITE("tms9901", tms9901_cru_w) |
| 104 | | AM_RANGE(0x0200, 0x0fff) AM_DEVWRITE("per_exp_box", ti99_4p_peb_cru_w) |
| 74 | AM_RANGE(0x0000, 0x03ff) AM_DEVWRITE("tms9901", tms9901_cru_w) |
| 75 | AM_RANGE(0x0400, 0x0fff) AM_DEVWRITE("sgcpu_board", sgcpu_cru_w ) |
| 105 | 76 | ADDRESS_MAP_END |
| 106 | 77 | |
| 107 | | |
| 108 | 78 | /* |
| 109 | 79 | Input ports, used by machine code for TI keyboard and joystick emulation. |
| 110 | 80 | |
| r9485 | r9486 | |
| 142 | 112 | PORT_CONFSETTING( 0x01, "TI RS-232 card" ) |
| 143 | 113 | |
| 144 | 114 | PORT_START( "EXTCARD" ) |
| 145 | | PORT_CONFNAME( 0x04, 0x00, "P-Code card" ) |
| 146 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 147 | | PORT_CONFSETTING( 0x04, DEF_STR( On ) ) |
| 115 | PORT_CONFNAME( 0x03, 0x02, "HSGPL extension" ) |
| 116 | PORT_CONFSETTING( 0x01, "Flash" ) |
| 117 | PORT_CONFSETTING( 0x02, DEF_STR( On ) ) |
| 148 | 118 | |
| 149 | 119 | PORT_START( "HFDCDIP" ) |
| 150 | 120 | PORT_DIPNAME( 0xff, 0x55, "HFDC drive config" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| r9485 | r9486 | |
| 159 | 129 | PORT_CONFSETTING( 0x01, "Realistic") |
| 160 | 130 | |
| 161 | 131 | PORT_START( "EVPC-SW1" ) |
| 162 | | PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) PORT_CHANGED( evpc_changed, (void *)0) |
| 132 | PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) |
| 163 | 133 | PORT_DIPSETTING( 0x00, "PAL" ) |
| 164 | 134 | PORT_DIPSETTING( 0x01, "NTSC" ) |
| 165 | 135 | |
| 166 | 136 | PORT_START( "EVPC-SW3" ) |
| 167 | | PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) PORT_CHANGED( evpc_changed, (void *)1) |
| 137 | PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) |
| 168 | 138 | PORT_DIPSETTING( 0x00, DEF_STR( International )) |
| 169 | 139 | PORT_DIPSETTING( 0x01, DEF_STR( German )) |
| 170 | 140 | |
| 171 | 141 | PORT_START( "EVPC-SW4" ) |
| 172 | | PORT_DIPNAME( 0x01, 0x00, "EVPC VDP RAM" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) PORT_CHANGED( evpc_changed, (void *)2) |
| 142 | PORT_DIPNAME( 0x01, 0x00, "EVPC VDP RAM" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) |
| 173 | 143 | PORT_DIPSETTING( 0x00, "shifted" ) |
| 174 | 144 | PORT_DIPSETTING( 0x01, "not shifted" ) |
| 175 | 145 | |
| 176 | 146 | PORT_START( "EVPC-SW8" ) |
| 177 | | PORT_DIPNAME( 0x01, 0x00, "EVPC Configuration" ) PORT_CHANGED( evpc_changed, (void *)3) |
| 147 | PORT_DIPNAME( 0x01, 0x00, "EVPC Configuration" ) |
| 178 | 148 | PORT_DIPSETTING( 0x00, "DIP" ) |
| 179 | 149 | PORT_DIPSETTING( 0x01, "NOVRAM" ) |
| 180 | 150 | |
| r9485 | r9486 | |
| 189 | 159 | PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 190 | 160 | PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(1) |
| 191 | 161 | |
| 192 | | |
| 193 | 162 | /* 4 ports for keyboard and joystick */ |
| 194 | 163 | PORT_START("KEY0") /* col 0 */ |
| 195 | 164 | PORT_BIT(0x0088, IP_ACTIVE_LOW, IPT_UNUSED) |
| r9485 | r9486 | |
| 270 | 239 | |
| 271 | 240 | INPUT_PORTS_END |
| 272 | 241 | |
| 273 | | |
| 274 | | static GFXDECODE_START( ti99_4p ) |
| 275 | | GFXDECODE_END |
| 276 | | |
| 277 | | static const tms5220_interface ti99_4p_tms5220interface = |
| 242 | DRIVER_INIT( ti99_4p ) |
| 278 | 243 | { |
| 279 | | DEVCB_NULL, /* no IRQ callback */ |
| 280 | | DEVCB_NULL, /* no Ready callback */ |
| 281 | | #if 1 |
| 282 | | spchroms_read, /* speech ROM read handler */ |
| 283 | | spchroms_load_address, /* speech ROM load address handler */ |
| 284 | | spchroms_read_and_branch /* speech ROM read and branch handler */ |
| 285 | | #endif |
| 286 | | }; |
| 244 | } |
| 287 | 245 | |
| 288 | | /* F4 Character Displayer */ |
| 289 | | static const gfx_layout ti99_6_charlayout = |
| 246 | MACHINE_START( ti99_4p ) |
| 290 | 247 | { |
| 291 | | 8, 6, /* 8 x 6 characters */ |
| 292 | | 64, /* 64 characters */ |
| 293 | | 1, /* 1 bits per pixel */ |
| 294 | | { 0 }, /* no bitplanes */ |
| 295 | | /* x offsets */ |
| 296 | | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 297 | | /* y offsets */ |
| 298 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8 }, |
| 299 | | 8*6 /* every char takes 6 bytes */ |
| 300 | | }; |
| 248 | } |
| 301 | 249 | |
| 302 | | static const gfx_layout ti99_7_charlayout = |
| 303 | | { |
| 304 | | 8, 7, /* 8 x 7 characters */ |
| 305 | | 95, /* 95 characters */ |
| 306 | | 1, /* 1 bits per pixel */ |
| 307 | | { 0 }, /* no bitplanes */ |
| 308 | | /* x offsets */ |
| 309 | | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 310 | | /* y offsets */ |
| 311 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8 }, |
| 312 | | 8*7 /* every char takes 7 bytes */ |
| 313 | | }; |
| 314 | | |
| 315 | | static const gfx_layout ti99_8_charlayout = |
| 316 | | { |
| 317 | | 8, 8, /* 8 x 8 characters */ |
| 318 | | 64, /* 64 characters */ |
| 319 | | 1, /* 1 bits per pixel */ |
| 320 | | { 0 }, /* no bitplanes */ |
| 321 | | /* x offsets */ |
| 322 | | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 323 | | /* y offsets */ |
| 324 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 325 | | 8*8 /* every char takes 8 bytes */ |
| 326 | | }; |
| 327 | | |
| 328 | | static const gfx_layout ti99_c_charlayout = |
| 329 | | { |
| 330 | | 8, 8, /* 8 x 8 characters */ |
| 331 | | 1, /* 1 characters */ |
| 332 | | 1, /* 1 bits per pixel */ |
| 333 | | { 0 }, /* no bitplanes */ |
| 334 | | /* x offsets */ |
| 335 | | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 336 | | /* y offsets */ |
| 337 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 338 | | 8*8 /* every char takes 8 bytes */ |
| 339 | | }; |
| 340 | | |
| 341 | | static const gfx_layout ti99_24_charlayout = |
| 342 | | { |
| 343 | | 24, 24, /* 24 x 24 characters */ |
| 344 | | 1, /* 1 characters */ |
| 345 | | 1, /* 1 bits per pixel */ |
| 346 | | { 0 }, /* no bitplanes */ |
| 347 | | /* x offsets */ |
| 348 | | { 0, 1, 2, 3, 4, 5, 6, 7, 64, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135 }, |
| 349 | | /* y offsets */ |
| 350 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8, 48*8, 49*8, 50*8, 51*8, 52*8, 53*8, 54*8, 55*8 }, |
| 351 | | 24*24 /* every char takes 72 bytes */ |
| 352 | | }; |
| 353 | | |
| 354 | | static GFXDECODE_START( ti99b ) |
| 355 | | GFXDECODE_ENTRY( region_grom, 0x04b4, ti99_8_charlayout, 2, 2 ) |
| 356 | | GFXDECODE_ENTRY( region_grom, 0x06b4, ti99_7_charlayout, 2, 2 ) |
| 357 | | GFXDECODE_ENTRY( region_grom, 0x0950, ti99_24_charlayout, 2, 2 ) |
| 358 | | GFXDECODE_ENTRY( region_grom, 0x0998, ti99_c_charlayout, 2, 2 ) |
| 359 | | GFXDECODE_END |
| 360 | | |
| 361 | 250 | /* |
| 362 | | We use a DAC to emulate "audio gate", even though |
| 363 | | a) there was no DAC in an actual TI99 |
| 364 | | b) this is a 2-level output (whereas a DAC provides a 256-level output...) |
| 251 | Reset the machine. |
| 365 | 252 | */ |
| 366 | | |
| 367 | | static const floppy_config ti99_4p_floppy_config = |
| 253 | MACHINE_RESET( ti99_4p ) |
| 368 | 254 | { |
| 369 | | DEVCB_NULL, |
| 370 | | DEVCB_NULL, |
| 371 | | DEVCB_NULL, |
| 372 | | DEVCB_NULL, |
| 373 | | DEVCB_NULL, |
| 374 | | FLOPPY_STANDARD_5_25_DSHD, |
| 375 | | FLOPPY_OPTIONS_NAME(ti99), |
| 376 | | NULL |
| 377 | | }; |
| 255 | tms9901_set_single_int(machine->device("tms9901"), 12, 0); |
| 256 | } |
| 378 | 257 | |
| 379 | | static const mm58274c_interface floppy_mm58274c_interface = |
| 258 | INTERRUPT_GEN( ti99_4p_hblank_interrupt ) |
| 380 | 259 | { |
| 381 | | 1, /* mode 24*/ |
| 382 | | 0 /* first day of week */ |
| 383 | | }; |
| 260 | v9938_interrupt(device->machine, 0); |
| 261 | } |
| 384 | 262 | |
| 385 | 263 | /* |
| 386 | 264 | Machine description. |
| r9485 | r9486 | |
| 391 | 269 | MDRV_CPU_ADD("maincpu", TMS9900, 3000000) |
| 392 | 270 | MDRV_CPU_PROGRAM_MAP(memmap) |
| 393 | 271 | MDRV_CPU_IO_MAP(cru_map) |
| 272 | MDRV_CPU_VBLANK_INT_HACK(ti99_4p_hblank_interrupt, 262) /* 262.5 in 60Hz, 312.5 in 50Hz */ |
| 394 | 273 | |
| 395 | | // MZ: Changed 263 to 262 to avoid blank image on startup |
| 396 | | // The issue is somehow related to changing VReg 9 to 0 in an unconvenient situation |
| 397 | | // but I could not identify it more closely. Seems to happen in v9938_interrupt. |
| 398 | | MDRV_CPU_VBLANK_INT_HACK(ti99_4ev_hblank_interrupt, 262) /* 262.5 in 60Hz, 312.5 in 50Hz */ |
| 274 | /* video hardware */ |
| 275 | MDRV_TI_V9938_ADD("video", 60, "screen", 2500, 512+32, (212+28)*2, tms9901_sg_set_int2) |
| 399 | 276 | |
| 400 | 277 | MDRV_MACHINE_START( ti99_4p ) |
| 401 | 278 | MDRV_MACHINE_RESET( ti99_4p ) |
| 402 | 279 | |
| 403 | | /* For HSGPL */ |
| 404 | | MDRV_NVRAM_HANDLER( ti99 ) |
| 405 | | |
| 406 | | /* video hardware */ |
| 407 | | MDRV_SCREEN_ADD("screen", RASTER) |
| 408 | | MDRV_SCREEN_REFRESH_RATE(60) /* or 50Hz */ |
| 409 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 410 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 411 | | MDRV_SCREEN_SIZE(512+32, (212+28)*2) |
| 412 | | MDRV_SCREEN_VISIBLE_AREA(0, 512+32 - 1, 0, (212+28)*2 - 1) |
| 413 | | |
| 414 | 280 | // Didn't work, probably just done wrong by me: |
| 415 | 281 | // MDRV_TIMER_ADD_SCANLINE("v9938_scanline", ti99_4ev_scanline_interrupt , "screen", 0, 1) |
| 416 | 282 | |
| 417 | | MDRV_PALETTE_LENGTH(512) |
| 418 | | |
| 419 | | MDRV_PALETTE_INIT(v9938) |
| 420 | | MDRV_VIDEO_START(ti99_4ev) |
| 421 | | MDRV_VIDEO_UPDATE(generic_bitmapped) |
| 422 | | MDRV_GFXDECODE(ti99b) |
| 423 | | |
| 424 | 283 | /* sound hardware */ |
| 425 | 284 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 426 | 285 | MDRV_SOUND_ADD("dac", DAC, 0) |
| 427 | 286 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 428 | 287 | MDRV_SOUND_WAVE_ADD("wave", "cassette") |
| 429 | 288 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 430 | | MDRV_SOUND_ADD("sn76496", SN76496, 3579545) /* 3.579545 MHz */ |
| 289 | MDRV_SOUND_ADD("soundgen", SN76496, 3579545) /* 3.579545 MHz */ |
| 431 | 290 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 432 | | MDRV_SOUND_ADD("tmc0285", TMC0285, 680000L) |
| 433 | | MDRV_SOUND_CONFIG(ti99_4p_tms5220interface) |
| 434 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 435 | 291 | |
| 436 | | /* devices */ |
| 437 | | MDRV_PBOX_ADD( "per_exp_box", TRUE, tms9901_set_int1, NULL ) |
| 438 | | |
| 439 | | /* MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt ) |
| 440 | | MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) */ |
| 441 | | |
| 442 | | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 443 | | |
| 444 | 292 | /* tms9901 */ |
| 445 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 293 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4p) |
| 446 | 294 | |
| 447 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 448 | | |
| 449 | | /* rtc */ |
| 450 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 451 | | |
| 452 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 453 | | |
| 454 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4p_floppy_config) |
| 455 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 456 | | |
| 457 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 458 | | |
| 459 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 295 | /* devices */ |
| 296 | MDRV_PBOXSG_ADD( "peribox", card_extint, card_notconnected, card_ready ) |
| 297 | MDRV_SGCPUB_ADD( "sgcpu_board" ) |
| 298 | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 460 | 299 | MACHINE_CONFIG_END |
| 461 | 300 | |
| 462 | 301 | |
| 463 | 302 | ROM_START(ti99_4p) |
| 464 | 303 | /*CPU memory space*/ |
| 465 | | ROM_REGION16_BE(region_cpu1_len_4p, "maincpu", 0) |
| 304 | ROM_REGION16_BE(0x10000, "maincpu", 0) |
| 466 | 305 | ROM_LOAD16_BYTE("sgcpu_hb.bin", 0x0000, 0x8000, CRC(aa100730) SHA1(35e585b2dcd3f2a0005bebb15ede6c5b8c787366) ) /* system ROMs */ |
| 467 | 306 | ROM_LOAD16_BYTE("sgcpu_lb.bin", 0x0001, 0x8000, CRC(2a5dc818) SHA1(dec141fe2eea0b930859cbe1ebd715ac29fa8ecb) ) /* system ROMs */ |
| 468 | | |
| 469 | | /*GROM memory space*/ |
| 470 | | ROM_REGION(0x10000, region_grom, 0) |
| 471 | | ROM_LOAD("994agr38.bin", 0x0000, 0x6000, CRC(bdd9f09b) SHA1(9b058a55d2528d2a6a69d7081aa296911ed7c0de)) /* system GROMs */ |
| 472 | | |
| 473 | | /*DSR ROM space*/ |
| 474 | | ROM_REGION(region_dsr_len, region_dsr, 0) |
| 475 | | ROM_LOAD_OPTIONAL("disk.bin", offset_fdc_dsr, 0x2000, CRC(8f7df93f) SHA1(ed91d48c1eaa8ca37d5055bcf67127ea51c4cad5) ) /* TI disk DSR ROM */ |
| 476 | | #if HAS_99CCFDC |
| 477 | | ROM_LOAD_OPTIONAL("ccfdc.bin", offset_ccfdc_dsr, 0x4000, BAD_DUMP CRC(f69cc69d)) /* CorComp disk DSR ROM */ |
| 478 | | #endif |
| 479 | | ROM_LOAD_OPTIONAL("bwg.bin", offset_bwg_dsr, 0x8000, CRC(06f1ec89) SHA1(6ad77033ed268f986d9a5439e65f7d391c4b7651)) /* BwG disk DSR ROM */ |
| 480 | | ROM_LOAD_OPTIONAL("hfdc.bin", offset_hfdc_dsr, 0x4000, CRC(66fbe0ed) SHA1(11df2ecef51de6f543e4eaf8b2529d3e65d0bd59)) /* HFDC disk DSR ROM */ |
| 481 | | ROM_LOAD_OPTIONAL("rs232.bin", offset_rs232_dsr, 0x1000, CRC(eab382fb) SHA1(ee609a18a21f1a3ddab334e8798d5f2a0fcefa91)) /* TI rs232 DSR ROM */ |
| 482 | | ROM_LOAD("evpcdsr.bin", offset_evpc_dsr, 0x10000, CRC(a062b75d) SHA1(6e8060f86e3bb9c36f244d88825e3fe237bfe9a9)) /* evpc DSR ROM */ |
| 483 | | |
| 484 | | /* HSGPL memory space */ |
| 485 | | ROM_REGION(region_hsgpl_len, region_hsgpl, ROMREGION_ERASEFF) |
| 486 | | |
| 487 | | /*TMC0285 ROM space*/ |
| 488 | | ROM_REGION(0x8000, region_speech_rom, 0) |
| 489 | | ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */ |
| 490 | 307 | ROM_END |
| 491 | 308 | |
| 492 | 309 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
src/mess/drivers/ti99_4x.c
| r9485 | r9486 | |
| 22 | 22 | #include "deprecat.h" |
| 23 | 23 | #include "cpu/tms9900/tms9900.h" |
| 24 | 24 | #include "sound/sn76496.h" |
| 25 | | #include "sound/tms5220.h" |
| 25 | |
| 26 | 26 | #include "sound/wave.h" |
| 27 | 27 | #include "video/v9938.h" |
| 28 | | #include "machine/ti99_4x.h" |
| 29 | 28 | #include "machine/tms9901.h" |
| 30 | | #include "machine/tms9902.h" |
| 31 | | #include "audio/spchroms.h" |
| 32 | | #include "devices/ti99_peb.h" |
| 33 | | #include "machine/994x_ser.h" |
| 34 | | #include "machine/99_dsk.h" |
| 35 | | #include "machine/99_ide.h" |
| 36 | | #include "machine/99_hsgpl.h" |
| 37 | | #include "devices/flopdrv.h" |
| 38 | | #include "devices/harddriv.h" |
| 39 | 29 | #include "devices/cassette.h" |
| 40 | | #include "machine/smartmed.h" |
| 41 | | #include "machine/idectrl.h" |
| 42 | | #include "machine/smc92x4.h" |
| 43 | | #include "machine/mm58274c.h" |
| 44 | | #include "machine/rtc65271.h" |
| 45 | | #include "devices/ti99cart.h" |
| 46 | | #include "formats/ti99_dsk.h" |
| 47 | | #include "devices/ti99_hd.h" |
| 48 | 30 | |
| 31 | #include "machine/ti99/tiboard.h" |
| 32 | |
| 33 | #include "machine/ti99/videowrp.h" |
| 34 | |
| 35 | #include "machine/ti99/peribox.h" |
| 36 | #include "machine/ti99/crubus.h" |
| 37 | #include "machine/ti99/datamux.h" |
| 38 | #include "machine/ti99/grom.h" |
| 39 | #include "machine/ti99/gromport.h" |
| 40 | #include "machine/ti99/mecmouse.h" |
| 41 | #include "machine/ti99/handset.h" |
| 42 | |
| 49 | 43 | /* |
| 50 | 44 | Memory map |
| 51 | 45 | */ |
| 52 | | |
| 53 | 46 | static ADDRESS_MAP_START(memmap, ADDRESS_SPACE_PROGRAM, 16) |
| 54 | 47 | ADDRESS_MAP_GLOBAL_MASK(0xffff) |
| 55 | 48 | AM_RANGE(0x0000, 0x1fff) AM_ROM /*system ROM*/ |
| 56 | | AM_RANGE(0x2000, 0x3fff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*lower 8kb of RAM extension - installed dynamically*/ |
| 57 | | AM_RANGE(0x4000, 0x5fff) AM_DEVREADWRITE("per_exp_box", ti99_4x_peb_r, ti99_4x_peb_w) /*DSR ROM space*/ |
| 58 | | AM_RANGE(0x6000, 0x7fff) AM_READWRITE(ti99_cart_r, ti99_cart_w) /*cartridge memory*/ |
| 59 | | // AM_RANGE(0x6000, 0x7fff) AM_DEVREADWRITE("ti99_multicart", ti99_multicart_r, ti99_multicart_w) |
| 60 | | AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAMBANK("bank1") /*RAM PAD, mirrored 4 times*/ |
| 61 | | AM_RANGE(0x8400, 0x87ff) AM_READWRITE(ti99_nop_8_r, ti99_wsnd_w) /*soundchip write*/ |
| 62 | | AM_RANGE(0x8800, 0x8bff) AM_READWRITE(ti99_rvdp_r, ti99_nop_8_w) /*vdp read*/ |
| 63 | | AM_RANGE(0x8C00, 0x8fff) AM_READWRITE(ti99_nop_8_r, ti99_wvdp_w) /*vdp write*/ |
| 64 | | AM_RANGE(0x9000, 0x93ff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*speech read - installed dynamically*/ |
| 65 | | AM_RANGE(0x9400, 0x97ff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*speech write - installed dynamically*/ |
| 66 | | AM_RANGE(0x9800, 0x9bff) AM_READWRITE(ti99_grom_r, ti99_nop_8_w) /*GPL read*/ |
| 67 | | AM_RANGE(0x9c00, 0x9fff) AM_READWRITE(ti99_nop_8_r, ti99_grom_w) /*GPL write*/ |
| 68 | | AM_RANGE(0xa000, 0xffff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*upper 24kb of RAM extension - installed dynamically*/ |
| 49 | AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAM /*RAM PAD, mirrored 4 times*/ |
| 50 | AM_RANGE(0x8800, 0x8bff) AM_DEVREADWRITE("video", ti_tms991x_r16, ti_video_wnop) /*vdp read*/ |
| 51 | AM_RANGE(0x8C00, 0x8fff) AM_DEVREADWRITE("video", ti_video_rnop, ti_tms991x_w16) /*vdp write*/ |
| 52 | AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("datamux_16_8", ti99_dmux_r, ti99_dmux_w) |
| 69 | 53 | ADDRESS_MAP_END |
| 70 | 54 | |
| 71 | 55 | static ADDRESS_MAP_START(memmap_4ev, ADDRESS_SPACE_PROGRAM, 16) |
| 72 | 56 | ADDRESS_MAP_GLOBAL_MASK(0xffff) |
| 73 | | AM_RANGE(0x0000, 0x1fff) AM_ROM /*system ROM*/ |
| 74 | | AM_RANGE(0x2000, 0x3fff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*lower 8kb of RAM extension - installed dynamically*/ |
| 75 | | AM_RANGE(0x4000, 0x5fff) AM_DEVREADWRITE("per_exp_box", ti99_4x_peb_r, ti99_4x_peb_w) /*DSR ROM space*/ |
| 76 | | AM_RANGE(0x6000, 0x7fff) AM_READWRITE(ti99_cart_r, ti99_cart_w) /*cartridge memory*/ |
| 77 | | // AM_RANGE(0x6000, 0x7fff) AM_DEVREADWRITE("ti99_multicart", ti99_multicart_r, ti99_multicart_w) |
| 78 | | AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAMBANK("bank1") /*RAM PAD, mirrored 4 times*/ |
| 79 | | AM_RANGE(0x8400, 0x87ff) AM_READWRITE(ti99_nop_8_r, ti99_wsnd_w) /*soundchip write*/ |
| 80 | | AM_RANGE(0x8800, 0x8bff) AM_READWRITE(ti99_rv38_r, ti99_nop_8_w) /*vdp read*/ |
| 81 | | AM_RANGE(0x8C00, 0x8fff) AM_READWRITE(ti99_nop_8_r, ti99_wv38_w) /*vdp write*/ |
| 82 | | AM_RANGE(0x9000, 0x93ff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*speech read - installed dynamically*/ |
| 83 | | AM_RANGE(0x9400, 0x97ff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*speech write - installed dynamically*/ |
| 84 | | AM_RANGE(0x9800, 0x9bff) AM_READWRITE(ti99_grom_r, ti99_nop_8_w) /*GPL read*/ |
| 85 | | AM_RANGE(0x9c00, 0x9fff) AM_READWRITE(ti99_nop_8_r, ti99_grom_w) /*GPL write*/ |
| 86 | | AM_RANGE(0xa000, 0xffff) AM_READWRITE(ti99_nop_8_r, ti99_nop_8_w) /*upper 24kb of RAM extension - installed dynamically*/ |
| 57 | AM_RANGE(0x0000, 0x1fff) AM_ROM /*system ROM*/ |
| 58 | AM_RANGE(0x8000, 0x80ff) AM_MIRROR(0x0300) AM_RAM /*RAM PAD, mirrored 4 times*/ |
| 59 | AM_RANGE(0x8800, 0x8bff) AM_DEVREADWRITE("video", ti_v9938_r16, ti_video_wnop) /*vdp read*/ |
| 60 | AM_RANGE(0x8C00, 0x8fff) AM_DEVREADWRITE("video", ti_video_rnop, ti_v9938_w16) /*vdp write*/ |
| 61 | AM_RANGE(0x0000, 0xffff) AM_DEVREADWRITE("datamux_16_8", ti99_dmux_r, ti99_dmux_w) |
| 87 | 62 | ADDRESS_MAP_END |
| 88 | 63 | |
| 89 | 64 | /* |
| 90 | 65 | CRU map |
| 91 | 66 | */ |
| 92 | | |
| 93 | 67 | static ADDRESS_MAP_START(cru_map, ADDRESS_SPACE_IO, 8) |
| 94 | 68 | AM_RANGE(0x0000, 0x007f) AM_DEVREAD("tms9901", tms9901_cru_r) |
| 95 | | AM_RANGE(0x0080, 0x00ff) AM_DEVREAD("ti99_multicart", ti99_multicart_cru_r) /* SuperSpace */ |
| 96 | | AM_RANGE(0x0100, 0x01ff) AM_DEVREAD("per_exp_box", ti99_4x_peb_cru_r) |
| 69 | AM_RANGE(0x0000, 0x01ff) AM_DEVREAD("crubus", ti99_crubus_r ) |
| 97 | 70 | |
| 98 | 71 | AM_RANGE(0x0000, 0x03ff) AM_DEVWRITE("tms9901", tms9901_cru_w) |
| 99 | | AM_RANGE(0x0400, 0x07ff) AM_DEVWRITE("ti99_multicart", ti99_multicart_cru_w) /* SuperSpace */ |
| 100 | | AM_RANGE(0x0800, 0x0fff) AM_DEVWRITE("per_exp_box", ti99_4x_peb_cru_w) |
| 72 | AM_RANGE(0x0000, 0x0fff) AM_DEVWRITE("crubus", ti99_crubus_w ) |
| 101 | 73 | ADDRESS_MAP_END |
| 102 | 74 | |
| 103 | 75 | /* |
| 104 | 76 | Input ports, used by machine code for TI keyboard and joystick emulation. |
| 105 | 77 | */ |
| 106 | 78 | |
| 79 | INPUT_CHANGED( gk_changed ) |
| 80 | { |
| 81 | running_device *cartsys = field->port->machine->device("gromport"); |
| 82 | set_gk_switches(cartsys, (UINT8)((UINT64)param&0x07), newval); |
| 83 | } |
| 84 | |
| 107 | 85 | /* TI99/4a: 48-key keyboard, plus two optional joysticks (2 shift keys) */ |
| 108 | 86 | static INPUT_PORTS_START(ti99_4a) |
| 109 | 87 | |
| 110 | 88 | PORT_START( "RAM" ) /* config */ |
| 111 | 89 | PORT_CONFNAME( 0x07, 0x01, "RAM extension" ) |
| 112 | 90 | PORT_CONFSETTING( 0x00, DEF_STR( None ) ) |
| 113 | | PORT_CONFSETTING( 0x01, "Texas Instruments 32 KiB" ) |
| 114 | | PORT_CONFSETTING( 0x02, "Super AMS 1MiB" ) |
| 115 | | PORT_CONFSETTING( 0x03, "Foundation 128 KiB" ) |
| 116 | | PORT_CONFSETTING( 0x04, "Foundation 512 KiB" ) |
| 117 | | PORT_CONFSETTING( 0x05, "Myarc 128 KiB" ) |
| 118 | | PORT_CONFSETTING( 0x06, "Myarc 512 KiB" ) |
| 91 | PORT_CONFSETTING( 0x01, "Console 32 KiB (16 bit)" ) |
| 92 | PORT_CONFSETTING( 0x02, "TI Memexp card 32 KiB" ) |
| 93 | PORT_CONFSETTING( 0x03, "Super AMS 1MiB" ) |
| 94 | PORT_CONFSETTING( 0x07, "Myarc 512 KiB" ) |
| 119 | 95 | |
| 120 | 96 | PORT_START( "SPEECH" ) |
| 121 | 97 | PORT_CONFNAME( 0x01, 0x01, "Speech synthesizer" ) |
| r9485 | r9486 | |
| 128 | 104 | PORT_CONFSETTING( 0x01, "TI SD Floppy Controller" ) |
| 129 | 105 | PORT_CONFSETTING( 0x02, "SNUG BwG Controller" ) |
| 130 | 106 | PORT_CONFSETTING( 0x03, "Myarc HFDC" ) |
| 131 | | // PORT_CONFSETTING( 0x04, "Corcomp" ) |
| 132 | 107 | |
| 133 | 108 | PORT_START( "HDCTRL" ) |
| 134 | 109 | PORT_CONFNAME( 0x03, 0x00, "HD controller" ) |
| 135 | 110 | PORT_CONFSETTING( 0x00, DEF_STR( None ) ) |
| 136 | | // PORT_CONFSETTING( 0x01, "Nouspikel IDE Controller" ) |
| 111 | PORT_CONFSETTING( 0x01, "Nouspikel IDE Controller" ) |
| 137 | 112 | // PORT_CONFSETTING( 0x02, "WHTech SCSI Controller" ) |
| 138 | 113 | PORT_CONFNAME( 0x04, 0x00, "USB-SM card" ) |
| 139 | 114 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| r9485 | r9486 | |
| 146 | 121 | |
| 147 | 122 | /* Flash setting is used to flash an empty HSGPL DSR ROM */ |
| 148 | 123 | PORT_START( "EXTCARD" ) |
| 149 | | PORT_CONFNAME( 0x03, 0x00, "HSGPL extension" ) PORT_CHANGED( hsgpl_changed, NULL) |
| 124 | PORT_CONFNAME( 0x03, 0x00, "HSGPL extension" ) |
| 150 | 125 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 151 | 126 | PORT_CONFSETTING( 0x01, "Flash" ) |
| 152 | 127 | PORT_CONFSETTING( 0x02, DEF_STR( On ) ) |
| r9485 | r9486 | |
| 160 | 135 | PORT_CONFSETTING( 0x01, "Mechatronics Mouse" ) |
| 161 | 136 | |
| 162 | 137 | PORT_START( "CARTSLOT" ) |
| 163 | | PORT_DIPNAME( 0x0f, 0x00, "Cartridge slot" ) |
| 164 | | PORT_DIPSETTING( 0x00, "Auto" ) |
| 165 | | PORT_DIPSETTING( 0x01, "Slot 1" ) |
| 166 | | PORT_DIPSETTING( 0x02, "Slot 2" ) |
| 167 | | PORT_DIPSETTING( 0x03, "Slot 3" ) |
| 168 | | PORT_DIPSETTING( 0x04, "Slot 4" ) |
| 169 | | PORT_DIPSETTING( 0x0f, "GRAM Kracker" ) |
| 138 | PORT_DIPNAME( 0x0f, CART_AUTO, "Cartridge slot" ) |
| 139 | PORT_DIPSETTING( CART_AUTO, "Auto" ) |
| 140 | PORT_DIPSETTING( CART_1, "Slot 1" ) |
| 141 | PORT_DIPSETTING( CART_2, "Slot 2" ) |
| 142 | PORT_DIPSETTING( CART_3, "Slot 3" ) |
| 143 | PORT_DIPSETTING( CART_4, "Slot 4" ) |
| 144 | PORT_DIPSETTING( CART_GK, "GRAM Kracker" ) |
| 170 | 145 | |
| 171 | 146 | /* GRAM Kracker Support */ |
| 172 | 147 | PORT_START( "GKSWITCH1" ) |
| 173 | | PORT_DIPNAME( 0x01, 0x01, "GK switch 1" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)1) |
| 174 | | PORT_DIPSETTING( 0x00, "GK Off" ) |
| 175 | | PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) |
| 148 | PORT_DIPNAME( 0x01, GK_NORMAL, "GK switch 1" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)1) |
| 149 | PORT_DIPSETTING( GK_OFF, "GK Off" ) |
| 150 | PORT_DIPSETTING( GK_NORMAL, DEF_STR( Normal ) ) |
| 176 | 151 | |
| 177 | 152 | PORT_START( "GKSWITCH2" ) |
| 178 | | PORT_DIPNAME( 0x01, 0x01, "GK switch 2" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)2) |
| 179 | | PORT_DIPSETTING( 0x00, "GRAM 0" ) |
| 180 | | PORT_DIPSETTING( 0x01, "Op Sys" ) |
| 153 | PORT_DIPNAME( 0x01, GK_OPSYS, "GK switch 2" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)2) |
| 154 | PORT_DIPSETTING( GK_GRAM0, "GRAM 0" ) |
| 155 | PORT_DIPSETTING( GK_OPSYS, "Op Sys" ) |
| 181 | 156 | |
| 182 | 157 | PORT_START( "GKSWITCH3" ) |
| 183 | | PORT_DIPNAME( 0x01, 0x01, "GK switch 3" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)3) |
| 184 | | PORT_DIPSETTING( 0x00, "GRAM 1-2" ) |
| 185 | | PORT_DIPSETTING( 0x01, "TI BASIC" ) |
| 158 | PORT_DIPNAME( 0x01, GK_TIBASIC, "GK switch 3" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)3) |
| 159 | PORT_DIPSETTING( GK_GRAM12, "GRAM 1-2" ) |
| 160 | PORT_DIPSETTING( GK_TIBASIC, "TI BASIC" ) |
| 186 | 161 | |
| 187 | 162 | PORT_START( "GKSWITCH4" ) |
| 188 | | PORT_DIPNAME( 0x03, 0x01, "GK switch 4" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)4) |
| 189 | | PORT_DIPSETTING( 0x00, "Bank 1" ) |
| 190 | | PORT_DIPSETTING( 0x01, "W/P" ) |
| 191 | | PORT_DIPSETTING( 0x02, "Bank 2" ) |
| 163 | PORT_DIPNAME( 0x03, GK_WP, "GK switch 4" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)4) |
| 164 | PORT_DIPSETTING( GK_BANK1, "Bank 1" ) |
| 165 | PORT_DIPSETTING( GK_WP, "W/P" ) |
| 166 | PORT_DIPSETTING( GK_BANK2, "Bank 2" ) |
| 192 | 167 | |
| 193 | 168 | PORT_START( "GKSWITCH5" ) |
| 194 | | PORT_DIPNAME( 0x01, 0x00, "GK switch 5" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)5) |
| 195 | | PORT_DIPSETTING( 0x00, "Loader On" ) |
| 196 | | PORT_DIPSETTING( 0x01, "Loader Off" ) |
| 169 | PORT_DIPNAME( 0x01, GK_LDON, "GK switch 5" ) PORT_CONDITION( "CARTSLOT", 0x0f, PORTCOND_EQUALS, 0x0f ) PORT_CHANGED( gk_changed, (void *)5) |
| 170 | PORT_DIPSETTING( GK_LDON, "Loader On" ) |
| 171 | PORT_DIPSETTING( GK_LDOFF, "Loader Off" ) |
| 197 | 172 | |
| 173 | PORT_START( "BWGDIP1" ) |
| 174 | PORT_DIPNAME( 0x01, 0x00, "BwG step rate" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 ) |
| 175 | PORT_DIPSETTING( 0x00, "6 ms") |
| 176 | PORT_DIPSETTING( 0x01, "20 ms") |
| 177 | |
| 178 | PORT_START( "BWGDIP2" ) |
| 179 | PORT_DIPNAME( 0x01, 0x00, "BwG date/time display" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 ) |
| 180 | PORT_DIPSETTING( 0x00, "Hide") |
| 181 | PORT_DIPSETTING( 0x01, "Show") |
| 182 | |
| 183 | PORT_START( "BWGDIP34" ) |
| 184 | PORT_DIPNAME( 0x03, 0x00, "BwG drives" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x02 ) |
| 185 | PORT_DIPSETTING( 0x00, "DSK1 only") |
| 186 | PORT_DIPSETTING( 0x01, "DSK1-DSK2") |
| 187 | PORT_DIPSETTING( 0x02, "DSK1-DSK3") |
| 188 | PORT_DIPSETTING( 0x03, "DSK1-DSK4") |
| 189 | |
| 198 | 190 | PORT_START( "HFDCDIP" ) |
| 199 | 191 | PORT_DIPNAME( 0xff, 0x55, "HFDC drive config" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 200 | 192 | PORT_DIPSETTING( 0x00, "40 track, 16 ms") |
| r9485 | r9486 | |
| 307 | 299 | static INPUT_PORTS_START(ti99_4ev) |
| 308 | 300 | PORT_INCLUDE(ti99_4a) |
| 309 | 301 | PORT_START( "EVPC-SW1" ) |
| 310 | | PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) PORT_CHANGED( evpc_changed, (void *)0) |
| 302 | PORT_DIPNAME( 0x01, 0x00, "EVPC video mode" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) |
| 311 | 303 | PORT_DIPSETTING( 0x00, "PAL" ) |
| 312 | 304 | PORT_DIPSETTING( 0x01, "NTSC" ) |
| 313 | 305 | |
| 314 | 306 | PORT_START( "EVPC-SW3" ) |
| 315 | | PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) PORT_CHANGED( evpc_changed, (void *)1) |
| 307 | PORT_DIPNAME( 0x01, 0x00, "EVPC charset" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) |
| 316 | 308 | PORT_DIPSETTING( 0x00, DEF_STR( International )) |
| 317 | 309 | PORT_DIPSETTING( 0x01, DEF_STR( German )) |
| 318 | 310 | |
| 319 | 311 | PORT_START( "EVPC-SW4" ) |
| 320 | | PORT_DIPNAME( 0x01, 0x00, "EVPC VDP RAM" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) PORT_CHANGED( evpc_changed, (void *)2) |
| 312 | PORT_DIPNAME( 0x01, 0x00, "EVPC VDP RAM" ) PORT_CONDITION( "EVPC-SW8", 0x01, PORTCOND_EQUALS, 0x00 ) |
| 321 | 313 | PORT_DIPSETTING( 0x00, "shifted" ) |
| 322 | 314 | PORT_DIPSETTING( 0x01, "not shifted" ) |
| 323 | 315 | |
| 324 | 316 | PORT_START( "EVPC-SW8" ) |
| 325 | | PORT_DIPNAME( 0x01, 0x00, "EVPC Configuration" ) PORT_CHANGED( evpc_changed, (void *)3) |
| 317 | PORT_DIPNAME( 0x01, 0x00, "EVPC Configuration" ) |
| 326 | 318 | PORT_DIPSETTING( 0x00, "DIP" ) |
| 327 | 319 | PORT_DIPSETTING( 0x01, "NOVRAM" ) |
| 328 | 320 | |
| r9485 | r9486 | |
| 336 | 328 | |
| 337 | 329 | PORT_START( "RAM" ) /* config */ |
| 338 | 330 | PORT_CONFNAME( 0x07, 0x01, "RAM extension" ) |
| 339 | | PORT_CONFSETTING( 0x00, DEF_STR( None ) ) |
| 340 | | PORT_CONFSETTING( 0x01, "Texas Instruments 32 KiB" ) |
| 341 | | PORT_CONFSETTING( 0x02, "Super AMS 1MiB" ) |
| 342 | | PORT_CONFSETTING( 0x03, "Foundation 128 KiB" ) |
| 343 | | PORT_CONFSETTING( 0x04, "Foundation 512 KiB" ) |
| 344 | | PORT_CONFSETTING( 0x05, "Myarc 128 KiB" ) |
| 345 | | PORT_CONFSETTING( 0x06, "Myarc 512 KiB" ) |
| 331 | PORT_CONFSETTING( 0x01, "Console 32 KiB (16 bit)" ) |
| 332 | PORT_CONFSETTING( 0x02, "Texas Instruments 32 KiB" ) |
| 333 | PORT_CONFSETTING( 0x03, "Super AMS 1MiB" ) |
| 334 | PORT_CONFSETTING( 0x04, "Foundation 128 KiB" ) |
| 335 | PORT_CONFSETTING( 0x05, "Foundation 512 KiB" ) |
| 336 | PORT_CONFSETTING( 0x06, "Myarc 128 KiB" ) |
| 337 | PORT_CONFSETTING( 0x07, "Myarc 512 KiB" ) |
| 346 | 338 | |
| 347 | 339 | PORT_START( "SPEECH" ) |
| 348 | 340 | PORT_CONFNAME( 0x01, 0x01, "Speech synthesizer" ) |
| r9485 | r9486 | |
| 360 | 352 | PORT_START( "HDCTRL" ) |
| 361 | 353 | PORT_CONFNAME( 0x03, 0x00, "HD controller" ) |
| 362 | 354 | PORT_CONFSETTING( 0x00, DEF_STR( None ) ) |
| 363 | | // PORT_CONFSETTING( 0x01, "Nouspikel IDE Controller" ) |
| 355 | PORT_CONFSETTING( 0x01, "Nouspikel IDE Controller" ) |
| 364 | 356 | // PORT_CONFSETTING( 0x02, "WHTech SCSI Controller" ) |
| 365 | 357 | PORT_CONFNAME( 0x08, 0x00, "USB-SM card" ) |
| 366 | 358 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| r9485 | r9486 | |
| 372 | 364 | PORT_CONFSETTING( 0x01, "TI RS-232 card" ) |
| 373 | 365 | |
| 374 | 366 | PORT_START( "EXTCARD" ) |
| 375 | | PORT_CONFNAME( 0x03, 0x00, "HSGPL extension" ) PORT_CHANGED( hsgpl_changed, NULL) |
| 367 | PORT_CONFNAME( 0x03, 0x00, "HSGPL extension" ) |
| 376 | 368 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 377 | 369 | PORT_CONFSETTING( 0x01, "Flash" ) |
| 378 | 370 | PORT_CONFSETTING( 0x02, DEF_STR( On ) ) |
| 379 | | PORT_CONFNAME( 0x04, 0x00, "P-Code card" ) |
| 380 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 381 | | PORT_CONFSETTING( 0x04, DEF_STR( On ) ) |
| 382 | 371 | |
| 383 | 372 | PORT_START( "HCI" ) |
| 384 | 373 | PORT_CONFNAME( 0x01, 0x00, "Mouse support" ) |
| r9485 | r9486 | |
| 723 | 712 | GFXDECODE_ENTRY( region_grom, 0x0998, ti99_c_charlayout, 2, 2 ) |
| 724 | 713 | GFXDECODE_END |
| 725 | 714 | |
| 715 | static const TMS9928a_interface tms9918_interface = |
| 716 | { |
| 717 | TMS99x8, |
| 718 | 0x4000, |
| 719 | 15, 15, |
| 720 | tms9901_set_int2 |
| 721 | }; |
| 726 | 722 | |
| 723 | static const TMS9928a_interface tms9929_interface = |
| 724 | { |
| 725 | TMS9929, |
| 726 | 0x4000, |
| 727 | 13, 13, |
| 728 | tms9901_set_int2 |
| 729 | }; |
| 730 | |
| 731 | static const TMS9928a_interface tms9918a_interface = |
| 732 | { |
| 733 | TMS99x8A, |
| 734 | 0x4000, |
| 735 | 15, 15, |
| 736 | tms9901_set_int2 |
| 737 | }; |
| 738 | |
| 739 | |
| 740 | static const TMS9928a_interface tms9929a_interface = |
| 741 | { |
| 742 | TMS9929A, |
| 743 | 0x4000, |
| 744 | 13, 13, |
| 745 | tms9901_set_int2 |
| 746 | }; |
| 747 | |
| 727 | 748 | /* |
| 728 | | TMS5220 speech synthesizer |
| 729 | | Note that in the real hardware, the predecessor TMC0285 was used. |
| 749 | Format: |
| 750 | Name, address bus mask, select pattern, write select bit(s), read8z function, write8 function, Condition name, bits which must be set, bits which must not be set |
| 751 | |
| 752 | Multiple devices may have the same select pattern; as in the real hardware, |
| 753 | care must be taken that only one device actually responds. In the case of |
| 754 | GROMs, each chip has an internal address counter and an ID, and the chip |
| 755 | only responds when the ID and the most significant 3 bits match. |
| 756 | If the HSGPL extension is active, the console GROMs should be removed. In |
| 757 | reality, the chips should be pulled out of their sockets. Here we simulate |
| 758 | this by a condition. |
| 730 | 759 | */ |
| 731 | | static const tms5220_interface ti99_4x_tms5220interface = |
| 760 | static const bus_device dmux_devices[] = |
| 732 | 761 | { |
| 733 | | DEVCB_NULL, /* no IRQ callback */ |
| 734 | | DEVCB_NULL, /* no Ready callback */ |
| 735 | | spchroms_read, /* speech ROM read handler */ |
| 736 | | spchroms_load_address, /* speech ROM load address handler */ |
| 737 | | spchroms_read_and_branch /* speech ROM read and branch handler */ |
| 762 | { "console_grom_0", 0xfc01, 0x9800, 0x0400, ti99grom_rz, ti99grom_w, "EXTCARD", 0x00, 0x02 }, |
| 763 | { "console_grom_1", 0xfc01, 0x9800, 0x0400, ti99grom_rz, ti99grom_w, "EXTCARD", 0x00, 0x02 }, |
| 764 | { "console_grom_2", 0xfc01, 0x9800, 0x0400, ti99grom_rz, ti99grom_w, "EXTCARD", 0x00, 0x02 }, |
| 765 | { "soundgen", 0xfc01, 0x8400, 0x0000, NULL, sn76496_w, NULL, 0, 0 }, |
| 766 | { "gromport", 0xfc01, 0x9800, 0x0400, gromportg_rz, gromportg_w, NULL, 0, 0 }, |
| 767 | { "gromport", 0xe000, 0x6000, 0x0000, gromportr_rz, gromportr_w, NULL, 0, 0 }, |
| 768 | { "peribox", 0x0000, 0x0000, 0x0000, ti99_peb_data_rz, ti99_peb_data_w, 0, 0 }, // Peribox needs all addresses |
| 769 | { NULL, 0, 0, 0, NULL, NULL, 0, 0 } |
| 738 | 770 | }; |
| 739 | 771 | |
| 740 | | static const mm58274c_interface floppy_mm58274c_interface = |
| 772 | static const cruconf_device cru_devices[] = |
| 741 | 773 | { |
| 742 | | 1, /* mode 24*/ |
| 743 | | 0 /* first day of week */ |
| 774 | { "gromport", 0xf800, 0x0800, gromportc_rz, gromportc_w }, // Check: Is this really limited? |
| 775 | { "peribox", 0x0000, 0x0000, ti99_peb_cru_rz, ti99_peb_cru_w }, // Peribox needs all addresses |
| 776 | { NULL, 0, 0, NULL, NULL } |
| 744 | 777 | }; |
| 745 | 778 | |
| 779 | MACHINE_RESET( ti99_4 ) |
| 780 | { |
| 781 | } |
| 746 | 782 | |
| 747 | | static const floppy_config ti99_4_floppy_config = |
| 783 | MACHINE_RESET( ti99_4a ) |
| 748 | 784 | { |
| 749 | | DEVCB_NULL, |
| 750 | | DEVCB_NULL, |
| 751 | | DEVCB_NULL, |
| 752 | | DEVCB_NULL, |
| 753 | | DEVCB_NULL, |
| 754 | | FLOPPY_STANDARD_5_25_DSHD, |
| 755 | | FLOPPY_OPTIONS_NAME(ti99), |
| 756 | | NULL |
| 757 | | }; |
| 785 | } |
| 758 | 786 | |
| 759 | 787 | static MACHINE_CONFIG_START( ti99_4_60hz, driver_device ) |
| 760 | 788 | /* basic machine hardware */ |
| r9485 | r9486 | |
| 764 | 792 | MDRV_CPU_IO_MAP(cru_map) |
| 765 | 793 | MDRV_CPU_VBLANK_INT("screen", ti99_vblank_interrupt) |
| 766 | 794 | |
| 767 | | MDRV_MACHINE_START( ti99_4_60hz ) |
| 768 | | MDRV_MACHINE_RESET( ti99 ) |
| 795 | MDRV_MACHINE_RESET( ti99_4 ) |
| 769 | 796 | |
| 770 | | /* For HSGPL */ |
| 771 | | MDRV_NVRAM_HANDLER( ti99 ) |
| 772 | | |
| 773 | 797 | /* video hardware */ |
| 774 | | MDRV_FRAGMENT_ADD(tms9928a) |
| 775 | | MDRV_SCREEN_MODIFY("screen") |
| 776 | | MDRV_SCREEN_REFRESH_RATE(60) |
| 777 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 798 | // MDRV_FRAGMENT_ADD(tms9928a) |
| 799 | // MDRV_SCREEN_MODIFY("screen") |
| 800 | // MDRV_SCREEN_REFRESH_RATE(60) |
| 801 | // MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 802 | |
| 803 | MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9918_interface) |
| 778 | 804 | MDRV_GFXDECODE(ti99) |
| 779 | 805 | |
| 780 | 806 | /* sound hardware */ |
| 781 | 807 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 808 | MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 809 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 810 | |
| 782 | 811 | MDRV_SOUND_WAVE_ADD("wave.1", "cassette1") |
| 783 | 812 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 784 | | MDRV_SOUND_WAVE_ADD("wave.2", "cassette2") |
| 785 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 786 | | MDRV_SOUND_ADD("sn76496", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 787 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 788 | | MDRV_SOUND_ADD("tmc0285", TMC0285, 680000L) |
| 789 | | MDRV_SOUND_CONFIG(ti99_4x_tms5220interface) |
| 790 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 791 | 813 | |
| 792 | | /* devices */ |
| 793 | | MDRV_PBOX_ADD( "per_exp_box", FALSE, tms9901_set_int1, NULL ) |
| 794 | | |
| 795 | | // MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt ) |
| 796 | | // MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) |
| 797 | | |
| 798 | | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 799 | | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 800 | | |
| 801 | | /* rtc */ |
| 802 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 814 | MDRV_TI994_BOARD_ADD( "ti_board" ) |
| 815 | |
| 803 | 816 | /* tms9901 */ |
| 804 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 817 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4) |
| 805 | 818 | |
| 806 | | /* to be moved to controller */ |
| 807 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 808 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 819 | MDRV_CRUBUS_ADD( "crubus", cru_devices ) |
| 820 | MDRV_DMUX_ADD( "datamux_16_8", dmux_devices ) |
| 821 | |
| 822 | MDRV_GROM_ADD( "console_grom_0", 0, region_grom, 0x0000, 0x1800, console_ready ) |
| 823 | MDRV_GROM_ADD( "console_grom_1", 1, region_grom, 0x2000, 0x1800, console_ready ) |
| 824 | MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready ) |
| 809 | 825 | |
| 810 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 811 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 826 | MDRV_TI99_GROMPORT_ADD( "gromport", console_ready ) |
| 827 | |
| 828 | MDRV_PBOX4_ADD( "peribox", console_extint, console_notconnected, console_ready ) |
| 812 | 829 | |
| 813 | | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 830 | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 831 | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 814 | 832 | |
| 815 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 816 | | |
| 817 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 833 | MDRV_MECMOUSE_ADD( "mecmouse" ) |
| 834 | MDRV_HANDSET_ADD( "handset", "tms9901" ) |
| 818 | 835 | MACHINE_CONFIG_END |
| 819 | 836 | |
| 820 | 837 | static MACHINE_CONFIG_START( ti99_4_50hz, driver_device ) |
| r9485 | r9486 | |
| 825 | 842 | MDRV_CPU_IO_MAP(cru_map) |
| 826 | 843 | MDRV_CPU_VBLANK_INT("screen", ti99_vblank_interrupt) |
| 827 | 844 | |
| 828 | | MDRV_MACHINE_START( ti99_4_50hz ) |
| 829 | | MDRV_MACHINE_RESET( ti99 ) |
| 845 | MDRV_MACHINE_RESET( ti99_4 ) |
| 830 | 846 | |
| 831 | | /* For HSGPL */ |
| 832 | | MDRV_NVRAM_HANDLER( ti99 ) |
| 833 | | |
| 834 | 847 | /* video hardware */ |
| 835 | | MDRV_FRAGMENT_ADD(tms9928a) |
| 836 | | MDRV_SCREEN_MODIFY("screen") |
| 837 | | MDRV_SCREEN_REFRESH_RATE(50) |
| 838 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 839 | | MDRV_GFXDECODE(ti99) |
| 848 | MDRV_TI_TMS991x_ADD("video", tms9928a, 50, "screen", 2500, &tms9929_interface) |
| 840 | 849 | |
| 850 | MDRV_GFXDECODE(ti99) |
| 851 | |
| 841 | 852 | /* sound hardware */ |
| 842 | 853 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 843 | | MDRV_SOUND_ADD("sn76496", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 854 | MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 844 | 855 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 845 | | MDRV_SOUND_ADD("tmc0285", TMC0285, 680000L) |
| 846 | | MDRV_SOUND_CONFIG(ti99_4x_tms5220interface) |
| 847 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 856 | |
| 848 | 857 | MDRV_SOUND_WAVE_ADD("wave.1", "cassette1") |
| 849 | 858 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 850 | 859 | |
| 851 | | /* devices */ |
| 852 | | MDRV_PBOX_ADD( "per_exp_box", FALSE, tms9901_set_int1, NULL ) |
| 860 | MDRV_TI994_BOARD_ADD( "ti_board" ) |
| 853 | 861 | |
| 854 | | // MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt |
| 855 | | // MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) |
| 856 | | |
| 857 | | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 858 | | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 859 | | |
| 860 | | /* rtc */ |
| 861 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 862 | 862 | /* tms9901 */ |
| 863 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 863 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4) |
| 864 | 864 | |
| 865 | | /* to be moved to controller */ |
| 866 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 867 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 865 | MDRV_CRUBUS_ADD( "crubus", cru_devices ) |
| 866 | MDRV_DMUX_ADD( "datamux_16_8", dmux_devices ) |
| 868 | 867 | |
| 869 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 870 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 868 | MDRV_GROM_ADD( "console_grom_0", 0, region_grom, 0x0000, 0x1800, console_ready ) |
| 869 | MDRV_GROM_ADD( "console_grom_1", 1, region_grom, 0x2000, 0x1800, console_ready ) |
| 870 | MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready ) |
| 871 | 871 | |
| 872 | | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 872 | MDRV_TI99_GROMPORT_ADD( "gromport", console_ready ) |
| 873 | |
| 874 | MDRV_PBOX4_ADD( "peribox", console_extint, console_notconnected, console_ready ) |
| 873 | 875 | |
| 874 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 875 | | |
| 876 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 876 | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 877 | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 878 | |
| 879 | MDRV_MECMOUSE_ADD( "mecmouse" ) |
| 880 | MDRV_HANDSET_ADD( "handset", "tms9901" ) |
| 877 | 881 | MACHINE_CONFIG_END |
| 878 | 882 | |
| 879 | 883 | static MACHINE_CONFIG_START( ti99_4a_60hz, driver_device ) |
| r9485 | r9486 | |
| 884 | 888 | MDRV_CPU_IO_MAP(cru_map) |
| 885 | 889 | MDRV_CPU_VBLANK_INT("screen", ti99_vblank_interrupt) |
| 886 | 890 | |
| 887 | | MDRV_MACHINE_START( ti99_4a_60hz ) |
| 888 | | MDRV_MACHINE_RESET( ti99 ) |
| 891 | MDRV_MACHINE_RESET( ti99_4a ) |
| 889 | 892 | |
| 890 | | /* For HSGPL and EVPC */ |
| 891 | | MDRV_NVRAM_HANDLER( ti99 ) |
| 892 | | |
| 893 | 893 | /* video hardware */ |
| 894 | | MDRV_FRAGMENT_ADD(tms9928a) |
| 895 | | MDRV_SCREEN_MODIFY("screen") |
| 896 | | MDRV_SCREEN_REFRESH_RATE(60) |
| 897 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 894 | MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9918a_interface) |
| 898 | 895 | MDRV_GFXDECODE(ti99a) |
| 899 | | |
| 896 | |
| 900 | 897 | /* sound hardware */ |
| 901 | 898 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 902 | | MDRV_SOUND_ADD("sn76496", SN94624, 3579545/8) /* 3.579545 MHz SN94624N */ |
| 899 | MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 903 | 900 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 904 | | MDRV_SOUND_ADD("tmc0285", TMC0285, 680000L) |
| 905 | | MDRV_SOUND_CONFIG(ti99_4x_tms5220interface) |
| 906 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 901 | |
| 907 | 902 | MDRV_SOUND_WAVE_ADD("wave.1", "cassette1") |
| 908 | 903 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 909 | 904 | |
| 910 | | /* devices */ |
| 911 | | MDRV_PBOX_ADD( "per_exp_box", FALSE, tms9901_set_int1, NULL ) |
| 905 | MDRV_TI994A_BOARD_ADD( "ti_board" ) |
| 912 | 906 | |
| 913 | | // MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt ) |
| 914 | | // MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) |
| 915 | | |
| 916 | | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 917 | | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 918 | | |
| 919 | | /* rtc */ |
| 920 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 921 | | |
| 922 | 907 | /* tms9901 */ |
| 923 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 908 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4a) |
| 924 | 909 | |
| 925 | | /* to be moved to controller */ |
| 926 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 927 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 910 | MDRV_CRUBUS_ADD( "crubus", cru_devices ) |
| 911 | MDRV_DMUX_ADD( "datamux_16_8", dmux_devices ) |
| 928 | 912 | |
| 929 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 930 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 913 | MDRV_GROM_ADD( "console_grom_0", 0, region_grom, 0x0000, 0x1800, console_ready ) |
| 914 | MDRV_GROM_ADD( "console_grom_1", 1, region_grom, 0x2000, 0x1800, console_ready ) |
| 915 | MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready ) |
| 931 | 916 | |
| 932 | | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 917 | MDRV_TI99_GROMPORT_ADD( "gromport", console_ready ) |
| 918 | |
| 919 | MDRV_PBOX4A_ADD( "peribox", console_extint, console_notconnected, console_ready ) |
| 933 | 920 | |
| 934 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 921 | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 922 | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 935 | 923 | |
| 936 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 924 | MDRV_MECMOUSE_ADD( "mecmouse" ) |
| 937 | 925 | MACHINE_CONFIG_END |
| 938 | 926 | |
| 939 | | |
| 940 | 927 | static MACHINE_CONFIG_START( ti99_4a_50hz, driver_device ) |
| 941 | 928 | /* basic machine hardware */ |
| 942 | 929 | /* TMS9900 CPU @ 3.0 MHz */ |
| r9485 | r9486 | |
| 944 | 931 | MDRV_CPU_PROGRAM_MAP(memmap) |
| 945 | 932 | MDRV_CPU_IO_MAP(cru_map) |
| 946 | 933 | MDRV_CPU_VBLANK_INT("screen", ti99_vblank_interrupt) |
| 934 | |
| 935 | MDRV_MACHINE_RESET( ti99_4a ) |
| 947 | 936 | |
| 948 | | MDRV_MACHINE_START( ti99_4a_50hz ) |
| 949 | | MDRV_MACHINE_RESET( ti99 ) |
| 950 | | |
| 951 | | /* For HSGPL */ |
| 952 | | MDRV_NVRAM_HANDLER( ti99 ) |
| 953 | | |
| 954 | 937 | /* video hardware */ |
| 955 | | MDRV_FRAGMENT_ADD(tms9928a) |
| 956 | | MDRV_SCREEN_MODIFY("screen") |
| 957 | | MDRV_SCREEN_REFRESH_RATE(50) |
| 958 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 938 | MDRV_TI_TMS991x_ADD("video", tms9928a, 60, "screen", 2500, &tms9929a_interface) |
| 959 | 939 | MDRV_GFXDECODE(ti99a) |
| 960 | | |
| 940 | |
| 961 | 941 | /* sound hardware */ |
| 962 | 942 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 963 | | MDRV_SOUND_ADD("sn76496", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 943 | MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 964 | 944 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 965 | | MDRV_SOUND_ADD("tmc0285", TMC0285, 680000L) |
| 966 | | MDRV_SOUND_CONFIG(ti99_4x_tms5220interface) |
| 967 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 945 | |
| 968 | 946 | MDRV_SOUND_WAVE_ADD("wave.1", "cassette1") |
| 969 | 947 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 970 | 948 | |
| 971 | | /* devices */ |
| 972 | | MDRV_PBOX_ADD( "per_exp_box", FALSE, tms9901_set_int1, NULL ) |
| 949 | MDRV_TI994A_BOARD_ADD( "ti_board" ) |
| 950 | |
| 951 | /* tms9901 */ |
| 952 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4a) |
| 953 | |
| 954 | MDRV_CRUBUS_ADD( "crubus", cru_devices ) |
| 955 | MDRV_DMUX_ADD( "datamux_16_8", dmux_devices ) |
| 973 | 956 | |
| 974 | | // MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt ) |
| 975 | | // MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) */ |
| 957 | MDRV_GROM_ADD( "console_grom_0", 0, region_grom, 0x0000, 0x1800, console_ready ) |
| 958 | MDRV_GROM_ADD( "console_grom_1", 1, region_grom, 0x2000, 0x1800, console_ready ) |
| 959 | MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready ) |
| 976 | 960 | |
| 961 | MDRV_TI99_GROMPORT_ADD( "gromport", console_ready ) |
| 962 | |
| 963 | MDRV_PBOX4A_ADD( "peribox", console_extint, console_notconnected, console_ready ) |
| 964 | |
| 977 | 965 | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 978 | 966 | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 979 | 967 | |
| 980 | | /* rtc */ |
| 981 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 982 | | /* tms9901 */ |
| 983 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 984 | | |
| 985 | | /* to be moved to controller */ |
| 986 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 987 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 988 | | |
| 989 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 990 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 991 | | |
| 992 | | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 993 | | |
| 994 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 995 | | |
| 996 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 968 | MDRV_MECMOUSE_ADD( "mecmouse" ) |
| 997 | 969 | MACHINE_CONFIG_END |
| 998 | 970 | |
| 971 | INTERRUPT_GEN( ti99_4ev_hblank_interrupt ) |
| 972 | { |
| 973 | v9938_interrupt(device->machine, 0); |
| 974 | } |
| 999 | 975 | |
| 976 | // Unused |
| 977 | TIMER_DEVICE_CALLBACK( ti99_4ev_scanline_interrupt ) |
| 978 | { |
| 979 | v9938_interrupt(timer.machine, 0); |
| 980 | } |
| 981 | |
| 1000 | 982 | static MACHINE_CONFIG_START( ti99_4ev_60hz, driver_device ) |
| 1001 | 983 | /* basic machine hardware */ |
| 1002 | 984 | /* TMS9900 CPU @ 3.0 MHz */ |
| r9485 | r9486 | |
| 1005 | 987 | MDRV_CPU_IO_MAP(cru_map) |
| 1006 | 988 | MDRV_CPU_VBLANK_INT_HACK(ti99_4ev_hblank_interrupt, 262) /* 262.5 in 60Hz, 312.5 in 50Hz */ |
| 1007 | 989 | |
| 1008 | | MDRV_MACHINE_START( ti99_4ev_60hz ) |
| 1009 | | MDRV_MACHINE_RESET( ti99 ) |
| 990 | MDRV_MACHINE_RESET( ti99_4a ) |
| 1010 | 991 | |
| 1011 | | /* For HSGPL */ |
| 1012 | | MDRV_NVRAM_HANDLER( ti99 ) |
| 1013 | | |
| 1014 | 992 | /* video hardware */ |
| 1015 | | MDRV_SCREEN_ADD("screen", RASTER) |
| 1016 | | MDRV_SCREEN_REFRESH_RATE(60) /* or 50Hz */ |
| 1017 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 1018 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1019 | | MDRV_SCREEN_SIZE(512+32, (212+28)*2) |
| 1020 | | MDRV_SCREEN_VISIBLE_AREA(0, 512+32 - 1, 0, (212+28)*2 - 1) |
| 993 | MDRV_TI_V9938_ADD("video", 60, "screen", 2500, 512+32, (212+28)*2, tms9901_set_int2) |
| 1021 | 994 | |
| 1022 | | // MDRV_TIMER_ADD_SCANLINE("v9938_scanline", ti99_4ev_scanline_interrupt , "screen", 1, 1) |
| 1023 | | |
| 1024 | | MDRV_PALETTE_LENGTH(512) |
| 1025 | | |
| 1026 | | MDRV_PALETTE_INIT(v9938) |
| 1027 | | MDRV_VIDEO_START(ti99_4ev) |
| 1028 | | MDRV_VIDEO_UPDATE(generic_bitmapped) |
| 1029 | 995 | MDRV_GFXDECODE(ti99b) |
| 1030 | 996 | |
| 1031 | 997 | /* sound hardware */ |
| 1032 | 998 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1033 | | MDRV_SOUND_ADD("sn76496", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 999 | MDRV_SOUND_ADD("soundgen", SN94624, 3579545/8) /* 3.579545 MHz */ |
| 1034 | 1000 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 1035 | | MDRV_SOUND_ADD("tmc0285", TMC0285, 680000L) |
| 1036 | | MDRV_SOUND_CONFIG(ti99_4x_tms5220interface) |
| 1037 | | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1001 | |
| 1038 | 1002 | MDRV_SOUND_WAVE_ADD("wave.1", "cassette1") |
| 1039 | 1003 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 1040 | 1004 | |
| 1041 | | /* devices */ |
| 1042 | | MDRV_PBOX_ADD( "per_exp_box", FALSE, tms9901_set_int1, NULL ) |
| 1005 | MDRV_TI994A_BOARD_ADD( "ti_board" ) |
| 1006 | |
| 1007 | MDRV_TMS9901_ADD("tms9901", tms9901_wiring_ti99_4a) |
| 1043 | 1008 | |
| 1044 | | // MDRV_IDE_CONTROLLER_ADD( "ide", ti99_ide_interrupt ) |
| 1045 | | // MDRV_RTC65271_ADD("ide_rtc", ti99_clk_interrupt_callback) */ |
| 1009 | MDRV_CRUBUS_ADD( "crubus", cru_devices ) |
| 1010 | MDRV_DMUX_ADD( "datamux_16_8", dmux_devices ) |
| 1046 | 1011 | |
| 1047 | | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 1048 | | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 1012 | MDRV_GROM_ADD( "console_grom_0", 0, region_grom, 0x0000, 0x1800, console_ready ) |
| 1013 | MDRV_GROM_ADD( "console_grom_1", 1, region_grom, 0x2000, 0x1800, console_ready ) |
| 1014 | MDRV_GROM_ADD( "console_grom_2", 2, region_grom, 0x4000, 0x1800, console_ready ) |
| 1049 | 1015 | |
| 1050 | | /* rtc */ |
| 1051 | | MDRV_MM58274C_ADD("mm58274c_floppy", floppy_mm58274c_interface) |
| 1052 | | /* tms9901 */ |
| 1053 | | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_4x) |
| 1016 | MDRV_TI99_GROMPORT_ADD( "gromport", console_ready ) |
| 1054 | 1017 | |
| 1055 | | /* to be moved to controller */ |
| 1056 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 1057 | | MDRV_SMC92X4_ADD("smc92x4", ti99_smc92x4_interface ) |
| 1018 | MDRV_PBOXEV_ADD( "peribox", console_extint, console_notconnected, console_ready ) |
| 1058 | 1019 | |
| 1059 | | MDRV_FLOPPY_4_DRIVES_ADD(ti99_4_floppy_config) |
| 1060 | | MDRV_MFMHD_3_DRIVES_ADD() |
| 1061 | | |
| 1062 | | MDRV_TI99_CARTRIDGE_ADD("ti99_multicart") |
| 1063 | | MDRV_SMARTMEDIA_ADD("smartmedia") |
| 1064 | | |
| 1065 | | MDRV_TI99_4_RS232_CARD_ADD("rs232") |
| 1020 | MDRV_CASSETTE_ADD( "cassette1", default_cassette_config ) |
| 1021 | MDRV_CASSETTE_ADD( "cassette2", default_cassette_config ) |
| 1066 | 1022 | MACHINE_CONFIG_END |
| 1067 | 1023 | |
| 1068 | | |
| 1069 | 1024 | /* |
| 1070 | 1025 | ROM loading |
| 1071 | 1026 | Note that we use the same ROMset for 50Hz and 60Hz versions. |
| 1027 | ROMs for peripheral equipment have been moved to the respective files. |
| 1072 | 1028 | */ |
| 1073 | 1029 | |
| 1074 | 1030 | ROM_START(ti99_4) |
| 1075 | 1031 | /*CPU memory space*/ |
| 1076 | | ROM_REGION16_BE(region_cpu1_len, "maincpu", 0) |
| 1032 | ROM_REGION16_BE(0x2000, "maincpu", 0) |
| 1077 | 1033 | ROM_LOAD16_BYTE("u610.bin", 0x0000, 0x1000, CRC(6fcf4b15) SHA1(d085213c64701d429ae535f9a4ac8a50427a8343)) /* CPU ROMs high */ |
| 1078 | 1034 | ROM_LOAD16_BYTE("u611.bin", 0x0001, 0x1000, CRC(491c21d1) SHA1(7741ae9294c51a44a78033d1b77c01568a6bbfb9)) /* CPU ROMs low */ |
| 1079 | 1035 | |
| r9485 | r9486 | |
| 1082 | 1038 | ROM_LOAD("u500.bin", 0x0000, 0x1800, CRC(aa757e13) SHA1(4658d3d01c0131c283a30cebd12e76754d41a84a)) /* system GROM 0 */ |
| 1083 | 1039 | ROM_LOAD("u501.bin", 0x2000, 0x1800, CRC(c863e460) SHA1(6d849a76011273a069a98ed0c3feaf13831c942f)) /* system GROM 1 */ |
| 1084 | 1040 | ROM_LOAD("u502.bin", 0x4000, 0x1800, CRC(b0eda548) SHA1(725e3f26f8c819f356e4bb405b4102b5ae1e0e70)) /* system GROM 1 */ |
| 1085 | | |
| 1086 | | /*DSR ROM space*/ |
| 1087 | | ROM_REGION(region_dsr_len, region_dsr, 0) |
| 1088 | | ROM_LOAD_OPTIONAL("disk.bin", offset_fdc_dsr, 0x2000, CRC(8f7df93f) SHA1(ed91d48c1eaa8ca37d5055bcf67127ea51c4cad5)) /* TI disk DSR ROM */ |
| 1089 | | #if HAS_99CCFDC |
| 1090 | | ROM_LOAD_OPTIONAL("ccfdc.bin", offset_ccfdc_dsr, 0x4000, BAD_DUMP CRC(f69cc69d)) /* CorComp disk DSR ROM */ |
| 1091 | | #endif |
| 1092 | | ROM_LOAD_OPTIONAL("bwg.bin", offset_bwg_dsr, 0x8000, CRC(06f1ec89) SHA1(6ad77033ed268f986d9a5439e65f7d391c4b7651)) /* BwG disk DSR ROM */ |
| 1093 | | ROM_LOAD_OPTIONAL("hfdc.bin", offset_hfdc_dsr, 0x4000, CRC(66fbe0ed) SHA1(11df2ecef51de6f543e4eaf8b2529d3e65d0bd59)) /* HFDC disk DSR ROM */ |
| 1094 | | ROM_LOAD_OPTIONAL("rs232.bin", offset_rs232_dsr, 0x1000, CRC(eab382fb) SHA1(ee609a18a21f1a3ddab334e8798d5f2a0fcefa91)) /* TI rs232 DSR ROM */ |
| 1095 | | |
| 1096 | | /* HSGPL memory space */ |
| 1097 | | ROM_REGION(region_hsgpl_len, region_hsgpl, ROMREGION_ERASEFF) |
| 1098 | | |
| 1099 | | /*TMS5220 ROM space*/ |
| 1100 | | ROM_REGION(0x8000, region_speech_rom, 0) |
| 1101 | | ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */ |
| 1102 | 1041 | ROM_END |
| 1103 | 1042 | |
| 1104 | 1043 | ROM_START(ti99_4a) |
| 1105 | 1044 | /*CPU memory space*/ |
| 1106 | | ROM_REGION16_BE(region_cpu1_len, "maincpu", 0) |
| 1045 | ROM_REGION16_BE(0x2000, "maincpu", 0) |
| 1107 | 1046 | ROM_LOAD16_WORD("994arom.bin", 0x0000, 0x2000, CRC(db8f33e5) SHA1(6541705116598ab462ea9403c00656d6353ceb85)) /* system ROMs */ |
| 1108 | 1047 | |
| 1109 | 1048 | /*GROM memory space*/ |
| 1110 | 1049 | ROM_REGION(0x10000, region_grom, 0) |
| 1111 | 1050 | ROM_LOAD("994agrom.bin", 0x0000, 0x6000, CRC(af5c2449) SHA1(0c5eaad0093ed89e9562a2c0ee6a370bdc9df439)) /* system GROMs */ |
| 1112 | | |
| 1113 | | /*DSR ROM space*/ |
| 1114 | | ROM_REGION(region_dsr_len, region_dsr, 0) |
| 1115 | | ROM_LOAD_OPTIONAL("disk.bin", offset_fdc_dsr, 0x2000, CRC(8f7df93f) SHA1(ed91d48c1eaa8ca37d5055bcf67127ea51c4cad5)) /* TI disk DSR ROM */ |
| 1116 | | #if HAS_99CCFDC |
| 1117 | | ROM_LOAD_OPTIONAL("ccfdc.bin", offset_ccfdc_dsr, 0x4000, BAD_DUMP CRC(f69cc69d)) /* CorComp disk DSR ROM */ |
| 1118 | | #endif |
| 1119 | | ROM_LOAD_OPTIONAL("bwg.bin", offset_bwg_dsr, 0x8000, CRC(06f1ec89) SHA1(6ad77033ed268f986d9a5439e65f7d391c4b7651)) /* BwG disk DSR ROM */ |
| 1120 | | ROM_LOAD_OPTIONAL("hfdc.bin", offset_hfdc_dsr, 0x4000, CRC(66fbe0ed) SHA1(11df2ecef51de6f543e4eaf8b2529d3e65d0bd59)) /* HFDC disk DSR ROM */ |
| 1121 | | ROM_LOAD_OPTIONAL("rs232.bin", offset_rs232_dsr, 0x1000, CRC(eab382fb) SHA1(ee609a18a21f1a3ddab334e8798d5f2a0fcefa91)) /* TI rs232 DSR ROM */ |
| 1122 | | ROM_LOAD_OPTIONAL("pcode_r0.bin", offset_pcode_rom, 0x1000, CRC(3881d5b0) SHA1(a60e0468bb15ff72f97cf6e80979ca8c11ed0426)) /* TI P-Code card rom4732 */ |
| 1123 | | ROM_LOAD_OPTIONAL("pcode_r1.bin", offset_pcode_rom + 0x1000, 0x2000, CRC(46a06b8b) SHA1(24e2608179921aef312cdee6f455e3f46deb30d0)) /* TI P-Code card rom4764 */ |
| 1124 | | ROM_LOAD_OPTIONAL("pcode_g0.bin", offset_pcode_grom, 0x10000, CRC(541b3860) SHA1(7be77c216737334ae997753a6a85136f117affb7)) /* TI P-Code card groms */ |
| 1125 | | |
| 1126 | | /* HSGPL memory space */ |
| 1127 | | ROM_REGION(region_hsgpl_len, region_hsgpl, ROMREGION_ERASEFF) |
| 1128 | | |
| 1129 | | /*TMS5220 ROM space*/ |
| 1130 | | ROM_REGION(0x8000, region_speech_rom, 0) |
| 1131 | | ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */ |
| 1132 | | |
| 1133 | 1051 | ROM_END |
| 1134 | 1052 | |
| 1135 | 1053 | ROM_START(ti99_4ev) |
| 1136 | 1054 | /*CPU memory space*/ |
| 1137 | | ROM_REGION16_BE(region_cpu1_len, "maincpu", 0) |
| 1055 | ROM_REGION16_BE(0x2000, "maincpu", 0) |
| 1138 | 1056 | ROM_LOAD16_WORD("994arom.bin", 0x0000, 0x2000, CRC(db8f33e5) SHA1(6541705116598ab462ea9403c00656d6353ceb85)) /* system ROMs */ |
| 1139 | 1057 | |
| 1140 | 1058 | /*GROM memory space*/ |
| 1141 | 1059 | ROM_REGION(0x10000, region_grom, 0) |
| 1142 | 1060 | ROM_LOAD("994agr38.bin", 0x0000, 0x6000, CRC(bdd9f09b) SHA1(9b058a55d2528d2a6a69d7081aa296911ed7c0de)) /* system GROMs */ |
| 1143 | | |
| 1144 | | /*DSR ROM space*/ |
| 1145 | | ROM_REGION(region_dsr_len, region_dsr, 0) |
| 1146 | | ROM_LOAD_OPTIONAL("disk.bin", offset_fdc_dsr, 0x2000, CRC(8f7df93f) SHA1(ed91d48c1eaa8ca37d5055bcf67127ea51c4cad5)) /* TI disk DSR ROM */ |
| 1147 | | #if HAS_99CCFDC |
| 1148 | | ROM_LOAD_OPTIONAL("ccfdc.bin", offset_ccfdc_dsr, 0x4000, BAD_DUMP CRC(f69cc69d)) /* CorComp disk DSR ROM */ |
| 1149 | | #endif |
| 1150 | | ROM_LOAD_OPTIONAL("bwg.bin", offset_bwg_dsr, 0x8000, CRC(06f1ec89) SHA1(6ad77033ed268f986d9a5439e65f7d391c4b7651)) /* BwG disk DSR ROM */ |
| 1151 | | ROM_LOAD_OPTIONAL("hfdc.bin", offset_hfdc_dsr, 0x4000, CRC(66fbe0ed) SHA1(11df2ecef51de6f543e4eaf8b2529d3e65d0bd59)) /* HFDC disk DSR ROM */ |
| 1152 | | ROM_LOAD_OPTIONAL("rs232.bin", offset_rs232_dsr, 0x1000, CRC(eab382fb) SHA1(ee609a18a21f1a3ddab334e8798d5f2a0fcefa91)) /* TI rs232 DSR ROM */ |
| 1153 | | ROM_LOAD("evpcdsr.bin", offset_evpc_dsr, 0x10000, CRC(a062b75d) SHA1(6e8060f86e3bb9c36f244d88825e3fe237bfe9a9)) /* evpc DSR ROM */ |
| 1154 | | |
| 1155 | | /* HSGPL memory space */ |
| 1156 | | ROM_REGION(region_hsgpl_len, region_hsgpl, ROMREGION_ERASEFF) |
| 1157 | | |
| 1158 | | /*TMS5220 ROM space*/ |
| 1159 | | ROM_REGION(0x8000, region_speech_rom, 0) |
| 1160 | | ROM_LOAD_OPTIONAL("spchrom.bin", 0x0000, 0x8000, CRC(58b155f7) SHA1(382292295c00dff348d7e17c5ce4da12a1d87763)) /* system speech ROM */ |
| 1161 | 1061 | ROM_END |
| 1162 | 1062 | |
| 1163 | 1063 | #define rom_ti99_4e rom_ti99_4 |
| 1164 | 1064 | #define rom_ti99_4ae rom_ti99_4a |
| 1165 | 1065 | |
| 1166 | | |
| 1167 | 1066 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 1168 | | COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, ti99_4, "Texas Instruments", "TI99/4 Home Computer (US)" , 0) |
| 1169 | | COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, ti99_4, "Texas Instruments", "TI99/4 Home Computer (Europe)" , 0) |
| 1170 | | COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, ti99_4a, "Texas Instruments", "TI99/4A Home Computer (US)" , 0) |
| 1171 | | COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, ti99_4a, "Texas Instruments", "TI99/4A Home Computer (Europe)" , 0) |
| 1172 | | COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz,ti99_4ev, ti99_4ev,"Texas Instruments", "TI99/4A Home Computer with EVPC" , 0) |
| 1067 | COMP( 1979, ti99_4, 0, 0, ti99_4_60hz, ti99_4, 0, "Texas Instruments", "TI99/4 Home Computer (US)" , 0) |
| 1068 | COMP( 1980, ti99_4e, ti99_4, 0, ti99_4_50hz, ti99_4, 0, "Texas Instruments", "TI99/4 Home Computer (Europe)" , 0) |
| 1069 | COMP( 1981, ti99_4a, 0, 0, ti99_4a_60hz, ti99_4a, 0, "Texas Instruments", "TI99/4A Home Computer (US)" , 0) |
| 1070 | COMP( 1981, ti99_4ae, ti99_4a, 0, ti99_4a_50hz, ti99_4a, 0, "Texas Instruments", "TI99/4A Home Computer (Europe)" , 0) |
| 1071 | COMP( 1994, ti99_4ev, ti99_4a, 0, ti99_4ev_60hz,ti99_4ev, 0, "Texas Instruments", "TI99/4A Home Computer with EVPC" , 0) |