Created
February 17, 2021 21:07
-
-
Save jpcima/d1aa24644df26515eaf88b5c54604319 to your computer and use it in GitHub Desktop.
BambooTracker Nuked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/BambooTracker/chip/nuked/ym3438.c b/BambooTracker/chip/nuked/ym3438.c | |
index d1507ca..c2e8b64 100644 | |
--- a/BambooTracker/chip/nuked/ym3438.c | |
+++ b/BambooTracker/chip/nuked/ym3438.c | |
@@ -39,7 +39,7 @@ | |
#include "ym3438.h" | |
/*OPN-MOD: define the quantization in bits at which channels clip*/ | |
-static const unsigned channel_clipbits = 11; /*YM2612 has 9 bits*/ | |
+static const unsigned channel_clipbits = 13; /*YM2612 has 9 bits*/ | |
enum { | |
eg_num_attack = 0, | |
@@ -1100,7 +1100,7 @@ void OPN2_ChGenerate(ym3438_t *chip) | |
} | |
if (fm_algorithm[op][5][chip->connect[channel]] && !test_dac) | |
{ | |
- add += chip->fm_out[slot] >> 5; | |
+ add += chip->fm_out[slot] >> 1; | |
} | |
sum = acc + add; | |
/* Clamp */ | |
@@ -1697,8 +1697,8 @@ void OPN2_Clock(ym3438_t *chip, Bit16s *buffer) | |
chip->cycles = (chip->cycles + 1) % 24; | |
chip->channel = chip->cycles % 6; | |
- buffer[0] = chip->mol; | |
- buffer[1] = chip->mor; | |
+ buffer[0] = chip->mol >> 4; | |
+ buffer[1] = chip->mor >> 4; | |
/*OPN-MOD: Rhythm output*/ | |
buffer[2] = *rhythml; | |
buffer[3] = *rhythmr; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment