Testing: added Super Game Boy audio mixing test function.

This commit is contained in:
byuu 2019-12-09 00:08:37 +09:00
parent 6aa7c944d5
commit f5d40bd1ee
2 changed files with 10 additions and 3 deletions

View File

@ -40,7 +40,6 @@ namespace SameBoy {
float left = sample->left / 32768.0f;
float right = sample->right / 32768.0f;
icd.apuWrite(left, right);
//print(dsp.stream->pending(), " ", icd.stream->pending(), "\n");
}
static auto vblank(GB_gameboy_t*) -> void {
@ -59,6 +58,14 @@ auto ICD::Enter() -> void {
}
auto ICD::main() -> void {
#if 0
static uint n = 0;
float x = sin((2 * 3.141592 * n++ * 1000.0) / 44100.0) * 0.1;
apuWrite(x, x);
step(128);
return synchronizeCPU();
#endif
if(r6003 & 0x80) {
auto clocks = GB_run(&sameboy);
step(clocks >> 1);

View File

@ -65,8 +65,8 @@ auto DSP::power(bool reset) -> void {
}
if(configuration.hacks.hotfixes) {
//Magical Drop (Japan) does not initialize the DSP registers at startup.
//Tokoton mode will hang forever in some instances even on real hardware.
//Magical Drop (Japan) does not initialize the DSP registers at startup:
//tokoton mode will hang forever in some instances even on real hardware.
if(cartridge.headerTitle() == "MAGICAL DROP") {
for(uint address : range(0x80)) spc_dsp.write(address, 0xff);
}