ESFM: add "fast" mode

alters ESFMu to add a fast feedback calculation path
This commit is contained in:
tildearrow 2024-03-11 13:21:50 -05:00
parent 3e645e58f2
commit 0ac63d817d
12 changed files with 63 additions and 6 deletions

View file

@ -983,7 +983,7 @@ int DivPlatformESFM::getRegisterPoolSize() {
void DivPlatformESFM::reset() {
while (!writes.empty()) writes.pop();
ESFM_init(&chip);
ESFM_init(&chip,isFast?1:0);
// set chip to native mode
ESFM_write_reg(&chip, 0x105, 0x80);
// ensure NTS bit in register 0x408 is reset, for smooth envelope rate scaling
@ -1053,6 +1053,10 @@ void DivPlatformESFM::setFlags(const DivConfig& flags) {
rate=chipClock/288.0;
}
void DivPlatformESFM::setFast(bool fast) {
isFast=fast;
}
int DivPlatformESFM::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
parent=p;
dumpWrites=false;