From 4374fe5974dab519355e865f5eb54b96296734f8 Mon Sep 17 00:00:00 2001 From: Andrea Zoppi Date: Thu, 2 May 2024 22:29:56 +0200 Subject: [PATCH] Fixed tremolo updates --- include/aymo_ymf262_arm_neon.h | 2 +- src/aymo_ymf262_none.c | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/include/aymo_ymf262_arm_neon.h b/include/aymo_ymf262_arm_neon.h index d63b24c..d986b50 100644 --- a/include/aymo_ymf262_arm_neon.h +++ b/include/aymo_ymf262_arm_neon.h @@ -239,12 +239,12 @@ struct aymo_(chip) { uint8_t rm_hh_bit8; uint8_t rm_tc_bit3; uint8_t rm_tc_bit5; + uint8_t eg_tremoloreq; uint8_t eg_tremolopos; uint8_t eg_tremoloshift; uint8_t eg_vibshift; uint8_t pg_vibpos; uint8_t process_all_slots; - uint8_t pad32_[1]; struct aymo_ymf262_chip_regs chip_regs; struct aymo_ymf262_slot_regs slot_regs[AYMO_(SLOT_NUM_MAX)]; diff --git a/src/aymo_ymf262_none.c b/src/aymo_ymf262_none.c index 889bc8d..8844a88 100644 --- a/src/aymo_ymf262_none.c +++ b/src/aymo_ymf262_none.c @@ -101,15 +101,6 @@ void aymo_(write)(struct aymo_(chip)* chip, uint16_t address, uint8_t value) assert(chip); OPL3_WriteReg(&chip->opl3, address, value); - - // Fix tremolo updates delayed w.r.t. AYMO - if (address == 0xBDu) { - uint8_t tremolopos = chip->opl3.tremolopos; - if (tremolopos >= 105u) { - tremolopos = (210u - tremolopos); - } - chip->opl3.tremolo = (tremolopos >> chip->opl3.tremoloshift); - } }