mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
(MESS) previous BBC Master commit was over-simplifying the cart
mapping compared to the real thing. This should be more in line with the code which will be needed with slots. nw.
This commit is contained in:
parent
e75ca754dc
commit
bf1199eb2a
@ -15,9 +15,11 @@
|
||||
<year>198?</year>
|
||||
<publisher>Acorn</publisher>
|
||||
<part name="cart" interface="bbcm_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<dataarea name="uprom" size="16384">
|
||||
<rom name="bbcmasterdemonstrationcartridge_1.rom" size="16384" crc="fc40c0e8" sha1="970ff4721e707f3c843f4fb09ce7f03e7ab265ae" offset="0" />
|
||||
<rom name="bbcmasterdemonstrationcartridge_2.rom" size="16384" crc="2e73522d" sha1="ff39620d93b18fd36a4718474495211a46ef8184" offset="0x4000" />
|
||||
</dataarea>
|
||||
<dataarea name="lorom" size="16384">
|
||||
<rom name="bbcmasterdemonstrationcartridge_2.rom" size="16384" crc="2e73522d" sha1="ff39620d93b18fd36a4718474495211a46ef8184" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
@ -2020,7 +2020,6 @@ DEVICE_IMAGE_LOAD_MEMBER( bbc_state, bbc_exp_rom )
|
||||
DEVICE_IMAGE_LOAD_MEMBER( bbc_state, bbcm_cart )
|
||||
{
|
||||
UINT8 *RAM = m_region_user1->base();
|
||||
UINT32 size;
|
||||
int addr = 0, index = 0;
|
||||
|
||||
if (strcmp(image.device().tag(),":cart1") == 0)
|
||||
@ -2031,7 +2030,7 @@ DEVICE_IMAGE_LOAD_MEMBER( bbc_state, bbcm_cart )
|
||||
|
||||
if (image.software_entry() == NULL)
|
||||
{
|
||||
size = image.length();
|
||||
UINT32 size = image.length();
|
||||
logerror("loading rom %s, size:%.4x\n", image.filename(), size);
|
||||
|
||||
if (size != 0x8000)
|
||||
@ -2044,10 +2043,18 @@ DEVICE_IMAGE_LOAD_MEMBER( bbc_state, bbcm_cart )
|
||||
}
|
||||
else
|
||||
{
|
||||
size = image.get_software_region_length("rom");
|
||||
logerror("loading rom %s, size:%.4x\n", image.filename(), size);
|
||||
UINT32 size_lo = image.get_software_region_length("lorom");
|
||||
UINT32 size_hi = image.get_software_region_length("uprom");
|
||||
logerror("loading rom %s, size:%.4x\n", image.filename(), size_lo + size_hi);
|
||||
|
||||
memcpy(RAM + addr, image.get_software_region("rom"), size);
|
||||
if (size_lo + size_hi != 0x8000)
|
||||
{
|
||||
image.seterror(IMAGE_ERROR_UNSUPPORTED, "Invalid rom file size");
|
||||
return IMAGE_INIT_FAIL;
|
||||
}
|
||||
|
||||
memcpy(RAM + addr + 0, image.get_software_region("uprom"), size_hi);
|
||||
memcpy(RAM + addr + size_hi, image.get_software_region("lorom"), size_lo);
|
||||
}
|
||||
|
||||
return IMAGE_INIT_PASS;
|
||||
|
Loading…
Reference in New Issue
Block a user