src/mess/machine/ti99_4x.c
| r4069 | r4070 | |
| 375 | 375 | |
| 376 | 376 | DEVICE_START( ti99_cart ) |
| 377 | 377 | { |
| 378 | | int id = image_index_in_device(device); |
| 378 | int id = 0; |
| 379 | if (strcmp(device->tag,"cart1")==0) { |
| 380 | id = 0; |
| 381 | } |
| 382 | if (strcmp(device->tag,"cart2")==0) { |
| 383 | id = 1; |
| 384 | } |
| 385 | if (strcmp(device->tag,"cart3")==0) { |
| 386 | id = 2; |
| 387 | } |
| 388 | |
| 379 | 389 | cartridge_pages[id] = (UINT16 *) (memory_region(device->machine, "main") + offset_cart + (id * 0x2000)); |
| 380 | 390 | return DEVICE_START_OK; |
| 381 | 391 | } |
| r4069 | r4070 | |
| 397 | 407 | /* Original idea by Norberto Bensa */ |
| 398 | 408 | const char *name = image_filename(image); |
| 399 | 409 | const char *ch, *ch2; |
| 400 | | int id = image_index_in_device(image); |
| 410 | int id = 0; |
| 401 | 411 | int i; |
| 402 | | slot_type_t type = (slot_type_t) id; |
| 412 | slot_type_t type; |
| 413 | |
| 414 | if (strcmp(image->tag,"cart1")==0) { |
| 415 | id = 0; |
| 416 | } |
| 417 | if (strcmp(image->tag,"cart2")==0) { |
| 418 | id = 1; |
| 419 | } |
| 420 | if (strcmp(image->tag,"cart3")==0) { |
| 421 | id = 2; |
| 422 | } |
| 423 | type = (slot_type_t) id; |
| 403 | 424 | |
| 404 | 425 | /* There is a circuitry in TI99/4(a) that resets the console when a |
| 405 | 426 | cartridge is inserted or removed. We emulate this instead of resetting the |
| r4069 | r4070 | |
| 518 | 539 | DEVICE_IMAGE_UNLOAD( ti99_cart ) |
| 519 | 540 | { |
| 520 | 541 | int i; |
| 521 | | int id = image_index_in_device(image); |
| 522 | | |
| 542 | int id = 0; |
| 543 | if (strcmp(image->tag,"cart1")==0) { |
| 544 | id = 0; |
| 545 | } |
| 546 | if (strcmp(image->tag,"cart2")==0) { |
| 547 | id = 1; |
| 548 | } |
| 549 | if (strcmp(image->tag,"cart3")==0) { |
| 550 | id = 2; |
| 551 | } |
| 523 | 552 | /* There is a circuitry in TI99/4(a) that resets the console when a |
| 524 | 553 | cartridge is inserted or removed. We emulate this instead of resetting the |
| 525 | 554 | emulator (which is the default in MESS). */ |
src/mess/drivers/ti99_8.c
| r4069 | r4070 | |
| 158 | 158 | #include "cpu/tms9900/tms9900.h" |
| 159 | 159 | #include "devices/mflopimg.h" |
| 160 | 160 | #include "devices/cassette.h" |
| 161 | #include "devices/cartslot.h" |
| 161 | 162 | #include "machine/smartmed.h" |
| 162 | 163 | #include "sound/5220intf.h" |
| 163 | 164 | #include "devices/harddriv.h" |
| r4069 | r4070 | |
| 397 | 398 | 1 /* MP9537 mask */ |
| 398 | 399 | }; |
| 399 | 400 | |
| 401 | MACHINE_DRIVER_START(ti99_8_cartslot) |
| 402 | MDRV_CARTSLOT_ADD("cart1") |
| 403 | MDRV_CARTSLOT_EXTENSION_LIST("bin,c,d,g,m,crom,drom,grom,mrom") |
| 404 | MDRV_CARTSLOT_NOT_MANDATORY |
| 405 | MDRV_CARTSLOT_START(ti99_cart) |
| 406 | MDRV_CARTSLOT_LOAD(ti99_cart) |
| 407 | MDRV_CARTSLOT_UNLOAD(ti99_cart) |
| 408 | |
| 409 | MDRV_CARTSLOT_ADD("cart2") |
| 410 | MDRV_CARTSLOT_EXTENSION_LIST("bin,c,d,g,m,crom,drom,grom,mrom") |
| 411 | MDRV_CARTSLOT_NOT_MANDATORY |
| 412 | MDRV_CARTSLOT_START(ti99_cart) |
| 413 | MDRV_CARTSLOT_LOAD(ti99_cart) |
| 414 | MDRV_CARTSLOT_UNLOAD(ti99_cart) |
| 415 | |
| 416 | MDRV_CARTSLOT_ADD("cart3") |
| 417 | MDRV_CARTSLOT_EXTENSION_LIST("bin,c,d,g,m,crom,drom,grom,mrom") |
| 418 | MDRV_CARTSLOT_NOT_MANDATORY |
| 419 | MDRV_CARTSLOT_START(ti99_cart) |
| 420 | MDRV_CARTSLOT_LOAD(ti99_cart) |
| 421 | MDRV_CARTSLOT_UNLOAD(ti99_cart) |
| 422 | MACHINE_DRIVER_END |
| 423 | |
| 400 | 424 | static MACHINE_DRIVER_START(ti99_8_60hz) |
| 401 | 425 | /* basic machine hardware */ |
| 402 | 426 | /* TMS9995-MP9537 CPU @ 10.7 MHz */ |
| r4069 | r4070 | |
| 438 | 462 | |
| 439 | 463 | /* tms9901 */ |
| 440 | 464 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_8) |
| 465 | |
| 466 | MDRV_IMPORT_FROM(ti99_8_cartslot) |
| 441 | 467 | MACHINE_DRIVER_END |
| 442 | 468 | |
| 443 | 469 | |
| r4069 | r4070 | |
| 482 | 508 | |
| 483 | 509 | /* tms9901 */ |
| 484 | 510 | MDRV_TMS9901_ADD("tms9901", tms9901reset_param_ti99_8) |
| 511 | |
| 512 | MDRV_IMPORT_FROM(ti99_8_cartslot) |
| 485 | 513 | MACHINE_DRIVER_END |
| 486 | 514 | |
| 487 | 515 | /* |
| r4069 | r4070 | |
| 517 | 545 | |
| 518 | 546 | #define rom_ti99_8e rom_ti99_8 |
| 519 | 547 | |
| 520 | | static void ti99_8_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 521 | | { |
| 522 | | /* cartslot */ |
| 523 | | switch(state) |
| 524 | | { |
| 525 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 526 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_CARTSLOT; break; |
| 527 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 528 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 0; break; |
| 529 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 0; break; |
| 530 | | case MESS_DEVINFO_INT_COUNT: info->i = 3; break; |
| 531 | | |
| 532 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 533 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_cart); break; |
| 534 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_cart); break; |
| 535 | | |
| 536 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 537 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin,c,d,g,m,crom,drom,grom,mrom"); break; |
| 538 | | } |
| 539 | | } |
| 540 | | |
| 541 | 548 | static void ti99_8_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 542 | 549 | { |
| 543 | 550 | /* floppy */ |
| r4069 | r4070 | |
| 622 | 629 | /* one cassette unit port */ |
| 623 | 630 | /* Hex-bus disk controller: supports up to 4 floppy disk drives */ |
| 624 | 631 | /* expansion port (similar to 99/4(a) - yet slightly different) */ |
| 625 | | |
| 626 | | CONFIG_DEVICE(ti99_8_cartslot_getinfo) |
| 627 | | #if 1 |
| 628 | 632 | CONFIG_DEVICE(ti99_8_floppy_getinfo) |
| 629 | 633 | CONFIG_DEVICE(ti99_8_parallel_getinfo) |
| 630 | 634 | CONFIG_DEVICE(ti99_8_serial_getinfo) |
| 631 | 635 | /*CONFIG_DEVICE(ti99_8_quickload_getinfo)*/ |
| 632 | 636 | CONFIG_DEVICE(ti99_8_memcard_getinfo) |
| 633 | | #endif |
| 634 | | |
| 635 | 637 | SYSTEM_CONFIG_END |
| 636 | 638 | |
| 637 | 639 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
src/mess/drivers/ti99_4x.c
| r4069 | r4070 | |
| 34 | 34 | #include "devices/mflopimg.h" |
| 35 | 35 | #include "devices/harddriv.h" |
| 36 | 36 | #include "devices/cassette.h" |
| 37 | #include "devices/cartslot.h" |
| 37 | 38 | #include "machine/smartmed.h" |
| 38 | 39 | #include "sound/5220intf.h" |
| 39 | 40 | #include "machine/idectrl.h" |
| r4069 | r4070 | |
| 507 | 508 | 0 /* first day of week */ |
| 508 | 509 | }; |
| 509 | 510 | |
| 511 | MACHINE_DRIVER_START(ti99_4_cartslot) |
| 512 | MDRV_CARTSLOT_ADD("cart1") |
| 513 | MDRV_CARTSLOT_EXTENSION_LIST("bin,c,d,g,m,crom,drom,grom,mrom") |
| 514 | MDRV_CARTSLOT_NOT_MANDATORY |
| 515 | MDRV_CARTSLOT_START(ti99_cart) |
| 516 | MDRV_CARTSLOT_LOAD(ti99_cart) |
| 517 | MDRV_CARTSLOT_UNLOAD(ti99_cart) |
| 518 | |
| 519 | MDRV_CARTSLOT_ADD("cart2") |
| 520 | MDRV_CARTSLOT_EXTENSION_LIST("bin,c,d,g,m,crom,drom,grom,mrom") |
| 521 | MDRV_CARTSLOT_NOT_MANDATORY |
| 522 | MDRV_CARTSLOT_START(ti99_cart) |
| 523 | MDRV_CARTSLOT_LOAD(ti99_cart) |
| 524 | MDRV_CARTSLOT_UNLOAD(ti99_cart) |
| 525 | |
| 526 | MDRV_CARTSLOT_ADD("cart3") |
| 527 | MDRV_CARTSLOT_EXTENSION_LIST("bin,c,d,g,m,crom,drom,grom,mrom") |
| 528 | MDRV_CARTSLOT_NOT_MANDATORY |
| 529 | MDRV_CARTSLOT_START(ti99_cart) |
| 530 | MDRV_CARTSLOT_LOAD(ti99_cart) |
| 531 | MDRV_CARTSLOT_UNLOAD(ti99_cart) |
| 532 | MACHINE_DRIVER_END |
| 533 | |
| 510 | 534 | static MACHINE_DRIVER_START(ti99_4_60hz) |
| 511 | 535 | /* basic machine hardware */ |
| 512 | 536 | /* TMS9900 CPU @ 3.0 MHz */ |
| r4069 | r4070 | |
| 555 | 579 | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 556 | 580 | |
| 557 | 581 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 582 | |
| 583 | MDRV_IMPORT_FROM(ti99_4_cartslot) |
| 558 | 584 | MACHINE_DRIVER_END |
| 559 | 585 | |
| 560 | 586 | static MACHINE_DRIVER_START(ti99_4_50hz) |
| r4069 | r4070 | |
| 603 | 629 | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 604 | 630 | |
| 605 | 631 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 632 | |
| 633 | MDRV_IMPORT_FROM(ti99_4_cartslot) |
| 606 | 634 | MACHINE_DRIVER_END |
| 607 | 635 | |
| 608 | 636 | static MACHINE_DRIVER_START(ti99_4a_60hz) |
| r4069 | r4070 | |
| 652 | 680 | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 653 | 681 | |
| 654 | 682 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 683 | |
| 684 | MDRV_IMPORT_FROM(ti99_4_cartslot) |
| 655 | 685 | MACHINE_DRIVER_END |
| 656 | 686 | |
| 657 | 687 | |
| r4069 | r4070 | |
| 701 | 731 | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 702 | 732 | |
| 703 | 733 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 734 | |
| 735 | MDRV_IMPORT_FROM(ti99_4_cartslot) |
| 704 | 736 | MACHINE_DRIVER_END |
| 705 | 737 | |
| 706 | 738 | |
| r4069 | r4070 | |
| 757 | 789 | MDRV_TMS9902_ADD("tms9902_0", tms9902_params_0) |
| 758 | 790 | MDRV_TMS9902_ADD("tms9902_1", tms9902_params_1) |
| 759 | 791 | |
| 760 | | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 792 | MDRV_WD179X_ADD("wd179x", ti99_wd17xx_interface ) |
| 793 | |
| 794 | MDRV_IMPORT_FROM(ti99_4_cartslot) |
| 761 | 795 | MACHINE_DRIVER_END |
| 762 | 796 | |
| 763 | 797 | |
| r4069 | r4070 | |
| 862 | 896 | * and you could plug quite a lot of GROMs in the side port. Neither of these |
| 863 | 897 | * are emulated. |
| 864 | 898 | */ |
| 865 | | |
| 866 | | static void ti99_4_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 867 | | { |
| 868 | | /* cartslot */ |
| 869 | | switch(state) |
| 870 | | { |
| 871 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 872 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_CARTSLOT; break; |
| 873 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 874 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 0; break; |
| 875 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 0; break; |
| 876 | | case MESS_DEVINFO_INT_COUNT: info->i = 3; break; |
| 877 | | |
| 878 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 879 | | case MESS_DEVINFO_PTR_START: info->start = DEVICE_START_NAME(ti99_cart); break; |
| 880 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(ti99_cart); break; |
| 881 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(ti99_cart); break; |
| 882 | | |
| 883 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 884 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin,c,d,g,m,crom,drom,grom,mrom"); break; |
| 885 | | } |
| 886 | | } |
| 887 | | |
| 899 | |
| 888 | 900 | static void ti99_4_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 889 | 901 | { |
| 890 | 902 | /* floppy */ |
| r4069 | r4070 | |
| 985 | 997 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 986 | 998 | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), ""); break; |
| 987 | 999 | } |
| 988 | | } |
| 989 | | |
| 990 | | static SYSTEM_CONFIG_START(ti99_4) |
| 991 | | CONFIG_DEVICE(ti99_4_cartslot_getinfo) |
| 1000 | } |
| 1001 | |
| 1002 | static SYSTEM_CONFIG_START(ti99_4) |
| 992 | 1003 | CONFIG_DEVICE(ti99_4_floppy_getinfo) |
| 993 | 1004 | CONFIG_DEVICE(ti99_4_parallel_getinfo) |
| 994 | 1005 | CONFIG_DEVICE(ti99_4_serial_getinfo) |