update to Mednafen 0.9.39-unstable : spu, timer
This commit is contained in:
parent
aff26ee02e
commit
25a9c1e5d6
|
@ -105,4 +105,6 @@
|
|||
[OK] psx/mdec : (c), opts,
|
||||
[NO] psx/psx : cheats support
|
||||
[OK] psx/psx : (c), cnf parse
|
||||
[OK] psx/sio : (c)
|
||||
[OK] psx/sio : (c)
|
||||
[OK] psx/spu : (c), comments, inline
|
||||
[OK] psx/timer : (c), comments
|
|
@ -1,19 +1,25 @@
|
|||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/******************************************************************************/
|
||||
/* Mednafen Sony PS1 Emulation Module */
|
||||
/******************************************************************************/
|
||||
/* spu.cpp:
|
||||
** Copyright (C) 2011-2016 Mednafen Team
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License
|
||||
** as published by the Free Software Foundation; either version 2
|
||||
** of the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#pragma GCC optimize ("unroll-loops")
|
||||
|
||||
/* TODO:
|
||||
Note to self: Emulating the SPU at more timing accuracy than sample, and emulating the whole SPU RAM write port FIFO thing and hypothetical periodic FIFO commit to
|
||||
|
@ -465,7 +471,7 @@ void PS_SPU::CacheEnvelope(SPU_Voice *voice)
|
|||
ADSR->SustainLevel = (Sl + 1) << 11;
|
||||
}
|
||||
|
||||
void PS_SPU::ResetEnvelope(SPU_Voice *voice)
|
||||
INLINE void PS_SPU::ResetEnvelope(SPU_Voice *voice)
|
||||
{
|
||||
SPU_ADSR *ADSR = &voice->ADSR;
|
||||
|
||||
|
@ -474,7 +480,7 @@ void PS_SPU::ResetEnvelope(SPU_Voice *voice)
|
|||
ADSR->Phase = ADSR_ATTACK;
|
||||
}
|
||||
|
||||
void PS_SPU::ReleaseEnvelope(SPU_Voice *voice)
|
||||
INLINE void PS_SPU::ReleaseEnvelope(SPU_Voice *voice)
|
||||
{
|
||||
SPU_ADSR *ADSR = &voice->ADSR;
|
||||
|
||||
|
@ -483,7 +489,7 @@ void PS_SPU::ReleaseEnvelope(SPU_Voice *voice)
|
|||
}
|
||||
|
||||
|
||||
void PS_SPU::RunEnvelope(SPU_Voice *voice)
|
||||
INLINE void PS_SPU::RunEnvelope(SPU_Voice *voice)
|
||||
{
|
||||
SPU_ADSR *ADSR = &voice->ADSR;
|
||||
int increment;
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
/******************************************************************************/
|
||||
/* Mednafen Sony PS1 Emulation Module */
|
||||
/******************************************************************************/
|
||||
/* spu.h:
|
||||
** Copyright (C) 2011-2016 Mednafen Team
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License
|
||||
** as published by the Free Software Foundation; either version 2
|
||||
** of the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MDFN_PSX_SPU_H
|
||||
#define __MDFN_PSX_SPU_H
|
||||
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
/******************************************************************************/
|
||||
/* Mednafen Sony PS1 Emulation Module */
|
||||
/******************************************************************************/
|
||||
/* spu_reverb.inc:
|
||||
** Copyright (C) 2011-2016 Mednafen Team
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License
|
||||
** as published by the Free Software Foundation; either version 2
|
||||
** of the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
static int16 ReverbSat(int32 samp) MDFN_WARN_UNUSED_RESULT;
|
||||
static INLINE int16 ReverbSat(int32 samp)
|
||||
{
|
||||
|
@ -104,7 +125,7 @@ static int32 IIASM(const int16 IIR_ALPHA, const int16 insamp)
|
|||
//
|
||||
// Take care to thoroughly test the reverb resampling code when modifying anything that uses RvbResPos.
|
||||
//
|
||||
void PS_SPU::RunReverb(const int32* in, int32* out)
|
||||
INLINE void PS_SPU::RunReverb(const int32* in, int32* out)
|
||||
{
|
||||
int32 upsampled[2] = { 0, 0 };
|
||||
|
||||
|
|
|
@ -1,19 +1,25 @@
|
|||
/* Mednafen - Multi-system Emulator
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/******************************************************************************/
|
||||
/* Mednafen Sony PS1 Emulation Module */
|
||||
/******************************************************************************/
|
||||
/* timer.cpp:
|
||||
** Copyright (C) 2011-2016 Mednafen Team
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License
|
||||
** as published by the Free Software Foundation; either version 2
|
||||
** of the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#pragma GCC optimize ("unroll-loops")
|
||||
|
||||
#include <assert.h>
|
||||
#include "psx.h"
|
||||
|
@ -50,7 +56,8 @@
|
|||
|
||||
Overflow/Carry flag 0x1000
|
||||
Cleared on mode/status read.
|
||||
Set when counter overflows from 0xFFFF->0.
|
||||
Set repeatedly after counter overflows from 0xFFFF->0 while before the next clocking(FIXME: currently not emulated correctly in respect
|
||||
to the constant/repeated setting after an overflow but before the next clocking).
|
||||
|
||||
Hidden flags:
|
||||
IRQ done
|
||||
|
|
|
@ -1,3 +1,24 @@
|
|||
/******************************************************************************/
|
||||
/* Mednafen Sony PS1 Emulation Module */
|
||||
/******************************************************************************/
|
||||
/* timer.h:
|
||||
** Copyright (C) 2011-2016 Mednafen Team
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License
|
||||
** as published by the Free Software Foundation; either version 2
|
||||
** of the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MDFN_PSX_TIMER_H
|
||||
#define __MDFN_PSX_TIMER_H
|
||||
|
||||
|
|
Loading…
Reference in New Issue