Update lazyusf rsp hle

CQTexperiment
Chris Moeller 2015-02-07 17:57:52 -08:00
parent d6c6b18431
commit f98f9c7694
9 changed files with 15 additions and 79 deletions

View File

@ -21,16 +21,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _MSC_VER
#include <stdbool.h>
#else
#include "mystdbool.h"
#endif
#include <stdint.h>
#include <string.h>
#include "common.h"
#include "alist.h"
#include "arithmetics.h"
#include "audio.h"
@ -409,7 +403,7 @@ void alist_envmix_ge(
}
count >>= 1;
for (k = 0; k < count; k++) {
for (k = 0; k < count; ++k) {
int16_t gains[4];
int16_t* buffers[4];
int16_t l_vol = ramp_step(&ramps[0]);
@ -980,18 +974,16 @@ void alist_iirf(
{
int16_t *dst = (int16_t*)(hle->alist_buffer + dmemo);
int32_t i, prev;
int16_t frame[8];
int16_t frame[8];
int16_t ibuf[4];
uint16_t index = 7;
count = align(count, 16);
#define vmulf(a, b) (((a)*(b)+0x4000)>>15)
if(init)
{
for(i = 0; i < 8; i++)
for(i = 0; i < 8; ++i)
frame[i] = 0;
ibuf[1] = 0;
ibuf[2] = 0;
@ -1007,10 +999,10 @@ void alist_iirf(
prev = vmulf(table[9], frame[6]) * 2;
do
{
for(i = 0; i < 8; i++)
for(i = 0; i < 8; ++i)
{
int32_t accu;
ibuf[index&3] = *alist_s16(hle, dmemi);
ibuf[index&3] = *alist_s16(hle, dmemi);
accu = prev + vmulf(table[0], ibuf[index&3]) + vmulf(table[1], ibuf[(index-1)&3]) + vmulf(table[0], ibuf[(index-2)&3]);
accu += vmulf(table[8], frame[index]) * 2;
@ -1024,8 +1016,8 @@ void alist_iirf(
count -= 0x10;
} while (count > 0);
dram_store_u16(hle, &frame[6], address + 4, 4);
dram_store_u16(hle, (int16_t*)&ibuf[(index-2)&3], address+8, 2);
dram_store_u16(hle, (int16_t*)&ibuf[(index-1)&3], address+10, 2);
dram_store_u16(hle, (uint16_t*)&frame[6], address + 4, 4);
dram_store_u16(hle, (uint16_t*)&ibuf[(index-2)&3], address+8, 2);
dram_store_u16(hle, (uint16_t*)&ibuf[(index-1)&3], address+10, 2);
}

View File

@ -22,11 +22,7 @@
#ifndef ALIST_INTERNAL_H
#define ALIST_INTERNAL_H
#ifndef _MSC_VER
#include <stdbool.h>
#else
#include "mystdbool.h"
#endif
#include <stdint.h>
#include <stddef.h>

View File

@ -21,11 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _MSC_VER
#include <stdbool.h>
#else
#include "mystdbool.h"
#endif
#include <stdint.h>
#include <string.h>

View File

@ -21,11 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _MSC_VER
#include <stdbool.h>
#else
#include "mystdbool.h"
#endif
#include <stdint.h>
#include "common.h"

View File

@ -21,11 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _MSC_VER
#include <stdbool.h>
#else
#include "mystdbool.h"
#endif
#include <stdint.h>
#include "common.h"

View File

@ -24,6 +24,8 @@
#include <stdint.h>
#include "common.h"
static inline int16_t clamp_s16(int_fast32_t x)
{
x = (x < INT16_MIN) ? INT16_MIN: x;
@ -32,5 +34,10 @@ static inline int16_t clamp_s16(int_fast32_t x)
return x;
}
static inline int32_t vmulf(int16_t x, int16_t y)
{
return (((int32_t)(x))*((int32_t)(y))+0x4000)>>15;
}
#endif

View File

@ -21,11 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _MSC_VER
#include <stdbool.h>
#else
#include "mystdbool.h"
#endif
#include <stdint.h>
#ifdef ENABLE_TASK_DUMP

View File

@ -19,11 +19,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _MSC_VER
#include <stdbool.h>
#else
#include "mystdbool.h"
#endif
#include <stdint.h>
#include <string.h>
#include <stddef.h>

View File

@ -1,39 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Mupen64plus-rsp-hle - alist_internal.h *
* Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
* Copyright (C) 2014 Bobby Smiles *
* *
* 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 _MYSTDBOOL_H_
#define _MYSTDBOOL_H_
#pragma once
typedef unsigned char my_bool;
enum { my_b_false = 0 };
enum { my_b_true = 1 };
#undef bool
#undef true
#undef false
#define bool my_bool
#define true my_b_true
#define false my_b_false
#endif