(MESS) pce/tg16: added default values for pre-formatted BRAM. you could

obtain the same result by launching PCE or TG-16 with the CD-SYSTEM
cart and entering the BRAM configuration menu (by pressing Select), but
it makes sense to be more user-friendly in this case. [Fabio Priuli]
This commit is contained in:
etabeta78 2015-04-06 19:32:01 +02:00
parent 60d67c8c12
commit 79ed044ec2
2 changed files with 11 additions and 1 deletions

View File

@ -229,9 +229,17 @@ void pce_cd_device::late_setup()
m_msm->change_clock_w((PCE_CD_CLOCK / 6) / m_adpcm_clock_divider);
}
void pce_cd_device::nvram_init(nvram_device &nvram, void *data, size_t size)
{
static const UINT8 init[8] = { 0x48, 0x55, 0x42, 0x4d, 0x00, 0xa0, 0x10, 0x80 };
memset(data, 0x00, size);
memcpy(data, init, sizeof(init));
}
// TODO: left and right speaker tags should be passed from the parent config, instead of using the hard-coded ones below!?!
static MACHINE_CONFIG_FRAGMENT( pce_cd )
MCFG_NVRAM_ADD_0FILL("bram")
MCFG_NVRAM_ADD_CUSTOM_DRIVER("bram", pce_cd_device, nvram_init)
MCFG_CDROM_ADD("cdrom")
MCFG_CDROM_INTERFACE("pce_cdrom")

View File

@ -60,6 +60,8 @@ public:
DECLARE_READ8_MEMBER(intf_r);
DECLARE_READ8_MEMBER(acard_r);
void nvram_init(nvram_device &nvram, void *data, size_t size);
private:
void adpcm_stop(UINT8 irq_flag);
void adpcm_play();