mirror of
https://github.com/libretro/NP2kai.git
synced 2024-10-07 06:43:29 +00:00
remove CDDA mod
This commit is contained in:
parent
2fa46a2404
commit
d498e50734
20
cbus/ideio.c
Executable file → Normal file
20
cbus/ideio.c
Executable file → Normal file
@ -1212,10 +1212,6 @@ static BRESULT SOUNDCALL playdevaudio(IDEDRV drv, SINT32 *pcm, UINT count) {
|
||||
const UINT8 *ptr;
|
||||
SINT sampl;
|
||||
SINT sampr;
|
||||
UINT skipcnt;
|
||||
|
||||
// CDDA
|
||||
count = count * soundcfg.cddaskip;
|
||||
|
||||
sxsi = sxsi_getptr(drv->sxsidrv);
|
||||
if ((sxsi == NULL) || (sxsi->devtype != SXSIDEV_CDROM) ||
|
||||
@ -1229,27 +1225,13 @@ const UINT8 *ptr;
|
||||
count -= r;
|
||||
ptr = drv->dabuf + 2352 - (drv->dabufrem * 4);
|
||||
drv->dabufrem -= r;
|
||||
skipcnt = 0;
|
||||
do {
|
||||
sampl = ((SINT8)ptr[1] << 8) + ptr[0];
|
||||
sampr = ((SINT8)ptr[3] << 8) + ptr[2];
|
||||
#if 0
|
||||
pcm[0] += (SINT)((int)(sampl)*np2cfg.davolume/255);
|
||||
pcm[1] += (SINT)((int)(sampr)*np2cfg.davolume/255);
|
||||
#else
|
||||
skipcnt++;
|
||||
if ((skipcnt % soundcfg.cddaskip) == 0) {
|
||||
pcm[0] += sampl;
|
||||
pcm[1] += sampr;
|
||||
// (kaiE)
|
||||
pcm[0] = (pcm[0] * np2cfg.vol_cdda) >> 6;
|
||||
pcm[1] = (pcm[1] * np2cfg.vol_cdda) >> 6;
|
||||
//
|
||||
pcm += 2;
|
||||
}
|
||||
#endif
|
||||
ptr += 4;
|
||||
// pcm += 2;
|
||||
pcm += 2;
|
||||
} while(--r);
|
||||
}
|
||||
if (count == 0) {
|
||||
|
@ -125,7 +125,7 @@ static void IOOUTCALL pcm86_oa46c(UINT port, REG8 val) {
|
||||
g_pcm86.realbuf += PCM86_REALBUFSIZE - 4;
|
||||
#endif
|
||||
}
|
||||
g_pcm86.write = 1; // (kaiD)
|
||||
// g_pcm86.write = 1;
|
||||
g_pcm86.reqirq = 1;
|
||||
#else
|
||||
if (g_pcm86.virbuf < PCM86_LOGICALBUF) {
|
||||
@ -138,7 +138,7 @@ static void IOOUTCALL pcm86_oa46c(UINT port, REG8 val) {
|
||||
g_pcm86.realbuf &= 3; // align4Œˆ‚߃Eƒ`
|
||||
g_pcm86.realbuf += PCM86_REALBUFSIZE - 4;
|
||||
}
|
||||
g_pcm86.write = 1;
|
||||
// g_pcm86.write = 1;
|
||||
g_pcm86.reqirq = 1;
|
||||
}
|
||||
#endif
|
||||
@ -188,36 +188,25 @@ static REG8 IOINPCALL pcm86_ia468(UINT port) {
|
||||
REG8 ret;
|
||||
|
||||
ret = g_pcm86.fifo & (~0x10);
|
||||
#if 0 // #if 1 // (kai8)
|
||||
if (g_pcm86gen_intrq()) {
|
||||
#if 1
|
||||
if (pcm86gen_intrq()) {
|
||||
ret |= 0x10;
|
||||
}
|
||||
#elif 1 //
|
||||
#elif 1 // むしろこう?
|
||||
if (g_pcm86.fifo & 0x20) {
|
||||
sound_sync();
|
||||
#if 0 // (kaiE)
|
||||
// if (g_pcm86.virbuf <= g_pcm86.fifosize) {
|
||||
if (g_pcm86.virbuf <= g_pcm86.fifosize && g_pcm86.virbuf > 0) { // (kaiD)
|
||||
// if (g_pcm86.write) { // (kai8)
|
||||
// g_pcm86.write = 0; // (kai8)
|
||||
// } // (kai8)
|
||||
// else { // (kai8)
|
||||
ret |= 0x10;
|
||||
// } // (kai8)
|
||||
}
|
||||
#else
|
||||
//
|
||||
if (g_pcm86.virbuf <= g_pcm86.fifosize) {
|
||||
if (g_pcm86.write) {
|
||||
if (g_pcm86.virbuf)
|
||||
g_pcm86.write = 0;
|
||||
} else if (g_pcm86.virbuf <= g_pcm86.fifosize) {
|
||||
}
|
||||
else {
|
||||
ret |= 0x10;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
if ((g_pcm86.write) && (g_pcm86.fifo & 0x20)) {
|
||||
g_pcm86.write = 0;
|
||||
// g_pcm86.write = 0;
|
||||
sound_sync();
|
||||
if (g_pcm86.virbuf <= g_pcm86.fifosize) {
|
||||
g_pcm86.write = 0;
|
||||
|
@ -60,8 +60,7 @@ typedef struct {
|
||||
UINT8 fifo;
|
||||
UINT8 soundflags; /*!< サウンド フラグ (A460) */
|
||||
UINT8 dactrl;
|
||||
//UINT8 _write;
|
||||
UINT8 write; // (kaiD)
|
||||
UINT8 _write;
|
||||
UINT8 stepbit;
|
||||
UINT8 irq;
|
||||
UINT8 reqirq;
|
||||
|
@ -11,21 +11,8 @@
|
||||
#include "fmboard.h"
|
||||
|
||||
/* サンプリングレートに8掛けた物 */
|
||||
#if 1
|
||||
const UINT pcm86rate8[] = {
|
||||
44100 * 8,
|
||||
33080 * 8,
|
||||
22050 * 8,
|
||||
16540 * 8,
|
||||
11030 * 8,
|
||||
8270 * 8,
|
||||
5520 * 8,
|
||||
4130 * 8
|
||||
};
|
||||
#else
|
||||
const UINT pcm86rate8[] = {352800, 264600, 176400, 132300,
|
||||
88200, 66150, 44010, 33075};
|
||||
#endif
|
||||
|
||||
/* 32,24,16,12, 8, 6, 4, 3 - 最少公倍数: 96 */
|
||||
/* 3, 4, 6, 8,12,16,24,32 */
|
||||
|
@ -215,8 +215,6 @@ BRESULT sound_create(UINT rate, UINT ms) {
|
||||
UINT reserve;
|
||||
|
||||
ZeroMemory(&sndstream, sizeof(sndstream));
|
||||
// CDDA
|
||||
#if 0
|
||||
switch(rate) {
|
||||
case 11025:
|
||||
case 22050:
|
||||
@ -231,23 +229,6 @@ BRESULT sound_create(UINT rate, UINT ms) {
|
||||
default:
|
||||
return(FAILURE);
|
||||
}
|
||||
#else
|
||||
switch(rate) {
|
||||
case 11025:
|
||||
soundcfg.cddaskip = 4;
|
||||
break;
|
||||
case 22050:
|
||||
soundcfg.cddaskip = 2;
|
||||
break;
|
||||
case 44100:
|
||||
soundcfg.cddaskip = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
soundcfg.cddaskip = 1;
|
||||
return(FAILURE);
|
||||
}
|
||||
#endif
|
||||
samples = soundmng_create(rate, ms);
|
||||
if (samples == 0) {
|
||||
goto scre_err1;
|
||||
@ -261,11 +242,6 @@ BRESULT sound_create(UINT rate, UINT ms) {
|
||||
reserve = rate * SOUNDRESERVE / 1000;
|
||||
#else
|
||||
reserve = 0;
|
||||
#endif
|
||||
#ifdef __LIBRETRO__
|
||||
reserve=0;
|
||||
//samples=735; //44100Hz/60fps=735 (sample/flame)
|
||||
samples=782; //44100Hz/56.4fps=781.9 (sample/flame)
|
||||
#endif
|
||||
sndstream.buffer = (SINT32 *)_MALLOC((samples + reserve) * 2
|
||||
* sizeof(SINT32), "stream");
|
||||
|
@ -15,9 +15,6 @@ typedef void (SOUNDCALL * SOUNDCB)(void *hdl, SINT32 *pcm, UINT count);
|
||||
|
||||
typedef struct {
|
||||
UINT rate;
|
||||
// CDDATvOf[^Ôø«Ìœß̬×H
|
||||
UINT cddaskip;
|
||||
//
|
||||
UINT32 hzbase;
|
||||
UINT32 clockbase;
|
||||
UINT32 minclock;
|
||||
|
Loading…
Reference in New Issue
Block a user