Previous 15994 Revisions Next

r14848 Tuesday 3rd April, 2012 at 16:00:02 UTC by Sandro Ronco
x07: Added memory cards softlist. [Anna Wu, Sandro Ronco]
[hash]x07_card.xml*
[src/mess/drivers]x07.c

hash/x07_card.xml
r0r14848
1<?xml version="1.0"?>
2<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
3
4<!--
5Undumped 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
r14847r14848
961961}
962962
963963
964static 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
964999static PALETTE_INIT( x07 )
9651000{
9661001   palette_set_color(machine, 0, MAKE_RGB(138, 146, 148));
r14847r14848
14591494   MCFG_RAM_DEFAULT_SIZE("16K")
14601495   MCFG_RAM_EXTRA_OPTIONS("8K,24k")
14611496
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
14621504   /* cassette */
14631505   MCFG_CARTSLOT_ADD("cassette")
14641506   MCFG_CARTSLOT_EXTENSION_LIST("k7,cas,lst")
r14847r14848
14661508   MCFG_CARTSLOT_LOAD(x07_cass)
14671509   MCFG_CARTSLOT_UNLOAD(x07_cass)
14681510   MCFG_CARTSLOT_INTERFACE("x07_cass")
1511
1512   /* Software lists */
1513   MCFG_SOFTWARE_LIST_ADD("card_list", "x07_card")
14691514MACHINE_CONFIG_END
14701515
14711516/* ROM definition */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team