Merge pull request #1635 from 86Box/master
Bring the branch up to par with master.
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||||
*
|
*
|
||||||
* Copyright 2018,2019 Miran Grca.
|
* Copyright 2018-2021 Miran Grca.
|
||||||
*/
|
*/
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|||||||
@@ -120,7 +120,11 @@ void codegen_allocator_clean_blocks(struct mem_block_t *block)
|
|||||||
#if defined __ARM_EABI__ || defined _ARM_ || defined __aarch64__ || defined _M_ARM || defined _M_ARM64
|
#if defined __ARM_EABI__ || defined _ARM_ || defined __aarch64__ || defined _M_ARM || defined _M_ARM64
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
#ifndef _MSC_VER
|
||||||
__clear_cache(&mem_block_alloc[block->offset], &mem_block_alloc[block->offset + MEM_BLOCK_SIZE]);
|
__clear_cache(&mem_block_alloc[block->offset], &mem_block_alloc[block->offset + MEM_BLOCK_SIZE]);
|
||||||
|
#else
|
||||||
|
FlushInstructionCache(GetCurrentProcess(), &mem_block_alloc[block->offset], MEM_BLOCK_SIZE);
|
||||||
|
#endif
|
||||||
if (block->next)
|
if (block->next)
|
||||||
block = &mem_blocks[block->next - 1];
|
block = &mem_blocks[block->next - 1];
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ int codegen_can_unroll_full(codeblock_t *block, ir_data_t *ir, uint32_t next_pc,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
max_unroll = UNROLL_MAX_UOPS / ((ir->wr_pos-start)+6);
|
max_unroll = UNROLL_MAX_UOPS / ((ir->wr_pos-start)+6);
|
||||||
if (max_unroll > (UNROLL_MAX_REG_REFERENCES / max_version_refcount))
|
if ((max_version_refcount != 0) && (max_unroll > (UNROLL_MAX_REG_REFERENCES / max_version_refcount)))
|
||||||
max_unroll = (UNROLL_MAX_REG_REFERENCES / max_version_refcount);
|
max_unroll = (UNROLL_MAX_REG_REFERENCES / max_version_refcount);
|
||||||
if (max_unroll > UNROLL_MAX_COUNT)
|
if (max_unroll > UNROLL_MAX_COUNT)
|
||||||
max_unroll = UNROLL_MAX_COUNT;
|
max_unroll = UNROLL_MAX_COUNT;
|
||||||
|
|||||||
@@ -299,6 +299,37 @@ static inline double high_cut_iir(int c, int i, double NewSample) {
|
|||||||
return y[c][i][0];
|
return y[c][i][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* fc=5.283kHz, gain=-9.477dB, width=0.4845 */
|
||||||
|
static inline double deemph_iir(int i, double NewSample) {
|
||||||
|
double ACoef[NCoef+1] = {
|
||||||
|
0.46035077886318842566,
|
||||||
|
-0.28440821191249848754,
|
||||||
|
0.03388877229118691936
|
||||||
|
};
|
||||||
|
|
||||||
|
double BCoef[NCoef+1] = {
|
||||||
|
1.00000000000000000000,
|
||||||
|
-1.05429146278569141337,
|
||||||
|
0.26412280202756849290
|
||||||
|
};
|
||||||
|
static double y[2][NCoef+1]; /* output samples */
|
||||||
|
static double x[2][NCoef+1]; /* input samples */
|
||||||
|
int n;
|
||||||
|
|
||||||
|
/* shift the old samples */
|
||||||
|
for(n=NCoef; n>0; n--) {
|
||||||
|
x[i][n] = x[i][n-1];
|
||||||
|
y[i][n] = y[i][n-1];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Calculate the new output */
|
||||||
|
x[i][0] = NewSample;
|
||||||
|
y[i][0] = ACoef[0] * x[i][0];
|
||||||
|
for(n=1; n<=NCoef; n++)
|
||||||
|
y[i][0] += ACoef[n] * x[i][n] - BCoef[n] * y[i][n];
|
||||||
|
|
||||||
|
return y[i][0];
|
||||||
|
}
|
||||||
|
|
||||||
#undef NCoef
|
#undef NCoef
|
||||||
#define NCoef 2
|
#define NCoef 2
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
#include <86box/timer.h>
|
#include <86box/timer.h>
|
||||||
#include <86box/sound.h>
|
#include <86box/sound.h>
|
||||||
#include <86box/midi.h>
|
#include <86box/midi.h>
|
||||||
#include <86box/snd_mpu401.h>
|
|
||||||
#include <86box/snd_ac97.h>
|
#include <86box/snd_ac97.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -27,8 +26,6 @@
|
|||||||
static float low_fir_es1371_coef[ES1371_NCoef];
|
static float low_fir_es1371_coef[ES1371_NCoef];
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
mpu_t mpu;
|
|
||||||
|
|
||||||
uint8_t pci_command, pci_serr;
|
uint8_t pci_command, pci_serr;
|
||||||
|
|
||||||
uint32_t base_addr;
|
uint32_t base_addr;
|
||||||
@@ -897,7 +894,7 @@ static uint8_t es1371_pci_read(int func, int addr, void *p)
|
|||||||
case 0x04: return es1371->pci_command;
|
case 0x04: return es1371->pci_command;
|
||||||
case 0x05: return es1371->pci_serr;
|
case 0x05: return es1371->pci_serr;
|
||||||
|
|
||||||
case 0x06: return 0x10; /* Supports support ACPI */
|
case 0x06: return 0x10; /* Supports ACPI */
|
||||||
case 0x07: return 0x00;
|
case 0x07: return 0x00;
|
||||||
|
|
||||||
case 0x08: return 0x02; /* Revision ID */
|
case 0x08: return 0x02; /* Revision ID */
|
||||||
|
|||||||
Reference in New Issue
Block a user