ncd, save the internal nvram instead of trying to use memcards like the AES does (nw)

This commit is contained in:
David Haywood 2012-12-07 23:19:39 +00:00
parent e253939220
commit 483c15bc81
2 changed files with 27 additions and 6 deletions

View File

@ -248,7 +248,8 @@
</part>
</software>
<software name="lastbld2">
<!-- Resets after loading? -->
<software name="lastbld2" supported="no">
<description>Bakumatsu Roman Daini Maku - Gekka no Kenshi - Tsuki ni Saku Hana, Chiri Yuku Hana (1999)(SNK)(JP)[!][Last Blade 2, The]</description>
<year>199?</year>
<publisher>SNK</publisher>
@ -340,7 +341,8 @@
</part>
</software>
<software name="doubledr">
<!-- Hangs during loading due to erasing vectors -->
<software name="doubledr" supported="no">
<description>Double Dragon (1995)(SNK)(JP-US)[!][NGCD-082 MT B01, NGCD-082E MT B04]</description>
<year>199?</year>
<publisher>SNK</publisher>
@ -550,7 +552,8 @@
</part>
</software>
<software name="kof98">
<!-- sound doesn't work? -->
<software name="kof98" supported="no">
<description>King of Fighters '98, The - The Slugfest (1998)(SNK)(JP)[!][King of Fighters '98, The - Dream Match Never Ends][NGCD-2420 MT A04, NGCD-2421]</description>
<year>199?</year>
<publisher>SNK</publisher>
@ -594,7 +597,8 @@
</part>
</software>
<software name="lresort">
<!-- sound doesn't work? -->
<software name="lresort" supported="no">
<description>Last Resort (1994)(SNK)(JP-US)[!]</description>
<year>199?</year>
<publisher>SNK</publisher>

View File

@ -46,7 +46,6 @@
- might need better handling of the Vector Table Mapping, or better interrupts (see point above)
- Softlist are based on an old Tosec set and should be updated to the TruRip set once we can convert CCD
without throwing away gap data etc.
- Backup RAM isn't saved?
****************************************************************************/
@ -1597,6 +1596,24 @@ struct cdrom_interface neocd_cdrom =
NULL
};
static NVRAM_HANDLER( neocd )
{
ng_aes_state *state = machine.driver_data<ng_aes_state>();
if (read_or_write)
file->write(state->m_memcard_data,0x2000);
else
{
if (file)
file->read(state->m_memcard_data,0x2000);
else
{
memset(state->m_memcard_data,0x00,0x2000);
}
}
}
static MACHINE_CONFIG_DERIVED_CLASS( neocd, neogeo_base, ng_aes_state )
MCFG_CPU_MODIFY("maincpu")
@ -1614,7 +1631,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( neocd, neogeo_base, ng_aes_state )
MCFG_SET_TYPE3_INTERRUPT_CALLBACK( ng_aes_state, interrupt_callback_type3 )
MCFG_MEMCARD_HANDLER(neogeo_aes)
MCFG_NVRAM_HANDLER(neocd)
MCFG_MACHINE_START_OVERRIDE(ng_aes_state,neocd)
MCFG_MACHINE_RESET_OVERRIDE(ng_aes_state,neocd)