(MESS) aim65.c: added software list for software ROMs and hooked up to the driver. [K1W1, Fabio Priuli]

out of whatsnew: make sure to read the "usage" feature to use properly the dumps
This commit is contained in:
Fabio Priuli 2013-05-01 09:56:29 +00:00
parent dbafe417fd
commit aa853b85c2
4 changed files with 190 additions and 6 deletions

1
.gitattributes vendored
View File

@ -26,6 +26,7 @@ hash/adam_cart.xml svneol=native#text/xml
hash/adam_cass.xml svneol=native#text/xml
hash/adam_flop.xml svneol=native#text/xml
hash/advision.xml svneol=native#text/xml
hash/aim65_cart.xml svneol=native#text/xml
hash/alice32.xml svneol=native#text/xml
hash/alice90.xml svneol=native#text/xml
hash/amiga1000_flop.xml svneol=native#text/xml

92
hash/aim65_cart.xml Normal file
View File

@ -0,0 +1,92 @@
<?xml version="1.0"?>
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
<softwarelist name="aim65_cart" description="Rockwell AIM 65 cartridges">
<!--
There are 5 ROM sockets on the AIM 65 PCB: 2 sockets were for the boot strap and 3 sockets for software roms,
at locations z24, z25, and z26.
There are the BASIC ROMs, PL65 and FORTH. Each has 2 ROMs and they all work.
The Assembler ROM works. The Mathpack does not work (it needs another ROM which is missing).
-->
<software name="assemblr">
<description>Assembler</description>
<year>197?</year>
<publisher>&lt;unknown&gt;</publisher>
<info name="usage" value="Load in &quot;cart3&quot;, then press N to start"/>
<part name="cart" interface="aim65_cart">
<dataarea name="z24" size="4096">
<rom name="assembler.z24" size="4096" crc="0878b399" sha1="483e92b57d64be51643a9f6490521a8572aa2f68" offset="0x0000" />
</dataarea>
</part>
</software>
<software name="basic11">
<description>AIM 65 BASIC v1.1</description>
<year>1978</year>
<publisher>Microsoft</publisher>
<info name="usage" value="Load both in &quot;cart1&quot; and &quot;cart2&quot;, then press 5 to start"/>
<part name="cart" interface="aim65_cart">
<dataarea name="z25" size="4096">
<rom name="basic.z25" size="4096" crc="d7b42d2a" sha1="4bbdb28d332429825adea0266ed9192786d9e392" offset="0x0000" />
</dataarea>
<dataarea name="z26" size="4096">
<rom name="basic.z26" size="4096" crc="36a61f39" sha1="f5ce0126cb594a565e730973fd140d03c298cefa" offset="0x0000" />
</dataarea>
</part>
</software>
<software name="forth13">
<description>AIM 65 FORTH v1.3</description>
<year>197?</year>
<publisher>&lt;unknown&gt;</publisher>
<info name="usage" value="Load both in &quot;cart1&quot; and &quot;cart2&quot;, then press 5 to start"/>
<part name="cart" interface="aim65_cart">
<dataarea name="z25" size="4096">
<rom name="forth v1.3.z25" size="4096" crc="0671d019" sha1="dd2a1613e435c833634100cf4a22c6cff70c7a26" offset="0x0000" />
</dataarea>
<dataarea name="z26" size="4096">
<rom name="forth v1.3.z26" size="4096" crc="a80ad472" sha1="42a2e8c86829a2fe48090e6665ff9fe25b12b070" offset="0x0000" />
</dataarea>
</part>
</software>
<software name="mathpack" supported="no">
<description>Mathpack</description>
<year>197?</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="aim65_cart">
<dataarea name="z24" size="4096">
<rom name="mathpack.z24" size="4096" crc="4889af55" sha1="5e9541ddfc06e3802d09b30d1bd89c5da914c76e" offset="0x0000" />
</dataarea>
</part>
</software>
<software name="pl65">
<description>AIM 65 PL/65 v1.0</description>
<year>1978</year>
<publisher>Rockwell</publisher>
<info name="usage" value="Load both in &quot;cart1&quot; and &quot;cart2&quot;, then press 5 to start"/>
<part name="cart" interface="aim65_cart">
<dataarea name="z25" size="4096">
<rom name="pl65 v1.0.z25" size="4096" crc="76dcf864" sha1="e937c54ed109401f796640cd45b27dfefb76667e" offset="0x0000" />
</dataarea>
<dataarea name="z26" size="4096">
<rom name="pl65 v1.0.z26" size="4096" crc="2ac71abd" sha1="6df5e3125bebefac80d51d9337555f54bdf0d8ea" offset="0x0000" />
</dataarea>
</part>
</software>
</softwarelist>

View File

@ -255,6 +255,87 @@ const dl1416_interface aim65_ds5_intf =
MACHINE DRIVERS
***************************************************************************/
struct aim_cart_range
{
const char *tag;
int offset;
};
static const struct aim_cart_range aim_cart_table[] =
{
{ ":z24", 0xd000 },
{ ":z25", 0xc000 },
{ ":z26", 0xb000 },
{ 0 }
};
DEVICE_IMAGE_LOAD_MEMBER( aim65_state, aim65_cart )
{
UINT32 size;
UINT8 *temp_copy;
const struct aim_cart_range *aim_cart = &aim_cart_table[0], *this_cart;
/* First, determine where this cart has to be loaded */
while (aim_cart->tag)
{
if (strcmp(aim_cart->tag, image.device().tag()) == 0)
break;
aim_cart++;
}
this_cart = aim_cart;
if (!this_cart->tag)
{
astring errmsg;
errmsg.printf("Tag '%s' could not be found", image.device().tag());
image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.cstr());
return IMAGE_INIT_FAIL;
}
if (image.software_entry() == NULL)
{
size = image.length();
temp_copy = auto_alloc_array(machine(), UINT8, size);
if (size > 0x1000)
{
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
auto_free(machine(), temp_copy);
return IMAGE_INIT_FAIL;
}
if (image.fread(temp_copy, size) != size)
{
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file");
auto_free(machine(), temp_copy);
return IMAGE_INIT_FAIL;
}
}
else
{
if (image.get_software_region(this_cart->tag + 1) == NULL)
{
astring errmsg;
errmsg.printf("Attempted to load file with wrong extension\nCartslot '%s' only accepts files with '.%s' extension",
this_cart->tag, this_cart->tag + 1);
image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.cstr());
return IMAGE_INIT_FAIL;
}
size = image.get_software_region_length(this_cart->tag + 1);
temp_copy = auto_alloc_array(machine(), UINT8, size);
memcpy(temp_copy, image.get_software_region(this_cart->tag + 1), size);
}
memcpy(memregion("maincpu")->base() + this_cart->offset, temp_copy, size);
auto_free(machine(), temp_copy);
return IMAGE_INIT_PASS;
}
static MACHINE_CONFIG_START( aim65, aim65_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", M6502, AIM65_CLOCK) /* 1 MHz */
@ -284,20 +365,31 @@ static MACHINE_CONFIG_START( aim65, aim65_state )
MCFG_CASSETTE_ADD( "cassette", aim65_1_cassette_interface )
MCFG_CASSETTE_ADD( "cassette2", aim65_2_cassette_interface )
MCFG_CARTSLOT_ADD("cart1")
MCFG_CARTSLOT_ADD("z26")
MCFG_CARTSLOT_EXTENSION_LIST("z26")
MCFG_CARTSLOT_INTERFACE("aim65_cart")
MCFG_CARTSLOT_LOAD(aim65_state, aim65_cart)
MCFG_CARTSLOT_NOT_MANDATORY
MCFG_CARTSLOT_ADD("cart2")
MCFG_CARTSLOT_ADD("z25")
MCFG_CARTSLOT_EXTENSION_LIST("z25")
MCFG_CARTSLOT_INTERFACE("aim65_cart")
MCFG_CARTSLOT_LOAD(aim65_state, aim65_cart)
MCFG_CARTSLOT_NOT_MANDATORY
MCFG_CARTSLOT_ADD("cart3")
MCFG_CARTSLOT_ADD("z24")
MCFG_CARTSLOT_EXTENSION_LIST("z24")
MCFG_CARTSLOT_INTERFACE("aim65_cart")
MCFG_CARTSLOT_NOT_MANDATORY
MCFG_CARTSLOT_LOAD(aim65_state, aim65_cart)
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("4K")
MCFG_RAM_EXTRA_OPTIONS("1K,2K,3K")
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","aim65_cart")
MACHINE_CONFIG_END
@ -307,9 +399,6 @@ MACHINE_CONFIG_END
ROM_START( aim65 )
ROM_REGION(0x10000, "maincpu", 0)
ROM_CART_LOAD("cart1", 0xb000, 0x1000, ROM_OPTIONAL)
ROM_CART_LOAD("cart2", 0xc000, 0x1000, ROM_OPTIONAL)
ROM_CART_LOAD("cart3", 0xd000, 0x1000, ROM_OPTIONAL)
ROM_SYSTEM_BIOS(0, "aim65", "Rockwell AIM-65")
ROMX_LOAD("aim65mon.z23", 0xe000, 0x1000, CRC(90e44afe) SHA1(78e38601edf6bfc787b58750555a636b0cf74c5c), ROM_BIOS(1))
ROMX_LOAD("aim65mon.z22", 0xf000, 0x1000, CRC(d01914b0) SHA1(e5b5ddd4cd43cce073a718ee4ba5221f2bc84eaf), ROM_BIOS(1))

View File

@ -67,6 +67,8 @@ public:
DECLARE_WRITE16_MEMBER(aim65_update_ds3);
DECLARE_WRITE16_MEMBER(aim65_update_ds4);
DECLARE_WRITE16_MEMBER(aim65_update_ds5);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(aim65_cart);
};