OPL3/OPNFMOnSFG: Correctly round the clock for multiples of 315 / 88 MHz.
2 files changed, 3 insertions(+), 3 deletions(-)

M src/drivers/OPL3.asm
M src/drivers/emulations/OPNFMOnSFG.asm
M src/drivers/OPL3.asm +1 -1
@@ 8,7 8,7 @@ OPL3_FM_DATA: equ 01H
 OPL3_FM2_ADDRESS: equ 02H
 OPL3_FM2_DATA: equ 03H
 OPL3_FM2_NEW: equ 05H
-OPL3_CLOCK: equ 14318181
+OPL3_CLOCK: equ 14318182
 OPL3_TIMER_1: equ 02H
 OPL3_FLAG_CONTROL: equ 04H
 

          
M src/drivers/emulations/OPNFMOnSFG.asm +2 -2
@@ 330,7 330,7 @@ OPNFMOnSFG_WriteSFGRegister:
 	ld bc,OPNFMOnSFG.WriteRegister.WriteSFGRegister
 	jp Utils_JumpIXOffsetBC
 
-; de = offset; 65536 * (log2((7159090 / 2^11 / 144) / 27.5) + 8/12 + 0.5/12/64)
+; de = offset; 65536 * (log2((7159091 / 2^11 / 144) / 27.5) + 8/12 + 0.5/12/64)
 ;                             frequency               A0      A-C#   rounding
 ; ix = this
 OPNFMOnSFG_SetFrequencyOffset:

          
@@ 359,7 359,7 @@ OPNFMOnSFG_BlockFNumToFloat:
 	ld b,a
 	ret
 
-; de = offset; 65536 * (log2((7159090 / 2^11 / 144) / 27.5) + 8/12 + 0.5/12/64)
+; de = offset; 65536 * (log2((7159091 / 2^11 / 144) / 27.5) + 8/12 + 0.5/12/64)
 ;                             frequency               A0      A-C#   rounding
 ; b.hl = octave.fraction (OPN)
 ; b.hl <- octave.fraction (OPM)