src/mess/drivers/apf.c
| r1624 | r1625 | |
| 666 | 666 | ROM_REGION(0x10000+0x0800,REGION_CPU1,0) |
| 667 | 667 | ROM_LOAD("apf_4000.rom",0x010000, 0x0800, CRC(2a331a33) SHA1(387b90882cd0b66c192d9cbaa3bec250f897e4f1)) |
| 668 | 668 | // ROM_LOAD("apf-m1000rom.bin",0x010000, 0x0800, CRC(cc6ac840) SHA1(1110a234bcad99bd0894ad44c591389d16376ca4)) |
| 669 | ROM_CART_LOAD(0, "bin", 0x8000, 0x2000, ROM_OPTIONAL) |
| 669 | 670 | ROM_END |
| 670 | 671 | |
| 671 | 672 | static void apfimag_cassette_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| r1624 | r1625 | |
| 701 | 702 | } |
| 702 | 703 | } |
| 703 | 704 | |
| 704 | | static int device_load_apfm1000_cart(mess_image *image) |
| 705 | | { |
| 706 | | UINT8 *rom = memory_region(REGION_CPU1)+0x8000; |
| 707 | | int size; |
| 708 | 705 | |
| 709 | | size = image_length(image); |
| 710 | | |
| 711 | | if (image_fread(image, rom, size) != size) |
| 712 | | { |
| 713 | | logerror("%s load error\n", image_filename(image)); |
| 714 | | return 1; |
| 715 | | } |
| 716 | | |
| 717 | | |
| 718 | | return 0; |
| 719 | | } |
| 720 | | |
| 721 | | static void apfm1000_cartslot_getinfo(const device_class *devclass, UINT32 state, union devinfo *info) |
| 722 | | { |
| 723 | | /* cartslot */ |
| 724 | | switch(state) |
| 725 | | { |
| 726 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 727 | | case DEVINFO_INT_COUNT: info->i = 1; break; |
| 728 | | |
| 729 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 730 | | case DEVINFO_PTR_LOAD: info->load = device_load_apfm1000_cart; break; |
| 731 | | // case DEVINFO_PTR_PARTIAL_HASH: info->partialhash = lynx_partialhash; break; |
| 732 | | |
| 733 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 734 | | case DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 735 | | |
| 736 | | default: cartslot_device_getinfo(devclass, state, info); break; |
| 737 | | } |
| 738 | | } |
| 739 | | |
| 740 | 706 | SYSTEM_CONFIG_START( apfimag ) |
| 741 | 707 | CONFIG_DEVICE(apfimag_cassette_getinfo) |
| 742 | 708 | CONFIG_DEVICE(apfimag_floppy_getinfo) |
| 743 | 709 | SYSTEM_CONFIG_END |
| 744 | 710 | |
| 745 | 711 | SYSTEM_CONFIG_START(apfm1000) |
| 746 | | CONFIG_DEVICE(apfm1000_cartslot_getinfo) |
| 712 | CONFIG_DEVICE(cartslot_device_getinfo) |
| 747 | 713 | SYSTEM_CONFIG_END |
| 748 | 714 | |
| 749 | 715 | /*************************************************************************** |