PV-1000: more accurate emulation
This commit is contained in:
parent
09a30570de
commit
293d2b8775
|
@ -459,7 +459,7 @@ src/engine/platform/sound/ga20/iremga20.cpp
|
|||
|
||||
src/engine/platform/sound/sm8521.c
|
||||
|
||||
src/engine/platform/sound/d65010g031.c
|
||||
src/engine/platform/sound/d65modified.c
|
||||
|
||||
src/engine/platform/oplAInterface.cpp
|
||||
src/engine/platform/ym2608Interface.cpp
|
||||
|
|
|
@ -40,7 +40,7 @@ void DivPlatformPV1000::acquire(short** buf, size_t len) {
|
|||
for (size_t h=0; h<len; h++) {
|
||||
short samp;
|
||||
samp=d65010g031_sound_tick(&d65010g031,1);
|
||||
buf[0][h]=samp<<12;
|
||||
buf[0][h]=samp;
|
||||
for (int i=0; i<3; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=(d65010g031.square[i].out<<12);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define _PV1000_H
|
||||
|
||||
#include "../dispatch.h"
|
||||
#include "sound/d65010g031.h"
|
||||
#include "sound/d65modified.h"
|
||||
#include <queue>
|
||||
|
||||
class DivPlatformPV1000: public DivDispatch {
|
||||
|
|
|
@ -34,9 +34,31 @@ freely, subject to the following restrictions:
|
|||
TODO:
|
||||
- needs hardware test
|
||||
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
ALTERED VERSION!!!
|
||||
|
||||
|
||||
THIS IS **NOT** NOT NOT NOT!!!! THE ORIGINAL SOFTWARE
|
||||
IT ISN'T
|
||||
THE MODIFICATIONS THAT WERE MADE ARE:
|
||||
|
||||
1. FIX VOLUMES - APPARENTLY THE SQUARES HAVE DIFFERENT VOLUMES (thanks forple)
|
||||
|
||||
*/
|
||||
|
||||
#include "d65010g031.h"
|
||||
#include "d65modified.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
static int d65010g031_max(int a, int b) { return (a > b) ? a : b; }
|
||||
|
@ -57,12 +79,20 @@ int d65010g031_square_tick(struct d65010g031_square_t *square, const int cycle)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// this is the bit I altered
|
||||
// THIS IS **NOT** THE ORIGINAL SOFTWARE! I am plainly marking it as such!
|
||||
const int d65Volumes[3]={
|
||||
3840,
|
||||
5120,
|
||||
8192
|
||||
};
|
||||
|
||||
int d65010g031_sound_tick(struct d65010g031_t *d65010g031, const int cycle)
|
||||
{
|
||||
int out = 0;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
out += d65010g031_square_tick(&d65010g031->square[i], cycle);
|
||||
out += d65010g031_square_tick(&d65010g031->square[i], cycle)?d65Volumes[i]:-d65Volumes[i];
|
||||
}
|
||||
return out;
|
||||
}
|
Loading…
Reference in a new issue