mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-04 01:45:08 +01:00
[SCD]
.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:
parent
a973fd587e
commit
f3756f260c
@ -249,10 +249,10 @@ void cd_cart_init(void)
|
|||||||
m68k.memory_map[i].base = scd.cartridge.area + ((i & 0x3f) << 16);
|
m68k.memory_map[i].base = scd.cartridge.area + ((i & 0x3f) << 16);
|
||||||
m68k.memory_map[i].read8 = NULL;
|
m68k.memory_map[i].read8 = NULL;
|
||||||
m68k.memory_map[i].read16 = NULL;
|
m68k.memory_map[i].read16 = NULL;
|
||||||
m68k.memory_map[i].write8 = NULL;
|
m68k.memory_map[i].write8 = m68k_unused_8_w;
|
||||||
m68k.memory_map[i].write16 = NULL;
|
m68k.memory_map[i].write16 = m68k_unused_16_w;
|
||||||
zbank_memory_map[i].read = NULL;
|
zbank_memory_map[i].read = NULL;
|
||||||
zbank_memory_map[i].write = NULL;
|
zbank_memory_map[i].write = zbank_unused_w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,9 +147,10 @@ void cdd_load(char *filename, int type_bin)
|
|||||||
if (strstr(rominfo.product,"T-95035") != NULL)
|
if (strstr(rominfo.product,"T-95035") != NULL)
|
||||||
{
|
{
|
||||||
/* Snatcher */
|
/* Snatcher */
|
||||||
|
cdd.toc.tracks[0].start = cdd.toc.last = cdd.toc.end = 0;
|
||||||
do
|
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.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.end = cdd.toc.tracks[cdd.toc.last].end;
|
||||||
cdd.toc.last++;
|
cdd.toc.last++;
|
||||||
|
@ -96,18 +96,23 @@ void pcm_update(short *buffer, int length)
|
|||||||
/* check if channel is enabled */
|
/* check if channel is enabled */
|
||||||
if (pcm.status & (1 << j))
|
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];
|
short data = pcm.ram[(pcm.chan[j].addr >> 11) & 0xffff];
|
||||||
|
|
||||||
/* STOP data ? */
|
/* loop data ? */
|
||||||
if (data == 0xff)
|
if (data == 0xff)
|
||||||
{
|
{
|
||||||
/* reset WAVE RAM address with loop address */
|
/* reset WAVE RAM address */
|
||||||
pcm.chan[j].addr = pcm.chan[j].ls.w << 11;
|
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];
|
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 */
|
/* infinite loop should not output any data */
|
||||||
if (data != 0xff)
|
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) */
|
/* 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);
|
l += ((data * pcm.chan[j].env * (pcm.chan[j].pan & 0x0F)) >> 6);
|
||||||
r += ((data * pcm.chan[j].env * (pcm.chan[j].pan >> 4)) >> 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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1233,6 +1233,9 @@ static void systemmenu ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* reinitialize audio streams */
|
||||||
|
audio_init(snd.sample_rate, snd.frame_rate);
|
||||||
|
|
||||||
/* force hard reset */
|
/* force hard reset */
|
||||||
system_init();
|
system_init();
|
||||||
system_reset();
|
system_reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user