hash/x07_card.xml
| r0 | r14848 | |
| 1 | <?xml version="1.0"?> |
| 2 | <!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> |
| 3 | |
| 4 | <!-- |
| 5 | Undumped cards: |
| 6 | - XP-110f Fichier (Database) |
| 7 | - XP-120f Table (Spreadsheet) |
| 8 | - XP-130f Graphique |
| 9 | - XP-150 Math Functions |
| 10 | |
| 11 | --> |
| 12 | |
| 13 | <softwarelist name="x07_card" description="Canon X-07 Memory Cards"> |
| 14 | <software name="xp140"> |
| 15 | <description>XP-140 Monitor</description> |
| 16 | <year>1983</year> |
| 17 | <publisher>Canon</publisher> |
| 18 | <part name="card" interface="x07_card"> |
| 19 | <feature name="card_type" value="xp140" /> |
| 20 | <dataarea name="rom" size="0x2000"> |
| 21 | <rom name="xp140.rom" size="0x2000" crc="4b26a9b4" sha1="5704519cf44a49bb3ab6638b439103e6a37f1eb4" offset="0" /> |
| 22 | </dataarea> |
| 23 | </part> |
| 24 | </software> |
| 25 | </softwarelist> |
src/mess/drivers/x07.c
| r14847 | r14848 | |
| 961 | 961 | } |
| 962 | 962 | |
| 963 | 963 | |
| 964 | static DEVICE_IMAGE_LOAD( x07_card ) |
| 965 | { |
| 966 | running_machine &machine = image.device().machine(); |
| 967 | x07_state *state = machine.driver_data<x07_state>(); |
| 968 | address_space *space = state->m_maincpu->memory().space( AS_PROGRAM ); |
| 969 | UINT16 ram_size = state->m_ram->size(); |
| 970 | |
| 971 | if (image.software_entry() == NULL) |
| 972 | { |
| 973 | UINT8 *rom = machine.region_alloc( "card", image.length(), 1, ENDIANNESS_LITTLE )->base(); |
| 974 | image.fread(rom, image.length()); |
| 975 | |
| 976 | space->install_ram(ram_size, ram_size + 0xfff); |
| 977 | space->install_rom(0x6000, 0x7fff, rom); |
| 978 | } |
| 979 | else |
| 980 | { |
| 981 | const char *card_type = image.get_feature("card_type"); |
| 982 | |
| 983 | if (!strcmp(card_type, "xp140")) |
| 984 | { |
| 985 | // 0x4000 - 0x4fff 4KB RAM |
| 986 | // 0x6000 - 0x7fff 8KB ROM |
| 987 | space->install_ram(ram_size, ram_size + 0xfff); |
| 988 | space->install_rom(0x6000, 0x7fff, image.get_software_region("rom")); |
| 989 | } |
| 990 | else |
| 991 | { |
| 992 | return IMAGE_INIT_FAIL; |
| 993 | } |
| 994 | } |
| 995 | |
| 996 | return IMAGE_INIT_PASS; |
| 997 | } |
| 998 | |
| 964 | 999 | static PALETTE_INIT( x07 ) |
| 965 | 1000 | { |
| 966 | 1001 | palette_set_color(machine, 0, MAKE_RGB(138, 146, 148)); |
| r14847 | r14848 | |
| 1459 | 1494 | MCFG_RAM_DEFAULT_SIZE("16K") |
| 1460 | 1495 | MCFG_RAM_EXTRA_OPTIONS("8K,24k") |
| 1461 | 1496 | |
| 1497 | /* Memory Card */ |
| 1498 | MCFG_CARTSLOT_ADD("card") |
| 1499 | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin") |
| 1500 | MCFG_CARTSLOT_NOT_MANDATORY |
| 1501 | MCFG_CARTSLOT_LOAD(x07_card) |
| 1502 | MCFG_CARTSLOT_INTERFACE("x07_card") |
| 1503 | |
| 1462 | 1504 | /* cassette */ |
| 1463 | 1505 | MCFG_CARTSLOT_ADD("cassette") |
| 1464 | 1506 | MCFG_CARTSLOT_EXTENSION_LIST("k7,cas,lst") |
| r14847 | r14848 | |
| 1466 | 1508 | MCFG_CARTSLOT_LOAD(x07_cass) |
| 1467 | 1509 | MCFG_CARTSLOT_UNLOAD(x07_cass) |
| 1468 | 1510 | MCFG_CARTSLOT_INTERFACE("x07_cass") |
| 1511 | |
| 1512 | /* Software lists */ |
| 1513 | MCFG_SOFTWARE_LIST_ADD("card_list", "x07_card") |
| 1469 | 1514 | MACHINE_CONFIG_END |
| 1470 | 1515 | |
| 1471 | 1516 | /* ROM definition */ |