mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
(MESS) msx.c: slightly simplified sram handling in conjunction with softlists. no whatsnew.
This commit is contained in:
parent
1069bca28d
commit
b4343927a4
@ -22,6 +22,8 @@ Unless otherwise noted, the information in this list has not been verified by op
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="lh532077" size="262144" crc="4ead5098" sha1="12b3c31f0fd10ff5823dcc8bf6dfeb785a8af2f7" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="sram" size="8192" >
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -202,10 +204,11 @@ Unless otherwise noted, the information in this list has not been verified by op
|
||||
<part name="cart" interface="msx_cart">
|
||||
<feature name="pcb" value="TA-621 KAGA" />
|
||||
<feature name="mapper" value="M60002-0125SP" />
|
||||
<feature name="sram" value="SRAM" />
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="lh532051" size="262144" crc="d640deaf" sha1="6c1814c70d69a50ec60e39ef281f0b8cd7bf8598" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="sram" size="8192" >
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -276,10 +279,11 @@ Unless otherwise noted, the information in this list has not been verified by op
|
||||
<part name="cart" interface="msx_cart">
|
||||
<feature name="pcb" value="TAS-621-64K" />
|
||||
<feature name="mapper" value="M60002-0125SP" />
|
||||
<feature name="sram" value="SRAM" />
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="lh23100y" size="131072" crc="" sha1="" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="sram" size="8192" >
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
-->
|
||||
@ -501,6 +505,8 @@ Unless otherwise noted, the information in this list has not been verified by op
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="lh532038" size="262144" crc="3aa33a30" sha1="e6de8bbd60123444de2a90928853985ceb0b4cbf" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="sram" size="8192" >
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -530,6 +536,8 @@ Unless otherwise noted, the information in this list has not been verified by op
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="lh531043" size="131072" crc="d8055f5f" sha1="da4b44c734029f60388b7cea4ab97c3d5c6a09e9" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="sram" size="8192" >
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
|
1992
hash/msx2_cart.xml
1992
hash/msx2_cart.xml
File diff suppressed because it is too large
Load Diff
@ -102,7 +102,7 @@ enum msx_slot_type {
|
||||
SLOT_RAM_MM,
|
||||
SLOT_CARTRIDGE1,
|
||||
SLOT_CARTRIDGE2,
|
||||
SLOT_DISK_ROM2,
|
||||
SLOT_DISK_ROM2,
|
||||
SLOT_END
|
||||
};
|
||||
|
||||
|
@ -98,52 +98,49 @@ DEVICE_IMAGE_LOAD (msx_cart)
|
||||
/* Load software from software list */
|
||||
/* TODO: Add proper SRAM (size) handling */
|
||||
|
||||
const char *mapper = software_part_get_feature( (software_part*)image.part_entry(), "mapper" );
|
||||
const char *sram = software_part_get_feature( (software_part*)image.part_entry(), "sram" );
|
||||
|
||||
if ( mapper != NULL )
|
||||
const char *mapper = software_part_get_feature((software_part*)image.part_entry(), "mapper");
|
||||
if (mapper != NULL)
|
||||
{
|
||||
/* TODO: Split out the SRAM recognition code and 8KB/16KB bank configuration */
|
||||
static const struct { const char *mapper_name; bool sram_present; int mapper_type; } mapper_types[] =
|
||||
static const struct { const char *mapper_name; int mapper_type; } mapper_types[] =
|
||||
{
|
||||
{ "M60002-0125SP", false, SLOT_ASCII8 },
|
||||
{ "M60002-0125SP", true, SLOT_ASCII8_SRAM },
|
||||
{ "LZ93A13", false, SLOT_ASCII8 },
|
||||
{ "LZ93A13", true, SLOT_ASCII8_SRAM },
|
||||
{ "LZ93A13-16", false, SLOT_ASCII16 },
|
||||
{ "LZ93A13-16", true, SLOT_ASCII16_SRAM },
|
||||
{ "M60002-0125SP-16", false, SLOT_ASCII16 },
|
||||
{ "M60002-0125SP-16", true, SLOT_ASCII16_SRAM },
|
||||
{ "IREM TAM-S1", false, SLOT_RTYPE },
|
||||
{ "MR6401", false, SLOT_ASCII16 },
|
||||
{ "NEOS MR6401", false, SLOT_ASCII8 },
|
||||
{ "BS6202", false, SLOT_ASCII8 },
|
||||
{ "BS6101", false, SLOT_ASCII8 },
|
||||
{ "BS6101-16", false, SLOT_ASCII16 },
|
||||
{ "M60002-0125SP", SLOT_ASCII8 },
|
||||
{ "LZ93A13", SLOT_ASCII8 },
|
||||
{ "LZ93A13-16", SLOT_ASCII16 },
|
||||
{ "M60002-0125SP-16", SLOT_ASCII16 },
|
||||
{ "IREM TAM-S1", SLOT_RTYPE },
|
||||
{ "MR6401", SLOT_ASCII16 },
|
||||
{ "NEOS MR6401", SLOT_ASCII8 },
|
||||
{ "BS6202", SLOT_ASCII8 },
|
||||
{ "BS6101", SLOT_ASCII8 },
|
||||
{ "BS6101-16", SLOT_ASCII16 },
|
||||
{ "KONAMI-SCC", SLOT_KONAMI_SCC },
|
||||
{ "KONAMI", SLOT_KONAMI },
|
||||
{ "SUPERLODE", SLOT_MAJUTSUSHI },
|
||||
{ "MAJUTSUSHI", SLOT_SUPERLOADRUNNER },
|
||||
};
|
||||
|
||||
for ( int i = 0; i < ARRAY_LENGTH(mapper_types) && type < 0; i++ )
|
||||
|
||||
for (int i = 0; i < ARRAY_LENGTH(mapper_types) && type < 0; i++)
|
||||
{
|
||||
if ( !mame_stricmp( mapper, mapper_types[i].mapper_name ) )
|
||||
{
|
||||
if ( sram == NULL && ! mapper_types[i].sram_present )
|
||||
type = mapper_types[i].mapper_type;
|
||||
|
||||
|
||||
if ( sram != NULL && mapper_types[i].sram_present )
|
||||
type = mapper_types[i].mapper_type;
|
||||
}
|
||||
if (!mame_stricmp(mapper, mapper_types[i].mapper_name))
|
||||
type = mapper_types[i].mapper_type;
|
||||
}
|
||||
|
||||
if ( -1 == type )
|
||||
logerror( "Mapper '%s' not recognized!\n", mapper );
|
||||
if (-1 == type)
|
||||
logerror("Mapper '%s' not recognized!\n", mapper);
|
||||
}
|
||||
|
||||
UINT8 *rom_region = image.get_software_region( "rom" );
|
||||
size = size_aligned = image.get_software_region_length( "rom" );
|
||||
UINT8 *tmp_sram = image.get_software_region("sram");
|
||||
if (tmp_sram)
|
||||
{
|
||||
if (type == SLOT_ASCII8) type = SLOT_ASCII8_SRAM;
|
||||
if (type == SLOT_ASCII16) type = SLOT_ASCII16_SRAM;
|
||||
}
|
||||
|
||||
mem = auto_alloc_array( image.device().machine(), UINT8, size_aligned );
|
||||
memcpy( mem, rom_region, size_aligned );
|
||||
UINT8 *rom_region = image.get_software_region("rom");
|
||||
size = size_aligned = image.get_software_region_length("rom");
|
||||
|
||||
mem = auto_alloc_array(image.device().machine(), UINT8, size_aligned);
|
||||
memcpy(mem, rom_region, size_aligned);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user