.fixed PCM channels loop address (Snatcher)
.fixed default TOC for Snatcher .bin image
.disabled Mode 1 ROM cartridge write access

[Wii/GC]
.fixed PCM channels remaining enabled when forcing system hardware
This commit is contained in:
EkeEke 2012-07-21 23:01:05 +02:00
parent a973fd587e
commit f3756f260c
4 changed files with 17 additions and 11 deletions

View File

@ -249,10 +249,10 @@ void cd_cart_init(void)
m68k.memory_map[i].base = scd.cartridge.area + ((i & 0x3f) << 16);
m68k.memory_map[i].read8 = NULL;
m68k.memory_map[i].read16 = NULL;
m68k.memory_map[i].write8 = NULL;
m68k.memory_map[i].write16 = NULL;
m68k.memory_map[i].write8 = m68k_unused_8_w;
m68k.memory_map[i].write16 = m68k_unused_16_w;
zbank_memory_map[i].read = NULL;
zbank_memory_map[i].write = NULL;
zbank_memory_map[i].write = zbank_unused_w;
}
}
}

View File

@ -147,9 +147,10 @@ void cdd_load(char *filename, int type_bin)
if (strstr(rominfo.product,"T-95035") != NULL)
{
/* Snatcher */
cdd.toc.tracks[0].start = cdd.toc.last = cdd.toc.end = 0;
do
{
cdd.toc.tracks[cdd.toc.last].start = cdd.toc.end + 2*75;
cdd.toc.tracks[cdd.toc.last].start = cdd.toc.end;
cdd.toc.tracks[cdd.toc.last].end = cdd.toc.tracks[cdd.toc.last].start + toc_snatcher[cdd.toc.last];
cdd.toc.end = cdd.toc.tracks[cdd.toc.last].end;
cdd.toc.last++;

View File

@ -96,18 +96,23 @@ void pcm_update(short *buffer, int length)
/* check if channel is enabled */
if (pcm.status & (1 << j))
{
/* read current WAVE RAM address */
/* read from current WAVE RAM address */
short data = pcm.ram[(pcm.chan[j].addr >> 11) & 0xffff];
/* STOP data ? */
/* loop data ? */
if (data == 0xff)
{
/* reset WAVE RAM address with loop address */
/* reset WAVE RAM address */
pcm.chan[j].addr = pcm.chan[j].ls.w << 11;
/* read WAVE RAM address again */
/* read again from WAVE RAM address */
data = pcm.ram[pcm.chan[j].ls.w];
}
else
{
/* increment WAVE RAM address */
pcm.chan[j].addr += pcm.chan[j].fd.w;
}
/* infinite loop should not output any data */
if (data != 0xff)
@ -122,9 +127,6 @@ void pcm_update(short *buffer, int length)
/* multiply PCM data with ENV & stereo PAN data then add to outputs (13.6 fixed point) */
l += ((data * pcm.chan[j].env * (pcm.chan[j].pan & 0x0F)) >> 6);
r += ((data * pcm.chan[j].env * (pcm.chan[j].pan >> 4)) >> 6);
/* increment WAVE RAM address */
pcm.chan[j].addr += pcm.chan[j].fd.w;
}
}
}

View File

@ -1233,6 +1233,9 @@ static void systemmenu ()
}
}
/* reinitialize audio streams */
audio_init(snd.sample_rate, snd.frame_rate);
/* force hard reset */
system_init();
system_reset();