core quality, part 2
- Bubble System WSG - C64 (dSID) - Game Boy - DS - PowerNoise
This commit is contained in:
parent
a1254d5fb6
commit
cb1f268335
12 changed files with 175 additions and 12 deletions
|
|
@ -23,7 +23,6 @@
|
|||
#include <math.h>
|
||||
|
||||
#define CHIP_DIVIDER 32
|
||||
#define CLOCK_DIVIDER 128 // for match to output rate
|
||||
|
||||
#define rRead8(a) (nds.read8(a))
|
||||
#define rWrite8(a,v) {if(!skipRegisterWrites) {nds.write8((a),(v)); regPool[(a)]=(v); if(dumpWrites) addWrite((a),(v)); }}
|
||||
|
|
@ -71,7 +70,7 @@ const char** DivPlatformNDS::getRegisterSheet() {
|
|||
|
||||
void DivPlatformNDS::acquire(short** buf, size_t len) {
|
||||
for (size_t i=0; i<len; i++) {
|
||||
nds.tick(CLOCK_DIVIDER);
|
||||
nds.tick(coreQuality);
|
||||
int lout=((nds.loutput()-0x200)<<5); // scale to 16 bit
|
||||
int rout=((nds.routput()-0x200)<<5); // scale to 16 bit
|
||||
if (lout>32767) lout=32767;
|
||||
|
|
@ -561,13 +560,39 @@ void DivPlatformNDS::renderSamples(int sysID) {
|
|||
void DivPlatformNDS::setFlags(const DivConfig& flags) {
|
||||
isDSi=flags.getBool("chipType",0);
|
||||
chipClock=33513982;
|
||||
rate=chipClock/2/CLOCK_DIVIDER;
|
||||
rate=chipClock/2/coreQuality;
|
||||
for (int i=0; i<16; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
memCompo.capacity=(isDSi?16777216:4194304);
|
||||
}
|
||||
|
||||
void DivPlatformNDS::setCoreQuality(unsigned char q) {
|
||||
switch (q) {
|
||||
case 0:
|
||||
coreQuality=1024;
|
||||
break;
|
||||
case 1:
|
||||
coreQuality=512;
|
||||
break;
|
||||
case 2:
|
||||
coreQuality=256;
|
||||
break;
|
||||
case 3:
|
||||
coreQuality=128;
|
||||
break;
|
||||
case 4:
|
||||
coreQuality=32;
|
||||
break;
|
||||
case 5:
|
||||
coreQuality=8;
|
||||
break;
|
||||
default:
|
||||
coreQuality=128;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformNDS::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue