mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
(MESS) a7800: changed header bits for pokey at
$0450, after discussion with Mike Saarna. also, when loading from softlist, let's rely on the xml to detect oncart RAM and NVRAM. nw.
This commit is contained in:
parent
229ffaf20f
commit
1560236849
@ -1180,6 +1180,8 @@ type of rom dumps. Effort will be made at a later date to split them and docume
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="impssble.bin" size="131072" crc="3b1f2f47" sha1="5437c0efb63a349953ec047efe6ec24144ed6914" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -1195,6 +1197,8 @@ type of rom dumps. Effort will be made at a later date to split them and docume
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="impssbeu.bin" size="131072" crc="994af6e0" sha1="9770b61472510aba1cf3ea35ceca1859c3493676" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -1210,6 +1214,8 @@ type of rom dumps. Effort will be made at a later date to split them and docume
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="jinks.bin" size="131072" crc="0818d8cd" sha1="472bc12c437b015a9e317bac092529f3295033b8" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -1225,6 +1231,8 @@ type of rom dumps. Effort will be made at a later date to split them and docume
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="jinkseu.bin" size="131072" crc="9207ed3b" sha1="eb16de0c3d5c4e769ae2314ba21c4dd3bca33c88" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -1826,6 +1834,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="plutos.bin" size="131072" crc="2f211f7f" sha1="fa55d6a366b237917f18487fc51817394839a3bc" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -1902,6 +1912,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="rescuefr.bin" size="32768" crc="9a74fbf2" sha1="6653022f38e553d475896a918850158eaf8f77ff" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -2021,6 +2033,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="sirius.bin" size="131072" crc="65ae616e" sha1="cd9f6dea96f102262065d7472e73121b67f9e244" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -2119,6 +2133,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="smmrgame.bin" size="131072" crc="65c6df3f" sha1="31d46b32a2aa8d5bd6028cff1f41037426b22409" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -2283,6 +2299,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="65536">
|
||||
<rom name="twrtpllr.bin" size="65536" crc="4407ba04" sha1="53976013986e0ad3694ab9c021420b8172465de7" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -2298,6 +2316,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="65536">
|
||||
<rom name="twrtpleu.bin" size="65536" crc="0f87fd7b" sha1="56e1b795e80382edb376e4536d1dee539d4ac548" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -2342,6 +2362,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="wntrgame.bin" size="131072" crc="8981b531" sha1="b3725d6f0834c68ac62ce13eb9eb0d01d1124e5e" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="16384">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -2417,6 +2439,8 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="4096">
|
||||
<rom name="highscre.bin" size="4096" crc="9be408d3" sha1="a3af676991391a6dd716c79022d4947206b78164" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="nvram" size="2048">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
@ -2430,10 +2454,12 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="1">
|
||||
<!-- this entry behaves just as passthrough, even if in fact the chips shall be socketed on the PCB! -->
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="131072">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- Chip adding 128K of RAM + POKEY+HighScore onboard -->
|
||||
<!-- Chip adding 128K of RAM + POKEY + HighScore onboard -->
|
||||
<software name="xm">
|
||||
<description>XM Expansion Module</description>
|
||||
<year>2015?</year>
|
||||
@ -2443,6 +2469,10 @@ almost nothing like the prototype.
|
||||
<dataarea name="rom" size="4096">
|
||||
<rom name="highscre.bin" size="4096" crc="9be408d3" sha1="a3af676991391a6dd716c79022d4947206b78164" offset="0" />
|
||||
</dataarea>
|
||||
<dataarea name="ram" size="131072">
|
||||
</dataarea>
|
||||
<dataarea name="nvram" size="2048">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
|
@ -357,6 +357,8 @@ bool a78_cart_slot_device::call_load()
|
||||
if (software_entry() != NULL)
|
||||
{
|
||||
const char *pcb_name;
|
||||
bool has_ram = get_software_region("ram") ? TRUE : FALSE;
|
||||
bool has_nvram = get_software_region("nvram") ? TRUE : FALSE;
|
||||
len = get_software_region_length("rom");
|
||||
|
||||
m_cart->rom_alloc(len);
|
||||
@ -367,6 +369,14 @@ bool a78_cart_slot_device::call_load()
|
||||
m_type = a78_get_pcb_id(pcb_name);
|
||||
else
|
||||
m_type = A78_TYPE0;
|
||||
|
||||
if (has_ram)
|
||||
m_cart->ram_alloc(get_software_region_length("ram"));
|
||||
if (has_nvram)
|
||||
{
|
||||
m_cart->nvram_alloc(get_software_region_length("nvram"));
|
||||
battery_load(m_cart->get_nvram_base(), get_software_region_length("nvram"), 0xff);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -388,7 +398,7 @@ bool a78_cart_slot_device::call_load()
|
||||
// let's try to auto-fix some common errors in the header
|
||||
mapper = validate_header((head[53] << 8) | head[54], TRUE);
|
||||
|
||||
switch (mapper & 0xfe)
|
||||
switch (mapper & 0x2e)
|
||||
{
|
||||
case 0x0000:
|
||||
m_type = BIT(mapper, 0) ? A78_TYPE1 : A78_TYPE0;
|
||||
@ -410,21 +420,22 @@ bool a78_cart_slot_device::call_load()
|
||||
m_type = A78_VERSABOARD;
|
||||
break;
|
||||
}
|
||||
|
||||
// check special bits, which override the previous
|
||||
if ((mapper & 0xff00) == 0x0100)
|
||||
m_type = A78_ACTIVISION;
|
||||
else if ((mapper & 0xff00) == 0x0200)
|
||||
m_type = A78_ABSOLUTE;
|
||||
else if ((mapper & 0xff00) == 0x0300)
|
||||
|
||||
// check if cart has a POKEY at $0450 (typically a VersaBoard variant)!
|
||||
if (mapper & 0x40)
|
||||
{
|
||||
// the cart has a POKEY at $0450 (typically a VersaBoard variant)!
|
||||
if (m_type != A78_TYPE2)
|
||||
{
|
||||
m_type &= ~0x02;
|
||||
m_type += A78_POKEY0450;
|
||||
}
|
||||
}
|
||||
|
||||
// check special bits, which override the previous
|
||||
if ((mapper & 0xff00) == 0x0100)
|
||||
m_type = A78_ACTIVISION;
|
||||
else if ((mapper & 0xff00) == 0x0200)
|
||||
m_type = A78_ABSOLUTE;
|
||||
|
||||
logerror("Cart type: 0x%x\n", m_type);
|
||||
|
||||
@ -450,21 +461,21 @@ bool a78_cart_slot_device::call_load()
|
||||
m_cart->rom_alloc(len);
|
||||
ROM = m_cart->get_rom_base();
|
||||
fread(ROM, len);
|
||||
|
||||
if (m_type == A78_TYPE6)
|
||||
m_cart->ram_alloc(0x4000);
|
||||
if (m_type == A78_MEGACART || (m_type >= A78_VERSABOARD && m_type <= A78_VERSA_POK450))
|
||||
m_cart->ram_alloc(0x8000);
|
||||
if (m_type == A78_XB_BOARD || m_type == A78_XM_BOARD)
|
||||
m_cart->ram_alloc(0x20000);
|
||||
if (m_type == A78_HSC || m_type == A78_XM_BOARD)
|
||||
{
|
||||
m_cart->nvram_alloc(0x800);
|
||||
battery_load(m_cart->get_nvram_base(), 0x800, 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
//printf("Type: %s\n", a78_get_slot(m_type));
|
||||
|
||||
if (m_type == A78_TYPE6)
|
||||
m_cart->ram_alloc(0x4000);
|
||||
if (m_type == A78_MEGACART || (m_type >= A78_VERSABOARD && m_type <= A78_VERSA_POK450))
|
||||
m_cart->ram_alloc(0x8000);
|
||||
if (m_type == A78_XB_BOARD || m_type == A78_XM_BOARD)
|
||||
m_cart->ram_alloc(0x20000);
|
||||
if (m_type == A78_HSC || m_type == A78_XM_BOARD)
|
||||
{
|
||||
m_cart->nvram_alloc(0x800);
|
||||
battery_load(m_cart->get_nvram_base(), 0x800, 0xff);
|
||||
}
|
||||
}
|
||||
return IMAGE_INIT_PASS;
|
||||
}
|
||||
@ -539,7 +550,7 @@ void a78_cart_slot_device::get_default_card_software(astring &result)
|
||||
// let's try to auto-fix some common errors in the header
|
||||
mapper = validate_header((head[53] << 8) | head[54], FALSE);
|
||||
|
||||
switch (mapper & 0xfe)
|
||||
switch (mapper & 0x2e)
|
||||
{
|
||||
case 0x0000:
|
||||
type = BIT(mapper, 0) ? A78_TYPE1 : A78_TYPE0;
|
||||
@ -562,21 +573,22 @@ void a78_cart_slot_device::get_default_card_software(astring &result)
|
||||
break;
|
||||
}
|
||||
|
||||
// check special bits, which override the previous
|
||||
if ((mapper & 0xff00) == 0x0100)
|
||||
type = A78_ACTIVISION;
|
||||
else if ((mapper & 0xff00) == 0x0200)
|
||||
type = A78_ABSOLUTE;
|
||||
else if ((mapper & 0xff00) == 0x0300)
|
||||
// check if cart has a POKEY at $0450 (typically a VersaBoard variant)!
|
||||
if (mapper & 0x40)
|
||||
{
|
||||
// the cart has a POKEY at $0450 (typically a VersaBoard variant)!
|
||||
if (type != A78_TYPE2)
|
||||
{
|
||||
type &= ~0x02;
|
||||
type += A78_POKEY0450;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check special bits, which override the previous
|
||||
if ((mapper & 0xff00) == 0x0100)
|
||||
type = A78_ACTIVISION;
|
||||
else if ((mapper & 0xff00) == 0x0200)
|
||||
type = A78_ABSOLUTE;
|
||||
|
||||
logerror("Cart type: %x\n", type);
|
||||
slot_string = a78_get_slot(type);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user